Skip to content

Commit

Permalink
PCI: Fix PCI Express Capability accessors for PCI_EXP_FLAGS
Browse files Browse the repository at this point in the history
PCI_EXP_FLAGS_TYPE is a mask, not an offset.  Fix it.

Previously, pcie_capability_read_word(..., PCI_EXP_FLAGS, ...) would
fail.

[bhelgaas:  tweak changelog]
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: stable@vger.kernel.org	# v3.7+
  • Loading branch information
Alex Williamson authored and Bjorn Helgaas committed Feb 15, 2013
1 parent 775c739 commit 969daa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/access.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 969daa3

Please sign in to comment.