提交 6a49d812 编写于 作者: Y Yu Zhao 提交者: Jesse Barnes

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: NYu Zhao <yu.zhao@intel.com>
Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
上级 999da9fd
...@@ -165,13 +165,13 @@ struct pci_slot_attribute { ...@@ -165,13 +165,13 @@ struct pci_slot_attribute {
extern void pci_enable_ari(struct pci_dev *dev); extern void pci_enable_ari(struct pci_dev *dev);
/** /**
* pci_ari_enabled - query ARI forwarding status * 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; * 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;
} }
#endif /* DRIVERS_PCI_H */ #endif /* DRIVERS_PCI_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册