[PATCH 2/2] nouveau/radeon: Un-ignore hotplug on resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit b440bde74f04 enabled drivers to be able to set an ignore
hotplug flag on the device and used it in the suspend routine for
nouveau and radeon to prevent hotplug when the device is powered off.
However, there was no undo function provided, so once set, the ignore
hotplug flag lives on for the life of the pci_dev.  I think the
intention was only to ignore hotplug across the power event for the
device, so we should be able to clear the flag on resume.

Signed-off-by: Alex Williamson <alex.williamson@xxxxxxxxxx>
---
 drivers/gpu/drm/nouveau/nouveau_drm.c |    1 +
 drivers/gpu/drm/radeon/radeon_drv.c   |    1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 8763deb..b168c3a 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -749,6 +749,7 @@ nouveau_pmops_runtime_resume(struct device *dev)
 		return -EINVAL;
 
 	pci_set_power_state(pdev, PCI_D0);
+	pci_unignore_hotplug(pdev);
 	pci_restore_state(pdev);
 	ret = pci_enable_device(pdev);
 	if (ret)
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 5d684be..1c7c79b 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -472,6 +472,7 @@ static int radeon_pmops_runtime_resume(struct device *dev)
 	drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
 
 	pci_set_power_state(pdev, PCI_D0);
+	pci_unignore_hotplug(pdev);
 	pci_restore_state(pdev);
 	ret = pci_enable_device(pdev);
 	if (ret)

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux