Skip to contentSkip to conversation

pci: Fix pcie access for PCI_EXP_FLAGS

PATCH In review Alex Williamson 2 participants 2 messages Feb 14, 2013 – Feb 15, 2013 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pci: Fix pcie access for PCI_EXP_FLAGS

PCI_EXP_FLAGS_TYPE is a mask, not an offset. Fix it.

---
 drivers/pci/access.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/access.c +1 -1
index 3af0478..32046c5 100644
@@ -515,7 +515,7 @@ static bool pcie_capability_reg_implemented(struct pci_dev *dev, int pos)
 		return false;
 
 	switch (pos) {
-	case PCI_EXP_FLAGS_TYPE:
+	case PCI_EXP_FLAGS:
 		return true;
 	case PCI_EXP_DEVCAP:
 	case PCI_EXP_DEVCTL:
maintainer
#1 lore raw
Quoted 3 lines · Alex Williamson

PCI_EXP_FLAGS_TYPE is a mask, not an offset. Fix it.

I applied this to pci/misc so it will appear in v3.9 and marked it for stable for v3.7+.

Thanks!

Quoted 18 lines
---
 drivers/pci/access.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/access.c +1 -1
index 3af0478..32046c5 100644
@@ -515,7 +515,7 @@ static bool pcie_capability_reg_implemented(struct pci_dev *dev, int pos)
                return false;
 
        switch (pos) {
-       case PCI_EXP_FLAGS_TYPE:
+       case PCI_EXP_FLAGS:
                return true;
        case PCI_EXP_DEVCAP:
        case PCI_EXP_DEVCTL: