Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce4541f4 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

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: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarKeith Busch <keith.busch@intel.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 7fd8930f
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -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;