]> git.baikalelectronics.ru Git - kernel.git/commit
switchtec: Fix minor bug with partition ID register
authorLogan Gunthorpe <logang@deltatee.com>
Mon, 22 May 2017 21:52:30 +0000 (16:52 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 22 May 2017 21:52:30 +0000 (16:52 -0500)
commit4df97606e6e0483f81c1a26c5407edf5a2ab2796
treee2627f003c78390e5e7adcfef4ffc4423313e5a9
parent0b4069f54fd3125c0f84a2910228bd41f04b1a6e
switchtec: Fix minor bug with partition ID register

When a switch endpoint is configured without NTB, the mmio_ntb registers
will read all zeros.  However, in corner case configurations where the
partition ID is not zero and NTB is not enabled, the code will have the
wrong partition ID and this causes the driver to use the wrong set of
drivers.  To fix this we simply take the partition ID from the system info
region.

Reported-by: Dingbao Chen <dingbao.chen@microsemi.com>
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/switch/switchtec.c