VirtualBox

Changeset 26163 in vbox for trunk


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

PDM: s/pUsbReg/pReg/g (2nd try, backed out r57176)

Location:
trunk
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/pdmusb.h

    r26162 r26163  
    106106     * @returns VBox status.
    107107     * @param   pUsbIns     The USB device instance data.
    108      *                      If the registration structure is needed, it can be
    109      *                      accessed thru pUsbDev->pReg.
     108     *                      If the registration structure is needed, it will be
     109     *                      accessible thru pUsbDev->pReg.
    110110     * @param   iInstance   Instance number. Use this to figure out which registers
    111111     *                      and such to use. The instance number is also found in
     
    654654    R3PTRTYPE(PCPDMUSBHLP)      pUsbHlp;
    655655    /** Pointer to the USB device registration structure.  */
    656     R3PTRTYPE(PCPDMUSBREG)      pUsb;
     656    R3PTRTYPE(PCPDMUSBREG)      pReg;
    657657    /** Configuration handle. */
    658658    R3PTRTYPE(PCFGMNODE)        pCfg;
  • trunk/src/VBox/VMM/PDM.cpp

    r26162 r26163  
    544544    for (PPDMUSBINS pUsbIns = pVM->pdm.s.pUsbInstances; pUsbIns; pUsbIns = pUsbIns->Internal.s.pNext)
    545545    {
    546         pdmR3TermLuns(pVM, pUsbIns->Internal.s.pLuns, pUsbIns->pUsb->szDeviceName, pUsbIns->iInstance);
    547 
    548         if (pUsbIns->pUsb->pfnDestruct)
     546        pdmR3TermLuns(pVM, pUsbIns->Internal.s.pLuns, pUsbIns->pReg->szDeviceName, pUsbIns->iInstance);
     547
     548        if (pUsbIns->pReg->pfnDestruct)
    549549        {
    550550            LogFlow(("pdmR3DevTerm: Destroying - device '%s'/%d\n",
    551                      pUsbIns->pUsb->szDeviceName, pUsbIns->iInstance));
    552             pUsbIns->pUsb->pfnDestruct(pUsbIns);
     551                     pUsbIns->pReg->szDeviceName, pUsbIns->iInstance));
     552            pUsbIns->pReg->pfnDestruct(pUsbIns);
    553553        }
    554554
     
    949949{
    950950    Assert(pUsbIns->Internal.s.fVMSuspended);
    951     if (pUsbIns->pUsb->pfnVMPowerOn)
    952     {
    953         LogFlow(("PDMR3PowerOn: Notifying - device '%s'/%d\n", pUsbIns->pUsb->szDeviceName, pUsbIns->iInstance));
    954         int rc = VINF_SUCCESS; pUsbIns->pUsb->pfnVMPowerOn(pUsbIns);
     951    if (pUsbIns->pReg->pfnVMPowerOn)
     952    {
     953        LogFlow(("PDMR3PowerOn: Notifying - device '%s'/%d\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance));
     954        int rc = VINF_SUCCESS; pUsbIns->pReg->pfnVMPowerOn(pUsbIns);
    955955        if (RT_FAILURE(rc))
    956956        {
    957             LogRel(("PDMR3PowerOn: device '%s'/%d -> %Rrc\n", pUsbIns->pUsb->szDeviceName, pUsbIns->iInstance, rc));
     957            LogRel(("PDMR3PowerOn: device '%s'/%d -> %Rrc\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance, rc));
    958958            return rc;
    959959        }
     
    10171017        for (PPDMLUN pLun = pUsbIns->Internal.s.pLuns;  pLun && RT_SUCCESS(rc);  pLun = pLun->pNext)
    10181018            for (PPDMDRVINS pDrvIns = pLun->pTop;  pDrvIns && RT_SUCCESS(rc);  pDrvIns = pDrvIns->Internal.s.pDown)
    1019                 rc = pdmR3PowerOnDrv(pDrvIns, pUsbIns->pUsb->szDeviceName, pUsbIns->iInstance, pLun->iLun);
     1019                rc = pdmR3PowerOnDrv(pDrvIns, pUsbIns->pReg->szDeviceName, pUsbIns->iInstance, pLun->iLun);
    10201020        if (RT_SUCCESS(rc))
    10211021            rc = pdmR3PowerOnUsb(pUsbIns);
     
    10951095    {
    10961096        pUsbIns->Internal.s.fVMReset = true;
    1097         if (pUsbIns->pUsb->pfnVMReset)
     1097        if (pUsbIns->pReg->pfnVMReset)
    10981098        {
    10991099            if (!pUsbIns->Internal.s.pfnAsyncNotify)
    11001100            {
    1101                 LogFlow(("PDMR3Reset: Notifying - device '%s'/%d\n", pUsbIns->pUsb->szDeviceName, pUsbIns->iInstance));
    1102                 pUsbIns->pUsb->pfnVMReset(pUsbIns);
     1101                LogFlow(("PDMR3Reset: Notifying - device '%s'/%d\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance));
     1102                pUsbIns->pReg->pfnVMReset(pUsbIns);
    11031103                if (pUsbIns->Internal.s.pfnAsyncNotify)
    1104                     LogFlow(("PDMR3Reset: Async notification started - device '%s'/%d\n", pUsbIns->pUsb->szDeviceName, pUsbIns->iInstance));
     1104                    LogFlow(("PDMR3Reset: Async notification started - device '%s'/%d\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance));
    11051105            }
    11061106            else if (pUsbIns->Internal.s.pfnAsyncNotify(pUsbIns))
    11071107            {
    1108                 LogFlow(("PDMR3Reset: Async notification completed - device '%s'/%d\n", pUsbIns->pUsb->szDeviceName, pUsbIns->iInstance));
     1108                LogFlow(("PDMR3Reset: Async notification completed - device '%s'/%d\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance));
    11091109                pUsbIns->Internal.s.pfnAsyncNotify = NULL;
    11101110            }
     
    12321232            for (PPDMLUN pLun = pUsbIns->Internal.s.pLuns; pLun; pLun = pLun->pNext)
    12331233                for (PPDMDRVINS pDrvIns = pLun->pTop; pDrvIns; pDrvIns = pDrvIns->Internal.s.pDown)
    1234                     if (!pdmR3ResetDrv(pDrvIns, &cAsync, pUsbIns->pUsb->szDeviceName, pUsbIns->iInstance, pLun->iLun))
     1234                    if (!pdmR3ResetDrv(pDrvIns, &cAsync, pUsbIns->pReg->szDeviceName, pUsbIns->iInstance, pLun->iLun))
    12351235                        break;
    12361236
     
    13211321    {
    13221322        pUsbIns->Internal.s.fVMSuspended = true;
    1323         if (pUsbIns->pUsb->pfnVMSuspend)
     1323        if (pUsbIns->pReg->pfnVMSuspend)
    13241324        {
    13251325            if (!pUsbIns->Internal.s.pfnAsyncNotify)
    13261326            {
    1327                 LogFlow(("PDMR3Suspend: Notifying - device '%s'/%d\n", pUsbIns->pUsb->szDeviceName, pUsbIns->iInstance));
    1328                 pUsbIns->pUsb->pfnVMSuspend(pUsbIns);
     1327                LogFlow(("PDMR3Suspend: Notifying - device '%s'/%d\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance));
     1328                pUsbIns->pReg->pfnVMSuspend(pUsbIns);
    13291329                if (pUsbIns->Internal.s.pfnAsyncNotify)
    1330                     LogFlow(("PDMR3Suspend: Async notification started - device '%s'/%d\n", pUsbIns->pUsb->szDeviceName, pUsbIns->iInstance));
     1330                    LogFlow(("PDMR3Suspend: Async notification started - device '%s'/%d\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance));
    13311331            }
    13321332            else if (pUsbIns->Internal.s.pfnAsyncNotify(pUsbIns))
    13331333            {
    1334                 LogFlow(("PDMR3Suspend: Async notification completed - device '%s'/%d\n", pUsbIns->pUsb->szDeviceName, pUsbIns->iInstance));
     1334                LogFlow(("PDMR3Suspend: Async notification completed - device '%s'/%d\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance));
    13351335                pUsbIns->Internal.s.pfnAsyncNotify = NULL;
    13361336            }
     
    14381438            for (PPDMLUN pLun = pUsbIns->Internal.s.pLuns; pLun; pLun = pLun->pNext)
    14391439                for (PPDMDRVINS pDrvIns = pLun->pTop; pDrvIns; pDrvIns = pDrvIns->Internal.s.pDown)
    1440                     if (!pdmR3SuspendDrv(pDrvIns, &cAsync, pUsbIns->pUsb->szDeviceName, pUsbIns->iInstance, pLun->iLun))
     1440                    if (!pdmR3SuspendDrv(pDrvIns, &cAsync, pUsbIns->pReg->szDeviceName, pUsbIns->iInstance, pLun->iLun))
    14411441                        break;
    14421442
     
    15071507{
    15081508    Assert(pUsbIns->Internal.s.fVMSuspended);
    1509     if (pUsbIns->pUsb->pfnVMResume)
    1510     {
    1511         LogFlow(("PDMR3Resume: Notifying - device '%s'/%d\n", pUsbIns->pUsb->szDeviceName, pUsbIns->iInstance));
    1512         int rc = VINF_SUCCESS; pUsbIns->pUsb->pfnVMResume(pUsbIns);
     1509    if (pUsbIns->pReg->pfnVMResume)
     1510    {
     1511        LogFlow(("PDMR3Resume: Notifying - device '%s'/%d\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance));
     1512        int rc = VINF_SUCCESS; pUsbIns->pReg->pfnVMResume(pUsbIns);
    15131513        if (RT_FAILURE(rc))
    15141514        {
    1515             LogRel(("PDMR3Resume: device '%s'/%d -> %Rrc\n", pUsbIns->pUsb->szDeviceName, pUsbIns->iInstance, rc));
     1515            LogRel(("PDMR3Resume: device '%s'/%d -> %Rrc\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance, rc));
    15161516            return rc;
    15171517        }
     
    15751575        for (PPDMLUN pLun = pUsbIns->Internal.s.pLuns;  pLun && RT_SUCCESS(rc);  pLun = pLun->pNext)
    15761576            for (PPDMDRVINS pDrvIns = pLun->pTop;  pDrvIns && RT_SUCCESS(rc);  pDrvIns = pDrvIns->Internal.s.pDown)
    1577                 rc = pdmR3ResumeDrv(pDrvIns, pUsbIns->pUsb->szDeviceName, pUsbIns->iInstance, pLun->iLun);
     1577                rc = pdmR3ResumeDrv(pDrvIns, pUsbIns->pReg->szDeviceName, pUsbIns->iInstance, pLun->iLun);
    15781578        if (RT_SUCCESS(rc))
    15791579            rc = pdmR3ResumeUsb(pUsbIns);
     
    16531653    {
    16541654        pUsbIns->Internal.s.fVMSuspended = true;
    1655         if (pUsbIns->pUsb->pfnVMPowerOff)
     1655        if (pUsbIns->pReg->pfnVMPowerOff)
    16561656        {
    16571657            if (!pUsbIns->Internal.s.pfnAsyncNotify)
    16581658            {
    1659                 LogFlow(("PDMR3PowerOff: Notifying - device '%s'/%d\n", pUsbIns->pUsb->szDeviceName, pUsbIns->iInstance));
    1660                 pUsbIns->pUsb->pfnVMPowerOff(pUsbIns);
     1659                LogFlow(("PDMR3PowerOff: Notifying - device '%s'/%d\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance));
     1660                pUsbIns->pReg->pfnVMPowerOff(pUsbIns);
    16611661                if (pUsbIns->Internal.s.pfnAsyncNotify)
    1662                     LogFlow(("PDMR3PowerOff: Async notification started - device '%s'/%d\n", pUsbIns->pUsb->szDeviceName, pUsbIns->iInstance));
     1662                    LogFlow(("PDMR3PowerOff: Async notification started - device '%s'/%d\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance));
    16631663            }
    16641664            else if (pUsbIns->Internal.s.pfnAsyncNotify(pUsbIns))
    16651665            {
    1666                 LogFlow(("PDMR3PowerOff: Async notification completed - device '%s'/%d\n", pUsbIns->pUsb->szDeviceName, pUsbIns->iInstance));
     1666                LogFlow(("PDMR3PowerOff: Async notification completed - device '%s'/%d\n", pUsbIns->pReg->szDeviceName, pUsbIns->iInstance));
    16671667                pUsbIns->Internal.s.pfnAsyncNotify = NULL;
    16681668            }
     
    17631763            for (PPDMLUN pLun = pUsbIns->Internal.s.pLuns; pLun; pLun = pLun->pNext)
    17641764                for (PPDMDRVINS pDrvIns = pLun->pTop; pDrvIns; pDrvIns = pDrvIns->Internal.s.pDown)
    1765                     if (!pdmR3PowerOffDrv(pDrvIns, &cAsync, pUsbIns->pUsb->szDeviceName, pUsbIns->iInstance, pLun->iLun))
     1765                    if (!pdmR3PowerOffDrv(pDrvIns, &cAsync, pUsbIns->pReg->szDeviceName, pUsbIns->iInstance, pLun->iLun))
    17661766                        break;
    17671767
  • trunk/src/VBox/VMM/PDMDriver.cpp

    r26162 r26163  
    502502                                 pNew, pDrv->pReg->szDriverName, pNew->iInstance,
    503503                                 pLun->iLun,
    504                                  pLun->pDevIns ? pLun->pDevIns->pReg->szDeviceName : pLun->pUsbIns->pUsb->szDeviceName,
     504                                 pLun->pDevIns ? pLun->pDevIns->pReg->szDeviceName : pLun->pUsbIns->pReg->szDeviceName,
    505505                                 pLun->pDevIns ? pLun->pDevIns->iInstance             : pLun->pUsbIns->iInstance,
    506506                                 pDrvAbove, pDrvAbove ? pDrvAbove->pReg->szDriverName : "", pDrvAbove ? pDrvAbove->iInstance : -1));
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