Skip to content
Commit 0e1cd3d9 authored by Xiongfeng Wang's avatar Xiongfeng Wang Committed by Michael Ellerman
Browse files

cxl: Use pci_find_vsec_capability() to simplify the code



PCI core add pci_find_vsec_capability() to query VSEC. We can use that
core API to simplify the code.

The only logical change is that pci_find_vsec_capability check the
Vendor ID before finding the VSEC.

PCI spec rev 5.0 says in 7.9.5.2 Vendor-Specific Header:
  VSEC ID - This field is a vendor-defined ID number that indicates the
  nature and format of the VSEC structure
  Software must qualify the Vendor ID before interpreting this field.

Signed-off-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: default avatarAndrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230804075630.186054-1-wangxiongfeng2@huawei.com
parent 6039fcd3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment