Skip to content

Commit 591c1fd

Browse files
Quinn Tranmartinkpetersen
authored andcommitted
scsi: qla2xxx: Delay I/O Abort on PCI error
Currently when PCI error is detected, I/O is aborted manually through the ABORT IOCB mechanism which is not guaranteed to succeed. Instead, wait for the OS or system to notify driver to wind down I/O through the pci_error_handlers api. Set eeh_busy flag to pause all traffic and wait for I/O to drain. Cc: [email protected] Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Nilesh Javali <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent b5a3084 commit 591c1fd

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

drivers/scsi/qla2xxx/qla_attr.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2741,7 +2741,13 @@ qla2x00_dev_loss_tmo_callbk(struct fc_rport *rport)
27412741
return;
27422742

27432743
if (unlikely(pci_channel_offline(fcport->vha->hw->pdev))) {
2744-
qla2x00_abort_all_cmds(fcport->vha, DID_NO_CONNECT << 16);
2744+
/* Will wait for wind down of adapter */
2745+
ql_dbg(ql_dbg_aer, fcport->vha, 0x900c,
2746+
"%s pci offline detected (id %06x)\n", __func__,
2747+
fcport->d_id.b24);
2748+
qla_pci_set_eeh_busy(fcport->vha);
2749+
qla2x00_eh_wait_for_pending_commands(fcport->vha, fcport->d_id.b24,
2750+
0, WAIT_TARGET);
27452751
return;
27462752
}
27472753
}
@@ -2763,7 +2769,11 @@ qla2x00_terminate_rport_io(struct fc_rport *rport)
27632769
vha = fcport->vha;
27642770

27652771
if (unlikely(pci_channel_offline(fcport->vha->hw->pdev))) {
2766-
qla2x00_abort_all_cmds(fcport->vha, DID_NO_CONNECT << 16);
2772+
/* Will wait for wind down of adapter */
2773+
ql_dbg(ql_dbg_aer, fcport->vha, 0x900b,
2774+
"%s pci offline detected (id %06x)\n", __func__,
2775+
fcport->d_id.b24);
2776+
qla_pci_set_eeh_busy(vha);
27672777
qla2x00_eh_wait_for_pending_commands(fcport->vha, fcport->d_id.b24,
27682778
0, WAIT_TARGET);
27692779
return;

0 commit comments

Comments
 (0)