VirtualBox

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


Ignore:
Timestamp:
Feb 2, 2010 6:02:15 PM (15 years ago)
Author:
vboxsync
Message:

PDMDEVHLPR3 cleanup; reduced the number of strict functions.

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

Legend:

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

    r26001 r26157  
    13421342        E1kLog2(("%s ==> FAILED to enter critical section at %s:%d:%s with rc=\n",
    13431343                INSTANCE(pState), RT_SRC_POS_ARGS, rc));
    1344         PDMDeviceDBGFStop(pState->CTX_SUFF(pDevIns), RT_SRC_POS_ARGS,
     1344        PDMDevHlpDBGFStop(pState->CTX_SUFF(pDevIns), RT_SRC_POS_ARGS,
    13451345                          "%s Failed to enter critical section, rc=%Rrc\n",
    13461346                          INSTANCE(pState), rc);
     
    36653665        case 4: mask = 0xFFFFFFFF; break;
    36663666        default:
    3667             return PDMDeviceDBGFStop(pState->CTX_SUFF(pDevIns), RT_SRC_POS,
     3667            return PDMDevHlpDBGFStop(pState->CTX_SUFF(pDevIns), RT_SRC_POS,
    36683668                                     "%s e1kRegRead: unsupported op size: offset=%#10x cb=%#10x\n",
    36693669                                     szInst, uOffset, cb);
     
    36773677            mask <<= shift;
    36783678            if (!mask)
    3679                 return PDMDeviceDBGFStop(pState->CTX_SUFF(pDevIns), RT_SRC_POS,
     3679                return PDMDevHlpDBGFStop(pState->CTX_SUFF(pDevIns), RT_SRC_POS,
    36803680                                         "%s e1kRegRead: Zero mask: offset=%#10x cb=%#10x\n",
    36813681                                         szInst, uOffset, cb);
     
    38463846    {
    38473847        E1kLog(("%s e1kMMIOWrite: invalid op size: offset=%#10x cb=%#10x", pDevIns, uOffset, cb));
    3848         rc = PDMDeviceDBGFStop(pDevIns, RT_SRC_POS, "e1kMMIOWrite: invalid op size: offset=%#10x cb=%#10x\n", uOffset, cb);
     3848        rc = PDMDevHlpDBGFStop(pDevIns, RT_SRC_POS, "e1kMMIOWrite: invalid op size: offset=%#10x cb=%#10x\n", uOffset, cb);
    38493849    }
    38503850    else
     
    38793879    {
    38803880        E1kLog(("%s e1kIOPortIn: invalid op size: port=%RTiop cb=%08x", szInst, port, cb));
    3881         rc = PDMDeviceDBGFStop(pDevIns, RT_SRC_POS, "%s e1kIOPortIn: invalid op size: port=%RTiop cb=%08x\n", szInst, port, cb);
     3881        rc = PDMDevHlpDBGFStop(pDevIns, RT_SRC_POS, "%s e1kIOPortIn: invalid op size: port=%RTiop cb=%08x\n", szInst, port, cb);
    38823882    }
    38833883    else
     
    39303930    {
    39313931        E1kLog(("%s e1kIOPortOut: invalid op size: port=%RTiop cb=%08x\n", szInst, port, cb));
    3932         rc = PDMDeviceDBGFStop(pDevIns, RT_SRC_POS, "%s e1kIOPortOut: invalid op size: port=%RTiop cb=%08x\n", szInst, port, cb);
     3932        rc = PDMDevHlpDBGFStop(pDevIns, RT_SRC_POS, "%s e1kIOPortOut: invalid op size: port=%RTiop cb=%08x\n", szInst, port, cb);
    39333933    }
    39343934    else
     
    39533953                 * bird: VINF_SUCCESS is fine for unhandled cases of an OUT handler. (If you're curious
    39543954                 *       about the guest code and a bit adventuresome, try rc = PDMDeviceDBGFStop(...);) */
    3955                 rc = PDMDeviceDBGFStop(pDevIns, RT_SRC_POS, "e1kIOPortOut: invalid port %#010x\n", port);
     3955                rc = PDMDevHlpDBGFStop(pDevIns, RT_SRC_POS, "e1kIOPortOut: invalid port %#010x\n", port);
    39563956        }
    39573957    }
     
    40414041            if (pState->fGCEnabled)
    40424042            {
    4043                 rc = PDMDevHlpIOPortRegisterGC(pPciDev->pDevIns, pState->addrIOPort, cb, 0,
     4043                rc = PDMDevHlpIOPortRegisterRC(pPciDev->pDevIns, pState->addrIOPort, cb, 0,
    40444044                                               "e1kIOPortOut", "e1kIOPortIn", NULL, NULL, "E1000");
    40454045            }
     
    40584058            if (pState->fGCEnabled)
    40594059            {
    4060                 rc = PDMDevHlpMMIORegisterGC(pPciDev->pDevIns, GCPhysAddress, cb, 0,
     4060                rc = PDMDevHlpMMIORegisterRC(pPciDev->pDevIns, GCPhysAddress, cb, 0,
    40614061                                             "e1kMMIOWrite", "e1kMMIORead", NULL);
    40624062            }
     
    51755175
    51765176    /* Create transmit queue */
    5177     rc = PDMDevHlpPDMQueueCreate(pDevIns, sizeof(PDMQUEUEITEMCORE), 1, 0,
    5178                                  e1kTxQueueConsumer, true, "E1000-Xmit", &pState->pTxQueueR3);
     5177    rc = PDMDevHlpQueueCreate(pDevIns, sizeof(PDMQUEUEITEMCORE), 1, 0,
     5178                              e1kTxQueueConsumer, true, "E1000-Xmit", &pState->pTxQueueR3);
    51795179    if (RT_FAILURE(rc))
    51805180        return rc;
     
    51835183
    51845184    /* Create the RX notifier signaller. */
    5185     rc = PDMDevHlpPDMQueueCreate(pDevIns, sizeof(PDMQUEUEITEMCORE), 1, 0,
    5186                                  e1kCanRxQueueConsumer, true, "E1000-Rcv", &pState->pCanRxQueueR3);
     5185    rc = PDMDevHlpQueueCreate(pDevIns, sizeof(PDMQUEUEITEMCORE), 1, 0,
     5186                              e1kCanRxQueueConsumer, true, "E1000-Rcv", &pState->pCanRxQueueR3);
    51875187    if (RT_FAILURE(rc))
    51885188        return rc;
     
    52835283    e1kHardReset(pState);
    52845284
    5285     rc = PDMDevHlpPDMThreadCreate(pDevIns, &pState->pTxThread, pState, e1kTxThread, e1kTxThreadWakeUp, 0, RTTHREADTYPE_IO, "E1000_TX");
     5285    rc = PDMDevHlpThreadCreate(pDevIns, &pState->pTxThread, pState, e1kTxThread, e1kTxThreadWakeUp, 0, RTTHREADTYPE_IO, "E1000_TX");
    52865286    if (RT_FAILURE(rc))
    52875287        return rc;
  • trunk/src/VBox/Devices/Network/DevPCNet.cpp

    r26001 r26157  
    36643664            case 4: *pu32 = pcnetIoportReadU32(pThis, Port, &rc); break;
    36653665            default:
    3666                 rc = PDMDeviceDBGFStop(pThis->CTX_SUFF(pDevIns), RT_SRC_POS,
     3666                rc = PDMDevHlpDBGFStop(pThis->CTX_SUFF(pDevIns), RT_SRC_POS,
    36673667                                       "pcnetIOPortRead: unsupported op size: offset=%#10x cb=%u\n",
    36683668                                       Port, cb);
     
    37073707            case 4: rc = pcnetIoportWriteU32(pThis, Port, u32); break;
    37083708            default:
    3709                 rc = PDMDeviceDBGFStop(pThis->CTX_SUFF(pDevIns), RT_SRC_POS,
     3709                rc = PDMDevHlpDBGFStop(pThis->CTX_SUFF(pDevIns), RT_SRC_POS,
    37103710                                       "pcnetIOPortWrite: unsupported op size: offset=%#10x cb=%u\n",
    37113711                                       Port, cb);
     
    37553755                case 4:  *(uint32_t *)pv = pcnetMMIOReadU32(pThis, GCPhysAddr); break;
    37563756                default:
    3757                     rc = PDMDeviceDBGFStop(pThis->CTX_SUFF(pDevIns), RT_SRC_POS,
     3757                    rc = PDMDevHlpDBGFStop(pThis->CTX_SUFF(pDevIns), RT_SRC_POS,
    37583758                                           "pcnetMMIORead: unsupported op size: address=%RGp cb=%u\n",
    37593759                                           GCPhysAddr, cb);
     
    38083808                case 4:  pcnetMMIOWriteU32(pThis, GCPhysAddr, *(uint32_t *)pv); break;
    38093809                default:
    3810                     rc = PDMDeviceDBGFStop(pThis->CTX_SUFF(pDevIns), RT_SRC_POS,
     3810                    rc = PDMDevHlpDBGFStop(pThis->CTX_SUFF(pDevIns), RT_SRC_POS,
    38113811                                           "pcnetMMIOWrite: unsupported op size: address=%RGp cb=%u\n",
    38123812                                           GCPhysAddr, cb);
     
    39363936    if (pThis->fGCEnabled)
    39373937    {
    3938         rc = PDMDevHlpIOPortRegisterGC(pDevIns, Port, 0x10, 0, "pcnetIOPortAPromWrite",
     3938        rc = PDMDevHlpIOPortRegisterRC(pDevIns, Port, 0x10, 0, "pcnetIOPortAPromWrite",
    39393939                                       "pcnetIOPortAPromRead", NULL, NULL, "PCNet aprom");
    39403940        if (RT_FAILURE(rc))
    39413941            return rc;
    3942         rc = PDMDevHlpIOPortRegisterGC(pDevIns, Port + 0x10, 0x10, 0, "pcnetIOPortWrite",
     3942        rc = PDMDevHlpIOPortRegisterRC(pDevIns, Port + 0x10, 0x10, 0, "pcnetIOPortWrite",
    39433943                                       "pcnetIOPortRead", NULL, NULL, "PCNet");
    39443944        if (RT_FAILURE(rc))
     
    51605160     * Create the transmit queue.
    51615161     */
    5162     rc = PDMDevHlpPDMQueueCreate(pDevIns, sizeof(PDMQUEUEITEMCORE), 1, 0,
    5163                                  pcnetXmitQueueConsumer, true, "PCNet-Xmit", &pThis->pXmitQueueR3);
     5162    rc = PDMDevHlpQueueCreate(pDevIns, sizeof(PDMQUEUEITEMCORE), 1, 0,
     5163                              pcnetXmitQueueConsumer, true, "PCNet-Xmit", &pThis->pXmitQueueR3);
    51645164    if (RT_FAILURE(rc))
    51655165        return rc;
     
    51705170     * Create the RX notifer signaller.
    51715171     */
    5172     rc = PDMDevHlpPDMQueueCreate(pDevIns, sizeof(PDMQUEUEITEMCORE), 1, 0,
    5173                                  pcnetCanRxQueueConsumer, true, "PCNet-Rcv", &pThis->pCanRxQueueR3);
     5172    rc = PDMDevHlpQueueCreate(pDevIns, sizeof(PDMQUEUEITEMCORE), 1, 0,
     5173                              pcnetCanRxQueueConsumer, true, "PCNet-Rcv", &pThis->pCanRxQueueR3);
    51745174    if (RT_FAILURE(rc))
    51755175        return rc;
     
    52305230
    52315231    /* Create asynchronous thread */
    5232     rc = PDMDevHlpPDMThreadCreate(pDevIns, &pThis->pSendThread, pThis, pcnetAsyncSendThread, pcnetAsyncSendThreadWakeUp, 0, RTTHREADTYPE_IO, "PCNET_TX");
     5232    rc = PDMDevHlpThreadCreate(pDevIns, &pThis->pSendThread, pThis, pcnetAsyncSendThread, pcnetAsyncSendThreadWakeUp, 0, RTTHREADTYPE_IO, "PCNET_TX");
    52335233    AssertRCReturn(rc, rc);
    52345234
  • trunk/src/VBox/Devices/Network/DevVirtioNet.cpp

    r26055 r26157  
    14281428                                   NULL, NULL, "VirtioNet");
    14291429    AssertRCReturn(rc, rc);
    1430     rc = PDMDevHlpIOPortRegisterGC(pPciDev->pDevIns, pState->VPCI.addrIOPort,
     1430    rc = PDMDevHlpIOPortRegisterRC(pPciDev->pDevIns, pState->VPCI.addrIOPort,
    14311431                                   cb, 0, "vnetIOPortOut", "vnetIOPortIn",
    14321432                                   NULL, NULL, "VirtioNet");
     
    17111711
    17121712    /* Create the RX notifier signaller. */
    1713     rc = PDMDevHlpPDMQueueCreate(pDevIns, sizeof(PDMQUEUEITEMCORE), 1, 0,
    1714                                  vnetCanRxQueueConsumer, true, "VNet-Rcv", &pState->pCanRxQueueR3);
     1713    rc = PDMDevHlpQueueCreate(pDevIns, sizeof(PDMQUEUEITEMCORE), 1, 0,
     1714                              vnetCanRxQueueConsumer, true, "VNet-Rcv", &pState->pCanRxQueueR3);
    17151715    if (RT_FAILURE(rc))
    17161716        return 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