VirtualBox

Changeset 40280 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Feb 28, 2012 7:47:00 PM (13 years ago)
Author:
vboxsync
Message:

Corrected a bunch of HC and GC uses in status codes.

Location:
trunk/src/VBox/Devices/Network
Files:
3 edited

Legend:

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

    r39367 r40280  
    21972197    { /* RST */
    21982198#ifndef IN_RING3
    2199         return VINF_IOM_HC_IOPORT_WRITE;
     2199        return VINF_IOM_R3_IOPORT_WRITE;
    22002200#else
    22012201        e1kHardReset(pState);
     
    22802280    return VINF_SUCCESS;
    22812281#else /* !IN_RING3 */
    2282     return VINF_IOM_HC_MMIO_WRITE;
     2282    return VINF_IOM_R3_MMIO_WRITE;
    22832283#endif /* !IN_RING3 */
    22842284}
     
    23172317    return rc;
    23182318#else /* !IN_RING3 */
    2319     return VINF_IOM_HC_MMIO_READ;
     2319    return VINF_IOM_R3_MMIO_READ;
    23202320#endif /* !IN_RING3 */
    23212321}
     
    23522352    return VINF_SUCCESS;
    23532353#else /* !IN_RING3 */
    2354     return VINF_IOM_HC_MMIO_WRITE;
     2354    return VINF_IOM_R3_MMIO_WRITE;
    23552355#endif /* !IN_RING3 */
    23562356}
     
    24372437static int e1kRegReadICR(E1KSTATE* pState, uint32_t offset, uint32_t index, uint32_t *pu32Value)
    24382438{
    2439     int rc = e1kCsEnter(pState, VINF_IOM_HC_MMIO_READ);
     2439    int rc = e1kCsEnter(pState, VINF_IOM_R3_MMIO_READ);
    24402440    if (RT_UNLIKELY(rc != VINF_SUCCESS))
    24412441        return rc;
     
    25032503{
    25042504    E1K_INC_ISTAT_CNT(pState->uStatIntICS);
    2505     return e1kRaiseInterrupt(pState, VINF_IOM_HC_MMIO_WRITE, value & s_e1kRegMap[ICS_IDX].writable);
     2505    return e1kRaiseInterrupt(pState, VINF_IOM_R3_MMIO_WRITE, value & s_e1kRegMap[ICS_IDX].writable);
    25062506}
    25072507
     
    25502550static int e1kRegWriteIMC(E1KSTATE* pState, uint32_t offset, uint32_t index, uint32_t value)
    25512551{
    2552     int rc = e1kCsEnter(pState, VINF_IOM_HC_MMIO_WRITE);
     2552    int rc = e1kCsEnter(pState, VINF_IOM_R3_MMIO_WRITE);
    25532553    if (RT_UNLIKELY(rc != VINF_SUCCESS))
    25542554        return rc;
     
    25932593        /* Promiscuity has changed, pass the knowledge on. */
    25942594#ifndef IN_RING3
    2595         return VINF_IOM_HC_IOPORT_WRITE;
     2595        return VINF_IOM_R3_IOPORT_WRITE;
    25962596#else
    25972597        if (pState->pDrvR3)
     
    26542654#ifndef IN_RING3
    26552655    /* XXX */
    2656 //    return VINF_IOM_HC_MMIO_WRITE;
     2656//    return VINF_IOM_R3_MMIO_WRITE;
    26572657#endif
    2658     int rc = e1kCsRxEnter(pState, VINF_IOM_HC_MMIO_WRITE);
     2658    int rc = e1kCsRxEnter(pState, VINF_IOM_R3_MMIO_WRITE);
    26592659    if (RT_LIKELY(rc == VINF_SUCCESS))
    26602660    {
     
    27032703#endif
    27042704        E1K_INC_ISTAT_CNT(pState->uStatIntRDTR);
    2705         return e1kRaiseInterrupt(pState, VINF_IOM_HC_MMIO_WRITE, ICR_RXT0);
     2705        return e1kRaiseInterrupt(pState, VINF_IOM_R3_MMIO_WRITE, ICR_RXT0);
    27062706    }
    27072707
     
    32103210        Assert(pSg->cbUsed <= pSg->cbAvailable);
    32113211    }
    3212 /*    E1kLog2(("%s <<< Outgoing packet. Dump follows: >>>\n"
     3212/*    E1kLog2(("%s < < < Outgoing packet. Dump follows: > > >\n"
    32133213            "%.*Rhxd\n"
    3214             "%s <<<<<<<<<<<<< End of dump >>>>>>>>>>>>\n",
     3214            "%s < < < < < < < < < < < < <  End of dump > > > > > > > > > > > >\n",
    32153215            INSTANCE(pState), cbFrame, pSg->aSegs[0].pvSeg, INSTANCE(pState)));*/
    32163216
     
    39823982static int e1kRegWriteTDT(E1KSTATE* pState, uint32_t offset, uint32_t index, uint32_t value)
    39833983{
    3984     int rc = e1kCsTxEnter(pState, VINF_IOM_HC_MMIO_WRITE);
     3984    int rc = e1kCsTxEnter(pState, VINF_IOM_R3_MMIO_WRITE);
    39853985    if (RT_UNLIKELY(rc != VINF_SUCCESS))
    39863986        return rc;
     
    43344334             */
    43354335#ifdef E1K_GLOBAL_MUTEX
    4336             rc = e1kMutexAcquire(pState, VINF_IOM_HC_MMIO_READ, RT_SRC_POS);
     4336            rc = e1kMutexAcquire(pState, VINF_IOM_R3_MMIO_READ, RT_SRC_POS);
    43374337#else
    43384338            //rc = e1kCsEnter(pState, VERR_SEM_BUSY, RT_SRC_POS);
     
    44174417                     INSTANCE(pState), uOffset, u32, s_e1kRegMap[index].abbrev, s_e1kRegMap[index].name));
    44184418#ifdef E1K_GLOBAL_MUTEX
    4419             rc = e1kMutexAcquire(pState, VINF_IOM_HC_MMIO_WRITE, RT_SRC_POS);
     4419            rc = e1kMutexAcquire(pState, VINF_IOM_R3_MMIO_WRITE, RT_SRC_POS);
    44204420#else
    44214421            //rc = e1kCsEnter(pState, VERR_SEM_BUSY, RT_SRC_POS);
     
    45414541                rc = e1kRegRead(pState, pState->uSelectedReg, pu32, cb);
    45424542                /** @todo wrong return code triggers assertions in the debug build; fix please */
    4543                 if (rc == VINF_IOM_HC_MMIO_READ)
    4544                     rc = VINF_IOM_HC_IOPORT_READ;
     4543                if (rc == VINF_IOM_R3_MMIO_READ)
     4544                    rc = VINF_IOM_R3_IOPORT_READ;
    45454545
    45464546                E1kLog2(("%s e1kIOPortIn: IODATA(4), reading from selected register %#010x, val=%#010x\n", szInst, pState->uSelectedReg, *pu32));
     
    45954595                rc = e1kRegWrite(pState, pState->uSelectedReg, &u32, cb);
    45964596                /** @todo wrong return code triggers assertions in the debug build; fix please */
    4597                 if (rc == VINF_IOM_HC_MMIO_WRITE)
    4598                     rc = VINF_IOM_HC_IOPORT_WRITE;
     4597                if (rc == VINF_IOM_R3_MMIO_WRITE)
     4598                    rc = VINF_IOM_R3_IOPORT_WRITE;
    45994599                break;
    46004600            default:
     
    49424942            if (!ASMBitTest(pState->auVFTA, E1K_SPEC_VLAN(RT_BE2H_U16(u16Ptr[7]))))
    49434943            {
    4944                 E1kLog2(("%s Packet filter: no VLAN match (id=%d)\n", 
     4944                E1kLog2(("%s Packet filter: no VLAN match (id=%d)\n",
    49454945                         INSTANCE(pState), E1K_SPEC_VLAN(RT_BE2H_U16(u16Ptr[7]))));
    49464946                return false;
  • trunk/src/VBox/Devices/Network/DevPCNet.cpp

    r39248 r40280  
    12151215    }
    12161216    STAM_COUNTER_INC(&CTXALLSUFF(pThis->StatRingWriteFailed)); ;
    1217     return VINF_IOM_HC_MMIO_WRITE; /* handle in ring3 */
     1217    return VINF_IOM_R3_MMIO_WRITE; /* handle in ring3 */
    12181218}
    12191219
     
    28082808                {
    28092809                    Log(("#%d pcnetCSRWriteU16: pcnetInit requested => HC\n", PCNET_INST_NR));
    2810                     return VINF_IOM_HC_IOPORT_WRITE;
     2810                    return VINF_IOM_R3_IOPORT_WRITE;
    28112811                }
    28122812#endif
     
    28952895                Log(("#%d: promiscuous mode changed to %d\n", PCNET_INST_NR, !!(val & 0x8000)));
    28962896#ifndef IN_RING3
    2897                 return VINF_IOM_HC_IOPORT_WRITE;
     2897                return VINF_IOM_R3_IOPORT_WRITE;
    28982898#else
    28992899                /* check for promiscuous mode change */
     
    36323632
    36333633    STAM_PROFILE_ADV_START(&pThis->StatAPROMRead, a);
    3634     rc = PDMCritSectEnter(&pThis->CritSect, VINF_IOM_HC_IOPORT_WRITE);
     3634    rc = PDMCritSectEnter(&pThis->CritSect, VINF_IOM_R3_IOPORT_WRITE);
    36353635    if (rc == VINF_SUCCESS)
    36363636    {
     
    36803680    {
    36813681        STAM_PROFILE_ADV_START(&pThis->StatAPROMWrite, a);
    3682         rc = PDMCritSectEnter(&pThis->CritSect, VINF_IOM_HC_IOPORT_WRITE);
     3682        rc = PDMCritSectEnter(&pThis->CritSect, VINF_IOM_R3_IOPORT_WRITE);
    36833683        if (RT_LIKELY(rc == VINF_SUCCESS))
    36843684        {
     
    36953695    LogFlow(("#%d pcnetIOPortAPromWrite: Port=%RTiop u32=%#RX32 cb=%d rc=%Rrc\n", PCNET_INST_NR, Port, u32, cb, rc));
    36963696#ifdef LOG_ENABLED
    3697     if (rc == VINF_IOM_HC_IOPORT_WRITE)
     3697    if (rc == VINF_IOM_R3_IOPORT_WRITE)
    36983698        LogFlow(("#%d => HC\n", PCNET_INST_NR));
    36993699#endif
     
    37203720
    37213721    STAM_PROFILE_ADV_START(&pThis->CTX_SUFF_Z(StatIORead), a);
    3722     rc = PDMCritSectEnter(&pThis->CritSect, VINF_IOM_HC_IOPORT_READ);
     3722    rc = PDMCritSectEnter(&pThis->CritSect, VINF_IOM_R3_IOPORT_READ);
    37233723    if (RT_LIKELY(rc == VINF_SUCCESS))
    37243724    {
     
    37383738    Log2(("#%d pcnetIOPortRead: Port=%RTiop *pu32=%#RX32 cb=%d rc=%Rrc\n", PCNET_INST_NR, Port, *pu32, cb, rc));
    37393739#ifdef LOG_ENABLED
    3740     if (rc == VINF_IOM_HC_IOPORT_READ)
     3740    if (rc == VINF_IOM_R3_IOPORT_READ)
    37413741        LogFlow(("#%d pcnetIOPortRead/critsect failed in GC => HC\n", PCNET_INST_NR));
    37423742#endif
     
    37633763
    37643764    STAM_PROFILE_ADV_START(&pThis->CTX_SUFF_Z(StatIOWrite), a);
    3765     rc = PDMCritSectEnter(&pThis->CritSect, VINF_IOM_HC_IOPORT_WRITE);
     3765    rc = PDMCritSectEnter(&pThis->CritSect, VINF_IOM_R3_IOPORT_WRITE);
    37663766    if (RT_LIKELY(rc == VINF_SUCCESS))
    37673767    {
     
    37813781    Log2(("#%d pcnetIOPortWrite: Port=%RTiop u32=%#RX32 cb=%d rc=%Rrc\n", PCNET_INST_NR, Port, u32, cb, rc));
    37823782#ifdef LOG_ENABLED
    3783     if (rc == VINF_IOM_HC_IOPORT_WRITE)
     3783    if (rc == VINF_IOM_R3_IOPORT_WRITE)
    37843784        LogFlow(("#%d pcnetIOPortWrite/critsect failed in GC => HC\n", PCNET_INST_NR));
    37853785#endif
     
    38113811    {
    38123812        STAM_PROFILE_ADV_START(&pThis->CTX_SUFF_Z(StatMMIORead), a);
    3813         rc = PDMCritSectEnter(&pThis->CritSect, VINF_IOM_HC_MMIO_READ);
     3813        rc = PDMCritSectEnter(&pThis->CritSect, VINF_IOM_R3_MMIO_READ);
    38143814        if (RT_LIKELY(rc == VINF_SUCCESS))
    38153815        {
     
    38343834             PCNET_INST_NR, pv, cb, pv, cb, GCPhysAddr, rc));
    38353835#ifdef LOG_ENABLED
    3836     if (rc == VINF_IOM_HC_MMIO_READ)
     3836    if (rc == VINF_IOM_R3_MMIO_READ)
    38373837        LogFlow(("#%d => HC\n", PCNET_INST_NR));
    38383838#endif
     
    38643864    {
    38653865        STAM_PROFILE_ADV_START(&pThis->CTX_SUFF_Z(StatMMIOWrite), a);
    3866         rc = PDMCritSectEnter(&pThis->CritSect, VINF_IOM_HC_MMIO_WRITE);
     3866        rc = PDMCritSectEnter(&pThis->CritSect, VINF_IOM_R3_MMIO_WRITE);
    38673867        if (RT_LIKELY(rc == VINF_SUCCESS))
    38683868        {
     
    38793879            PDMCritSectLeave(&pThis->CritSect);
    38803880        }
    3881         // else rc == VINF_IOM_HC_MMIO_WRITE => handle in ring3
     3881        // else rc == VINF_IOM_R3_MMIO_WRITE => handle in ring3
    38823882
    38833883        STAM_PROFILE_ADV_STOP(&pThis->CTX_SUFF_Z(StatMMIOWrite), a);
     
    38863886             PCNET_INST_NR, pv, cb, pv, cb, GCPhysAddr, rc));
    38873887#ifdef LOG_ENABLED
    3888     if (rc == VINF_IOM_HC_MMIO_WRITE)
     3888    if (rc == VINF_IOM_R3_MMIO_WRITE)
    38893889        LogFlow(("#%d => HC\n", PCNET_INST_NR));
    38903890#endif
  • trunk/src/VBox/Devices/Network/DevVirtioNet.cpp

    r39248 r40280  
    418418    pState->uIsTransmitting   = 0;
    419419#ifndef IN_RING3
    420     return VINF_IOM_HC_IOPORT_WRITE;
     420    return VINF_IOM_R3_IOPORT_WRITE;
    421421#else
    422422    if (pState->pDrv)
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