Commit a7369f1f authored by Linas Vepstas's avatar Linas Vepstas Committed by Greg Kroah-Hartman

PCI: define inline for test of channel error state

Add very simple routine to indicate the pci channel error state.
Signed-off-by: default avatarLinas Vepstas <linas@austin.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c87deff7
...@@ -181,6 +181,11 @@ struct pci_dev { ...@@ -181,6 +181,11 @@ struct pci_dev {
#define to_pci_dev(n) container_of(n, struct pci_dev, dev) #define to_pci_dev(n) container_of(n, struct pci_dev, dev)
#define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL)
static inline int pci_channel_offline(struct pci_dev *pdev)
{
return (pdev->error_state != pci_channel_io_normal);
}
static inline struct pci_cap_saved_state *pci_find_saved_cap( static inline struct pci_cap_saved_state *pci_find_saved_cap(
struct pci_dev *pci_dev,char cap) struct pci_dev *pci_dev,char cap)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment