nvme-pci: don't open-code nvme_reset_ctrl
authorSagi Grimberg <sagi@grimberg.me>
Sun, 31 Dec 2017 12:01:19 +0000 (14:01 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 8 Jan 2018 10:01:59 +0000 (11:01 +0100)
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/pci.c

index 35331fa0013c05bf2998f0be1dfcba48fb33105f..add7b18d825d06d18d3de8ae1480f9f7fbac6fee 100644 (file)
@@ -2498,10 +2498,10 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        if (result)
                goto release_pools;
 
-       nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_RESETTING);
        dev_info(dev->ctrl.device, "pci function %s\n", dev_name(&pdev->dev));
 
-       queue_work(nvme_wq, &dev->ctrl.reset_work);
+       nvme_reset_ctrl(&dev->ctrl);
+
        return 0;
 
  release_pools: