Skip to contentSkip to conversation

AMD IOV: Fix xen start up bug on non-iommu machine

PATCH New Wei Wang2 1 participant 1 message Apr 21, 2008

lore
Share & tools
lore

Wei Wang2

author
#0 lore raw

PATCH 1/1 AMD IOV: Fix xen start up bug on non-iommu machine

Keir,
This patch fixes a Xen start up bug on non-iommu machine.

Signature · 12 lines
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy 
xen/drivers/passthrough/amd/iommu_detect.c +2 -3
diff -r 491074885dcb xen/drivers/passthrough/amd/iommu_detect.c
@@ -220,9 +220,8 @@ static int __init scan_functions_for_iom
 
     func = 0;
     count = 1;
-    while ( VALID_PCI_VENDOR_ID(pci_conf_read16(bus, dev, func,
-                                                PCI_VENDOR_ID)) &&
-            !error && (func < count) )
+    while ( (func < count) && !error &&
+        VALID_PCI_VENDOR_ID(pci_conf_read16(bus, dev, func, PCI_VENDOR_ID)) )
     {
         hdr_type = pci_conf_read8(bus, dev, func, PCI_HEADER_TYPE);
 

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