summaryrefslogtreecommitdiff
path: root/drivers/nvme
diff options
context:
space:
mode:
authorMaxim Levitsky <mlevitsk@redhat.com>2019-05-02 14:31:33 +0300
committerChristoph Hellwig <hch@lst.de>2019-05-13 16:00:03 +0200
commite8fd41bb3cf149fb6df4be714f94fc04871ccbce (patch)
tree4ae9bf361ce5b55ffd690fd23f59aa16558c3862 /drivers/nvme
parent936b33f7243fa1e54c8f4f2febd3472cc00e66fd (diff)
nvme-pci: init shadow doorbell after each reset
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>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/pci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 3e4fb891a95a..8ef3c67e05d6 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2280,8 +2280,6 @@ 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);
@@ -2289,6 +2287,7 @@ static int nvme_dev_add(struct nvme_dev *dev)
nvme_free_queues(dev, dev->online_queues);
}
+ nvme_dbbuf_set(dev);
return 0;
}