Commit bbf864aa authored by Zhangfei Gao's avatar Zhangfei Gao Committed by Zheng Zengkai
Browse files

PCI: PASID can be enabled without TLP prefix

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I472UK?from=project-issue



----------------------------------------------------------------------

A PASID-like feature is implemented on AMBA without using TLP prefixes
and these devices have PASID capability though not supporting TLP.
Adding a pasid_no_tlp bit for "PASID works without TLP prefixes" and
pci_enable_pasid() checks pasid_no_tlp as well as eetlp_prefix_path.

Suggested-by: default avatarBjorn Helgaas <helgaas@kernel.org>
Signed-off-by: default avatarZhangfei Gao <zhangfei.gao@linaro.org>
Reviewed-by: default avatarHao Fang <fanghao11@huawei.com>
Reviewed-by: default avatarMingqiang Ling <lingmingqiang@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent c1f9f10a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -380,7 +380,7 @@ int pci_enable_pasid(struct pci_dev *pdev, int features)
	if (WARN_ON(pdev->pasid_enabled))
		return -EBUSY;

	if (!pdev->eetlp_prefix_path)
	if (!pdev->eetlp_prefix_path && !pdev->pasid_no_tlp)
		return -EINVAL;

	if (!pasid)
+1 −0
Original line number Diff line number Diff line
@@ -382,6 +382,7 @@ struct pci_dev {
					   supported from root to here */
	int		l1ss;		/* L1SS Capability pointer */
#endif
	unsigned int	pasid_no_tlp:1;		/* PASID works without TLP Prefix */
	unsigned int	eetlp_prefix_path:1;	/* End-to-End TLP Prefix */

	pci_channel_state_t error_state;	/* Current connectivity state */