public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lpfc: use NVMe error codes for LS request done callback
@ 2020-09-16  8:50 Hannes Reinecke
  2020-09-16 21:23 ` James Smart
  0 siblings, 1 reply; 4+ messages in thread
From: Hannes Reinecke @ 2020-09-16  8:50 UTC (permalink / raw)
  To: James Smart
  Cc: Martin K. Petersen, Christoph Hellwig, James Bottomley,
	linux-scsi, Hannes Reinecke

The LS request callback requires a 'status' argument, but that one
should be an NVMe error code, not a driver specific one which has
no meaning in the nvme layer.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/scsi/lpfc/lpfc_nvme.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index e5be334d6a11..4b007a28014b 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -498,7 +498,9 @@ __lpfc_nvme_ls_req_cmp(struct lpfc_hba *phba,  struct lpfc_vport *vport,
 		cmdwqe->context3 = NULL;
 	}
 	if (pnvme_lsreq->done)
-		pnvme_lsreq->done(pnvme_lsreq, status);
+		pnvme_lsreq->done(pnvme_lsreq,
+				  status == IOSTAT_SUCCESS ?
+				  NVME_SC_SUCCESS : NVME_SC_INTERNAL);
 	else
 		lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
 				 "6046 NVMEx cmpl without done call back? "
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-18 17:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-16  8:50 [PATCH] lpfc: use NVMe error codes for LS request done callback Hannes Reinecke
2020-09-16 21:23 ` James Smart
2020-09-17  5:37   ` Hannes Reinecke
2020-09-18 17:26     ` James Smart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox