# HG changeset patch # User Yu Zhao # Date 1236909555 14400 # Node ID fe864af8b34bb03cdfe51dae05e2e3bcce2c5d69 # Parent 16659f5d8bb0d9d4b47cdb4a8c086c89deba793d Backport: PCI: enhance pci_ari_enabled() commit 6a49d8120021897e139641062236215aac5d220e Author: Yu Zhao Date: Sat Nov 22 02:38:21 2008 +0800 PCI: enhance pci_ari_enabled() Change parameter of pci_ari_enabled() from 'pci_dev' to 'pci_bus'. ARI forwarding on the bridge mostly concerns the subordinate devices rather than the bridge itself. So this change will make the function easier to use. Signed-off-by: Yu Zhao Signed-off-by: Jesse Barnes Signed-off-by: Yu Zhao diff -r 16659f5d8bb0 -r fe864af8b34b drivers/pci/pci.h --- a/drivers/pci/pci.h Thu Mar 12 21:58:24 2009 -0400 +++ b/drivers/pci/pci.h Thu Mar 12 21:59:15 2009 -0400 @@ -122,11 +122,11 @@ extern void pci_enable_ari(struct pci_dev *dev); /** * pci_ari_enabled - query ARI forwarding status - * @dev: the PCI device + * @bus: the PCI bus * * Returns 1 if ARI forwarding is enabled, or 0 if not enabled; */ -static inline int pci_ari_enabled(struct pci_dev *dev) +static inline int pci_ari_enabled(struct pci_bus *bus) { - return dev->ari_enabled; + return bus->self && bus->self->ari_enabled; }