[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [Patch] libxl: fix wrong mask of function number



libxl: fix wrong mask of function number

Function number is 3 bits. So the mask should be 0x7 instead 0x3.

Signed-off-by: Yang Zhang <yang.z.zhang@xxxxxxxxx>

diff -r 221f431092c0 -r a7e3fce593db tools/libxl/libxl_pci.c
--- a/tools/libxl/libxl_pci.c   Wed Jun 01 16:50:16 2011 +0100
+++ b/tools/libxl/libxl_pci.c   Thu Jun 02 15:42:20 2011 +0800
@@ -48,7 +48,7 @@
     value = 0;
     value |= (pcidev->bus & 0xff) << 16;
     value |= (pcidev->dev & 0x1f) << (8+3);
-    value |= (pcidev->func & 0x3) << (8+0);
+    value |= (pcidev->func & 0x7) << (8+0);

     return value;
 }

best regards
yang



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.