PCI: Allow PASID on fake PCIe devices without TLP prefixes
authorZhangfei Gao <zhangfei.gao@linaro.org>
Tue, 13 Jul 2021 02:54:34 +0000 (10:54 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 26 Aug 2021 19:21:42 +0000 (14:21 -0500)
commit8c09e896cef8d908dd9a20a9f2a5c3fcb9799de3
tree0bbb22e4619e5c084f814c37f61e8af92f27ed80
parente73f0f0ee7541171d89f2e2491130c7771ba58d3
PCI: Allow PASID on fake PCIe devices without TLP prefixes

Some systems, e.g., HiSilicon KunPeng920 and KunPeng930, have devices that
appear as PCI but are actually on the AMBA bus.  Some of these fake PCI
devices support a PASID-like feature and they do have a working PASID
capability even though they do not use the PCIe Transport Layer Protocol
and do not support TLP prefixes.

Add a pasid_no_tlp bit for this "PASID works without TLP prefixes" case and
update pci_enable_pasid() so it can enable PASID on these devices.

Set this bit for HiSilicon KunPeng920 and KunPeng930.

[bhelgaas: squashed, commit log]
Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/1626144876-11352-2-git-send-email-zhangfei.gao@linaro.org
Link: https://lore.kernel.org/r/1626144876-11352-3-git-send-email-zhangfei.gao@linaro.org
Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Signed-off-by: Zhou Wang <wangzhou1@hisilicon.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/ats.c
drivers/pci/quirks.c
include/linux/pci.h