]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
PCI: Fix PRI and PASID consistency
authorAlex Williamson <alex.williamson@redhat.com>
Wed, 2 Nov 2011 20:07:15 +0000 (14:07 -0600)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Thu, 3 Nov 2011 15:04:58 +0000 (08:04 -0700)
These are extended capabilities, rename and move to proper
group for consistency.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/ats.c
include/linux/pci_regs.h

index f727a09eb72fc9a04ffe0481eb7330d778d4f3d9..7fe4eef3ceffec0f570cff6a757446b1dae1f1b5 100644 (file)
@@ -173,7 +173,7 @@ int pci_enable_pri(struct pci_dev *pdev, u32 reqs)
        u32 max_requests;
        int pos;
 
-       pos = pci_find_ext_capability(pdev, PCI_PRI_CAP);
+       pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI);
        if (!pos)
                return -EINVAL;
 
@@ -204,7 +204,7 @@ void pci_disable_pri(struct pci_dev *pdev)
        u16 control;
        int pos;
 
-       pos = pci_find_ext_capability(pdev, PCI_PRI_CAP);
+       pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI);
        if (!pos)
                return;
 
@@ -225,7 +225,7 @@ bool pci_pri_enabled(struct pci_dev *pdev)
        u16 control;
        int pos;
 
-       pos = pci_find_ext_capability(pdev, PCI_PRI_CAP);
+       pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI);
        if (!pos)
                return false;
 
@@ -247,7 +247,7 @@ int pci_reset_pri(struct pci_dev *pdev)
        u16 control;
        int pos;
 
-       pos = pci_find_ext_capability(pdev, PCI_PRI_CAP);
+       pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI);
        if (!pos)
                return -EINVAL;
 
@@ -280,7 +280,7 @@ bool pci_pri_stopped(struct pci_dev *pdev)
        u16 control, status;
        int pos;
 
-       pos = pci_find_ext_capability(pdev, PCI_PRI_CAP);
+       pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI);
        if (!pos)
                return true;
 
@@ -309,7 +309,7 @@ int pci_pri_status(struct pci_dev *pdev)
        u16 status, control;
        int pos;
 
-       pos = pci_find_ext_capability(pdev, PCI_PRI_CAP);
+       pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PRI);
        if (!pos)
                return -EINVAL;
 
@@ -340,7 +340,7 @@ int pci_enable_pasid(struct pci_dev *pdev, int features)
        u16 control, supported;
        int pos;
 
-       pos = pci_find_ext_capability(pdev, PCI_PASID_CAP);
+       pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PASID);
        if (!pos)
                return -EINVAL;
 
@@ -374,7 +374,7 @@ void pci_disable_pasid(struct pci_dev *pdev)
        u16 control = 0;
        int pos;
 
-       pos = pci_find_ext_capability(pdev, PCI_PASID_CAP);
+       pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PASID);
        if (!pos)
                return;
 
@@ -398,7 +398,7 @@ int pci_pasid_features(struct pci_dev *pdev)
        u16 supported;
        int pos;
 
-       pos = pci_find_ext_capability(pdev, PCI_PASID_CAP);
+       pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PASID);
        if (!pos)
                return -EINVAL;
 
@@ -424,7 +424,7 @@ int pci_max_pasids(struct pci_dev *pdev)
        u16 supported;
        int pos;
 
-       pos = pci_find_ext_capability(pdev, PCI_PASID_CAP);
+       pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_PASID);
        if (!pos)
                return -EINVAL;
 
index b5d9657f31004d64e53d9467646c1f268f4d51ab..090d3a9f5b2644f436f5d646309eb0d9c30e88f3 100644 (file)
 #define PCI_EXT_CAP_ID_ARI     14
 #define PCI_EXT_CAP_ID_ATS     15
 #define PCI_EXT_CAP_ID_SRIOV   16
+#define PCI_EXT_CAP_ID_PRI     19
 #define PCI_EXT_CAP_ID_LTR     24
+#define PCI_EXT_CAP_ID_PASID   27
 
 /* Advanced Error Reporting */
 #define PCI_ERR_UNCOR_STATUS   4       /* Uncorrectable Error Status */
 #define  PCI_ATS_MIN_STU       12      /* shift of minimum STU block */
 
 /* Page Request Interface */
-#define PCI_PRI_CAP            0x13    /* PRI capability ID */
 #define PCI_PRI_CONTROL_OFF    0x04    /* Offset of control register */
 #define PCI_PRI_STATUS_OFF     0x06    /* Offset of status register */
 #define PCI_PRI_ENABLE         0x0001  /* Enable mask */
 #define PCI_PRI_ALLOC_REQ_OFF  0x0c    /* Cap offset for max reqs allowed */
 
 /* PASID capability */
-#define PCI_PASID_CAP          0x1b    /* PASID capability ID */
 #define PCI_PASID_CAP_OFF      0x04    /* PASID feature register */
 #define PCI_PASID_CONTROL_OFF   0x06    /* PASID control register */
 #define PCI_PASID_ENABLE       0x01    /* Enable/Supported bit */