OpenCloudOS-Kernel/drivers/pci/pcie
Stefan Mätje 4ec73791a6 PCI: Work around Pericom PCIe-to-PCI bridge Retrain Link erratum
Due to an erratum in some Pericom PCIe-to-PCI bridges in reverse mode
(conventional PCI on primary side, PCIe on downstream side), the Retrain
Link bit needs to be cleared manually to allow the link training to
complete successfully.

If it is not cleared manually, the link training is continuously restarted
and no devices below the PCI-to-PCIe bridge can be accessed.  That means
drivers for devices below the bridge will be loaded but won't work and may
even crash because the driver is only reading 0xffff.

See the Pericom Errata Sheet PI7C9X111SLB_errata_rev1.2_102711.pdf for
details.  Devices known as affected so far are: PI7C9X110, PI7C9X111SL,
PI7C9X130.

Add a new flag, clear_retrain_link, in struct pci_dev.  Quirks for affected
devices set this bit.

Note that pcie_retrain_link() lives in aspm.c because that's currently the
only place we use it, but this erratum is not specific to ASPM, and we may
retrain links for other reasons in the future.

Signed-off-by: Stefan Mätje <stefan.maetje@esd.eu>
[bhelgaas: apply regardless of CONFIG_PCIEASPM]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
CC: stable@vger.kernel.org
2019-04-06 09:25:47 -05:00
..
Kconfig PCI: Update PCIEPORTBUS Kconfig help text 2019-03-06 15:00:09 -06:00
Makefile PCI/LINK: Report degraded links via link bandwidth notification 2019-03-05 15:04:13 -06:00
aer.c PCI/AER: Use match_string() helper to simplify the code 2019-01-29 16:32:17 -06:00
aer_inject.c PCI/AER: Refactor error injection fallbacks 2018-10-18 19:43:19 -05:00
aspm.c PCI: Work around Pericom PCIe-to-PCI bridge Retrain Link erratum 2019-04-06 09:25:47 -05:00
bw_notification.c PCI/LINK: Report degraded links via link bandwidth notification 2019-03-05 15:04:13 -06:00
dpc.c PCI/DPC: Fix print AER status in DPC event handling 2019-02-21 17:07:20 -06:00
err.c PCI/ERR: Remove duplicated include from err.c 2018-10-02 16:04:40 -05:00
pme.c PCI/PME: Fix possible use-after-free on remove 2019-03-01 17:45:27 -06:00
portdrv.h PCI/LINK: Report degraded links via link bandwidth notification 2019-03-05 15:04:13 -06:00
portdrv_core.c PCI/LINK: Report degraded links via link bandwidth notification 2019-03-05 15:04:13 -06:00
portdrv_pci.c PCI/LINK: Report degraded links via link bandwidth notification 2019-03-05 15:04:13 -06:00
ptm.c Merge branch 'pci/spdx' into next 2018-02-01 11:40:07 -06:00