VirtualBox

Changeset 26112 in vbox


Ignore:
Timestamp:
Feb 1, 2010 1:44:02 AM (15 years ago)
Author:
vboxsync
Message:

PDM,UsbMsd,++: Resumed hacking the MSD code.

Location:
trunk
Files:
16 edited

Legend:

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

    r25728 r26112  
    451451 * Info handler, device version.
    452452 *
    453  * @param   pDevIns     Device instance which registered the info.
     453 * @param   pDevIns     The device instance which registered the info.
    454454 * @param   pHlp        Callback functions for doing output.
    455455 * @param   pszArgs     Argument string. Optional and specific to the handler.
     
    460460
    461461/**
     462 * Info handler, USB device version.
     463 *
     464 * @param   pUsbIns     The USB device instance which registered the info.
     465 * @param   pHlp        Callback functions for doing output.
     466 * @param   pszArgs     Argument string. Optional and specific to the handler.
     467 */
     468typedef DECLCALLBACK(void) FNDBGFHANDLERUSB(PPDMUSBINS pUsbIns, PCDBGFINFOHLP pHlp, const char *pszArgs);
     469/** Pointer to a FNDBGFHANDLERUSB function. */
     470typedef FNDBGFHANDLERUSB  *PFNDBGFHANDLERUSB;
     471
     472/**
    462473 * Info handler, driver version.
    463474 *
    464  * @param   pDrvIns     Driver instance which registered the info.
     475 * @param   pDrvIns     The driver instance which registered the info.
    465476 * @param   pHlp        Callback functions for doing output.
    466477 * @param   pszArgs     Argument string. Optional and specific to the handler.
  • trunk/include/VBox/log.h

    r24834 r26112  
    312312    /** USBFilter group. */
    313313    LOG_GROUP_USB_FILTER,
     314    /** MSD USB device group. */
     315    LOG_GROUP_USB_MSD,
    314316    /** Generic virtual disk layer. */
    315317    LOG_GROUP_VD,
     
    477479    "USB_DRV",      \
    478480    "USB_FILTER",   \
     481    "USB_MSD",      \
    479482    "VD",           \
    480483    "VD_ISCSI",     \
  • trunk/include/VBox/pdmqueue.h

    r21363 r26112  
    7676
    7777/**
     78 * Queue consumer callback for USB devices.
     79 *
     80 * @returns Success indicator.
     81 *          If false the item will not be removed and the flushing will stop.
     82 * @param   pDevIns     The USB device instance.
     83 * @param   pItem       The item to consume. Upon return this item will be freed.
     84 */
     85typedef DECLCALLBACK(bool) FNPDMQUEUEUSB(PPDMUSBINS pUsbIns, PPDMQUEUEITEMCORE pItem);
     86/** Pointer to a FNPDMQUEUEUSB(). */
     87typedef FNPDMQUEUEUSB *PFNPDMQUEUEUSB;
     88
     89/**
    7890 * Queue consumer callback for drivers.
    7991 *
  • trunk/include/VBox/pdmusb.h

    r26001 r26112  
    451451     * @param   pfnHandler          The handler function to be called to display the info.
    452452     */
    453 /** @todo    DECLR3CALLBACKMEMBER(int, pfnDBGFInfoRegister,(PPDMUSBINS pUsbIns, const char *pszName, const char *pszDesc, PFNDBGFHANDLERUSB pfnHandler)); */
     453    DECLR3CALLBACKMEMBER(int, pfnDBGFInfoRegister,(PPDMUSBINS pUsbIns, const char *pszName, const char *pszDesc, PFNDBGFHANDLERUSB pfnHandler));
    454454
    455455    /**
     
    483483     *                              If 0 then the emulation thread will be notified whenever an item arrives.
    484484     * @param   pfnCallback         The consumer function.
     485     * @param   pszName             The queue base name. The instance number will be
     486     *                              appended automatically.
    485487     * @param   ppQueue             Where to store the queue handle on success.
    486488     * @thread  The emulation thread.
    487489     */
    488 /** @todo    DECLR3CALLBACKMEMBER(int, pfnPDMQueueCreate,(PPDMUSBINS pUsbIns, RTUINT cbItem, RTUINT cItems, uint32_t cMilliesInterval, PFNPDMQUEUEUSB pfnCallback, PPDMQUEUE *ppQueue)); */
     490    DECLR3CALLBACKMEMBER(int, pfnPDMQueueCreate,(PPDMUSBINS pUsbIns, RTUINT cbItem, RTUINT cItems, uint32_t cMilliesInterval,
     491                                                 PFNPDMQUEUEUSB pfnCallback, const char *pszName, PPDMQUEUE *ppQueue));
    489492
    490493    /**
     
    493496     * @returns VBox status.
    494497     * @param   pUsbIns             The USB device instance.
    495      * @param   pszName         Data unit name.
    496      * @param   u32Instance     The instance identifier of the data unit.
    497      *                          This must together with the name be unique.
    498      * @param   u32Version      Data layout version number.
    499      * @param   cbGuess         The approximate amount of data in the unit.
    500      *                          Only for progress indicators.
    501      * @param   pfnSavePrep     Prepare save callback, optional.
    502      * @param   pfnSaveExec     Execute save callback, optional.
    503      * @param   pfnSaveDone     Done save callback, optional.
    504      * @param   pfnLoadPrep     Prepare load callback, optional.
    505      * @param   pfnLoadExec     Execute load callback, optional.
    506      * @param   pfnLoadDone     Done load callback, optional.
    507      */
    508 /** @todo    DECLR3CALLBACKMEMBER(int, pfnSSMRegister,(PPDMUSBINS pUsbIns, const char *pszName, uint32_t u32Instance, uint32_t u32Version, size_t cbGuess,
     498     * @param   uVersion            Data layout version number.
     499     * @param   cbGuess             The approximate amount of data in the unit.
     500     *                              Only for progress indicators.
     501     *
     502     * @param   pfnLivePrep         Prepare live save callback, optional.
     503     * @param   pfnLiveExec         Execute live save callback, optional.
     504     * @param   pfnLiveVote         Vote live save callback, optional.
     505     *
     506     * @param   pfnSavePrep         Prepare save callback, optional.
     507     * @param   pfnSaveExec         Execute save callback, optional.
     508     * @param   pfnSaveDone         Done save callback, optional.
     509     *
     510     * @param   pfnLoadPrep         Prepare load callback, optional.
     511     * @param   pfnLoadExec         Execute load callback, optional.
     512     * @param   pfnLoadDone         Done load callback, optional.
     513     */
     514    DECLR3CALLBACKMEMBER(int, pfnSSMRegister,(PPDMUSBINS pUsbIns, uint32_t uVersion, size_t cbGuess,
     515                                              PFNSSMUSBLIVEPREP pfnLivePrep, PFNSSMUSBLIVEEXEC pfnLiveExec, PFNSSMUSBLIVEVOTE pfnLiveVote,
    509516                                              PFNSSMUSBSAVEPREP pfnSavePrep, PFNSSMUSBSAVEEXEC pfnSaveExec, PFNSSMUSBSAVEDONE pfnSaveDone,
    510                                               PFNSSMUSBLOADPREP pfnLoadPrep, PFNSSMUSBLOADEXEC pfnLoadExec, PFNSSMUSBLOADDONE pfnLoadDone)); */
     517                                              PFNSSMUSBLOADPREP pfnLoadPrep, PFNSSMUSBLOADEXEC pfnLoadExec, PFNSSMUSBLOADDONE pfnLoadDone));
    511518
    512519    /**
     
    535542     * @param   enmClock            The clock to use on this timer.
    536543     * @param   pfnCallback         Callback function.
     544     * @param   pvUser              User argument for the callback.
     545     * @param   fFlags              Flags, see TMTIMER_FLAGS_*.
    537546     * @param   pszDesc             Pointer to description string which must stay around
    538547     *                              until the timer is fully destroyed (i.e. a bit after TMTimerDestroy()).
    539548     * @param   ppTimer             Where to store the timer on success.
    540549     */
    541 /** @todo    DECLR3CALLBACKMEMBER(int, pfnTMTimerCreate,(PPDMUSBINS pUsbIns, TMCLOCK enmClock, PFNTMTIMERUSB pfnCallback, const char *pszDesc, PPTMTIMERHC ppTimer)); */
     550    DECLR3CALLBACKMEMBER(int, pfnTMTimerCreate,(PPDMUSBINS pUsbIns, TMCLOCK enmClock, PFNTMTIMERUSB pfnCallback, void *pvUser,
     551                                                uint32_t fFlags, const char *pszDesc, PPTMTIMERR3 ppTimer));
    542552
    543553    /**
     
    704714
    705715/**
     716 * @copydoc PDMUSBHLP::pfnDriverAttach
     717 */
     718DECLINLINE(int) PDMUsbHlpDriverAttach(PPDMUSBINS pUsbIns, RTUINT iLun, PPDMIBASE pBaseInterface, PPDMIBASE *ppBaseInterface, const char *pszDesc)
     719{
     720    return pUsbIns->pUsbHlp->pfnDriverAttach(pUsbIns, iLun, pBaseInterface, ppBaseInterface, pszDesc);
     721}
     722
     723/**
    706724 * VBOX_STRICT wrapper for pUsbHlp->pfnDBGFStopV.
    707725 *
     
    755773}
    756774
     775/**
     776 * Set the VM error message
     777 *
     778 * @returns rc.
     779 * @param   pUsbIns             The USB device instance.
     780 * @param   rc                  VBox status code.
     781 * @param   RT_SRC_POS_DECL     Use RT_SRC_POS.
     782 * @param   pszFormat           Error message format string.
     783 * @param   ...                 Error message arguments.
     784 */
     785DECLINLINE(int) PDMUsbHlpVMSetError(PPDMUSBINS pUsbIns, int rc, RT_SRC_POS_DECL, const char *pszFormat, ...)
     786{
     787    va_list     va;
     788    va_start(va, pszFormat);
     789    rc = pUsbIns->pUsbHlp->pfnVMSetErrorV(pUsbIns, rc, RT_SRC_POS_ARGS, pszFormat, va);
     790    va_end(va);
     791    return rc;
     792}
     793
     794
    757795#endif /* IN_RING3 */
    758796
  • trunk/include/VBox/ssm.h

    r24917 r26112  
    510510
    511511
    512 /** The PDM Driver callback variants.
     512/** The PDM USB device callback variants.
    513513 * @{
    514514 */
     
    518518 *
    519519 * @returns VBox status code.
    520  * @param   pDrvIns         Driver instance of the device which registered the
    521  *                          data unit.
    522  * @param   pSSM            SSM operation handle.
    523  * @thread  Any.
    524  */
    525 typedef DECLCALLBACK(int) FNSSMDRVLIVEPREP(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM);
    526 /** Pointer to a FNSSMDRVLIVEPREP() function. */
    527 typedef FNSSMDRVLIVEPREP *PFNSSMDRVLIVEPREP;
     520 * @param   pUsbIns         The USB device instance of the USB device which
     521 *                          registered the data unit.
     522 * @param   pSSM            SSM operation handle.
     523 * @thread  Any.
     524 */
     525typedef DECLCALLBACK(int) FNSSMUSBLIVEPREP(PPDMUSBINS pUsbIns, PSSMHANDLE pSSM);
     526/** Pointer to a FNSSMUSBLIVEPREP() function. */
     527typedef FNSSMUSBLIVEPREP *PFNSSMUSBLIVEPREP;
    528528
    529529/**
     
    534534 *
    535535 * @returns VBox status code.
    536  * @param   pDrvIns         Driver instance of the device which registered the
    537  *                          data unit.
    538  * @param   pSSM            SSM operation handle.
    539  * @param   uPass           The data pass.
    540  * @thread  Any.
    541  */
    542 typedef DECLCALLBACK(int) FNSSMDRVLIVEEXEC(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM, uint32_t uPass);
    543 /** Pointer to a FNSSMDRVLIVEEXEC() function. */
    544 typedef FNSSMDRVLIVEEXEC *PFNSSMDRVLIVEEXEC;
     536 * @param   pUsbIns         The USB device instance of the USB device which
     537 *                          registered the data unit.
     538 * @param   pSSM            SSM operation handle.
     539 * @param   uPass           The pass.
     540 * @thread  Any.
     541 */
     542typedef DECLCALLBACK(int) FNSSMUSBLIVEEXEC(PPDMUSBINS pUsbIns, PSSMHANDLE pSSM, uint32_t uPass);
     543/** Pointer to a FNSSMUSBLIVEEXEC() function. */
     544typedef FNSSMUSBLIVEEXEC *PFNSSMUSBLIVEEXEC;
    545545
    546546/**
     
    557557 * @retval  VERR_SSM_VOTE_FOR_GIVING_UP if its time to give up.
    558558 *
    559  * @param   pDrvIns         Driver instance of the device which registered the
     559 * @param   pUsbIns         The USB device instance of the USB device which
     560 *                          registered the data unit.
     561 * @param   pSSM            SSM operation handle.
     562 * @param   uPass           The data pass.
     563 * @thread  Any.
     564 */
     565typedef DECLCALLBACK(int) FNSSMUSBLIVEVOTE(PPDMUSBINS pUsbIns, PSSMHANDLE pSSM, uint32_t uPass);
     566/** Pointer to a FNSSMUSBLIVEVOTE() function. */
     567typedef FNSSMUSBLIVEVOTE *PFNSSMUSBLIVEVOTE;
     568
     569/**
     570 * Prepare state save operation.
     571 *
     572 * @returns VBox status code.
     573 * @param   pUsbIns         The USB device instance of the USB device which
     574 *                          registered the data unit.
     575 * @param   pSSM            SSM operation handle.
     576 */
     577typedef DECLCALLBACK(int) FNSSMUSBSAVEPREP(PPDMUSBINS pUsbIns, PSSMHANDLE pSSM);
     578/** Pointer to a FNSSMUSBSAVEPREP() function. */
     579typedef FNSSMUSBSAVEPREP *PFNSSMUSBSAVEPREP;
     580
     581/**
     582 * Execute state save operation.
     583 *
     584 * @returns VBox status code.
     585 * @param   pUsbIns         The USB device instance of the USB device which
     586 *                          registered the data unit.
     587 * @param   pSSM            SSM operation handle.
     588 */
     589typedef DECLCALLBACK(int) FNSSMUSBSAVEEXEC(PPDMUSBINS pUsbIns, PSSMHANDLE pSSM);
     590/** Pointer to a FNSSMUSBSAVEEXEC() function. */
     591typedef FNSSMUSBSAVEEXEC *PFNSSMUSBSAVEEXEC;
     592
     593/**
     594 * Done state save operation.
     595 *
     596 * @returns VBox status code.
     597 * @param   pUsbIns         The USB device instance of the USB device which
     598 *                          registered the data unit.
     599 * @param   pSSM            SSM operation handle.
     600 */
     601typedef DECLCALLBACK(int) FNSSMUSBSAVEDONE(PPDMUSBINS pUsbIns, PSSMHANDLE pSSM);
     602/** Pointer to a FNSSMUSBSAVEDONE() function. */
     603typedef FNSSMUSBSAVEDONE *PFNSSMUSBSAVEDONE;
     604
     605/**
     606 * Prepare state load operation.
     607 *
     608 * @returns VBox status code.
     609 * @param   pUsbIns         The USB device instance of the USB device which
     610 *                          registered the data unit.
     611 * @param   pSSM            SSM operation handle.
     612 */
     613typedef DECLCALLBACK(int) FNSSMUSBLOADPREP(PPDMUSBINS pUsbIns, PSSMHANDLE pSSM);
     614/** Pointer to a FNSSMUSBLOADPREP() function. */
     615typedef FNSSMUSBLOADPREP *PFNSSMUSBLOADPREP;
     616
     617/**
     618 * Execute state load operation.
     619 *
     620 * @returns VBox status code.
     621 * @param   pUsbIns         The USB device instance of the USB device which
     622 *                          registered the data unit.
     623 * @param   pSSM            SSM operation handle.
     624 * @param   uVersion        Data layout version.
     625 * @param   uPass           The pass. This is always SSM_PASS_FINAL for units
     626 *                          that doesn't specify a pfnSaveLive callback.
     627 */
     628typedef DECLCALLBACK(int) FNSSMUSBLOADEXEC(PPDMUSBINS pUsbIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass);
     629/** Pointer to a FNSSMUSBLOADEXEC() function. */
     630typedef FNSSMUSBLOADEXEC *PFNSSMUSBLOADEXEC;
     631
     632/**
     633 * Done state load operation.
     634 *
     635 * @returns VBox load code.
     636 * @param   pUsbIns         The USB device instance of the USB device which
     637 *                          registered the data unit.
     638 * @param   pSSM            SSM operation handle.
     639 */
     640typedef DECLCALLBACK(int) FNSSMUSBLOADDONE(PPDMUSBINS pUsbIns, PSSMHANDLE pSSM);
     641/** Pointer to a FNSSMUSBLOADDONE() function. */
     642typedef FNSSMUSBLOADDONE *PFNSSMUSBLOADDONE;
     643
     644/** @} */
     645
     646
     647/** The PDM Driver callback variants.
     648 * @{
     649 */
     650
     651/**
     652 * Prepare state live save operation.
     653 *
     654 * @returns VBox status code.
     655 * @param   pDrvIns         Driver instance of the driver which registered the
     656 *                          data unit.
     657 * @param   pSSM            SSM operation handle.
     658 * @thread  Any.
     659 */
     660typedef DECLCALLBACK(int) FNSSMDRVLIVEPREP(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM);
     661/** Pointer to a FNSSMDRVLIVEPREP() function. */
     662typedef FNSSMDRVLIVEPREP *PFNSSMDRVLIVEPREP;
     663
     664/**
     665 * Execute state live save operation.
     666 *
     667 * This will be called repeatedly until all units vote that the live phase has
     668 * been concluded.
     669 *
     670 * @returns VBox status code.
     671 * @param   pDrvIns         Driver instance of the driver which registered the
     672 *                          data unit.
     673 * @param   pSSM            SSM operation handle.
     674 * @param   uPass           The data pass.
     675 * @thread  Any.
     676 */
     677typedef DECLCALLBACK(int) FNSSMDRVLIVEEXEC(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM, uint32_t uPass);
     678/** Pointer to a FNSSMDRVLIVEEXEC() function. */
     679typedef FNSSMDRVLIVEEXEC *PFNSSMDRVLIVEEXEC;
     680
     681/**
     682 * Vote on whether the live part of the saving has been concluded.
     683 *
     684 * The vote stops once a unit has vetoed the decision, so don't rely upon this
     685 * being called every time.
     686 *
     687 * @returns VBox status code.
     688 * @retval  VINF_SUCCESS if done.
     689 * @retval  VINF_SSM_VOTE_FOR_ANOTHER_PASS if another pass is needed.
     690 * @retval  VINF_SSM_VOTE_DONE_DONT_CALL_AGAIN if the live saving of the unit is
     691 *          done and there is not need calling it again before the final pass.
     692 * @retval  VERR_SSM_VOTE_FOR_GIVING_UP if its time to give up.
     693 *
     694 * @param   pDrvIns         Driver instance of the driver which registered the
    560695 *                          data unit.
    561696 * @param   pSSM            SSM operation handle.
  • trunk/include/VBox/tm.h

    r22808 r26112  
    150150/** Pointer to a device timer callback function. */
    151151typedef FNTMTIMERDEV *PFNTMTIMERDEV;
     152
     153/**
     154 * Device timer callback function.
     155 *
     156 * @param   pUsbIns         The USB device instance the timer is associated
     157 *                          with.
     158 * @param   pTimer          The timer handle.
     159 * @param   pvUser          User argument specified upon timer creation.
     160 */
     161typedef DECLCALLBACK(void) FNTMTIMERUSB(PPDMUSBINS pUsbIns, PTMTIMER pTimer, void *pvUser);
     162/** Pointer to a timer callback for a USB device. */
     163typedef FNTMTIMERUSB *PFNTMTIMERUSB;
    152164
    153165/**
  • trunk/include/VBox/vusb.h

    r25984 r26112  
    962962    struct VUSBURBDEV
    963963    {
    964         /** Pointer to the proxy URB.  */
    965         void           *pvProxyUrb;
     964        /** Pointer to private device specific data.  */
     965        void           *pvPrivate;
     966        /** Used by the device when linking the URB in some list of its own.   */
     967        PVUSBURB        pNext;
    966968    } Dev;
    967969
  • trunk/src/VBox/Devices/Builtins.cpp

    r25817 r26112  
    289289        return rc;
    290290
    291 #if defined(RT_OS_LINUX)
     291# if defined(RT_OS_LINUX)
    292292    rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvSCSIHost);
    293293    if (RT_FAILURE(rc))
    294294        return rc;
    295 #endif
     295# endif
    296296#endif
    297297
     
    314314        return rc;
    315315
     316# ifdef VBOX_WITH_SCSI
     317    rc = pCallbacks->pfnRegister(pCallbacks, &g_UsbMsd);
     318    if (RT_FAILURE(rc))
     319        return rc;
     320# endif
     321
    316322    return VINF_SUCCESS;
    317323}
    318324#endif
     325
  • trunk/src/VBox/Devices/Builtins.h

    r25817 r26112  
    122122#ifdef VBOX_WITH_USB
    123123extern const PDMUSBREG g_UsbDevProxy;
     124extern const PDMUSBREG g_UsbMsd;
    124125#endif
    125126
    126127#ifdef VBOX_WITH_SCSI
    127128extern const PDMDRVREG g_DrvSCSI;
    128 #if defined(RT_OS_LINUX)
     129# if defined(RT_OS_LINUX)
    129130extern const PDMDRVREG g_DrvSCSIHost;
    130 #endif
     131# endif
    131132#endif
    132133
  • trunk/src/VBox/Devices/Makefile.kmk

    r26097 r26112  
    10361036        USB/VUSBReadAhead.cpp \
    10371037        USB/VUSBUrb.cpp
     1038
    10381039 ifdef VBOX_WITH_VRDP
    10391040  Drivers_DEFS        += VBOX_WITH_VRDP
     
    10831084        USB/USBProxyDevice.cpp \
    10841085        USB/freebsd/USBProxyDevice-freebsd.cpp
     1086
     1087 ifdef VBOX_WITH_SCSI
     1088  Drivers_SOURCES += \
     1089        Storage/UsbMsd.cpp
     1090 endif
     1091
    10851092endif # VBOX_WITH_USB
    10861093
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r26109 r26112  
    16961696            rc = CFGMR3InsertInteger(pCfg,  "Last",     0);                             RC_CHECK();
    16971697
     1698            PCFGMNODE pUsbDevices = NULL;
    16981699#ifdef VBOX_WITH_EHCI
    16991700            hrc = USBCtlPtr->COMGETTER(EnabledEhci)(&fEnabled);                         H();
     
    17301731                 * on a per device level now.
    17311732                 */
    1732                 rc = CFGMR3InsertNode(pRoot, "USB", &pCfg);                             RC_CHECK();
    1733                 rc = CFGMR3InsertNode(pCfg, "USBProxy", &pCfg);                         RC_CHECK();
     1733                rc = CFGMR3InsertNode(pRoot, "USB", &pUsbDevices);                      RC_CHECK();
     1734                rc = CFGMR3InsertNode(pUsbDevices, "USBProxy", &pCfg);                  RC_CHECK();
    17341735                rc = CFGMR3InsertNode(pCfg, "GlobalConfig", &pCfg);                     RC_CHECK();
    17351736                // This globally enables the 2.0 -> 1.1 device morphing of proxied devies to keep windows quiet.
     
    17401741                //rc = CFGMR3InsertInteger(pCfg, "Force11PacketSize", true);            RC_CHECK();
    17411742            }
     1743
     1744#if 0 /* Enable+edit this to play with the virtual USB devices). */
     1745            if (!pUsbDevices)
     1746            {
     1747                rc = CFGMR3InsertNode(pRoot, "USB", &pUsbDevices);                  RC_CHECK();
     1748            }
     1749
     1750# if 1  /* Virtual MSD*/
     1751
     1752            rc = CFGMR3InsertNode(pUsbDevices, "Msd", &pDev);                       RC_CHECK();
     1753            rc = CFGMR3InsertNode(pDev,     "0", &pInst);                           RC_CHECK();
     1754            rc = CFGMR3InsertNode(pInst,    "Config", &pCfg);                       RC_CHECK();
     1755            rc = CFGMR3InsertNode(pInst,    "LUN#0", &pLunL0);                      RC_CHECK();
     1756
     1757            rc = CFGMR3InsertString(pLunL0, "Driver", "SCSI");                      RC_CHECK();
     1758            rc = CFGMR3InsertNode(pLunL0,   "Config", &pCfg);                       RC_CHECK();
     1759
     1760            rc = CFGMR3InsertNode(pLunL0,   "AttachedDriver", &pLunL1);             RC_CHECK();
     1761            rc = CFGMR3InsertString(pLunL1, "Driver", "Block");                     RC_CHECK();
     1762            rc = CFGMR3InsertNode(pLunL1,   "Config", &pCfg);                       RC_CHECK();
     1763            rc = CFGMR3InsertString(pCfg,   "Type", "HardDisk");                    RC_CHECK();
     1764            rc = CFGMR3InsertInteger(pCfg,  "Mountable", 0);                        RC_CHECK();
     1765
     1766            rc = CFGMR3InsertNode(pLunL1,   "AttachedDriver", &pLunL2);             RC_CHECK();
     1767            rc = CFGMR3InsertString(pLunL2, "Driver", "VD");                        RC_CHECK();
     1768            rc = CFGMR3InsertNode(pLunL2,   "Config", &pCfg);                       RC_CHECK();
     1769            rc = CFGMR3InsertString(pCfg,   "Path", "/Volumes/DataHFS/bird/VDIs/linux.vdi"); RC_CHECK();
     1770            rc = CFGMR3InsertString(pCfg,   "Format", "VDI");                       RC_CHECK();
     1771# endif
     1772#endif
    17421773        }
    17431774    }
  • trunk/src/VBox/RDP/client/vrdp/USBProxyDevice-linux.c

    r18866 r26112  
    11651165    if (!fFailed)
    11661166    {
    1167         pUrb->Dev.pvProxyUrb = pUrbLnx;
     1167        pUrb->Dev.pvPrivate = pUrbLnx;
    11681168        LogFlow(("usbProxyLinuxUrbQueueSplit: ok\n"));
    11691169        return true;
     
    13251325
    13261326    LogFlow(("usbProxyLinuxUrbQueue: ok\n"));
    1327     pUrb->Dev.pvProxyUrb = pUrbLnx;
     1327    pUrb->Dev.pvPrivate = pUrbLnx;
    13281328    return true;
    13291329}
     
    15911591            usbProxyLinuxUrbFree(pProxyDev, pUrbLnx);
    15921592        }
    1593         pUrb->Dev.pvProxyUrb = NULL;
     1593        pUrb->Dev.pvPrivate = NULL;
    15941594
    15951595        /* some adjustments for message transfers. */
     
    16181618{
    16191619    PUSBPROXYDEV pProxyDev = (PUSBPROXYDEV)pUrb->pDev;
    1620     PUSBPROXYURBLNX pUrbLnx = (PUSBPROXYURBLNX)pUrb->Dev.pvProxyUrb;
     1620    PUSBPROXYURBLNX pUrbLnx = (PUSBPROXYURBLNX)pUrb->Dev.pvPrivate;
    16211621    if (pUrbLnx->pSplitHead)
    16221622    {
  • trunk/src/VBox/RDP/client/vrdp/vusb.h

    r9902 r26112  
    188188    struct VUSBURBDEV
    189189    {
    190         /** Pointer to the proxy URB.  */
    191         void           *pvProxyUrb;
     190        /** Pointer to private device specific data.  */
     191        void           *pvPrivate;
     192        /** Used by the device when linking the URB in some list of its own.   */
     193        PVUSBURB        pNext;
    192194    } Dev;
    193195
  • trunk/src/VBox/VMM/PDMDevHlp.cpp

    r26001 r26112  
    825825        pLun->pBottom   = NULL;
    826826        pLun->pDevIns   = pDevIns;
     827        pLun->pUsbIns   = NULL;
    827828        pLun->pszDesc   = pszDesc;
    828829        pLun->pBase     = pBaseInterface;
  • trunk/src/VBox/VMM/PDMDriver.cpp

    r25966 r26112  
    501501                            Log(("PDM: Attached driver %p:'%s'/%d to LUN#%d on device '%s'/%d, pDrvAbove=%p:'%s'/%d\n",
    502502                                 pNew, pDrv->pDrvReg->szDriverName, pNew->iInstance,
    503                                  pLun->iLun, pLun->pDevIns->pDevReg->szDeviceName, pLun->pDevIns->iInstance,
     503                                 pLun->iLun,
     504                                 pLun->pDevIns ? pLun->pDevIns->pDevReg->szDeviceName : pLun->pUsbIns->pUsbReg->szDeviceName,
     505                                 pLun->pDevIns ? pLun->pDevIns->iInstance             : pLun->pUsbIns->iInstance,
    504506                                 pDrvAbove, pDrvAbove ? pDrvAbove->pDrvReg->szDriverName : "", pDrvAbove ? pDrvAbove->iInstance : -1));
    505507                        else
  • trunk/src/VBox/VMM/PDMInternal.h

    r25995 r26112  
    377377    R3PTRTYPE(const struct PDMDEVREG *) pDevReg;
    378378    /** Number of instances. */
    379     RTUINT                          cInstances;
     379    uint32_t                        cInstances;
    380380    /** Pointer to chain of instances (R3 Ptr). */
    381381    PPDMDEVINSR3                    pInstances;
     
    395395    R3PTRTYPE(const struct PDMUSBREG *) pUsbReg;
    396396    /** Next instance number. */
    397     RTUINT                          iNextInstance;
     397    uint32_t                        iNextInstance;
    398398    /** Pointer to chain of instances (R3 Ptr). */
    399399    R3PTRTYPE(PPDMUSBINS)           pInstances;
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