- Timestamp:
- Mar 20, 2009 1:43:11 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevE1000.cpp
r17183 r18118 4271 4271 { 4272 4272 E1KSTATE *pState = IFACE_TO_STATE(pInterface, INetworkConfig); 4273 switch (enmState) 4274 { 4275 case PDMNETWORKLINKSTATE_UP: 4273 bool fOldUp = !!(STATUS & STATUS_LU); 4274 bool fNewUp = enmState == PDMNETWORKLINKSTATE_UP; 4275 4276 if (fNewUp != fOldUp) 4277 { 4278 if (fNewUp) 4279 { 4276 4280 E1kLog(("%s Link is up\n", INSTANCE(pState))); 4277 4281 STATUS |= STATUS_LU; 4278 4282 Phy::setLinkStatus(&pState->phy, true); 4279 break; 4280 case PDMNETWORKLINKSTATE_DOWN: 4283 } 4284 else 4285 { 4281 4286 E1kLog(("%s Link is down\n", INSTANCE(pState))); 4282 4287 STATUS &= ~STATUS_LU; 4283 4288 Phy::setLinkStatus(&pState->phy, false); 4284 break; 4285 case PDMNETWORKLINKSTATE_DOWN_RESUME: 4286 /// @todo I failed to locate any references to this state, 4287 /// looks like it is never used. 4288 E1kLog(("%s Link is down temporarely\n", INSTANCE(pState))); 4289 STATUS &= ~STATUS_LU; 4290 Phy::setLinkStatus(&pState->phy, false); 4291 break; 4292 default: 4293 E1kLog(("%s Invalid link state: %d\n", INSTANCE(pState), enmState)); 4294 return VERR_INVALID_PARAMETER; 4295 } 4296 e1kRaiseInterrupt(pState, VERR_SEM_BUSY, ICR_LSC); 4289 } 4290 e1kRaiseInterrupt(pState, VERR_SEM_BUSY, ICR_LSC); 4291 if (pState->pDrv) 4292 pState->pDrv->pfnNotifyLinkChanged(pState->pDrv, enmState); 4293 } 4297 4294 return VINF_SUCCESS; 4298 4295 }
Note:
See TracChangeset
for help on using the changeset viewer.