aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/nvme.h
diff options
context:
space:
mode:
authorSagi Grimberg <sagi@grimberg.me>2019-08-02 19:33:59 -0700
committerSagi Grimberg <sagi@grimberg.me>2019-08-29 12:55:03 -0700
commite7832cb48a654cd12b2bc9181b2f0ad49d526ac6 (patch)
tree465c951b26754e06326e378aee3309dea3529911 /drivers/nvme/host/nvme.h
parentnvme-pci: Support shared tags across queues for Apple 2018 controllers (diff)
downloadlinux-dev-e7832cb48a654cd12b2bc9181b2f0ad49d526ac6.tar.xz
linux-dev-e7832cb48a654cd12b2bc9181b2f0ad49d526ac6.zip
nvme: make fabrics command run on a separate request queue
We have a fundamental issue that fabric commands use the admin_q. The reason is, that admin-connect, register reads and writes and admin commands cannot be guaranteed ordering while we are running controller resets. For example, when we reset a controller we perform: 1. disable the controller 2. teardown the admin queue 3. re-establish the admin queue 4. enable the controller In order to perform (3), we need to unquiesce the admin queue, however we may have some admin commands that are already pending on the quiesced admin_q and will immediate execute when we unquiesce it before we execute (4). The host must not send admin commands to the controller before enabling the controller. To fix this, we have the fabric commands (admin connect and property get/set, but not I/O queue connect) use a separate fabrics_q and make sure to quiesce the admin_q before we disable the controller, and unquiesce it only after we enable the controller. This fixes the error prints from nvmet in a controller reset storm test: kernel: nvmet: got cmd 6 while CC.EN == 0 on qid = 0 Which indicate that the host is sending an admin command when the controller is not enabled. Reviewed-by: James Smart <james.smart@broadcom.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Diffstat (limited to '')
-rw-r--r--drivers/nvme/host/nvme.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 624c3ea2134c..a818313a1f15 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -181,6 +181,7 @@ struct nvme_ctrl {
const struct nvme_ctrl_ops *ops;
struct request_queue *admin_q;
struct request_queue *connect_q;
+ struct request_queue *fabrics_q;
struct device *dev;
int instance;
int numa_node;