Skip to contentSkip to conversation

VT-d: DMAR device scope parse fixup

PATCH New Espen Skoglund 1 participant 1 message Apr 10, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 VT-d: DMAR device scope parse fixup

Previously applied sanity check fixup is incorrect.

xen/drivers/passthrough/vtd/dmar.c +2 -2
diff -r aed5788c659b xen/drivers/passthrough/vtd/dmar.c
@@ -236,7 +236,7 @@ static int scope_device_count(void *star
         bus = scope->start_bus;
         depth = (scope->length - sizeof(struct acpi_dev_scope))
 		    / sizeof(struct acpi_pci_path);
-        while ( --depth >= 0 )
+        while ( --depth > 0 )
         {
             bus = read_pci_config_byte(
                 bus, path_dev(path->dev, type), path->fn, PCI_SECONDARY_BUS);
@@ -358,7 +358,7 @@ static int __init acpi_parse_dev_scope(
 		    / sizeof(struct acpi_pci_path);
         bus = scope->start_bus;
 
-        while ( --depth >= 0 )
+        while ( --depth > 0 )
         {
             bus = read_pci_config_byte(
                 bus, path_dev(path->dev, type), path->fn, PCI_SECONDARY_BUS);

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel