Changeset 71944 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Apr 20, 2018 1:56:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevVirtioNet.cpp
r71789 r71944 528 528 529 529 /** 530 * Helper function that raises an interrupt if the guest is ready to receive it. 531 */ 532 int vnetRaiseInterrupt(PVNETSTATE pThis, int rcBusy, uint8_t u8IntCause) 533 { 534 if (pThis->VPCI.uStatus & VPCI_STATUS_DRV_OK) 535 return vpciRaiseInterrupt(&pThis->VPCI, rcBusy, u8IntCause); 536 return rcBusy; 537 } 538 539 540 /** 530 541 * Takes down the link temporarily if it's current status is up. 531 542 * … … 543 554 { 544 555 STATUS &= ~VNET_S_LINK_UP; 545 v pciRaiseInterrupt(&pThis->VPCI, VERR_SEM_BUSY, VPCI_ISR_CONFIG);556 vnetRaiseInterrupt(pThis, VERR_SEM_BUSY, VPCI_ISR_CONFIG); 546 557 /* Restore the link back in 5 seconds. */ 547 558 int rc = TMTimerSetMillies(pThis->pLinkUpTimer, pThis->cMsLinkUpDelay); … … 564 575 return; 565 576 STATUS |= VNET_S_LINK_UP; 566 v pciRaiseInterrupt(&pThis->VPCI, VERR_SEM_BUSY, VPCI_ISR_CONFIG);577 vnetRaiseInterrupt(pThis, VERR_SEM_BUSY, VPCI_ISR_CONFIG); 567 578 vnetWakeupReceive(pDevIns); 568 579 vnetCsLeave(pThis); … … 1076 1087 { 1077 1088 Log(("%s Link is up\n", INSTANCE(pThis))); 1089 pThis->fCableConnected = true; 1078 1090 STATUS |= VNET_S_LINK_UP; 1079 v pciRaiseInterrupt(&pThis->VPCI, VERR_SEM_BUSY, VPCI_ISR_CONFIG);1091 vnetRaiseInterrupt(pThis, VERR_SEM_BUSY, VPCI_ISR_CONFIG); 1080 1092 } 1081 1093 else … … 1084 1096 TMTimerStop(pThis->pLinkUpTimer); 1085 1097 Log(("%s Link is down\n", INSTANCE(pThis))); 1098 pThis->fCableConnected = false; 1086 1099 STATUS &= ~VNET_S_LINK_UP; 1087 v pciRaiseInterrupt(&pThis->VPCI, VERR_SEM_BUSY, VPCI_ISR_CONFIG);1100 vnetRaiseInterrupt(pThis, VERR_SEM_BUSY, VPCI_ISR_CONFIG); 1088 1101 } 1089 1102 if (pThis->pDrv) … … 1276 1289 { 1277 1290 Log(("%s Ignoring transmit requests from non-existent driver (status=0x%x).\n", INSTANCE(pThis), pThis->VPCI.uStatus)); 1291 return; 1292 } 1293 1294 if (!pThis->fCableConnected) 1295 { 1296 Log(("%s Ignoring transmit requests while cable is disconnected.\n", INSTANCE(pThis))); 1278 1297 return; 1279 1298 }
Note:
See TracChangeset
for help on using the changeset viewer.