Commit 78c3e5e6 authored by Arun Easi's avatar Arun Easi Committed by Martin K. Petersen

scsi: qla2xxx: Fix I/Os being passed down when FC device is being deleted

I/Os could be passed down while the device FC SCSI device is being deleted.
This would result in unnecessary delay of I/O and driver messages (when
extended logging is set).

[mkp: fixed commit hash and added SoB for Nilesh]

Link: https://lore.kernel.org/r/20200313085001.3781-1-njavali@marvell.com
Fixes: 3c75ad1d ("scsi: qla2xxx: Remove defer flag to indicate immeadiate port loss") # v5.6-rc1+
Tested-by: default avatarLaurence Oberman <loberman@redhat.com>
Reviewed-by: default avatarLaurence Oberman <loberman@redhat.com>
Reviewed-by: default avatarEwan D. Milne <emilne@redhat.com>
Reviewed-by: default avatarRoman Bolshakov <r.bolshakov@yadro.com>
Reviewed-by: default avatarHimanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: default avatarArun Easi <aeasi@marvell.com>
Signed-off-by: default avatarNilesh Javali <njavali@marvell.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 394b6171
......@@ -864,7 +864,7 @@ qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
goto qc24_fail_command;
}
if (atomic_read(&fcport->state) != FCS_ONLINE) {
if (atomic_read(&fcport->state) != FCS_ONLINE || fcport->deleted) {
if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
atomic_read(&base_vha->loop_state) == LOOP_DEAD) {
ql_dbg(ql_dbg_io, vha, 0x3005,
......@@ -946,7 +946,7 @@ qla2xxx_mqueuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd,
goto qc24_fail_command;
}
if (atomic_read(&fcport->state) != FCS_ONLINE) {
if (atomic_read(&fcport->state) != FCS_ONLINE || fcport->deleted) {
if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
atomic_read(&base_vha->loop_state) == LOOP_DEAD) {
ql_dbg(ql_dbg_io, vha, 0x3077,
......
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