PCI: Add DMA alias quirk for PLX PEX NTB
authorJames Sewart <jamessewart@arista.com>
Tue, 10 Dec 2019 22:25:40 +0000 (16:25 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Feb 2020 07:36:37 +0000 (08:36 +0100)
commit90053ff023da2e93569924f2c71e6aca4455665f
treeb716749bbe1b51f0121b3a419c9701f1ba8addbd
parent27a35f09367f0fe6e8d6a525be2447d7a66b90ca
PCI: Add DMA alias quirk for PLX PEX NTB

[ Upstream commit 7b90dfc4873b87c468cc6046538f46a531c1d785 ]

The PLX PEX NTB forwards DMA transactions using Requester IDs that don't
exist as PCI devices.  The devfn for a transaction is used as an index into
a lookup table storing the origin of a transaction on the other side of the
bridge.

Alias all possible devfns to the NTB device so that any transaction coming
in is governed by the mappings for the NTB.

Signed-off-by: James Sewart <jamessewart@arista.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/quirks.c