]> git.baikalelectronics.ru Git - kernel.git/commit
nvmet: don't check iosqes,iocqes for discovery controllers
authorSagi Grimberg <sagi@grimberg.me>
Mon, 15 Mar 2021 22:34:51 +0000 (15:34 -0700)
committerChristoph Hellwig <hch@lst.de>
Thu, 18 Mar 2021 04:39:02 +0000 (05:39 +0100)
commita589b12614c96452c7796e3734cef2906976fef8
tree545ce90ce1854d239f5797a256b22c5a3d04b1f9
parent4cbd720250d0b43f29801b38ab69925264dd6de9
nvmet: don't check iosqes,iocqes for discovery controllers

From the base spec, Figure 78:

  "Controller Configuration, these fields are defined as parameters to
   configure an "I/O Controller (IOC)" and not to configure a "Discovery
   Controller (DC).

   ...
   If the controller does not support I/O queues, then this field shall
   be read-only with a value of 0h

Just perform this check for I/O controllers.

Fixes: ffb9618ad11f ("nvmet: add a generic NVMe target")
Reported-by: Belanger, Martin <Martin.Belanger@dell.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/core.c