]> xenbits.xensource.com Git - xen.git/commitdiff
VT-d: DMAR device scope parse fixup
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 11 Apr 2008 08:12:56 +0000 (09:12 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 11 Apr 2008 08:12:56 +0000 (09:12 +0100)
Previously applied sanity check fixup is incorrect.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
xen/drivers/passthrough/vtd/dmar.c

index 19d5675a1b6dd2e39f2ba20cc75fcee977e932f9..0685d84010cb546774d11d3aab7520881e2bc69a 100644 (file)
@@ -231,7 +231,7 @@ static int scope_device_count(void *start, void *end)
         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->fn, PCI_SECONDARY_BUS);
@@ -353,7 +353,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->fn, PCI_SECONDARY_BUS);