aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorRavi Anand <ravi.anand@qlogic.com>2005-11-08 17:37:20 -0500
committerJames Bottomley <jejb@mulgrave.(none)>2005-11-09 16:18:27 -0500
commit33135aa2a568ec1a30e734f18e5315e10516e4f3 (patch)
treea039e0eb265bfd8b4bcb56d4c912c6e111071fa3 /drivers/scsi/qla2xxx
parentdcb36ce9d9100eb821c6ea314b02f215cbdd8aca (diff)
[SCSI] qla2xxx: Correct loop-in-transition issues
When mulitple initiators are coming up in an FCAL topology. Signed-off-by: Ravi Anand <ravi.anand@qlogic.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c21
-rw-r--r--drivers/scsi/qla2xxx/qla_mbx.c2
2 files changed, 15 insertions, 8 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 72d9090df3df..8fb084b706e0 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -147,8 +147,8 @@ check_fw_ready_again:
147 * LIP to complete 147 * LIP to complete
148 */ 148 */
149 149
150 if (atomic_read(&ha->loop_state) == 150 if (atomic_read(&ha->loop_state) !=
151 LOOP_DOWN && retry--) { 151 LOOP_READY && retry--) {
152 goto check_fw_ready_again; 152 goto check_fw_ready_again;
153 } 153 }
154 wait_time--; 154 wait_time--;
@@ -1258,9 +1258,15 @@ qla2x00_configure_hba(scsi_qla_host_t *ha)
1258 rval = qla2x00_get_adapter_id(ha, 1258 rval = qla2x00_get_adapter_id(ha,
1259 &loop_id, &al_pa, &area, &domain, &topo); 1259 &loop_id, &al_pa, &area, &domain, &topo);
1260 if (rval != QLA_SUCCESS) { 1260 if (rval != QLA_SUCCESS) {
1261 qla_printk(KERN_WARNING, ha, 1261 if (LOOP_NOT_READY(ha) || atomic_read(&ha->loop_down_timer) ||
1262 "ERROR -- Unable to get host loop ID.\n"); 1262 (rval == QLA_COMMAND_ERROR && loop_id == 0x7)) {
1263 set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); 1263 DEBUG2(printk("%s(%ld) Loop is in a transition state\n",
1264 __func__, ha->host_no));
1265 } else {
1266 qla_printk(KERN_WARNING, ha,
1267 "ERROR -- Unable to get host loop ID.\n");
1268 set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
1269 }
1264 return (rval); 1270 return (rval);
1265 } 1271 }
1266 1272
@@ -1789,7 +1795,7 @@ qla2x00_configure_loop(scsi_qla_host_t *ha)
1789 } 1795 }
1790 1796
1791 if (rval == QLA_SUCCESS && test_bit(RSCN_UPDATE, &flags)) { 1797 if (rval == QLA_SUCCESS && test_bit(RSCN_UPDATE, &flags)) {
1792 if (test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags)) { 1798 if (LOOP_NOT_READY(ha)) {
1793 rval = QLA_FUNCTION_FAILED; 1799 rval = QLA_FUNCTION_FAILED;
1794 } else { 1800 } else {
1795 rval = qla2x00_configure_fabric(ha); 1801 rval = qla2x00_configure_fabric(ha);
@@ -2362,8 +2368,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *ha, struct list_head *new_fcports)
2362 if (qla2x00_is_reserved_id(ha, loop_id)) 2368 if (qla2x00_is_reserved_id(ha, loop_id))
2363 continue; 2369 continue;
2364 2370
2365 if (atomic_read(&ha->loop_down_timer) || 2371 if (atomic_read(&ha->loop_down_timer) || LOOP_NOT_READY(ha))
2366 test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags))
2367 break; 2372 break;
2368 2373
2369 if (swl != NULL) { 2374 if (swl != NULL) {
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index ad3cacb9192d..0e963bf9c568 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -1008,6 +1008,8 @@ qla2x00_get_adapter_id(scsi_qla_host_t *ha, uint16_t *id, uint8_t *al_pa,
1008 mcp->tov = 30; 1008 mcp->tov = 30;
1009 mcp->flags = 0; 1009 mcp->flags = 0;
1010 rval = qla2x00_mailbox_command(ha, mcp); 1010 rval = qla2x00_mailbox_command(ha, mcp);
1011 if (mcp->mb[0] == MBS_COMMAND_ERROR)
1012 rval = QLA_COMMAND_ERROR;
1011 1013
1012 /* Return data. */ 1014 /* Return data. */
1013 *id = mcp->mb[1]; 1015 *id = mcp->mb[1];