qla2xxx: Fix missing device login retries.
authorArun Easi <arun.easi@qlogic.com>
Tue, 4 Aug 2015 17:38:02 +0000 (13:38 -0400)
committerJames Bottomley <JBottomley@Odin.com>
Thu, 27 Aug 2015 00:49:23 +0000 (17:49 -0700)
On certain conditions, login failures will just invoke
qla2x00_mark_device_lost() with the intend to do login again;
but if login_retry has been set already, that would fail to set the
relogin needed flag which is required to wakeup the DPC to retry.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
drivers/scsi/qla2xxx/qla_os.c

index 0b90fac255d3b7273fafe5f22b74e15d221d4f9e..0d0ff33d010f24986a9c6dfadc7fe8a18e227491 100644 (file)
@@ -3258,9 +3258,10 @@ void qla2x00_mark_device_lost(scsi_qla_host_t *vha, fc_port_t *fcport,
        if (!do_login)
                return;
 
+       set_bit(RELOGIN_NEEDED, &vha->dpc_flags);
+
        if (fcport->login_retry == 0) {
                fcport->login_retry = vha->hw->login_retry_count;
-               set_bit(RELOGIN_NEEDED, &vha->dpc_flags);
 
                ql_dbg(ql_dbg_disc, vha, 0x2067,
                    "Port login retry %8phN, id = 0x%04x retry cnt=%d.\n",