Commit 3fbc74fe authored by Quinn Tran's avatar Quinn Tran Committed by Martin K. Petersen

scsi: qla2xxx: Fix erroneous link down

If after an adapter reset the appearance of link is not recovered, the
devices are not rediscovered.  This is result of a race condition between
adapter reset (abort_isp) and the topology scan.  During adapter reset, the
ABORT_ISP_ACTIVE flag is set.  Topology scan usually occurred after adapter
reset.  In this case, the topology scan came earlier than usual where it
ran into problem due to ABORT_ISP_ACTIVE flag was still set.

kernel: qla2xxx [0000:13:00.0]-1005:1: Cmd 0x6a aborted with timeout since ISP Abort is pending
kernel: qla2xxx [0000:13:00.0]-28a0:1: MBX_GET_PORT_NAME failed, No FL Port.
kernel: qla2xxx [0000:13:00.0]-286b:1: qla2x00_configure_loop: exiting normally. local port wwpn 51402ec0123d9a80 id 012300)
kernel: qla2xxx [0000:13:00.0]-8017:1: ADAPTER RESET SUCCEEDED nexus=1:0:15.

Allow adapter reset to complete before any scan can start.

Cc: stable@vger.kernel.org
Signed-off-by: default avatarQuinn Tran <qutran@marvell.com>
Signed-off-by: default avatarNilesh Javali <njavali@marvell.com>
Reviewed-by: default avatarHimanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 7e8a936a
...@@ -7094,9 +7094,12 @@ qla2x00_do_dpc(void *data) ...@@ -7094,9 +7094,12 @@ qla2x00_do_dpc(void *data)
} }
} }
loop_resync_check: loop_resync_check:
if (test_and_clear_bit(LOOP_RESYNC_NEEDED, if (!qla2x00_reset_active(base_vha) &&
test_and_clear_bit(LOOP_RESYNC_NEEDED,
&base_vha->dpc_flags)) { &base_vha->dpc_flags)) {
/*
* Allow abort_isp to complete before moving on to scanning.
*/
ql_dbg(ql_dbg_dpc, base_vha, 0x400f, ql_dbg(ql_dbg_dpc, base_vha, 0x400f,
"Loop resync scheduled.\n"); "Loop resync scheduled.\n");
......
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