summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuinn Tran <qutran@marvell.com>2019-08-30 15:24:01 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-17 20:08:29 +0100
commitf110f9ee5bc479861aff8236b1356dc0b8ad1561 (patch)
tree422f79a32d6cfb349005328fa25af504a50972ce
parent292e8c2eaf07c0ef502713688f8155916f2dd5cd (diff)
downloadlinux-stable-f110f9ee5bc479861aff8236b1356dc0b8ad1561.tar.gz
linux-stable-f110f9ee5bc479861aff8236b1356dc0b8ad1561.tar.bz2
linux-stable-f110f9ee5bc479861aff8236b1356dc0b8ad1561.zip
scsi: qla2xxx: Fix stale session
[ Upstream commit 2037ce49d30a0d07348df406ef78f6664f4bc899 ] On fast cable pull, where driver is unable to detect device has disappeared and came back based on switch info, qla2xxx would not re-login while remote port has already invalidated the session. This causes IO timeout. This patch would relogin to remote device for RSCN affected port. Signed-off-by: Quinn Tran <qutran@marvell.com> Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Link: https://lore.kernel.org/r/20190830222402.23688-6-hmadhani@marvell.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/scsi/qla2xxx/qla_gs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
index ebf223cfebbc..dec521d726d9 100644
--- a/drivers/scsi/qla2xxx/qla_gs.c
+++ b/drivers/scsi/qla2xxx/qla_gs.c
@@ -3674,7 +3674,6 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, srb_t *sp)
list_for_each_entry(fcport, &vha->vp_fcports, list) {
if (memcmp(rp->port_name, fcport->port_name, WWN_SIZE))
continue;
- fcport->scan_needed = 0;
fcport->scan_state = QLA_FCPORT_FOUND;
found = true;
/*
@@ -3683,10 +3682,12 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, srb_t *sp)
if ((fcport->flags & FCF_FABRIC_DEVICE) == 0) {
qla2x00_clear_loop_id(fcport);
fcport->flags |= FCF_FABRIC_DEVICE;
- } else if (fcport->d_id.b24 != rp->id.b24) {
+ } else if (fcport->d_id.b24 != rp->id.b24 ||
+ fcport->scan_needed) {
qlt_schedule_sess_for_deletion(fcport);
}
fcport->d_id.b24 = rp->id.b24;
+ fcport->scan_needed = 0;
break;
}