OSDN Git Service

PCI: altera: Move retrain from fixup to altera_pcie_host_init()
authorLey Foon Tan <lftan@altera.com>
Fri, 26 Aug 2016 01:47:25 +0000 (09:47 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jan 2019 21:16:11 +0000 (22:16 +0100)
commitbb1de61e06c6eb0a602e0e86399af22476bc2289
tree994c02e5d4730290542438a82696b4a2c223bf24
parent2f5e06cf8ff289bb2b2cf278c1f78c5d63f4870a
PCI: altera: Move retrain from fixup to altera_pcie_host_init()

commit ce4f1c7ad490aa7129bde5632d6e53943f8a866c upstream.

Previously we used a PCI early fixup to initiate a link retrain on Altera
devices.  But Altera PCIe IP can be configured as either a Root Port or an
Endpoint, and they might have same vendor ID, so the fixup would be run for
both.

We only want to initiate a link retrain for Altera Root Port devices, not
for Endpoints, so move the link retrain functionality from the fixup to
altera_pcie_host_init().

[bhelgaas: changelog]
Signed-off-by: Ley Foon Tan <lftan@altera.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Claudius Heine <claudius.heine.ext@siemens.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pci/host/pcie-altera.c