mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-18 13:16:34 +00:00
Removed trailing whitespace from the source lines that are different
from the qla2xxx driver source code in the 2.6.26 kernel. Verified that the output of svn diff -x -w is empty for this commit. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1165 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
+41
-41
@@ -46,13 +46,13 @@ qla2x00_store_class2_enabled(struct device *dev,
|
||||
spin_lock_irqsave(&ha->hardware_lock, flags);
|
||||
|
||||
switch (buffer[0]) {
|
||||
case '0' :
|
||||
case '0':
|
||||
if (ha->enable_class_2) {
|
||||
ha->enable_class_2 = 0;
|
||||
reset = 1;
|
||||
}
|
||||
break;
|
||||
case '1' :
|
||||
case '1':
|
||||
if (!ha->enable_class_2) {
|
||||
if (ha->fw_attributes & __constant_cpu_to_le32(BIT_0)) {
|
||||
qla_printk(KERN_INFO, ha, "Enabling class 2 "
|
||||
@@ -89,8 +89,8 @@ out_unlock:
|
||||
goto out;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(class2_enabled,
|
||||
S_IRUGO|S_IWUSR,
|
||||
static DEVICE_ATTR(class2_enabled,
|
||||
S_IRUGO|S_IWUSR,
|
||||
qla2x00_show_class2_enabled,
|
||||
qla2x00_store_class2_enabled);
|
||||
|
||||
@@ -126,10 +126,10 @@ qla2x00_store_tgt_enabled(struct device *dev,
|
||||
}
|
||||
|
||||
switch (buffer[0]) {
|
||||
case '0' :
|
||||
case '0':
|
||||
res = qla_target.tgt_host_action(ha, DISABLE_TARGET_MODE);
|
||||
break;
|
||||
case '1' :
|
||||
case '1':
|
||||
res = qla_target.tgt_host_action(ha, ENABLE_TARGET_MODE);
|
||||
break;
|
||||
default:
|
||||
@@ -149,8 +149,8 @@ out:
|
||||
return res;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(target_mode_enabled,
|
||||
S_IRUGO|S_IWUSR,
|
||||
static DEVICE_ATTR(target_mode_enabled,
|
||||
S_IRUGO|S_IWUSR,
|
||||
qla2x00_show_tgt_enabled,
|
||||
qla2x00_store_tgt_enabled);
|
||||
|
||||
@@ -180,12 +180,12 @@ qla2x00_store_expl_conf_enabled(struct device *dev,
|
||||
spin_lock_irqsave(&ha->hardware_lock, flags);
|
||||
|
||||
switch (buffer[0]) {
|
||||
case '0' :
|
||||
case '0':
|
||||
ha->enable_explicit_conf = 0;
|
||||
printk("qla2xxx(%ld): explicit conformation disabled\n",
|
||||
ha->instance);
|
||||
break;
|
||||
case '1' :
|
||||
case '1':
|
||||
ha->enable_explicit_conf = 1;
|
||||
printk("qla2xxx(%ld): explicit conformation enabled\n",
|
||||
ha->instance);
|
||||
@@ -203,8 +203,8 @@ qla2x00_store_expl_conf_enabled(struct device *dev,
|
||||
return size;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(explicit_conform_enabled,
|
||||
S_IRUGO|S_IWUSR,
|
||||
static DEVICE_ATTR(explicit_conform_enabled,
|
||||
S_IRUGO|S_IWUSR,
|
||||
qla2x00_show_expl_conf_enabled,
|
||||
qla2x00_store_expl_conf_enabled);
|
||||
|
||||
@@ -227,11 +227,11 @@ qla2x00_show_resource_counts(struct device *dev,
|
||||
rval = qla2x00_mailbox_command(ha, &mc);
|
||||
|
||||
if (rval != QLA_SUCCESS) {
|
||||
size = scnprintf(buffer, max_size,
|
||||
"Mailbox Command failed %d, mb %#x",
|
||||
size = scnprintf(buffer, max_size,
|
||||
"Mailbox Command failed %d, mb %#x",
|
||||
rval, mc.mb[0]);
|
||||
} else {
|
||||
size = scnprintf(buffer, max_size,
|
||||
size = scnprintf(buffer, max_size,
|
||||
"immed_notify\t%d\ncommand\t\t%d\n",
|
||||
mc.mb[2], mc.mb[1]);
|
||||
}
|
||||
@@ -263,7 +263,7 @@ qla2x00_show_port_database(struct device *dev,
|
||||
port_data_t *pmap;
|
||||
ulong dma_size = 0x100*sizeof(*pmap);
|
||||
|
||||
pmap = (port_data_t*)dma_alloc_coherent(&ha->pdev->dev, dma_size,
|
||||
pmap = (port_data_t*)dma_alloc_coherent(&ha->pdev->dev, dma_size,
|
||||
&pmap_dma, GFP_KERNEL);
|
||||
if (pmap == NULL) {
|
||||
size = scnprintf(buffer, max_size, "DMA Alloc failed of %ld",
|
||||
@@ -286,30 +286,30 @@ qla2x00_show_port_database(struct device *dev,
|
||||
rval = qla2x00_mailbox_command(ha, &mc);
|
||||
|
||||
if (rval != QLA_SUCCESS) {
|
||||
size = scnprintf(buffer, max_size,
|
||||
"Mailbox Command failed %d, mb0 %#x mb1 %#x\n",
|
||||
size = scnprintf(buffer, max_size,
|
||||
"Mailbox Command failed %d, mb0 %#x mb1 %#x\n",
|
||||
rval, mc.mb[0], mc.mb[1]);
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
entries = le16_to_cpu(mc.mb[1])/sizeof(*pmap);
|
||||
|
||||
size += scnprintf(buffer+size, max_size-size,
|
||||
|
||||
size += scnprintf(buffer+size, max_size-size,
|
||||
"Port Name List (%#04x) returned %d bytes\nL_ID WWPN\n",
|
||||
MBC_PORT_NODE_NAME_LIST, le16_to_cpu(mc.mb[1]));
|
||||
|
||||
for (i = 0; (i < entries) && (size < max_size); ++i) {
|
||||
size += scnprintf(buffer+size, max_size-size,
|
||||
size += scnprintf(buffer+size, max_size-size,
|
||||
"%04x %02x%02x%02x%02x%02x%02x%02x%02x\n",
|
||||
le16_to_cpu(pmap[i].loop_id),
|
||||
pmap[i].port_name[7], pmap[i].port_name[6],
|
||||
pmap[i].port_name[5], pmap[i].port_name[4],
|
||||
pmap[i].port_name[3], pmap[i].port_name[2],
|
||||
pmap[i].port_name[7], pmap[i].port_name[6],
|
||||
pmap[i].port_name[5], pmap[i].port_name[4],
|
||||
pmap[i].port_name[3], pmap[i].port_name[2],
|
||||
pmap[i].port_name[1], pmap[i].port_name[0]);
|
||||
}
|
||||
|
||||
out_free:
|
||||
dma_free_coherent(&ha->pdev->dev, dma_size, pmap, pmap_dma);
|
||||
dma_free_coherent(&ha->pdev->dev, dma_size, pmap, pmap_dma);
|
||||
|
||||
if (size < max_size) {
|
||||
dma_addr_t gid_list_dma;
|
||||
@@ -320,7 +320,7 @@ out_free:
|
||||
gid_list = dma_alloc_coherent(&ha->pdev->dev, GID_LIST_SIZE,
|
||||
&gid_list_dma, GFP_KERNEL);
|
||||
if (gid_list == NULL) {
|
||||
size += scnprintf(buffer+size, max_size-size,
|
||||
size += scnprintf(buffer+size, max_size-size,
|
||||
"Unable to allocate gid_list");
|
||||
goto out_id_list_failed;
|
||||
}
|
||||
@@ -329,17 +329,17 @@ out_free:
|
||||
rval = qla2x00_get_id_list(ha, gid_list, gid_list_dma,
|
||||
&entries);
|
||||
if (rval != QLA_SUCCESS) {
|
||||
size += scnprintf(buffer+size, max_size-size,
|
||||
size += scnprintf(buffer+size, max_size-size,
|
||||
"qla2x00_get_id_list failed: %d",
|
||||
rval);
|
||||
goto out_free_id_list;
|
||||
}
|
||||
|
||||
size += scnprintf(buffer+size, max_size-size,
|
||||
|
||||
size += scnprintf(buffer+size, max_size-size,
|
||||
"\nGet ID List (0x007C) returned %d entries\n"
|
||||
"L_ID PortID\n",
|
||||
entries);
|
||||
|
||||
|
||||
id_iter = (char *)gid_list;
|
||||
for (i = 0; (i < entries) && (size < max_size); ++i) {
|
||||
gid = (struct gid_list_info *)id_iter;
|
||||
@@ -359,7 +359,7 @@ out_free:
|
||||
gid->area,
|
||||
gid->al_pa,
|
||||
gid->loop_id_2100);
|
||||
|
||||
|
||||
}
|
||||
id_iter += ha->gid_list_info_size;
|
||||
}
|
||||
@@ -373,8 +373,8 @@ out_id_list_failed:
|
||||
fc_port_t *fcport;
|
||||
char * state;
|
||||
char port_type[] = "URSBIT";
|
||||
|
||||
size += scnprintf(buffer+size, max_size-size,
|
||||
|
||||
size += scnprintf(buffer+size, max_size-size,
|
||||
"\nfc_ports database\n");
|
||||
|
||||
list_for_each_entry_rcu(fcport, &ha->fcports, list) {
|
||||
@@ -390,8 +390,8 @@ out_id_list_failed:
|
||||
case FCS_FAILOVER_FAILED : state = "Failover Failed"; break;
|
||||
default: state = "Unknown"; break;
|
||||
}
|
||||
|
||||
size += scnprintf(buffer+size, max_size-size,
|
||||
|
||||
size += scnprintf(buffer+size, max_size-size,
|
||||
"%04x %02x%02x%02x "
|
||||
"%02x%02x%02x%02x%02x%02x%02x%02x "
|
||||
"%c %s\n",
|
||||
@@ -399,9 +399,9 @@ out_id_list_failed:
|
||||
fcport->d_id.b.domain,
|
||||
fcport->d_id.b.area,
|
||||
fcport->d_id.b.al_pa,
|
||||
fcport->port_name[0], fcport->port_name[1],
|
||||
fcport->port_name[2], fcport->port_name[3],
|
||||
fcport->port_name[4], fcport->port_name[5],
|
||||
fcport->port_name[0], fcport->port_name[1],
|
||||
fcport->port_name[2], fcport->port_name[3],
|
||||
fcport->port_name[4], fcport->port_name[5],
|
||||
fcport->port_name[6], fcport->port_name[7],
|
||||
port_type[fcport->port_type], state);
|
||||
}
|
||||
@@ -422,7 +422,7 @@ qla2x00_update_portdb(struct device *dev,
|
||||
|
||||
if ((buffer == NULL) || (size == 0))
|
||||
goto out;
|
||||
|
||||
|
||||
switch (buffer[0]) {
|
||||
case '2':
|
||||
qla_printk(KERN_INFO, ha, "Reconfiguring loop on %ld\n",
|
||||
@@ -1303,7 +1303,7 @@ struct device_attribute *qla2x00_host_attrs[] = {
|
||||
&dev_attr_target_mode_enabled,
|
||||
&dev_attr_explicit_conform_enabled,
|
||||
&dev_attr_resource_counts,
|
||||
&dev_attr_port_database,
|
||||
&dev_attr_port_database,
|
||||
#endif
|
||||
NULL,
|
||||
};
|
||||
@@ -1762,7 +1762,7 @@ qla2x00_init_host_attr(scsi_qla_host_t *ha)
|
||||
|
||||
fc_host_node_name(ha->host) = wwn_to_u64(ha->node_name);
|
||||
fc_host_port_name(ha->host) = wwn_to_u64(ha->port_name);
|
||||
fc_host_supported_classes(ha->host) = ha->enable_class_2 ?
|
||||
fc_host_supported_classes(ha->host) = ha->enable_class_2 ?
|
||||
(FC_COS_CLASS2|FC_COS_CLASS3) : FC_COS_CLASS3;
|
||||
fc_host_max_npiv_vports(ha->host) = ha->max_npiv_vports;;
|
||||
fc_host_npiv_vports_inuse(ha->host) = ha->cur_vport_count;
|
||||
|
||||
+1
-1
@@ -2443,7 +2443,7 @@ typedef struct scsi_qla_host {
|
||||
|
||||
struct list_head work_list;
|
||||
|
||||
/*
|
||||
/*
|
||||
* To surprise, fcports list isn't anyhow protected, although it can be
|
||||
* accessed from many contexts, including concurrently. Seems, the
|
||||
* original author of this code thought that if anything never deleted
|
||||
|
||||
+9
-9
@@ -4139,7 +4139,7 @@ fail_fw_integrity:
|
||||
* host_reset, bring up w/ Target Mode Enabled
|
||||
*/
|
||||
void
|
||||
qla2x00_enable_tgt_mode(scsi_qla_host_t *ha)
|
||||
qla2x00_enable_tgt_mode(scsi_qla_host_t *ha)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@@ -4148,7 +4148,7 @@ qla2x00_enable_tgt_mode(scsi_qla_host_t *ha)
|
||||
spin_unlock_irqrestore(&ha->hardware_lock, flags);
|
||||
|
||||
set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
|
||||
qla2xxx_wake_dpc(ha);
|
||||
qla2xxx_wake_dpc(ha);
|
||||
qla2x00_wait_for_hba_online(ha);
|
||||
}
|
||||
|
||||
@@ -4157,8 +4157,8 @@ qla2x00_enable_tgt_mode(scsi_qla_host_t *ha)
|
||||
*
|
||||
* Disable Target Mode and reset the adapter
|
||||
*/
|
||||
void
|
||||
qla2x00_disable_tgt_mode(scsi_qla_host_t *ha)
|
||||
void
|
||||
qla2x00_disable_tgt_mode(scsi_qla_host_t *ha)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@@ -4167,7 +4167,7 @@ qla2x00_disable_tgt_mode(scsi_qla_host_t *ha)
|
||||
spin_unlock_irqrestore(&ha->hardware_lock, flags);
|
||||
|
||||
set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
|
||||
qla2xxx_wake_dpc(ha);
|
||||
qla2xxx_wake_dpc(ha);
|
||||
qla2x00_wait_for_hba_online(ha);
|
||||
}
|
||||
|
||||
@@ -4198,16 +4198,16 @@ int qla2xxx_tgt_register_driver(struct qla_tgt_initiator *tgt_data,
|
||||
int res = 0;
|
||||
|
||||
ENTER(__func__);
|
||||
|
||||
|
||||
if ((tgt_data == NULL) || (tgt_data->magic != QLA2X_TARGET_MAGIC)) {
|
||||
printk("***ERROR*** Wrong version of the target mode add-on: "
|
||||
"%d\n", tgt_data->magic);
|
||||
res = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
memcpy(&qla_target, tgt_data, sizeof(qla_target));
|
||||
|
||||
|
||||
init_data->magic = QLA2X_INITIATOR_MAGIC;
|
||||
init_data->req_pkt = qla2x00_req_pkt;
|
||||
init_data->isp_cmd = qla2x00_isp_cmd;
|
||||
@@ -4217,7 +4217,7 @@ int qla2xxx_tgt_register_driver(struct qla_tgt_initiator *tgt_data,
|
||||
init_data->mark_all_devices_lost = qla2x00_mark_all_devices_lost;
|
||||
init_data->get_port_database = qla2x00_get_port_database;
|
||||
init_data->get_id_list = qla2x00_get_id_list;
|
||||
|
||||
|
||||
out:
|
||||
LEAVE(__func__);
|
||||
return res;
|
||||
|
||||
+8
-8
@@ -586,8 +586,8 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb)
|
||||
mb[2], mb[3]));
|
||||
#ifdef CONFIG_SCSI_QLA2XXX_TARGET
|
||||
DEBUG2(printk("scsi(%ld): ha state %d init_done %d "
|
||||
"oper_mode %d topo %d\n",
|
||||
ha->host_no,
|
||||
"oper_mode %d topo %d\n",
|
||||
ha->host_no,
|
||||
atomic_read(&ha->loop_state),
|
||||
ha->flags.init_done,
|
||||
ha->operating_mode,
|
||||
@@ -915,7 +915,7 @@ qla2x00_process_response_queue(struct scsi_qla_host *ha)
|
||||
case ACCEPT_TGT_IO_TYPE:
|
||||
case CONTINUE_TGT_IO_TYPE:
|
||||
case CTIO_A64_TYPE:
|
||||
case IMMED_NOTIFY_TYPE:
|
||||
case IMMED_NOTIFY_TYPE:
|
||||
case NOTIFY_ACK_TYPE:
|
||||
case ENABLE_LUN_TYPE:
|
||||
case MODIFY_LUN_TYPE:
|
||||
@@ -933,10 +933,10 @@ qla2x00_process_response_queue(struct scsi_qla_host *ha)
|
||||
case ACCEPT_TGT_IO_TYPE:
|
||||
case CONTINUE_TGT_IO_TYPE:
|
||||
case CTIO_A64_TYPE:
|
||||
case IMMED_NOTIFY_TYPE:
|
||||
case IMMED_NOTIFY_TYPE:
|
||||
case NOTIFY_ACK_TYPE:
|
||||
case ENABLE_LUN_TYPE:
|
||||
case MODIFY_LUN_TYPE:
|
||||
case MODIFY_LUN_TYPE:
|
||||
DEBUG5(printk(KERN_WARNING
|
||||
"qla2x00_response_pkt: "
|
||||
"calling tgt_response_pkt %p "
|
||||
@@ -944,9 +944,9 @@ qla2x00_process_response_queue(struct scsi_qla_host *ha)
|
||||
qla_target.tgt_response_pkt,
|
||||
pkt->entry_type););
|
||||
if (qla_target.tgt_response_pkt)
|
||||
qla_target.tgt_response_pkt(ha,
|
||||
qla_target.tgt_response_pkt(ha,
|
||||
(response_t*)pkt);
|
||||
break;
|
||||
break;
|
||||
#endif /* CONFIG_SCSI_QLA2XXX_TARGET */
|
||||
case STATUS_TYPE:
|
||||
qla2x00_status_entry(ha, pkt);
|
||||
@@ -1668,7 +1668,7 @@ qla24xx_process_response_queue(struct scsi_qla_host *ha)
|
||||
qla_target.tgt_response_pkt,
|
||||
pkt->entry_type););
|
||||
if (qla_target.tgt_response_pkt)
|
||||
qla_target.tgt_response_pkt(ha,
|
||||
qla_target.tgt_response_pkt(ha,
|
||||
(response_t*)pkt);
|
||||
break;
|
||||
#endif /* CONFIG_SCSI_QLA2XXX_TARGET */
|
||||
|
||||
+2
-2
@@ -1789,7 +1789,7 @@ qla2x00_stop_dpc_thread(scsi_qla_host_t *ha)
|
||||
ha->dpc_thread = NULL;
|
||||
}
|
||||
spin_unlock_irq(&ha->dpc_lock);
|
||||
|
||||
|
||||
if (t != NULL)
|
||||
kthread_stop(t);
|
||||
}
|
||||
@@ -1808,7 +1808,7 @@ qla2x00_remove_one(struct pci_dev *pdev)
|
||||
ha->host_shutting_down = 1;
|
||||
spin_unlock_irqrestore(&ha->hardware_lock, flags);
|
||||
}
|
||||
if (qla_target.tgt_host_action != NULL)
|
||||
if (qla_target.tgt_host_action != NULL)
|
||||
qla_target.tgt_host_action(ha, DISABLE_TARGET_MODE);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user