VirtualBox

Changeset 24638 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Nov 13, 2009 1:58:10 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
54794
Message:

PCI: Fix interrupt mapping for certain slots behind a bridge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Bus/DevPCI.cpp

    r24265 r24638  
    22082208     * of our parent passing the device which asserted the interrupt instead of the device of the bridge.
    22092209     */
    2210     PPCIBUS     pBus = PDMINS_2_DATA(pDevIns, PPCIBUS);
    2211     int iIrqPinBridge = 0;
    2212     uint8_t uDevFnBridge = pPciDev->devfn;
     2210    PPCIBUS    pBus          = PDMINS_2_DATA(pDevIns, PPCIBUS);
     2211    PPCIDEVICE pPciDevBus    = pPciDev;
     2212    int        iIrqPinBridge = iIrq;
     2213    uint8_t    uDevFnBridge  = 0;
    22132214
    22142215    /* Walk the chain until we reach the host bus. */
    2215     while (pBus->iBus != 0)
    2216     {
    2217         uDevFnBridge = pBus->PciDev.devfn;
    2218         iIrqPinBridge = ((uDevFnBridge >> 3) + iIrqPinBridge) & 3;
     2216    do
     2217    {
     2218        uDevFnBridge  = pBus->PciDev.devfn;
     2219        iIrqPinBridge = ((pPciDevBus->devfn >> 3) + iIrqPinBridge) & 3;
     2220
    22192221        /* Get the parent. */
    22202222        pBus = pBus->PciDev.Int.s.CTX_SUFF(pBus);
    2221     }
     2223        pPciDevBus = &pBus->PciDev;
     2224    } while (pBus->iBus != 0);
    22222225
    22232226    AssertMsg(pBus->iBus == 0, ("This is not the host pci bus iBus=%d\n", pBus->iBus));
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette