diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2008-03-04 14:26:54 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-03-05 13:03:54 -0500 |
commit | 024f801f528220edc89275a724ea00cd18c5ebb7 (patch) | |
tree | a7b6458a5a04282082da41c6f27e0b4d256c0aa3 /drivers | |
parent | 50a29aec9c47d26e869df83ef1d69e3b63c83bf4 (diff) |
[SCSI] qla4xxx: regression - add start scan callout
We are seeing EXIST errors from sysfs during device addition.
We need a start scan callout so we do not start scanning sessions
found during hba setup, before the async scsi scan code is ready.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: David C Somayajulu <david.somayajulu@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_os.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 10a233e65bc9..8b92f348f02c 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c | |||
@@ -75,6 +75,7 @@ static int qla4xxx_eh_host_reset(struct scsi_cmnd *cmd); | |||
75 | static int qla4xxx_slave_alloc(struct scsi_device *device); | 75 | static int qla4xxx_slave_alloc(struct scsi_device *device); |
76 | static int qla4xxx_slave_configure(struct scsi_device *device); | 76 | static int qla4xxx_slave_configure(struct scsi_device *device); |
77 | static void qla4xxx_slave_destroy(struct scsi_device *sdev); | 77 | static void qla4xxx_slave_destroy(struct scsi_device *sdev); |
78 | static void qla4xxx_scan_start(struct Scsi_Host *shost); | ||
78 | 79 | ||
79 | static struct scsi_host_template qla4xxx_driver_template = { | 80 | static struct scsi_host_template qla4xxx_driver_template = { |
80 | .module = THIS_MODULE, | 81 | .module = THIS_MODULE, |
@@ -90,6 +91,7 @@ static struct scsi_host_template qla4xxx_driver_template = { | |||
90 | .slave_destroy = qla4xxx_slave_destroy, | 91 | .slave_destroy = qla4xxx_slave_destroy, |
91 | 92 | ||
92 | .scan_finished = iscsi_scan_finished, | 93 | .scan_finished = iscsi_scan_finished, |
94 | .scan_start = qla4xxx_scan_start, | ||
93 | 95 | ||
94 | .this_id = -1, | 96 | .this_id = -1, |
95 | .cmd_per_lun = 3, | 97 | .cmd_per_lun = 3, |
@@ -299,6 +301,18 @@ struct ddb_entry *qla4xxx_alloc_sess(struct scsi_qla_host *ha) | |||
299 | return ddb_entry; | 301 | return ddb_entry; |
300 | } | 302 | } |
301 | 303 | ||
304 | static void qla4xxx_scan_start(struct Scsi_Host *shost) | ||
305 | { | ||
306 | struct scsi_qla_host *ha = shost_priv(shost); | ||
307 | struct ddb_entry *ddb_entry, *ddbtemp; | ||
308 | |||
309 | /* finish setup of sessions that were already setup in firmware */ | ||
310 | list_for_each_entry_safe(ddb_entry, ddbtemp, &ha->ddb_list, list) { | ||
311 | if (ddb_entry->fw_ddb_device_state == DDB_DS_SESSION_ACTIVE) | ||
312 | qla4xxx_add_sess(ddb_entry); | ||
313 | } | ||
314 | } | ||
315 | |||
302 | /* | 316 | /* |
303 | * Timer routines | 317 | * Timer routines |
304 | */ | 318 | */ |
@@ -1178,7 +1192,6 @@ static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev, | |||
1178 | int ret = -ENODEV, status; | 1192 | int ret = -ENODEV, status; |
1179 | struct Scsi_Host *host; | 1193 | struct Scsi_Host *host; |
1180 | struct scsi_qla_host *ha; | 1194 | struct scsi_qla_host *ha; |
1181 | struct ddb_entry *ddb_entry, *ddbtemp; | ||
1182 | uint8_t init_retry_count = 0; | 1195 | uint8_t init_retry_count = 0; |
1183 | char buf[34]; | 1196 | char buf[34]; |
1184 | 1197 | ||
@@ -1297,13 +1310,6 @@ static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev, | |||
1297 | if (ret) | 1310 | if (ret) |
1298 | goto probe_failed; | 1311 | goto probe_failed; |
1299 | 1312 | ||
1300 | /* Update transport device information for all devices. */ | ||
1301 | list_for_each_entry_safe(ddb_entry, ddbtemp, &ha->ddb_list, list) { | ||
1302 | if (ddb_entry->fw_ddb_device_state == DDB_DS_SESSION_ACTIVE) | ||
1303 | if (qla4xxx_add_sess(ddb_entry)) | ||
1304 | goto remove_host; | ||
1305 | } | ||
1306 | |||
1307 | printk(KERN_INFO | 1313 | printk(KERN_INFO |
1308 | " QLogic iSCSI HBA Driver version: %s\n" | 1314 | " QLogic iSCSI HBA Driver version: %s\n" |
1309 | " QLogic ISP%04x @ %s, host#=%ld, fw=%02d.%02d.%02d.%02d\n", | 1315 | " QLogic ISP%04x @ %s, host#=%ld, fw=%02d.%02d.%02d.%02d\n", |
@@ -1313,10 +1319,6 @@ static int __devinit qla4xxx_probe_adapter(struct pci_dev *pdev, | |||
1313 | scsi_scan_host(host); | 1319 | scsi_scan_host(host); |
1314 | return 0; | 1320 | return 0; |
1315 | 1321 | ||
1316 | remove_host: | ||
1317 | qla4xxx_free_ddb_list(ha); | ||
1318 | scsi_remove_host(host); | ||
1319 | |||
1320 | probe_failed: | 1322 | probe_failed: |
1321 | qla4xxx_free_adapter(ha); | 1323 | qla4xxx_free_adapter(ha); |
1322 | scsi_host_put(ha->host); | 1324 | scsi_host_put(ha->host); |