[PATCH 1/2] pci: Add reciprocal function for pci_ignore_hotplug()

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

 



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@xxxxxxxxxx>
---
 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)
 {

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux