]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/commitdiff
Backport: PCI: enhance pci_ari_enabled()
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 13 Mar 2009 07:41:39 +0000 (07:41 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 13 Mar 2009 07:41:39 +0000 (07:41 +0000)
    commit 6a49d8120021897e139641062236215aac5d220e
    Author: Yu Zhao <yu.zhao@intel.com>
    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 <yu.zhao@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
drivers/pci/pci.h

index 22165f6eb2652973cf259199981e382e2eb072dc..76b3078b7ac576b9532094d33dcc3cdc3339323d 100644 (file)
@@ -122,11 +122,11 @@ extern int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
 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;
 }