From: Linas Vepstas Date: Tue, 12 Dec 2006 22:55:59 +0000 (-0600) Subject: PCI: define inline for test of channel error state X-Git-Tag: v2.6.21-rc2~42^2~8^2~35 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=a7369f1f6533b9efc3209d1df103537bbbf24b8c;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/include/linux/pci.h b/include/linux/pci.h index df875626b71..79856b3c714 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -181,6 +181,11 @@ struct pci_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) +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( struct pci_dev *pci_dev,char cap) {