Re: [BUG] Bisected Problem with LSI PCI FC Adapter

Bjorn Helgaas
2014-09-12T20:38:37Z

On Fri, Sep 12, 2014 at 2:05 PM, Dirk Gouders <dirk@gouders.net> wrote:
> ...
> Yinghai,
>
> I now applied your patches and tested them:
>
> echo 1 > /sys/bus/pci/devices/0000\:00\:0a.0/pcie_link_disable
> echo 0 > /sys/bus/pci/devices/0000\:00\:0a.0/pcie_link_disable
>
> The FC Adapter did not show up, this is the dmesg output (I also tested
> with 0b.0):
>
> [ 143.294168] pcieport 0000:00:0a.0: pcie_link_disable_set: lnk_ctrl = 18
> [ 148.284456] pcieport 0000:00:0a.0: pcie_link_disable_set: lnk_ctrl = 8
> [ 304.065942] pcieport 0000:00:0b.0: pcie_link_disable_set: lnk_ctrl = 18
> [ 309.035278] pcieport 0000:00:0b.0: pcie_link_disable_set: lnk_ctrl = 8
>
> So, probably my test environment does not work as expected and I have to
> test it on the failing machine.

I think you probably did reproduce the problem, it's just that it
wasn't fixed by bouncing the link. What if you try the following:

DEV=00:0a.0
setpci -s$DEV BRIDGE_CONTROL.W=0x0040
sleep 1
setpci -s$DEV BRIDGE_CONTROL.W=0x0000
sleep 1
echo 1 > /sys/bus/pci/rescan

Thanks to your patch, we reconfigured the secondary bus number of
bridge 00:0a.0. The commands above should reset the FC device behind
that bridge. I suspect it will then respond when we rescan that bus.

Bjorn