Changeset 43816 in vbox for trunk/src/VBox/HostDrivers/VBoxUSB/solaris/VBoxUSB-solaris.c
- Timestamp:
- Nov 6, 2012 5:44:17 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxUSB/solaris/VBoxUSB-solaris.c
r41700 r43816 250 250 VUSBDIRECTION enmDir; /* Xfer direction */ 251 251 VUSBSTATUS enmStatus; /* URB status */ 252 bool fShortOk; /* Whether receiving less data than requested is acceptable. */ 252 253 RTR3PTR pvDataR3; /* Userspace address of the original data buffer */ 253 254 size_t cbDataR3; /* Size of the data buffer */ … … 3105 3106 * Initialize callbacks and timeouts. 3106 3107 */ 3108 usb_req_attrs_t fAttributes = USB_ATTRS_AUTOCLEARING; 3109 if ( pUrb->enmDir == VUSBDIRECTION_IN 3110 && pUrb->fShortOk) 3111 { 3112 fAttributes |= USB_ATTRS_SHORT_XFER_OK; 3113 } 3107 3114 pReq->ctrl_cb = vboxUSBSolarisCtrlXferCompleted; 3108 3115 pReq->ctrl_exc_cb = vboxUSBSolarisCtrlXferCompleted; 3109 3116 pReq->ctrl_timeout = VBOXUSB_CTRL_XFER_TIMEOUT; 3110 pReq->ctrl_attributes = USB_ATTRS_AUTOCLEARING | (pUrb->enmDir == VUSBDIRECTION_IN ? USB_ATTRS_SHORT_XFER_OK : 0);3117 pReq->ctrl_attributes = fAttributes; 3111 3118 3112 3119 pReq->ctrl_client_private = (usb_opaque_t)pUrb; … … 3234 3241 * Initialize Bulk Xfer, callbacks and timeouts. 3235 3242 */ 3243 usb_req_attrs_t fAttributes = USB_ATTRS_AUTOCLEARING; 3236 3244 if (pUrb->enmDir == VUSBDIRECTION_OUT) 3237 3245 pReq->bulk_data = pUrb->pMsg; 3246 else if ( pUrb->enmDir == VUSBDIRECTION_IN 3247 && pUrb->fShortOk) 3248 { 3249 fAttributes |= USB_ATTRS_SHORT_XFER_OK; 3250 } 3238 3251 3239 3252 pReq->bulk_len = pUrb->cbDataR3; … … 3241 3254 pReq->bulk_exc_cb = vboxUSBSolarisBulkXferCompleted; 3242 3255 pReq->bulk_timeout = VBOXUSB_BULK_XFER_TIMEOUT; 3243 pReq->bulk_attributes = USB_ATTRS_AUTOCLEARING | (pUrb->enmDir == VUSBDIRECTION_IN ? USB_ATTRS_SHORT_XFER_OK : 0);3256 pReq->bulk_attributes = fAttributes; 3244 3257 pReq->bulk_client_private = (usb_opaque_t)pUrb; 3245 3258 … … 3358 3371 else 3359 3372 { 3373 Assert(pUrb->enmDir == VUSBDIRECTION_IN); 3360 3374 pReq->intr_data = NULL; 3361 pReq->intr_attributes = USB_ATTRS_AUTOCLEARING | USB_ATTRS_ONE_XFER | USB_ATTRS_SHORT_XFER_OK;3375 pReq->intr_attributes = USB_ATTRS_AUTOCLEARING | USB_ATTRS_ONE_XFER | (pUrb->fShortOk ? USB_ATTRS_SHORT_XFER_OK : 0); 3362 3376 } 3363 3377
Note:
See TracChangeset
for help on using the changeset viewer.