mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
nvme/pci: Disable on removal when disconnected
If the device is not present, the driver should disable the queues immediately. Prior to this, the driver was relying on the watchdog timer to kill the queues if requests were outstanding to the device, and that just delays removal up to one second. Signed-off-by: Keith Busch <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Sagi Grimberg <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
c5552fde10
commit
6db28eda26
1 changed files with 3 additions and 1 deletions
|
|
@ -2001,8 +2001,10 @@ static void nvme_remove(struct pci_dev *pdev)
|
|||
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
|
||||
if (!pci_device_is_present(pdev))
|
||||
if (!pci_device_is_present(pdev)) {
|
||||
nvme_change_ctrl_state(&dev->ctrl, NVME_CTRL_DEAD);
|
||||
nvme_dev_disable(dev, false);
|
||||
}
|
||||
|
||||
flush_work(&dev->reset_work);
|
||||
nvme_uninit_ctrl(&dev->ctrl);
|
||||
|
|
|
|||
Loading…
Reference in a new issue