Displaying 8 results from an estimated 8 matches for "pci_ari_cap_nfn".
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [2/4]
...*/
+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 = 0;
int scan_all_fns;
+ if (bus-&...
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [2/4]
...*/
+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 = 0;
int scan_all_fns;
+ if (bus-&...
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [2/4]
...*/
+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 = 0;
int scan_all_fns;
+ if (bus-&...
2008 Sep 01
1
[PATCH 2/4 v2] PCI: support ARI capability
...*/
+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(struct pci_dev *dev, int resno);
extern...
2008 Sep 01
1
[PATCH 2/4 v2] PCI: support ARI capability
...*/
+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(struct pci_dev *dev, int resno);
extern...
2008 Sep 01
1
[PATCH 2/4 v2] PCI: support ARI capability
...*/
+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(struct pci_dev *dev, int resno);
extern...
2008 Sep 27
2
[PATCH 3/6 v3] PCI: support ARI capability
...t 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 */
+#define PCI_ARI_CTRL 0x06 /* ARI Control Register */
+#define PCI_ARI_CTRL_MFVC 0x0001 /* MFVC Function Groups Enable */
+#define PCI_ARI_CTRL_ACS 0x0002 /* ACS Function Groups Enable */
+#define PCI_ARI_CTRL...
2008 Sep 27
2
[PATCH 3/6 v3] PCI: support ARI capability
...t 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 */
+#define PCI_ARI_CTRL 0x06 /* ARI Control Register */
+#define PCI_ARI_CTRL_MFVC 0x0001 /* MFVC Function Groups Enable */
+#define PCI_ARI_CTRL_ACS 0x0002 /* ACS Function Groups Enable */
+#define PCI_ARI_CTRL...