linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King <rmk+kernel@arm.linux.org.uk>
To: Jason Cooper <jason@lakedaemon.net>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/6] pci: mvebu: provide a compliant PCI configuration space
Date: Wed, 23 Sep 2015 18:17:26 +0100	[thread overview]
Message-ID: <E1Zenfa-0004cy-WE@rmk-PC.arm.linux.org.uk> (raw)
In-Reply-To: <20150923171706.GL21084@n2100.arm.linux.org.uk>

PCI requires reads to reserved or unimplemented configuration space to
return zero and complete normally.  However, the root port software
implementation was returning 0xfffffff and PCIBIOS_BAD_REGISTER_NUMBER.
Fix this.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 drivers/pci/host/pci-mvebu.c | 9 +++++++--
 1 file 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,
 		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)
-- 
2.1.0


  reply	other threads:[~2015-09-23 17:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-23 17:17 [PATCH 0/6] mvebu PCI fixes and cleanups Russell King - ARM Linux
2015-09-23 17:17 ` Russell King [this message]
2015-09-23 17:17 ` [PATCH 2/6] pci: mvebu: generate proper configuration access cycles Russell King
2015-09-24 14:30   ` Andrew Lunn
2015-09-24 22:23   ` Andrew Lunn
2015-09-24 22:43     ` Russell King - ARM Linux
2015-09-24 22:40       ` Andrew Lunn
2015-09-23 17:17 ` [PATCH 3/6] pci: mvebu: use of_get_available_child_count() Russell King
2015-09-23 17:17 ` [PATCH 4/6] pci: mvebu: use for_each_available_child_of_node() to walk child nodes Russell King
2015-09-23 17:17 ` [PATCH 5/6] pci: mvebu: report full node name when reporting a DT error Russell King
2015-09-23 17:17 ` [PATCH 6/6] pci: mvebu: use port->name rather than "PCIe%d.%d" Russell King
2015-09-24 23:36 ` [PATCH 0/6] mvebu PCI fixes and cleanups Andrew Lunn
2015-09-25  7:38 ` Thomas Petazzoni
2015-09-25 12:51   ` Bjorn Helgaas
2015-10-08 16:26 ` Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1Zenfa-0004cy-WE@rmk-PC.arm.linux.org.uk \
    --to=rmk+kernel@arm.linux.org.uk \
    --cc=bhelgaas@google.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=thomas.petazzoni@free-electrons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).