search for: pci_ari_cap

Displaying 8 results from an estimated 8 matches for "pci_ari_cap".

2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [2/4]
...ns; returns negative on failure. + */ +int pci_ari_next_fn(struct pci_dev *dev) +{ + int pos; + u16 cap; + + if (dev->pcie_type != PCI_EXP_TYPE_ENDPOINT) + return -EINVAL; + + pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ARI); + if (!pos) + return -EIO; + + pci_read_config_word(dev, pos + PCI_ARI_CAP, &cap); + + return PCI_ARI_CAP_NFN(cap); +} +EXPORT_SYMBOL_GPL(pci_ari_next_fn); diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index d030996..e8506fe 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1032,6 +1032,9 @@ int pci_scan_slot(struct pci_bus *bus, i int func, nr...
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [2/4]
...ns; returns negative on failure. + */ +int pci_ari_next_fn(struct pci_dev *dev) +{ + int pos; + u16 cap; + + if (dev->pcie_type != PCI_EXP_TYPE_ENDPOINT) + return -EINVAL; + + pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ARI); + if (!pos) + return -EIO; + + pci_read_config_word(dev, pos + PCI_ARI_CAP, &cap); + + return PCI_ARI_CAP_NFN(cap); +} +EXPORT_SYMBOL_GPL(pci_ari_next_fn); diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index d030996..e8506fe 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1032,6 +1032,9 @@ int pci_scan_slot(struct pci_bus *bus, i int func, nr...
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [2/4]
...ns; returns negative on failure. + */ +int pci_ari_next_fn(struct pci_dev *dev) +{ + int pos; + u16 cap; + + if (dev->pcie_type != PCI_EXP_TYPE_ENDPOINT) + return -EINVAL; + + pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ARI); + if (!pos) + return -EIO; + + pci_read_config_word(dev, pos + PCI_ARI_CAP, &cap); + + return PCI_ARI_CAP_NFN(cap); +} +EXPORT_SYMBOL_GPL(pci_ari_next_fn); diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index d030996..e8506fe 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1032,6 +1032,9 @@ int pci_scan_slot(struct pci_bus *bus, i int func, nr...
2008 Sep 01
1
[PATCH 2/4 v2] PCI: support ARI capability
...ns; returns negative on failure. + */ +int pci_ari_next_fn(struct pci_dev *dev) +{ + int pos; + u16 cap; + + if (dev->pcie_type != PCI_EXP_TYPE_ENDPOINT) + return -EINVAL; + + pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ARI); + if (!pos) + return -EIO; + + pci_read_config_word(dev, pos + PCI_ARI_CAP, &cap); + + return PCI_ARI_CAP_NFN(cap); +} +EXPORT_SYMBOL_GPL(pci_ari_next_fn); diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 5abd69c..720a607 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -147,3 +147,11 @@ struct pci_slot_attribute { extern int pci_resource_alignment(s...
2008 Sep 01
1
[PATCH 2/4 v2] PCI: support ARI capability
...ns; returns negative on failure. + */ +int pci_ari_next_fn(struct pci_dev *dev) +{ + int pos; + u16 cap; + + if (dev->pcie_type != PCI_EXP_TYPE_ENDPOINT) + return -EINVAL; + + pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ARI); + if (!pos) + return -EIO; + + pci_read_config_word(dev, pos + PCI_ARI_CAP, &cap); + + return PCI_ARI_CAP_NFN(cap); +} +EXPORT_SYMBOL_GPL(pci_ari_next_fn); diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 5abd69c..720a607 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -147,3 +147,11 @@ struct pci_slot_attribute { extern int pci_resource_alignment(s...
2008 Sep 01
1
[PATCH 2/4 v2] PCI: support ARI capability
...ns; returns negative on failure. + */ +int pci_ari_next_fn(struct pci_dev *dev) +{ + int pos; + u16 cap; + + if (dev->pcie_type != PCI_EXP_TYPE_ENDPOINT) + return -EINVAL; + + pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ARI); + if (!pos) + return -EIO; + + pci_read_config_word(dev, pos + PCI_ARI_CAP, &cap); + + return PCI_ARI_CAP_NFN(cap); +} +EXPORT_SYMBOL_GPL(pci_ari_next_fn); diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 5abd69c..720a607 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -147,3 +147,11 @@ struct pci_slot_attribute { extern int pci_resource_alignment(s...
2008 Sep 27
2
[PATCH 3/6 v3] PCI: support ARI capability
.../* Uncorrectable Error Status */ @@ -536,5 +541,14 @@ #define HT_CAPTYPE_GEN3 0xD0 /* Generation 3 hypertransport configuration */ #define HT_CAPTYPE_PM 0xE0 /* Hypertransport powermanagement configuration */ +/* Alternative Routing-ID Interpretation */ +#define PCI_ARI_CAP 0x04 /* ARI Capability Register */ +#define PCI_ARI_CAP_MFVC 0x0001 /* MFVC Function Groups Capability */ +#define PCI_ARI_CAP_ACS 0x0002 /* ACS Function Groups Capability */ +#define PCI_ARI_CAP_NFN(x) (((x) >> 8) & 0xff) /* Next Function Number */ +#defi...
2008 Sep 27
2
[PATCH 3/6 v3] PCI: support ARI capability
.../* Uncorrectable Error Status */ @@ -536,5 +541,14 @@ #define HT_CAPTYPE_GEN3 0xD0 /* Generation 3 hypertransport configuration */ #define HT_CAPTYPE_PM 0xE0 /* Hypertransport powermanagement configuration */ +/* Alternative Routing-ID Interpretation */ +#define PCI_ARI_CAP 0x04 /* ARI Capability Register */ +#define PCI_ARI_CAP_MFVC 0x0001 /* MFVC Function Groups Capability */ +#define PCI_ARI_CAP_ACS 0x0002 /* ACS Function Groups Capability */ +#define PCI_ARI_CAP_NFN(x) (((x) >> 8) & 0xff) /* Next Function Number */ +#defi...