[PATCH][V2] acpi: dmar: add a warning when PCI device is not found

Alex Hung alex.hung at canonical.com
Fri Aug 6 17:36:22 UTC 2021


BugLink: https://bugs.launchpad.net/bugs/1936458

Signed-off-by: Alex Hung <alex.hung at canonical.com>
---

[V2] Add PCI SEG:BUS:DEV:FUNC to the warning message.

 src/acpi/dmar/dmar.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/acpi/dmar/dmar.c b/src/acpi/dmar/dmar.c
index af9ee277..5b06c8c7 100644
--- a/src/acpi/dmar/dmar.c
+++ b/src/acpi/dmar/dmar.c
@@ -166,8 +166,11 @@ static int acpi_parse_one_dev_scope(fwts_framework *fw,
 			goto error;
 		dev_type = read_pci_device_secondary_bus_number(seg, bus,
 			path->dev, path->fn, &sec_bus);
-		if (dev_type < 0) /* no such device */
+		if (dev_type < 0) {	/* no such device */
+			fwts_warning(fw, "PCI device %04Xh:%02Xh:%02Xh.%02Xh is not found.",
+				     seg, bus, path->dev, path->fn);
 			goto error;
+		}
 		path++;
 		count--;
 		bus = sec_bus;
-- 
2.32.0




More information about the fwts-devel mailing list