PCI: altera: Check link status before retrain link
authorLey Foon Tan <lftan@altera.com>
Tue, 21 Jun 2016 08:53:12 +0000 (16:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jan 2019 21:16:11 +0000 (22:16 +0100)
commitcb3ff0382e582c823cbd2ba549b7754c6416ab78
treea8d446af9911a0e9306dd3a7c18d696486e67139
parent9efffbc8191dd989065d4cf12e50d2abc84bd1fb
PCI: altera: Check link status before retrain link

commit c622032ebc538cb3869c312ae3ad235a99da84b6 upstream.

Check the link status before retraining.  If the link is not up, don't
bother trying to retrain it.

[bhelgaas: split code move to separate patch, 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