From patchwork Wed Sep 16 08:50:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 296729 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14671C43461 for ; Wed, 16 Sep 2020 08:51:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DAD7F21741 for ; Wed, 16 Sep 2020 08:51:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726381AbgIPIvF (ORCPT ); Wed, 16 Sep 2020 04:51:05 -0400 Received: from mx2.suse.de ([195.135.220.15]:52136 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726068AbgIPIvD (ORCPT ); Wed, 16 Sep 2020 04:51:03 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 9B471AC8B; Wed, 16 Sep 2020 08:51:17 +0000 (UTC) From: Hannes Reinecke To: James Smart Cc: "Martin K. Petersen" , Christoph Hellwig , James Bottomley , linux-scsi@vger.kernel.org, Hannes Reinecke Subject: [PATCH] lpfc: use NVMe error codes for LS request done callback Date: Wed, 16 Sep 2020 10:50:59 +0200 Message-Id: <20200916085059.27206-1-hare@suse.de> X-Mailer: git-send-email 2.16.4 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org 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 --- 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? "