From: Christoph Hellwig Date: Thu, 27 Oct 2022 10:28:16 +0000 (-0700) Subject: nvme-pci: call nvme_pci_configure_admin_queue from nvme_pci_enable X-Git-Tag: v6.2-rc1~129^2~46^2~29 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a6ee7f19ebfd158ffb3a6ebacf20ae43549bed05;p=tomoyo%2Ftomoyo-test1.git nvme-pci: call nvme_pci_configure_admin_queue from nvme_pci_enable nvme_pci_configure_admin_queue is called right after nvme_pci_enable, and it's work is undone by nvme_dev_disable. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Tested-by Gerd Bayer --- diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 9dcb35f14800..c2e3a87237da 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -2639,7 +2639,8 @@ static int nvme_pci_enable(struct nvme_dev *dev) pci_enable_pcie_error_reporting(pdev); pci_save_state(pdev); - return 0; + + return nvme_pci_configure_admin_queue(dev); disable: pci_disable_device(pdev); @@ -2829,10 +2830,6 @@ static void nvme_reset_work(struct work_struct *work) if (result) goto out_unlock; - result = nvme_pci_configure_admin_queue(dev); - if (result) - goto out_unlock; - if (!dev->ctrl.admin_q) { result = nvme_pci_alloc_admin_tag_set(dev); if (result)