[PATCH] nvme-core: avoid identify with CNS 06h to discovery controller

Christoph Hellwig hch at infradead.org
Wed Mar 15 06:47:43 PDT 2023


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))

?



More information about the Linux-nvme mailing list