VirtualBox

Changeset 27002 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 3, 2010 6:34:42 PM (15 years ago)
Author:
vboxsync
Message:

e1000: A workaround for Windows lockups on link status interrupt.

Location:
trunk/src/VBox/Devices
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DevE1000.cpp

    r26574 r27002  
    863863    PTMTIMERR3              pTADTimerR3;   /**< Tranmsit Absolute Delay Timer - R3. */
    864864    PTMTIMERR3              pIntTimerR3;            /**< Late Interrupt Timer - R3. */
     865    PTMTIMERR3              pLUTimerR3;               /**< Link Up(/Restore) Timer. */
    865866
    866867    PPDMDEVINSR0            pDevInsR0;                   /**< Device instance - R0. */
     
    872873    PTMTIMERR0              pTADTimerR0;   /**< Tranmsit Absolute Delay Timer - R0. */
    873874    PTMTIMERR0              pIntTimerR0;            /**< Late Interrupt Timer - R0. */
     875    PTMTIMERR0              pLUTimerR0;          /**< Link Up(/Restore) Timer - R0. */
    874876
    875877    PPDMDEVINSRC            pDevInsRC;                   /**< Device instance - RC. */
     
    881883    PTMTIMERRC              pTADTimerRC;   /**< Tranmsit Absolute Delay Timer - RC. */
    882884    PTMTIMERRC              pIntTimerRC;            /**< Late Interrupt Timer - RC. */
    883 
    884     PTMTIMERR3  pLUTimer;                             /**< Link Up(/Restore) Timer. */
     885    PTMTIMERRC              pLUTimerRC;          /**< Link Up(/Restore) Timer - RC. */
     886
     887#if HC_ARCH_BITS != 32
     888    uint32_t                u32Padding2;
     889#endif
     890
    885891    PPDMTHREAD  pTxThread;                                    /**< Transmit thread. */
    886892    PDMCRITSECT cs;                  /**< Critical section - what is it protecting? */
     
    21082114        {
    21092115            /* The driver indicates that we should bring up the link */
    2110             STATUS |= STATUS_LU;
    2111 #ifdef E1K_LSC_ON_SLU
    2112             Phy::setLinkStatus(&pState->phy, true);
    2113             e1kRaiseInterrupt(pState, VERR_SEM_BUSY, ICR_LSC);
    2114 #endif /* E1K_LSC_ON_SLU */
     2116            /* Do so in 5 seconds. */
     2117            e1kArmTimer(pState, pState->CTX_SUFF(pLUTimer), 5000000);
    21152118        }
    21162119        if (value & CTRL_VME)
     
    44594462            e1kRaiseInterrupt(pState, VERR_SEM_BUSY, ICR_LSC);
    44604463            /* Restore the link back in 5 second. */
    4461             e1kArmTimer(pState, pState->pLUTimer, 5000000);
     4464            e1kArmTimer(pState, pState->pLUTimerR3, 5000000);
    44624465        }
    44634466        else
     
    47344737        e1kRaiseInterrupt(pState, VERR_SEM_BUSY, ICR_LSC);
    47354738        /* Restore the link back in five seconds. */
    4736         e1kArmTimer(pState, pState->pLUTimer, 5000000);
     4739        e1kArmTimer(pState, pState->pLUTimerR3, 5000000);
    47374740    }
    47384741    e1kMutexRelease(pState);
     
    48324835        e1kRaiseInterrupt(pState, VERR_SEM_BUSY, ICR_LSC);
    48334836        /* Restore the link back in 5 second. */
    4834         e1kArmTimer(pState, pState->pLUTimer, 5000000);
     4837        e1kArmTimer(pState, pState->pLUTimerR3, 5000000);
    48354838    }
    48364839
     
    48934896#endif /* E1K_USE_TX_TIMERS */
    48944897    pState->pIntTimerRC   = TMTimerRCPtr(pState->pIntTimerR3);
     4898    pState->pLUTimerRC    = TMTimerRCPtr(pState->pLUTimerR3);
    48954899}
    48964900
     
    52495253    rc = PDMDevHlpTMTimerCreate(pDevIns, TMCLOCK_VIRTUAL, e1kLinkUpTimer, pState,
    52505254                                TMTIMER_FLAGS_DEFAULT_CRIT_SECT, /** @todo check locking here. */
    5251                                 "E1000 Link Up Timer", &pState->pLUTimer);
     5255                                "E1000 Link Up Timer", &pState->pLUTimerR3);
    52525256    if (RT_FAILURE(rc))
    52535257        return rc;
     5258    pState->pLUTimerR0 = TMTimerR0Ptr(pState->pLUTimerR3);
     5259    pState->pLUTimerRC = TMTimerRCPtr(pState->pLUTimerR3);
    52545260
    52555261    /* Status driver */
  • trunk/src/VBox/Devices/testcase/tstDeviceStructSizeRC.cpp

    r26594 r27002  
    12971297    GEN_CHECK_OFF(E1KSTATE, pIntTimerR0);
    12981298    GEN_CHECK_OFF(E1KSTATE, pIntTimerRC);
    1299     GEN_CHECK_OFF(E1KSTATE, pLUTimer);
     1299    GEN_CHECK_OFF(E1KSTATE, pLUTimerR3);
     1300    GEN_CHECK_OFF(E1KSTATE, pLUTimerR0);
     1301    GEN_CHECK_OFF(E1KSTATE, pLUTimerRC);
    13001302    GEN_CHECK_OFF(E1KSTATE, pTxThread);
    13011303    GEN_CHECK_OFF(E1KSTATE, cs);
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