- Timestamp:
- Mar 27, 2009 5:38:06 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevPCNet.cpp
r18414 r18418 804 804 } 805 805 806 #ifdef IN_RING3 807 806 808 /** 807 809 * Store receive message descriptor and hand it over to the host (the VM guest). … … 852 854 } 853 855 } 856 857 #endif /* IN_RING3 */ 854 858 855 859 /** Checks if it's a bad (as in invalid) RMD.*/ … … 1549 1553 if (pcnetRmdLoad(pThis, &rmd, PHYSADDR(pThis, addr), false)) 1550 1554 cbRxBuffers += 4096-rmd.rmd1.bcnt; 1555 /* Hack: Make sure that all receive buffers are touched when the 1556 * device is initialized. */ 1557 static char aBuf[4096]; 1558 RTGCPHYS32 rbadr = PHYSADDR(pThis, rmd.rmd0.rbadr); 1559 /* don't change the content */ 1560 PDMDevHlpPhysRead(pDevIns, rbadr, aBuf, RT_MIN(sizeof(aBuf), 4096U-rmd.rmd1.bcnt)); 1561 PDMDevHlpPhysWrite(pDevIns, rbadr, aBuf, RT_MIN(sizeof(aBuf), 4096U-rmd.rmd1.bcnt)); 1551 1562 } 1552 1563 … … 3747 3758 int rc; 3748 3759 3749 /* 3750 * Don't block if we cannot enter here. 3751 */ 3752 rc = PDMR3CritSectTryEnter(&pThis->CritSect); 3753 if (RT_SUCCESS(rc)) 3754 { 3755 STAM_PROFILE_ADV_START(&pThis->StatTimer, a); 3756 pcnetPollTimer(pThis); 3757 PDMCritSectLeave(&pThis->CritSect); 3758 STAM_PROFILE_ADV_STOP(&pThis->StatTimer, a); 3759 } 3760 else 3761 pcnetPollTimerStart(pThis); 3760 STAM_PROFILE_ADV_START(&pThis->StatTimer, a); 3761 rc = PDMCritSectEnter(&pThis->CritSect, VERR_SEM_BUSY); 3762 AssertReleaseRC(rc); 3763 3764 pcnetPollTimer(pThis); 3765 3766 PDMCritSectLeave(&pThis->CritSect); 3767 STAM_PROFILE_ADV_STOP(&pThis->StatTimer, a); 3762 3768 } 3763 3769
Note:
See TracChangeset
for help on using the changeset viewer.