Skip to content

Commit def84ab

Browse files
martin-gpyChristoph Hellwig
authored andcommitted
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: Martin George <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 9d2789a commit def84ab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/nvme/host/core.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3063,7 +3063,8 @@ static int nvme_init_non_mdts_limits(struct nvme_ctrl *ctrl)
30633063
else
30643064
ctrl->max_zeroes_sectors = 0;
30653065

3066-
if (nvme_ctrl_limited_cns(ctrl))
3066+
if (ctrl->subsys->subtype != NVME_NQN_NVME ||
3067+
nvme_ctrl_limited_cns(ctrl))
30673068
return 0;
30683069

30693070
id = kzalloc(sizeof(*id), GFP_KERNEL);

0 commit comments

Comments
 (0)