mbox series

[V2,0/1] Proposal of a patch to work around link retrain errata of Pericom PCIe brigdes

Message ID 20190305173122.11875-1-stefan.maetje@esd.eu
Headers show
Series Proposal of a patch to work around link retrain errata of Pericom PCIe brigdes | expand

Message

Stefan Mätje March 5, 2019, 5:31 p.m. UTC
This patch provides a quirk that should work around PCIe link retrain issues
with some Pericom PCIe-to-PCI bridges. It is the second version of the patch
referred to by https://patchwork.kernel.org/patch/10664475/ and is archived
at https://marc.info/?l=linux-pci&m=154110439803920

The original patch was only for the Pericom PI7C9X111SL bridge. This is the
only hardware I can test with.

In the meantime Brett Hull <bhull@redhat.com> brought to my attention that
the PI7C9X110 and PI7C9X130 devices are also affected. I had access to the
errata sheet for the PI7C9X130 PCI bridge and its has the same issue
documented.

Therefore the patch will now handle all three mentioned devices.

I'd like to quote the errata sheet PI7C9X111SLB_errata_rev1.2_102711.pdf

> In Reverse Mode, retrain Link bit is not cleared automatically; this bit
> needs to be cleared manually by configuration write after it is set.
>
> Problem:
> In Reverse mode, after setting Retrain Link (bit 5 of register C0h), this
> bit will stay on and PI7C9x111SL will continuously retrain until this bit
> is cleared by another Configuration Write to register C0h.
>
> Workaround:
> Issue another configuration write to clear Retrain Link bit after setting
> this bit. No delay is required between these two configuration write.

There is no public URL to download these errata sheets. Because Pericom has
been acquired by Diodes Inc. all information has to be downloaded from their
web site. Following the link below one can find a datasheet and there is a
button to request additional documents like the errata sheet for instance.

https://www.diodes.com/products/connectivity-and-timing/pcie-packet-switchbridges/pcie-pci-bridges/part/PI7C9X111SL#tab-details

@Brett Hull: Could you please test on your site and supply also a
	signed-off?

Stefan Mätje (1):
  PCI/ASPM: Work around link retrain errata of Pericom PCIe-to-PCI
    bridges

 drivers/pci/pcie/aspm.c | 49 ++++++++++++++++++++++++++++++++++---------------
 drivers/pci/quirks.c    | 20 ++++++++++++++++++++
 include/linux/pci.h     |  2 ++
 3 files changed, 56 insertions(+), 15 deletions(-)

--
2.15.0