[<prev] [next>] [day] [month] [year] [list]
Message-Id: <0898a9bd92cfcf2ab07e5dd5ba59dc181b88edec.1551909341.git.sathyanarayanan.kuppuswamy@linux.intel.com>
Date: Wed, 6 Mar 2019 14:11:17 -0800
From: sathyanarayanan.kuppuswamy@...ux.intel.com
To: bhelgaas@...gle.com, corbet@....net
Cc: linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-pci@...r.kernel.org,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
Ashok Raj <ashok.raj@...el.com>,
Keith Busch <keith.busch@...el.com>
Subject: [PATCH v1 4/5] PCI/ATS: For PF/VF skip ATS initalization if spec check failed
From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@...ux.intel.com>
Don't initialize ATS for VF/PF devices if the ATS Capability
implementaion is not aligned with PCIe spec r4.0 sec 9.3.7.8.
Cc: Ashok Raj <ashok.raj@...el.com>
Cc: Keith Busch <keith.busch@...el.com>
Suggested-by: Ashok Raj <ashok.raj@...el.com>
Reviewed-by: Keith Busch <keith.busch@...el.com>
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@...ux.intel.com>
---
drivers/pci/ats.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/pci/ats.c b/drivers/pci/ats.c
index 28bbf7dad425..11299d93a59a 100644
--- a/drivers/pci/ats.c
+++ b/drivers/pci/ats.c
@@ -23,6 +23,12 @@ void pci_ats_init(struct pci_dev *dev)
if (pci_ats_disabled())
return;
+ /* If ATS Cap is invalid then return */
+ if (dev->is_virtfn || dev->is_physfn) {
+ if (dev->invalid_cap & PCI_IOV_INVALID_ATS)
+ return;
+ }
+
pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ATS);
if (!pos)
return;
--
2.20.1
Powered by blists - more mailing lists