Skip to content

Commit

Permalink
scsi: lpfc: Treat IOERR_SLI_DOWN I/O completion status the same as pc…
Browse files Browse the repository at this point in the history
…i 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 <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20231009161812.97232-3-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Justin Tee authored and Martin K. Petersen committed Oct 13, 2023
1 parent 0506814 commit d472a76
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/scsi/lpfc/lpfc_nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ lpfc_nvme_io_cmd_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn,
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
int cpu;
#endif
int offline = 0;
bool offline = false;

/* Sanity check on return of outstanding command */
if (!lpfc_ncmd) {
Expand Down Expand Up @@ -1125,7 +1125,9 @@ lpfc_nvme_io_cmd_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn,
nCmd->transferred_length = 0;
nCmd->rcv_rsplen = 0;
nCmd->status = NVME_SC_INTERNAL;
offline = pci_channel_offline(vport->phba->pcidev);
if (pci_channel_offline(vport->phba->pcidev) ||
lpfc_ncmd->result == IOERR_SLI_DOWN)
offline = true;
}
}

Expand Down

0 comments on commit d472a76

Please sign in to comment.