linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: David Milburn <dmilburn@redhat.com>
Cc: kbusch@kernel.org, Christoph Hellwig <hch@lst.de>,
	linux-nvme@lists.infradead.org, sagi@grimberg.me
Subject: Re: [PATCH] nvme: check for dynamic controller model before verifying cntlid
Date: Thu, 17 Oct 2019 17:10:44 +0200	[thread overview]
Message-ID: <20191017151044.GA8989@lst.de> (raw)
In-Reply-To: <7aa48745-d729-3f8a-e657-cbaa588cc618@redhat.com>

On Thu, Oct 17, 2019 at 10:08:30AM -0500, David Milburn wrote:
> Hi Christoph,
>
> On 10/17/2019 09:50 AM, Christoph Hellwig wrote:
>> On Wed, Oct 16, 2019 at 03:23:22PM -0500, David Milburn wrote:
>>> -		if (ctrl->cntlid != le16_to_cpu(id->cntlid)) {
>>> +		if (id->ctrattr && (ctrl->cntlid != le16_to_cpu(id->cntlid))) {
>>
>> Where do get the all-Fs cntrlid?  Identify Controller should return
>> the actual controller id, and the fabrics setup code also sets it up
>> to the return value of the connect command, which shouldn't be all-Fs
>> either.
>
> I see it in nvme_init_identify() after doing the nvme_identify_ctrl(),
> id->cntlid is FFFF causing the check to fail. There is a discussion
> in the NVMe over Fabrics spec, not specifically about identify, but
> with discover log page concerning dynamic vs static model and the
> value of cntlid, the target is a storage array.

Please trace down where it comes from, because I suspect your array is
buggy.  I guess it returns 0xffff from the connect command response,
which is wrong as that should contain the actual controller id, and not
0xffff which is passed in the connect command to request the dynamic
controller model.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

      reply	other threads:[~2019-10-17 15:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16 20:23 [PATCH] nvme: check for dynamic controller model before verifying cntlid David Milburn
2019-10-17 14:50 ` Christoph Hellwig
2019-10-17 15:08   ` David Milburn
2019-10-17 15:10     ` Christoph Hellwig [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=20191017151044.GA8989@lst.de \
    --to=hch@lst.de \
    --cc=dmilburn@redhat.com \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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;
as well as URLs for NNTP newsgroup(s).