VirtualBox

Changeset 57522 in vbox for trunk/src/VBox/Devices/USB


Ignore:
Timestamp:
Aug 25, 2015 9:52:33 AM (9 years ago)
Author:
vboxsync
Message:

USB/IP: Fixes and enable building it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/USB/usbip/USBProxyDevice-usbip.cpp

    r57406 r57522  
    8282/** Pipe stalled. */
    8383#define USBIP_STATUS_PIPE_STALLED            INT32_C(-32)
     84/** Short read. */
     85#define USBIP_STATUS_SHORT_READ              INT32_C(-121)
    8486/** @} */
    8587
     
    560562DECLINLINE(int) usbProxyUsbIpStatusConvertFromStatus(int32_t i32Status)
    561563{
    562     if (RT_LIKELY(i32Status == USBIP_STATUS_SUCCESS))
     564    if (RT_LIKELY(   i32Status == USBIP_STATUS_SUCCESS
     565                  || i32Status == USBIP_STATUS_SHORT_READ))
    563566        return VINF_SUCCESS;
    564567
     
    582585DECLINLINE(VUSBSTATUS) usbProxyUsbIpVUsbStatusConvertFromStatus(int32_t i32Status)
    583586{
    584     if (RT_LIKELY(i32Status == USBIP_STATUS_SUCCESS))
     587    if (RT_LIKELY(   i32Status == USBIP_STATUS_SUCCESS
     588                  || i32Status == USBIP_STATUS_SHORT_READ))
    585589        return VUSBSTATUS_OK;
    586590
     
    10931097
    10941098    UsbIpReqSubmit ReqSubmit;
     1099
     1100    RT_ZERO(ReqSubmit);
    10951101    ReqSubmit.Hdr.u32ReqRet           = USBIP_CMD_SUBMIT;
    10961102    ReqSubmit.Hdr.u32SeqNum           = pUrbUsbIp->u32SeqNumUrb;
     
    11201126            if (pUrb->enmDir == VUSBDIRECTION_OUT)
    11211127            {
    1122                 ReqSubmit.u32TransferBufferLength -= sizeof(VUSBSETUP);
    11231128                aSegReq[cSegsUsed].cbSeg = pUrb->cbData - sizeof(VUSBSETUP);
    11241129                aSegReq[cSegsUsed].pvSeg = pUrb->abData + sizeof(VUSBSETUP);
     
    12751280    pDevUsbIp->pszBusId      = NULL;
    12761281    usbProxyUsbIpResetRecvState(pDevUsbIp);
    1277 
    1278     pProxyDev->iActiveCfg = 1; /** @todo that may not be always true. */
    1279     pProxyDev->cIgnoreSetConfigs = 1;
    12801282
    12811283    rc = RTSemFastMutexCreate(&pDevUsbIp->hMtxLists);
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