PCI: mvebu: Dynamically detect if the PEX link is up to enable hot plug
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Tue, 1 Oct 2013 17:58:00 +0000 (11:58 -0600)
committerJason Cooper <jason@lakedaemon.net>
Tue, 8 Oct 2013 16:45:16 +0000 (16:45 +0000)
commit9f352f0e6c0fa2dc608812df297769789b7ecc51
tree3b31078c8202355ee95240008cd4769042bee766
parent96ae0b548672adc12431312718835e77472f5bf0
PCI: mvebu: Dynamically detect if the PEX link is up to enable hot plug

Otherwise hotplugging the PEX doesn't work at all since the driver
detects the link state at probe time. Simply replacing the two tests
of haslink with a register read is enough to fix it.

Tested on kirkwood with repeated plug/unplug of the link partner.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
drivers/pci/host/pci-mvebu.c