VirtualBox

Changeset 24470 in vbox for trunk/src


Ignore:
Timestamp:
Nov 6, 2009 5:56:31 PM (15 years ago)
Author:
vboxsync
Message:

#3987: Virtio: Fixed the status reporting required by recent kernels (virtio drivers).

File:
1 edited

Legend:

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

    r24191 r24470  
    760760    rc = PDMDevHlpIOPortRegister(pPciDev->pDevIns, pState->addrIOPort, cb, 0,
    761761                                 vpciIOPortOut, vpciIOPortIn, NULL, NULL, "VirtioNet");
    762 #if 0
     762#ifdef VNET_GC_SUPPORT
    763763    AssertRCReturn(rc, rc);
    764764    rc = PDMDevHlpIOPortRegisterR0(pPciDev->pDevIns, pState->addrIOPort, cb, 0,
     
    13721372    vpciReset(&pState->VPCI);
    13731373    // TODO: Implement reset
     1374    if (pState->fCableConnected)
     1375        STATUS = VNET_S_LINK_UP;
     1376    else
     1377        STATUS = 0;
    13741378}
    13751379
     
    14561460static int vnetCanReceive(VNETSTATE *pState)
    14571461{
    1458     int rc = vpciCsEnter(&pState->VPCI, VERR_SEM_BUSY);
     1462    int rc = vnetCsEnter(pState, VERR_SEM_BUSY);
    14591463    LogFlow(("%s vnetCanReceive\n", INSTANCE(pState)));
    14601464    if (!(pState->VPCI.uStatus & VPCI_STATUS_DRV_OK))
     
    14741478
    14751479    LogFlow(("%s vnetCanReceive -> %Vrc\n", INSTANCE(pState), rc));
    1476     vpciCsLeave(&pState->VPCI);
     1480    vnetCsLeave(pState);
    14771481    return rc;
    14781482}
     
    21352139    AssertLogRelReturnVoid(iLUN == 0);
    21362140
    2137     vpciCsEnter(&pState->VPCI, VERR_SEM_BUSY);
     2141    vnetCsEnter(pState, VERR_SEM_BUSY);
    21382142
    21392143    /*
     
    21432147    pState->pDrv = NULL;
    21442148
    2145     vpciCsLeave(&pState->VPCI);
     2149    vnetCsLeave(pState);
    21462150}
    21472151
     
    21662170    AssertLogRelReturn(iLUN == 0, VERR_PDM_NO_SUCH_LUN);
    21672171
    2168     vpciCsEnter(&pState->VPCI, VERR_SEM_BUSY);
     2172    vnetCsEnter(pState, VERR_SEM_BUSY);
    21692173
    21702174    /*
     
    22032207        vnetTempLinkDown(pState);
    22042208
    2205     vpciCsLeave(&pState->VPCI);
     2209    vnetCsLeave(pState);
    22062210    return rc;
    22072211
     
    22392243
    22402244    /* Flags, combination of the PDM_DEVREG_FLAGS_* \#defines. */
    2241     PDM_DEVREG_FLAGS_DEFAULT_BITS, // | PDM_DEVREG_FLAGS_RC | PDM_DEVREG_FLAGS_R0,
     2245#ifdef VNET_GC_SUPPORT
     2246    PDM_DEVREG_FLAGS_DEFAULT_BITS | PDM_DEVREG_FLAGS_RC | PDM_DEVREG_FLAGS_R0,
     2247#else
     2248    PDM_DEVREG_FLAGS_DEFAULT_BITS,
     2249#endif
    22422250    /* Device class(es), combination of the PDM_DEVREG_CLASS_* \#defines. */
    22432251    PDM_DEVREG_CLASS_NETWORK,
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