Prefer first PCI device id

The 'base' device id in a multi-function
device may be considered to be the first,
rather than the last.

Change-Id: I4f39b81fb0225b4221aeffc108c12388cf7a7ea1
This commit is contained in:
Jarrod Johnson 2023-07-27 14:10:52 -04:00
parent 7a3eb593d1
commit b1a693a0e7
2 changed files with 2 additions and 2 deletions

View File

@ -796,7 +796,7 @@ class IMMClient(object):
if venid is not None:
bdata['PCI Vendor ID'] = '{0:04x}'.format(venid)
devid = fundata.get(self.ADP_DEVID, None)
if devid is not None:
if devid is not None and 'PCI Device ID' not in bdata:
bdata['PCI Device ID'] = '{0:04x}'.format(devid)
venid = fundata.get(self.ADP_SUBVENID, None)
if venid is not None:

View File

@ -1709,7 +1709,7 @@ class OEMHandler(generic.OEMHandler):
if venid is not None:
bdata['PCI Vendor ID'] = '{0:04x}'.format(venid)
devid = fundata.get(self.ADP_DEVID, None)
if devid is not None:
if devid is not None and 'PCIE Device ID' not in bdata:
bdata['PCI Device ID'] = '{0:04x}'.format(devid)
venid = fundata.get(self.ADP_SUBVENID, None)
if venid is not None: