Skip to content

Commit

Permalink
Check for more invalid vendor/product IDs that signify device-not-pre…
Browse files Browse the repository at this point in the history
…sent

Signed-off-by: Alex Forencich <[email protected]>
  • Loading branch information
alexforencich committed Jun 24, 2023
1 parent 6572cbd commit 249970c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cocotbext/pcie/core/pci.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ async def scan(self, available_buses=0, timeout=1000, timeout_unit='ns'):
# read vendor ID and device ID
val = await self.rc.config_read_dword(dev_id, 0x000, 'little', timeout, timeout_unit)

if val is None or val == 0xffffffff:
if val in {0, 0xffffffff, 0xffff0000, 0x0000ffff}:
continue

# valid vendor ID
Expand Down

0 comments on commit 249970c

Please sign in to comment.