diff mbox

pci: Fix pcie access for PCI_EXP_FLAGS

Message ID 20130214183438.16138.15416.stgit@bling.home (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

Alex Williamson Feb. 14, 2013, 6:35 p.m. UTC
PCI_EXP_FLAGS_TYPE is a mask, not an offset.  Fix it.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
 drivers/pci/access.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Bjorn Helgaas Feb. 15, 2013, 6:53 p.m. UTC | #1
On Thu, Feb 14, 2013 at 11:35 AM, Alex Williamson
<alex.williamson@redhat.com> wrote:
> PCI_EXP_FLAGS_TYPE is a mask, not an offset.  Fix it.
>
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>

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

Thanks!

> ---
>  drivers/pci/access.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/access.c b/drivers/pci/access.c
> index 3af0478..32046c5 100644
> --- a/drivers/pci/access.c
> +++ b/drivers/pci/access.c
> @@ -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:
>
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/pci/access.c b/drivers/pci/access.c
index 3af0478..32046c5 100644
--- a/drivers/pci/access.c
+++ b/drivers/pci/access.c
@@ -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: