aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2015-09-23 13:17:26 -0400
committerBjorn Helgaas <bhelgaas@google.com>2015-10-08 12:07:54 -0400
commit58c19a140de555b2bef41b8bf95439c36d555836 (patch)
tree58efc8c162df04e8ab055b2e7e292c3bca6c39b0
parent6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f (diff)
PCI: mvebu: Return zero for reserved or unimplemented config space
PCI requires reads to reserved or unimplemented configuration space to return zero and complete normally (see PCI r3.0, sec 6.1). However, the root port software implementation was returning 0xfffffff and PCIBIOS_BAD_REGISTER_NUMBER. Return zero when reading reserved or unimplemented config space. [bhelgaas: changelog] Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> (Armada XP GP) Tested-by: Andrew Lunn <andrew@lunn.ch> (Kirkwood DIR665) Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r--drivers/pci/host/pci-mvebu.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c
index 67ec5e1c99db..b6a096bc9422 100644
--- a/drivers/pci/host/pci-mvebu.c
+++ b/drivers/pci/host/pci-mvebu.c
@@ -515,8 +515,13 @@ static int mvebu_sw_pci_bridge_read(struct mvebu_pcie_port *port,
515 break; 515 break;
516 516
517 default: 517 default:
518 *value = 0xffffffff; 518 /*
519 return PCIBIOS_BAD_REGISTER_NUMBER; 519 * PCI defines configuration read accesses to reserved or
520 * unimplemented registers to read as zero and complete
521 * normally.
522 */
523 *value = 0;
524 return PCIBIOS_SUCCESSFUL;
520 } 525 }
521 526
522 if (size == 2) 527 if (size == 2)