]> git.baikalelectronics.ru Git - kernel.git/commit
PCI/cxgb4: Extend T3 PCI quirk to T4+ devices
authorCasey Leedom <leedom@chelsio.com>
Thu, 15 Feb 2018 14:33:18 +0000 (20:03 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Feb 2018 20:41:53 +0000 (15:41 -0500)
commit1a2d870e3f795e763dc8a6a4eb5fb516e018b7c2
tree6e778ba537d21c28123285a08bc1d35cbb7cfe8f
parent32b432d6c42952d0f57600c296aeeabd2cd274e8
PCI/cxgb4: Extend T3 PCI quirk to T4+ devices

We've run into a problem where our device is attached
to a Virtual Machine and the use of the new pci_set_vpd_size()
API doesn't help.  The VM kernel has been informed that
the accesses are okay, but all of the actual VPD Capability
Accesses are trapped down into the KVM Hypervisor where it
goes ahead and imposes the silent denials.

The right idea is to follow the kernel.org
commit cd52b26eee0c ("PCI: Enable access to non-standard VPD for
Chelsio devices (cxgb3)") which Alexey Kardashevskiy authored
to establish a PCI Quirk for our T3-based adapters. This commit
extends that PCI Quirk to cover Chelsio T4 devices and later.

The advantage of this approach is that the VPD Size gets set early
in the Base OS/Hypervisor Boot and doesn't require that the cxgb4
driver even be available in the Base OS/Hypervisor.  Thus PF4 can
be exported to a Virtual Machine and everything should work.

Fixes: ea6b3dcef08d ("cxgb4: Set VPD size so we can read both VPD structures")
Cc: <stable@vger.kernel.org> # v4.9+
Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: Arjun Vynipadath <arjun@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
drivers/pci/quirks.c