Skip to contentSkip to conversation

Revert "nvme/pci: Cancel work after watchdog disabled"

PATCH New Keith Busch 2 participants 2 messages Feb 21, 2017 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "nvme/pci: Cancel work after watchdog disabled"

This reverts commit f666775720c2b1ddcd7e1bc24262265af03ab194.

The patch was trying to fix a condition where a reset is queued during disabling, but it breaks a standard reset since the reset_work can't sync with itself. The original patch testing isolated an unlikely condition, but neglected the more common use.

The condition this was trying to fix doesn't happen anyway with the most recent patches included, so just reverting the broken part and not trying to correct with a different patch.

Signed-off-by Keith Busch <keith.busch at intel.com>
---
 drivers/nvme/host/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/pci.c +1 -1
index 3b6fc3e..f4ce192 100644
@@ -1677,7 +1677,6 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
 	u32 csts = -1;
 
 	del_timer_sync(&dev->watchdog_timer);
-	cancel_work_sync(&dev->reset_work);
 
 	mutex_lock(&dev->shutdown_lock);
 	if (pci_is_enabled(to_pci_dev(dev->dev))) {
@@ -2003,6 +2002,7 @@ static void nvme_remove(struct pci_dev *pdev)
 		nvme_dev_disable(dev, false);
 	}
 
+	flush_work(&dev->reset_work);
 	nvme_uninit_ctrl(&dev->ctrl);
 	nvme_dev_disable(dev, true);
 	nvme_dev_remove_admin(dev);
Signature · 1 line
2.7.2
maintainer Applied
#1 lore raw

PATCH 1/1 Revert "nvme/pci: Cancel work after watchdog disabled"

Looks good to me,

applied to nvme-4.11, thanks.