VirtualBox

Changeset 18418 in vbox for trunk/src


Ignore:
Timestamp:
Mar 27, 2009 5:38:06 PM (16 years ago)
Author:
vboxsync
Message:

quick fix for #3775

File:
1 edited

Legend:

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

    r18414 r18418  
    804804}
    805805
     806#ifdef IN_RING3
     807
    806808/**
    807809 * Store receive message descriptor and hand it over to the host (the VM guest).
     
    852854    }
    853855}
     856
     857#endif /* IN_RING3 */
    854858
    855859/** Checks if it's a bad (as in invalid) RMD.*/
     
    15491553        if (pcnetRmdLoad(pThis, &rmd, PHYSADDR(pThis, addr), false))
    15501554            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));
    15511562    }
    15521563
     
    37473758    int         rc;
    37483759
    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);
    37623768}
    37633769
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