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

Shuai Xue xueshuai at linux.alibaba.com
Tue Dec 10 17:24:09 PST 2024



在 2024/12/10 22:53, Bjorn Helgaas 写道:
> On Tue, Dec 10, 2024 at 08:04:17PM +0800, Shuai Xue wrote:
>> 在 2024/12/10 06:29, Bjorn Helgaas 写道:
>>> From: Bjorn Helgaas <bhelgaas at google.com>
>>>
>>> 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.
> 
>>> -	for (vid = dwc_pcie_vendor_ids; vid->vendor_id; vid++) {
>>> +	for (vid = dwc_pcie_pmu_vsec_ids; vid->vendor_id; vid++) {
>>
>> How about checking the pdev->vendor with vid->vendor_id before
>> search the vesc cap?
>>
>> +		if (pdev->vendor != vid->vendor_id)
>> +			continue;
> 
> Every user of VSEC needs to specify the (Vendor ID, VSEC ID) and
> verify that the Vendor ID matches the device Vendor ID, so
> pci_find_vsec_capability() does this check internally, so I don't
> think we need to do it here.


I see. LGTM. Also, I quickly tested it on Yitian 710 and it works as expected.

Reviewed-and-tested-by: Shuai Xue <xueshuai at linux.alibaba.com>

Thanks.

Best Regards,
Shuai



More information about the linux-arm-kernel mailing list