]> git.proxmox.com Git - mirror_qemu.git/commitdiff
xhci: add endpoint cap on express bus only
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 13 May 2014 07:51:11 +0000 (09:51 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 26 May 2014 06:41:07 +0000 (08:41 +0200)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/hcd-xhci.c

index 6753a4263dbd08abf5042f35bce05b63bf40c75b..a203bc6b41089bbad204269e32f33eb9bbc82942 100644 (file)
@@ -3594,8 +3594,10 @@ static int usb_xhci_initfn(struct PCIDevice *dev)
                      PCI_BASE_ADDRESS_SPACE_MEMORY|PCI_BASE_ADDRESS_MEM_TYPE_64,
                      &xhci->mem);
 
-    ret = pcie_endpoint_cap_init(dev, 0xa0);
-    assert(ret >= 0);
+    if (pci_bus_is_express(dev->bus)) {
+        ret = pcie_endpoint_cap_init(dev, 0xa0);
+        assert(ret >= 0);
+    }
 
     if (xhci->flags & (1 << XHCI_FLAG_USE_MSI)) {
         msi_init(dev, 0x70, xhci->numintrs, true, false);