Skip to content

Commit

Permalink
nvme: move the call to nvme_init_identify earlier
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Dec 1, 2015
1 parent 7fd8930 commit ce4541f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions drivers/nvme/host/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ce4541f

Please sign in to comment.