PCI: Add ACS quirk for Pericom PI7C9X2G switches
authorNathan Rossi <nathan.rossi@digi.com>
Fri, 10 Sep 2021 02:58:23 +0000 (02:58 +0000)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 5 Nov 2021 11:07:44 +0000 (06:07 -0500)
commitacd61ffb2f1678fa5eb4170a3a4c530145fe2e64
tree595dddc5a87ad5e6e771d17eb0616c5f42e22fd0
parente3f4bd3462f6f796594ecc0dda7144ed2d1e5a26
PCI: Add ACS quirk for Pericom PI7C9X2G switches

The Pericom PI7C9X2G404/PI7C9X2G304/PI7C9X2G303 PCIe switches have an
erratum for ACS P2P Request Redirect behaviour when used in the cut-through
forwarding mode. The recommended work around for this issue is to use the
switch in store and forward mode. The erratum results in packets being
queued and not being delivered upstream, which can be observed as very poor
downstream device performance and/or dropped device-generated
data/interrupts.

Add a fixup so that when enabling or resuming the downstream port we check
if it has enabled ACS P2P Request Redirect, and if so, change the device
(via the upstream port) to use the store and forward operating mode.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=177471
Link: https://lore.kernel.org/r/20210910025823.196508-1-nathan@nathanrossi.com
Tested-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Nathan Rossi <nathan.rossi@digi.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/quirks.c