PCI: altera: Fix altera_pcie_link_is_up()
authorLey Foon Tan <lftan@altera.com>
Wed, 2 Mar 2016 09:43:07 +0000 (17:43 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jan 2019 21:16:11 +0000 (22:16 +0100)
commitecd77ebfa6ddcf728c8eccb4cdfebc23ab7125b9
treeb935f31a73f4e0aa42cb393ec75d232b28440781
parent271137c0385839090dc195d5e3f41fd1d8999372
PCI: altera: Fix altera_pcie_link_is_up()

commit eff31f4002c4e25b9b8c39d0a3a551c6c64c77e8 upstream.

Originally altera_pcie_link_is_up() decided the link was up if any of the
low four bits of the LTSSM register were set.  But the link is only up if
the LTSSM state is L0, so check for that exact value.

[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