[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150224201233.14443.61523.stgit@gimli.home>
Date: Tue, 24 Feb 2015 13:12:34 -0700
From: Alex Williamson <alex.williamson@...hat.com>
To: bhelgaas@...gle.com, linux-pci@...r.kernel.org, airlied@...ux.ie,
alexander.deucher@....com, dri-devel@...ts.freedesktop.org
Cc: alex.williamson@...hat.com, linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] pci: Add reciprocal function for pci_ignore_hotplug()
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@...hat.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)
{
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists