* [PATCH 0/2] PCI: iproc: MPS fix and quirks
@ 2017-01-27 21:44 Jon Mason
2017-01-27 21:44 ` [PATCH 1/2] PCI: iproc: allow the MPS to be set Jon Mason
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Jon Mason @ 2017-01-27 21:44 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: bcm-kernel-feedback-list, linux-pci, linux-arm-kernel, linux-kernel
A patch that corrects an issue where the MPS could not be set, and
another that fixes some quirks in the PAXC
Jon Mason (2):
PCI: iproc: allow the MPS to be set
PCI: Add quirk entry for NS2 PAXC PCI
drivers/pci/host/pcie-iproc.c | 5 ++++-
drivers/pci/quirks.c | 21 +++++++++++++++++++++
2 files changed, 25 insertions(+), 1 deletion(-)
--
2.7.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] PCI: iproc: allow the MPS to be set
2017-01-27 21:44 [PATCH 0/2] PCI: iproc: MPS fix and quirks Jon Mason
@ 2017-01-27 21:44 ` Jon Mason
2017-01-27 21:44 ` [PATCH 2/2] PCI: Add quirk entry for NS2 PAXC PCI Jon Mason
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Jon Mason @ 2017-01-27 21:44 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: bcm-kernel-feedback-list, linux-pci, linux-arm-kernel, linux-kernel
pcie_bus_configure_settings() needs to be called on each of the root
ports to allow for the MPS to be configured for all of the children
devices.
Signed-off-by: Jon Mason <jon.mason@broadcom.com>
---
drivers/pci/host/pcie-iproc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c
index 3ebc025..0f39bd2 100644
--- a/drivers/pci/host/pcie-iproc.c
+++ b/drivers/pci/host/pcie-iproc.c
@@ -1205,7 +1205,7 @@ int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res)
struct device *dev;
int ret;
void *sysdata;
- struct pci_bus *bus;
+ struct pci_bus *bus, *child;
dev = pcie->dev;
@@ -1278,6 +1278,9 @@ int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res)
if (pcie->map_irq)
pci_fixup_irqs(pci_common_swizzle, pcie->map_irq);
+ list_for_each_entry(child, &bus->children, node)
+ pcie_bus_configure_settings(child);
+
pci_bus_add_devices(bus);
return 0;
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] PCI: Add quirk entry for NS2 PAXC PCI
2017-01-27 21:44 [PATCH 0/2] PCI: iproc: MPS fix and quirks Jon Mason
2017-01-27 21:44 ` [PATCH 1/2] PCI: iproc: allow the MPS to be set Jon Mason
@ 2017-01-27 21:44 ` Jon Mason
2017-01-27 21:46 ` [PATCH 0/2] PCI: iproc: MPS fix and quirks Ray Jui
2017-02-08 21:55 ` Bjorn Helgaas
3 siblings, 0 replies; 6+ messages in thread
From: Jon Mason @ 2017-01-27 21:44 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: bcm-kernel-feedback-list, linux-pci, linux-arm-kernel, linux-kernel
The Broadcom Northstar2 SoC has a number of quirks for the PAXC
(internal/fake) PCI bus. Specifically, the PCI config space is shared
between the root port and the first PF (ie., PF0), and a number of
fields are tied to zero (thus preventing them from being set). These
cannot be "fixed" in device firmware, so we must fix them with a quirk.
Signed-off-by: Jon Mason <jon.mason@broadcom.com>
---
drivers/pci/quirks.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 1800bef..c5ef20a 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2239,6 +2239,27 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_BROADCOM,
PCI_DEVICE_ID_TIGON3_5719,
quirk_brcm_5719_limit_mrrs);
+#ifdef CONFIG_PCIE_IPROC_PLATFORM
+static void quirk_paxc_bridge(struct pci_dev *pdev)
+{
+ /* The PCI config space is shared with the PAXC root port and the first
+ * Ethernet device. So, we need to workaround this by telling the PCI
+ * code that the bridge is not an Ethernet device.
+ */
+ if (pdev->hdr_type == PCI_HEADER_TYPE_BRIDGE)
+ pdev->class = PCI_CLASS_BRIDGE_PCI << 8;
+
+ /* MPSS is not being set properly (as it is currently 0). This is
+ * because that area of the PCI config space is hard coded to zero, and
+ * is not modifiable by firmware. Set this to 2 (e.g., 512 byte MPS)
+ * so that the MPS can be set to the real max value.
+ */
+ pdev->pcie_mpss = 2;
+}
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0x16cd, quirk_paxc_bridge);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0x16f0, quirk_paxc_bridge);
+#endif
+
/* Originally in EDAC sources for i82875P:
* Intel tells BIOS developers to hide device 6 which
* configures the overflow device access containing
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] PCI: iproc: MPS fix and quirks
2017-01-27 21:44 [PATCH 0/2] PCI: iproc: MPS fix and quirks Jon Mason
2017-01-27 21:44 ` [PATCH 1/2] PCI: iproc: allow the MPS to be set Jon Mason
2017-01-27 21:44 ` [PATCH 2/2] PCI: Add quirk entry for NS2 PAXC PCI Jon Mason
@ 2017-01-27 21:46 ` Ray Jui
2017-02-08 21:55 ` Bjorn Helgaas
3 siblings, 0 replies; 6+ messages in thread
From: Ray Jui @ 2017-01-27 21:46 UTC (permalink / raw)
To: Jon Mason, Bjorn Helgaas
Cc: bcm-kernel-feedback-list, linux-pci, linux-arm-kernel, linux-kernel
The entire patch set looks good to me. Thanks!
Acked-by: Ray Jui <ray.jui@broadcom.com>
On 1/27/2017 1:44 PM, Jon Mason wrote:
> A patch that corrects an issue where the MPS could not be set, and
> another that fixes some quirks in the PAXC
>
> Jon Mason (2):
> PCI: iproc: allow the MPS to be set
> PCI: Add quirk entry for NS2 PAXC PCI
>
> drivers/pci/host/pcie-iproc.c | 5 ++++-
> drivers/pci/quirks.c | 21 +++++++++++++++++++++
> 2 files changed, 25 insertions(+), 1 deletion(-)
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] PCI: iproc: MPS fix and quirks
2017-01-27 21:44 [PATCH 0/2] PCI: iproc: MPS fix and quirks Jon Mason
` (2 preceding siblings ...)
2017-01-27 21:46 ` [PATCH 0/2] PCI: iproc: MPS fix and quirks Ray Jui
@ 2017-02-08 21:55 ` Bjorn Helgaas
2017-02-08 22:33 ` Jon Mason
3 siblings, 1 reply; 6+ messages in thread
From: Bjorn Helgaas @ 2017-02-08 21:55 UTC (permalink / raw)
To: Jon Mason
Cc: Bjorn Helgaas, linux-pci, bcm-kernel-feedback-list, linux-kernel,
linux-arm-kernel
On Fri, Jan 27, 2017 at 04:44:07PM -0500, Jon Mason wrote:
> A patch that corrects an issue where the MPS could not be set, and
> another that fixes some quirks in the PAXC
>
> Jon Mason (2):
> PCI: iproc: allow the MPS to be set
> PCI: Add quirk entry for NS2 PAXC PCI
>
> drivers/pci/host/pcie-iproc.c | 5 ++++-
> drivers/pci/quirks.c | 21 +++++++++++++++++++++
> 2 files changed, 25 insertions(+), 1 deletion(-)
Applied with Ray's ack to pci/host-iproc for v4.11, thanks!
It looks to me like several other drivers need a similar MPS fix.
I'll CC you on the patches.
Bjorn
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] PCI: iproc: MPS fix and quirks
2017-02-08 21:55 ` Bjorn Helgaas
@ 2017-02-08 22:33 ` Jon Mason
0 siblings, 0 replies; 6+ messages in thread
From: Jon Mason @ 2017-02-08 22:33 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Bjorn Helgaas, linux-pci, BCM Kernel Feedback, open list,
linux-arm-kernel
On Wed, Feb 8, 2017 at 4:55 PM, Bjorn Helgaas <helgaas@kernel.org> wrote:
> On Fri, Jan 27, 2017 at 04:44:07PM -0500, Jon Mason wrote:
>> A patch that corrects an issue where the MPS could not be set, and
>> another that fixes some quirks in the PAXC
>>
>> Jon Mason (2):
>> PCI: iproc: allow the MPS to be set
>> PCI: Add quirk entry for NS2 PAXC PCI
>>
>> drivers/pci/host/pcie-iproc.c | 5 ++++-
>> drivers/pci/quirks.c | 21 +++++++++++++++++++++
>> 2 files changed, 25 insertions(+), 1 deletion(-)
>
> Applied with Ray's ack to pci/host-iproc for v4.11, thanks!
>
> It looks to me like several other drivers need a similar MPS fix.
> I'll CC you on the patches.
I'm happy to look at whatever you want to CC me on, but this is an SoC
thing that I do not believe is applicable to the standard PCI device
(if that is what you are referring to).
Thanks,
Jon
>
> Bjorn
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-02-08 23:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-27 21:44 [PATCH 0/2] PCI: iproc: MPS fix and quirks Jon Mason
2017-01-27 21:44 ` [PATCH 1/2] PCI: iproc: allow the MPS to be set Jon Mason
2017-01-27 21:44 ` [PATCH 2/2] PCI: Add quirk entry for NS2 PAXC PCI Jon Mason
2017-01-27 21:46 ` [PATCH 0/2] PCI: iproc: MPS fix and quirks Ray Jui
2017-02-08 21:55 ` Bjorn Helgaas
2017-02-08 22:33 ` Jon Mason
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).