VirtualBox

Changeset 805 in vbox


Ignore:
Timestamp:
Feb 9, 2007 11:17:17 AM (18 years ago)
Author:
vboxsync
Message:

Corrected link restoration again

File:
1 edited

Legend:

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

    r801 r805  
    119119#define MII_MAX_REG                     32
    120120#define CSR_MAX_REG                     128
     121
     122/* Maximum number of times we report a link down to the guest (failure to send frame) */
     123#define PCNET_MAX_LINKDOWN_REPORTED     3
    121124
    122125/* Frame cache */
     
    19931996            break;
    19941997
     1998        /* Don't continue sending packets when the link is down. */
     1999        if (RT_UNLIKELY(   !pcnetIsLinkUp(pData)
     2000                        &&  pData->cLinkDownReported > PCNET_MAX_LINKDOWN_REPORTED)
     2001            )
     2002            break;
     2003
    19952004#ifdef PCNET_DEBUG_TMD
    19962005        Log2(("#%d TMDLOAD 0x%08x\n", PCNETSTATE_2_DEVINS(pData)->iInstance, PHYSADDR(pData, CSR_CXDA(pData))));
     
    21842193        AssertReleaseRC(rc);
    21852194
    2186         if (RT_LIKELY(pcnetIsLinkUp(pData)))
    2187             rc = pcnetAsyncTransmit(pData);
     2195        rc = pcnetAsyncTransmit(pData);
    21882196        PDMCritSectLeave(&pData->CritSect);
    21892197    }
     
    32313239
    32323240    rc = VERR_GENERAL_FAILURE;
    3233     if (pData->cLinkDownReported <= 3)
     3241    if (pData->cLinkDownReported <= PCNET_MAX_LINKDOWN_REPORTED)
    32343242        rc = TMTimerSetMillies(pData->pTimerRestore, 1500);
    32353243    if (VBOX_FAILURE(rc))
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