Revision eb28cb1b hw/pci/pcie.c

b/hw/pci/pcie.c
48 48

  
49 49
    assert(pci_is_express(dev));
50 50

  
51
    /*
52
     * Mangle type to convert Endpoints to Root Complex Integrated Endpoints.
53
     * Windows will report Code 10 (device cannot start) for regular Endpoints
54
     * on the Root Complex.
55
     */
56
    if (pci_bus_is_express(dev->bus) && pci_bus_is_root(dev->bus)) {
57
        switch (type) {
58
        case PCI_EXP_TYPE_ENDPOINT:
59
            type = PCI_EXP_TYPE_RC_END;
60
            break;
61
        }
62
    }
63

  
51 64
    pos = pci_add_capability(dev, PCI_CAP_ID_EXP, offset,
52 65
                                 PCI_EXP_VER2_SIZEOF);
53 66
    if (pos < 0) {

Also available in: Unified diff