Skip to content

Commit 78c3e5e

Browse files
Arun Easimartinkpetersen
authored andcommitted
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/[email protected] Fixes: 3c75ad1 ("scsi: qla2xxx: Remove defer flag to indicate immeadiate port loss") # v5.6-rc1+ Tested-by: Laurence Oberman <[email protected]> Reviewed-by: Laurence Oberman <[email protected]> Reviewed-by: Ewan D. Milne <[email protected]> Reviewed-by: Roman Bolshakov <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Arun Easi <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 394b617 commit 78c3e5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/scsi/qla2xxx/qla_os.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ qla2xxx_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
864864
goto qc24_fail_command;
865865
}
866866

867-
if (atomic_read(&fcport->state) != FCS_ONLINE) {
867+
if (atomic_read(&fcport->state) != FCS_ONLINE || fcport->deleted) {
868868
if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
869869
atomic_read(&base_vha->loop_state) == LOOP_DEAD) {
870870
ql_dbg(ql_dbg_io, vha, 0x3005,
@@ -946,7 +946,7 @@ qla2xxx_mqueuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd,
946946
goto qc24_fail_command;
947947
}
948948

949-
if (atomic_read(&fcport->state) != FCS_ONLINE) {
949+
if (atomic_read(&fcport->state) != FCS_ONLINE || fcport->deleted) {
950950
if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD ||
951951
atomic_read(&base_vha->loop_state) == LOOP_DEAD) {
952952
ql_dbg(ql_dbg_io, vha, 0x3077,

0 commit comments

Comments
 (0)