Commit def84ab6 authored by Martin George's avatar Martin George Committed by Christoph Hellwig

nvme: send Identify with CNS 06h only to I/O controllers

Identify CNS 06h (I/O Command Set Specific Identify Controller data
structure) is supported only on i/o controllers.

But nvme_init_non_mdts_limits() currently invokes this on all
controllers.  Correct this by ensuring this is sent to I/O
controllers only.
Signed-off-by: default avatarMartin George <marting@netapp.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 9d2789ac
......@@ -3063,7 +3063,8 @@ static int nvme_init_non_mdts_limits(struct nvme_ctrl *ctrl)
else
ctrl->max_zeroes_sectors = 0;
if (nvme_ctrl_limited_cns(ctrl))
if (ctrl->subsys->subtype != NVME_NQN_NVME ||
nvme_ctrl_limited_cns(ctrl))
return 0;
id = kzalloc(sizeof(*id), GFP_KERNEL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment