From: James Smart <james.smart@broadcom.com>
To: Hannes Reinecke <hare@suse.de>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
Christoph Hellwig <hch@lst.de>,
James Bottomley <james.bottomley@hansenpartnership.com>,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH] lpfc: use NVMe error codes for LS request done callback
Date: Fri, 18 Sep 2020 10:26:22 -0700 [thread overview]
Message-ID: <1a9be3d3-846b-5796-902b-db3dd7b71d03@broadcom.com> (raw)
In-Reply-To: <3fbfcab8-e6bc-a609-2162-d95ccb39501d@suse.de>
[-- Attachment #1: Type: text/plain, Size: 1803 bytes --]
On 9/16/2020 10:37 PM, Hannes Reinecke wrote:
> On 9/16/20 11:23 PM, James Smart wrote:
>>
>>
>> On 9/16/2020 1:50 AM, Hannes Reinecke wrote:
>>> 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? "
>>
>> No - it's not a nvme command, so doesn't need a nvme status code. It
>> should be a -Exxx value or a 0 (success). nvme_fc_send_ls_req() for
>> example calls __nvme_fc_send_ls_req(), which can return any number of
>> -Exxx values, and the routine returns the value returned by the done
>> call after waiting for it to complete - so they should all follow the
>> same form.
>>
> Right. But returning IOSTAT definitions is still wrong :->
true.. :)
-- james
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4163 bytes --]
prev parent reply other threads:[~2020-09-18 17:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1a9be3d3-846b-5796-902b-db3dd7b71d03@broadcom.com \
--to=james.smart@broadcom.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox