Changeset 20703 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Jun 19, 2009 9:04:22 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevPCNet.cpp
r20631 r20703 4210 4210 4211 4211 /** 4212 * Takes down the link temporarily if it's current status is up. 4213 * 4214 * This is used during restore and when replumbing the network link. 4215 * 4216 * The temporary link outage is supposed to indicate to the OS that all network 4217 * connections have been lost and that it for instance is appropriate to 4218 * renegotiate any DHCP lease. 4219 * 4220 * @param pThis The PCNet instance data. 4221 */ 4222 static void pcnetTempLinkDown(PCNetState *pThis) 4223 { 4224 if (pThis->fLinkUp) 4225 { 4226 pThis->fLinkTempDown = true; 4227 pThis->cLinkDownReported = 0; 4228 pThis->aCSR[0] |= RT_BIT(15) | RT_BIT(13); /* ERR | CERR (this is probably wrong) */ 4229 pThis->Led.Asserted.s.fError = pThis->Led.Actual.s.fError = 1; 4230 int rc = TMTimerSetMillies(pThis->pTimerRestore, 5000); 4231 AssertRC(rc); 4232 } 4233 } 4234 4235 4236 /** 4212 4237 * Serializes the receive thread, it may be working inside the critsect. 4213 4238 * … … 4361 4386 #endif 4362 4387 /* Indicate link down to the guest OS that all network connections have been lost. */ 4363 if (pThis->fLinkUp) 4364 { 4365 pThis->fLinkTempDown = true; 4366 pThis->cLinkDownReported = 0; 4367 pThis->aCSR[0] |= RT_BIT(15) | RT_BIT(13); /* ERR | CERR (this is probably wrong) */ 4368 pThis->Led.Asserted.s.fError = pThis->Led.Actual.s.fError = 1; 4369 return TMTimerSetMillies(pThis->pTimerRestore, 5000); 4370 } 4388 pcnetTempLinkDown(pThis); 4389 4371 4390 return VINF_SUCCESS; 4372 4391 } … … 4735 4754 * network card 4736 4755 */ 4737 if (pThis->fLinkUp && RT_SUCCESS(rc)) 4738 { 4739 pThis->fLinkTempDown = true; 4740 pThis->cLinkDownReported = 0; 4741 pThis->aCSR[0] |= RT_BIT(15) | RT_BIT(13); /* ERR | CERR (this is probably wrong) */ 4742 pThis->Led.Asserted.s.fError = pThis->Led.Actual.s.fError = 1; 4743 TMTimerSetMillies(pThis->pTimerRestore, 5000); 4744 } 4756 if (RT_SUCCESS(rc)) 4757 pcnetTempLinkDown(pThis); 4745 4758 4746 4759 PDMCritSectLeave(&pThis->CritSect);
Note:
See TracChangeset
for help on using the changeset viewer.