diff options
author | Linas Vepstas <linas@austin.ibm.com> | 2006-12-12 17:55:59 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-07 18:50:03 -0500 |
commit | a7369f1f6533b9efc3209d1df103537bbbf24b8c (patch) | |
tree | ddc2e0c407570e9250fbea39c815e4c461fc9a0f /include/linux/pci.h | |
parent | c87deff776feacd05a7411097e8c8c57e549e638 (diff) |
PCI: define inline for test of channel error state
Add very simple routine to indicate the pci channel error state.
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index df875626b71a..79856b3c714a 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -181,6 +181,11 @@ struct pci_dev { | |||
181 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) | 181 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) |
182 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) | 182 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) |
183 | 183 | ||
184 | static inline int pci_channel_offline(struct pci_dev *pdev) | ||
185 | { | ||
186 | return (pdev->error_state != pci_channel_io_normal); | ||
187 | } | ||
188 | |||
184 | static inline struct pci_cap_saved_state *pci_find_saved_cap( | 189 | static inline struct pci_cap_saved_state *pci_find_saved_cap( |
185 | struct pci_dev *pci_dev,char cap) | 190 | struct pci_dev *pci_dev,char cap) |
186 | { | 191 | { |