summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/pci.c
diff options
context:
space:
mode:
authorChristoph Hellwig2015-10-16 07:58:46 +0200
committerJens Axboe2015-12-01 18:59:40 +0100
commitce4541f40a949cd9a9c9f308b1a6a86914ce6e1a (patch)
tree3fe76ebab4c4ae2c21a67b5df205b6bc3d022ea5 /drivers/nvme/host/pci.c
parentnvme: add a common helper to read Identify Controller data (diff)
downloadkernel-qcow2-linux-ce4541f40a949cd9a9c9f308b1a6a86914ce6e1a.tar.gz
kernel-qcow2-linux-ce4541f40a949cd9a9c9f308b1a6a86914ce6e1a.tar.xz
kernel-qcow2-linux-ce4541f40a949cd9a9c9f308b1a6a86914ce6e1a.zip
nvme: move the call to nvme_init_identify earlier
We want to record the identify and CAP values even if no I/O queue is available. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/nvme/host/pci.c')
-rw-r--r--drivers/nvme/host/pci.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 086563fe6ed1..4d64aee61aea 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -1930,12 +1930,6 @@ static void nvme_dev_scan(struct work_struct *work)
*/
static int nvme_dev_add(struct nvme_dev *dev)
{
- int res;
-
- res = nvme_init_identify(&dev->ctrl);
- if (res)
- return res;
-
if (!dev->tagset.tags) {
dev->tagset.ops = &nvme_mq_ops;
dev->tagset.nr_hw_queues = dev->online_queues - 1;
@@ -2431,6 +2425,10 @@ static void nvme_probe_work(struct work_struct *work)
if (result)
goto disable;
+ result = nvme_init_identify(&dev->ctrl);
+ if (result)
+ goto free_tags;
+
result = nvme_setup_io_queues(dev);
if (result)
goto free_tags;