[PATCH] nvme-core: avoid identify with CNS 06h to discovery controller
Martin George
martinus.gpy at gmail.com
Thu Mar 16 01:34:14 PDT 2023
On Wed, 2023-03-15 at 06:47 -0700, Christoph Hellwig wrote:
> On Sat, Mar 11, 2023 at 10:56:03PM +0530, Martin George wrote:
> > nvme_init_non_mdts_limits() currenty invokes an identify command
> > with
> > CNS 06h to both discovery and i/o controllers. But as per the NVMe-
> > oF
> > specification, this is not supported on discovery controllers:
> >
> > "The Discovery controller shall support the Identify command with a
> > CNS value of 01h (Identify Controller data structure); all other
> > CNS
> > values are reserved."
> >
> > So ensure this identify command with CNS 06h is sent to i/o
> > controllers
> > alone and not to discovery controllers.
>
> This looks correct, but can we go a step further and also skip it
> for administrative controllers, i.e
>
> > - if (nvme_ctrl_limited_cns(ctrl))
> > + if (nvme_ctrl_limited_cns(ctrl) ||
> > nvme_discovery_ctrl(ctrl))
>
> if (ctrl->subsys->subtype != NVME_NQN_NVME ||
> nvme_ctrl_limited_cns(ctrl))
>
> ?
Sure. Will send a new patch for the same.
-Martin
More information about the Linux-nvme
mailing list