nvme-pci: remove HMB teardown on reset
authorKeith Busch <keith.busch@intel.com>
Wed, 6 Jun 2018 14:13:07 +0000 (08:13 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 8 Jun 2018 18:51:11 +0000 (12:51 -0600)
The controller is required to disable its host memory buffer use on
controller reset. We don't need to submit an admin command to delete it,
so this patch skips sending that command so we don't need to worry about
handling a timeout.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/pci.c

index 7a42ccad386447c9243049ef15f77e23f8eaadbd..7f8b1bd03db49f7c41959a080e8487fde26f7ffb 100644 (file)
@@ -2224,14 +2224,6 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
        nvme_stop_queues(&dev->ctrl);
 
        if (!dead && dev->ctrl.queue_count > 0) {
-               /*
-                * If the controller is still alive tell it to stop using the
-                * host memory buffer.  In theory the shutdown / reset should
-                * make sure that it doesn't access the host memoery anymore,
-                * but I'd rather be safe than sorry..
-                */
-               if (dev->host_mem_descs)
-                       nvme_set_host_mem(dev, 0);
                nvme_disable_io_queues(dev);
                nvme_disable_admin_queue(dev, shutdown);
        }