Skip to content

Commit d472a76

Browse files
Justin Teemartinkpetersen
Justin Tee
authored andcommitted
scsi: lpfc: Treat IOERR_SLI_DOWN I/O completion status the same as pci offline
During receipt of a hardware error attention ACQE, IOERR_SLI_DOWN status is set by the driver for all outstanding I/Os. In such hardware error attention cases, we can treat the situation exactly the same as pci_channel_offline. Thus, add IOERR_SLI_DOWN status to the same category as pci_channel_offline handling in lpfc_nvme_io_cmd_cmpl. Signed-off-by: Justin Tee <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 0506814 commit d472a76

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/scsi/lpfc/lpfc_nvme.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ lpfc_nvme_io_cmd_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn,
951951
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
952952
int cpu;
953953
#endif
954-
int offline = 0;
954+
bool offline = false;
955955

956956
/* Sanity check on return of outstanding command */
957957
if (!lpfc_ncmd) {
@@ -1125,7 +1125,9 @@ lpfc_nvme_io_cmd_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn,
11251125
nCmd->transferred_length = 0;
11261126
nCmd->rcv_rsplen = 0;
11271127
nCmd->status = NVME_SC_INTERNAL;
1128-
offline = pci_channel_offline(vport->phba->pcidev);
1128+
if (pci_channel_offline(vport->phba->pcidev) ||
1129+
lpfc_ncmd->result == IOERR_SLI_DOWN)
1130+
offline = true;
11291131
}
11301132
}
11311133

0 commit comments

Comments
 (0)