From: Russell King Date: Wed, 23 Sep 2015 17:17:26 +0000 (+0100) Subject: PCI: mvebu: Return zero for reserved or unimplemented config space X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=58c19a140de555b2bef41b8bf95439c36d555836;p=linux-beck.git 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 (Armada XP GP) Tested-by: Andrew Lunn (Kirkwood DIR665) Signed-off-by: Russell King Signed-off-by: Bjorn Helgaas Reviewed-by: Thomas Petazzoni --- 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, break; default: - *value = 0xffffffff; - return PCIBIOS_BAD_REGISTER_NUMBER; + /* + * PCI defines configuration read accesses to reserved or + * unimplemented registers to read as zero and complete + * normally. + */ + *value = 0; + return PCIBIOS_SUCCESSFUL; } if (size == 2)