Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 1d34bd5ae937157c68c1d2a605bb0b67 > files > 21

libvirt-0.6.3-20.1.el5_4.src.rpm

diff -up ./src/pci.c~reset ./src/pci.c
--- ./src/pci.c~reset	2009-07-31 11:25:05.000000000 -0400
+++ ./src/pci.c	2009-07-31 11:23:32.000000000 -0400
@@ -316,7 +316,7 @@ pciFindCapabilityOffset(pciDevice *dev, 
 static unsigned
 pciDetectFunctionLevelReset(pciDevice *dev)
 {
-    uint16_t caps;
+    uint32_t caps;
     uint8_t pos;
 
     /* The PCIe Function Level Reset capability allows
@@ -326,7 +326,7 @@ pciDetectFunctionLevelReset(pciDevice *d
      * on SR-IOV NICs at the moment.
      */
     if (dev->pcie_cap_pos) {
-        caps = pciRead16(dev, dev->pcie_cap_pos + PCI_EXP_DEVCAP);
+        caps = pciRead32(dev, dev->pcie_cap_pos + PCI_EXP_DEVCAP);
         if (caps & PCI_EXP_DEVCAP_FLR) {
             VIR_DEBUG("%s %s: detected PCIe FLR capability", dev->id, dev->name);
             return 1;