Skip to content
Commit b34d605d authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Will Deacon
Browse files

perf/dwc_pcie: Qualify RAS DES VSEC Capability by Vendor, Revision



PCI Vendor-Specific (VSEC) Capabilities are defined by each vendor.
Devices from different vendors may advertise a VSEC Capability with the DWC
RAS DES functionality, but the vendors may assign different VSEC IDs.

Search for the DWC RAS DES Capability using the VSEC ID and VSEC Rev
chosen by the vendor.

This does not fix a current problem because Alibaba, Ampere, and Qualcomm
all assigned the same VSEC ID and VSEC Rev for the DWC RAS DES Capability.

The potential issue is that we may add support for a device from another
vendor, where the vendor has already assigned DWC_PCIE_VSEC_RAS_DES_ID
(0x02) for an unrelated VSEC.  In that event, dwc_pcie_des_cap() would find
the unrelated VSEC and mistakenly assume it was a DWC RAS DES Capability.

Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-and-tested-by: default avatarIlkka Koskinen <ilkka@os.amperecomputing.com>
Reviewed-and-tested-by: default avatarShuai Xue <xueshuai@linux.alibaba.com>
Link: https://lore.kernel.org/r/20241209222938.3219364-1-helgaas@kernel.org


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent f03241fb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment