mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
scsi: qla2xxx: Delay I/O Abort on PCI error
commit 591c1fdf2016d118b8fbde427b796fac13f3f070 upstream. 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: stable@vger.kernel.org Signed-off-by: Quinn Tran <qutran@marvell.com> Signed-off-by: Nilesh Javali <njavali@marvell.com> Link: https://lore.kernel.org/r/20240227164127.36465-11-njavali@marvell.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
65f195232b
commit
f30b3ee9a4
@@ -2741,7 +2741,13 @@ qla2x00_dev_loss_tmo_callbk(struct fc_rport *rport)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (unlikely(pci_channel_offline(fcport->vha->hw->pdev))) {
|
if (unlikely(pci_channel_offline(fcport->vha->hw->pdev))) {
|
||||||
qla2x00_abort_all_cmds(fcport->vha, DID_NO_CONNECT << 16);
|
/* Will wait for wind down of adapter */
|
||||||
|
ql_dbg(ql_dbg_aer, fcport->vha, 0x900c,
|
||||||
|
"%s pci offline detected (id %06x)\n", __func__,
|
||||||
|
fcport->d_id.b24);
|
||||||
|
qla_pci_set_eeh_busy(fcport->vha);
|
||||||
|
qla2x00_eh_wait_for_pending_commands(fcport->vha, fcport->d_id.b24,
|
||||||
|
0, WAIT_TARGET);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2763,7 +2769,11 @@ qla2x00_terminate_rport_io(struct fc_rport *rport)
|
|||||||
vha = fcport->vha;
|
vha = fcport->vha;
|
||||||
|
|
||||||
if (unlikely(pci_channel_offline(fcport->vha->hw->pdev))) {
|
if (unlikely(pci_channel_offline(fcport->vha->hw->pdev))) {
|
||||||
qla2x00_abort_all_cmds(fcport->vha, DID_NO_CONNECT << 16);
|
/* Will wait for wind down of adapter */
|
||||||
|
ql_dbg(ql_dbg_aer, fcport->vha, 0x900b,
|
||||||
|
"%s pci offline detected (id %06x)\n", __func__,
|
||||||
|
fcport->d_id.b24);
|
||||||
|
qla_pci_set_eeh_busy(vha);
|
||||||
qla2x00_eh_wait_for_pending_commands(fcport->vha, fcport->d_id.b24,
|
qla2x00_eh_wait_for_pending_commands(fcport->vha, fcport->d_id.b24,
|
||||||
0, WAIT_TARGET);
|
0, WAIT_TARGET);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user