Commit 63a8651f authored by Ravi Anand's avatar Ravi Anand Committed by James Bottomley

[SCSI] qla2xxx: Correct infinite-login-retry issue.

Where the DPC logic would get jammed into continuously
reloging-into a port.
Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent b5836927
...@@ -2437,7 +2437,6 @@ qla2x00_do_dpc(void *data) ...@@ -2437,7 +2437,6 @@ qla2x00_do_dpc(void *data)
if (atomic_read(&fcport->state) != FCS_ONLINE && if (atomic_read(&fcport->state) != FCS_ONLINE &&
fcport->login_retry) { fcport->login_retry) {
fcport->login_retry--;
if (fcport->flags & FCF_FABRIC_DEVICE) { if (fcport->flags & FCF_FABRIC_DEVICE) {
if (fcport->flags & if (fcport->flags &
FCF_TAPE_PRESENT) FCF_TAPE_PRESENT)
...@@ -2453,6 +2452,7 @@ qla2x00_do_dpc(void *data) ...@@ -2453,6 +2452,7 @@ qla2x00_do_dpc(void *data)
qla2x00_local_device_login( qla2x00_local_device_login(
ha, fcport); ha, fcport);
fcport->login_retry--;
if (status == QLA_SUCCESS) { if (status == QLA_SUCCESS) {
fcport->old_loop_id = fcport->loop_id; fcport->old_loop_id = fcport->loop_id;
...@@ -2470,6 +2470,8 @@ qla2x00_do_dpc(void *data) ...@@ -2470,6 +2470,8 @@ qla2x00_do_dpc(void *data)
} else { } else {
fcport->login_retry = 0; fcport->login_retry = 0;
} }
if (fcport->login_retry == 0)
fcport->loop_id = FC_NO_LOOP_ID;
} }
if (test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags)) if (test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags))
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment