[PATCH 1/2] pci: Add reciprocal function for pci_ignore_hotplug()
Alex Williamson
alex.williamson at redhat.com
Tue Feb 24 12:12:34 PST 2015
We have pci_ignore_hotplug(), but there's no way to undo this
without manipulating the device itself. It seems like the original
intention of the function is to provide the driver with a way to
ignore hotplug over a specific time window, ex. the time while the
device is powered off. Once the device is powered on again, the
flag should be cleared to avoid leaving driver cruft on the device.
Add a trivial helper function to enable this.
Signed-off-by: Alex Williamson <alex.williamson at redhat.com>
---
include/linux/pci.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 211e9da..26f9779 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1044,6 +1044,11 @@ static inline void pci_ignore_hotplug(struct pci_dev *dev)
dev->ignore_hotplug = 1;
}
+static inline void pci_unignore_hotplug(struct pci_dev *dev)
+{
+ dev->ignore_hotplug = 0;
+}
+
static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state,
bool enable)
{
More information about the dri-devel
mailing list