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@intel.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
Yang Zhang committed 2011-06-02 17:42:03 +01:00
1 parent 83cd67d589
commit c6386a7eec
1 file changed
+1 -1
+1 -1
View File
@@ -48,7 +48,7 @@ static unsigned int pcidev_encode_bdf(libxl_device_pci *pcidev)
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;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.