From 739ecc629f35931e14136231f06a1935466816e7 Mon Sep 17 00:00:00 2001 From: Junjie Mao Date: Wed, 20 Apr 2022 11:04:06 +0800 Subject: [PATCH] board_inspector: filter out non-present PCI buses The lookup extractor of the board inspector filters out non-PCI or non-present devices by checking the presence of vendor ID and class code. The same logic applies to PCI buses as well, but is neglected today. This patch adds the missing check. Tracked-On: #6689 Signed-off-by: Junjie Mao --- misc/config_tools/board_inspector/extractors/80-lookup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/config_tools/board_inspector/extractors/80-lookup.py b/misc/config_tools/board_inspector/extractors/80-lookup.py index 4fac22da0..51cb18708 100644 --- a/misc/config_tools/board_inspector/extractors/80-lookup.py +++ b/misc/config_tools/board_inspector/extractors/80-lookup.py @@ -134,7 +134,7 @@ def lookup_pci_devices(board_etree): for device in devices: lookup_pci_device(device, ids) - buses = board_etree.xpath("//bus[@type = 'pci']") + buses = board_etree.xpath("//bus[@type = 'pci' and vendor and class]") for bus in buses: lookup_pci_device(bus, ids)