]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
nvme: move the call to nvme_init_identify earlier
authorChristoph Hellwig <hch@lst.de>
Fri, 16 Oct 2015 05:58:46 +0000 (07:58 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 1 Jun 2017 20:40:40 +0000 (13:40 -0700)
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>
(cherry picked from commit ce4541f40a949cd9a9c9f308b1a6a86914ce6e1a)

Orabug: 25130845

Signed-off-by: Ashok Vairavan <ashok.vairavan@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/nvme/host/pci.c

index bf7e4621670666e10b5cefb411565c7623d871f4..d1590452f16d87d7ab00630d8916a8263896c167 100644 (file)
@@ -2030,12 +2030,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;
@@ -2562,6 +2556,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;