Skip to content

Commit

Permalink
nvme-pci: init shadow doorbell after each reset
Browse files Browse the repository at this point in the history
The spec states:

  "The settings are not retained across a Controller Level Reset"

Therefore the driver must enable the shadow doorbell, after each reset.

This was caught while testing the nvme driver over upcoming nvme-mdev
device.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Minwoo Im <minwoo.im@samsung.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Maxim Levitsky authored and Christoph Hellwig committed May 13, 2019
1 parent 936b33f commit e8fd41b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/nvme/host/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2280,15 +2280,14 @@ static int nvme_dev_add(struct nvme_dev *dev)
return ret;
}
dev->ctrl.tagset = &dev->tagset;

nvme_dbbuf_set(dev);
} else {
blk_mq_update_nr_hw_queues(&dev->tagset, dev->online_queues - 1);

/* Free previously allocated queues that are no longer usable */
nvme_free_queues(dev, dev->online_queues);
}

nvme_dbbuf_set(dev);
return 0;
}

Expand Down

0 comments on commit e8fd41b

Please sign in to comment.