From: Yang Zhang Date: Thu, 2 Jun 2011 16:42:03 +0000 (+0100) Subject: libxl: fix wrong mask of function number X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~10224^2~13 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c6386a7eecd4844c5e512ab5e7dca0fdeea0fdf5;p=xen.git 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 Acked-by: Ian Jackson Committed-by: Ian Jackson --- diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c index 55f199cc49..5b01b7696e 100644 --- a/tools/libxl/libxl_pci.c +++ b/tools/libxl/libxl_pci.c @@ -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; }