diff mbox

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

Message ID 20150224201240.14443.6308.stgit@gimli.home (mailing list archive)
State New, archived
Headers show

Commit Message

Alex Williamson Feb. 24, 2015, 8:12 p.m. UTC
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@redhat.com>
---
 drivers/gpu/drm/nouveau/nouveau_drm.c |    1 +
 drivers/gpu/drm/radeon/radeon_drv.c   |    1 +
 2 files changed, 2 insertions(+)
diff mbox

Patch

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)