diff options
author | Christoph Hellwig <hch@lst.de> | 2022-11-16 09:01:30 +0100 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2022-12-06 14:36:54 +0100 |
commit | c80767f770ed722264688f65c89e420971eb897a (patch) | |
tree | c0efa23df14eff5c9c26367aa266e1852b1afab2 /drivers/nvme | |
parent | 47d42d229a181e52b32fa9c80aaa36cf8b6b46fc (diff) |
nvme-pci: remove nvme_pci_disable
nvme_pci_disable has a single caller, fold it into that.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Eric Curtin <ecurtin@redhat.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/pci.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index c6a02210d22b..c3d9b23699d3 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -2657,18 +2657,6 @@ static void nvme_dev_unmap(struct nvme_dev *dev) pci_release_mem_regions(to_pci_dev(dev->dev)); } -static void nvme_pci_disable(struct nvme_dev *dev) -{ - struct pci_dev *pdev = to_pci_dev(dev->dev); - - pci_free_irq_vectors(pdev); - - if (pci_is_enabled(pdev)) { - pci_disable_pcie_error_reporting(pdev); - pci_disable_device(pdev); - } -} - static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown) { bool dead = true, freeze = false; @@ -2708,7 +2696,11 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown) } nvme_suspend_io_queues(dev); nvme_suspend_queue(&dev->queues[0]); - nvme_pci_disable(dev); + pci_free_irq_vectors(pdev); + if (pci_is_enabled(pdev)) { + pci_disable_pcie_error_reporting(pdev); + pci_disable_device(pdev); + } nvme_reap_pending_cqes(dev); nvme_cancel_tagset(&dev->ctrl); |