DM USB: temporary solution for corner case of control transfer
In the process of implementation for USB isochronous transfer, the timeout (100ms) is not enough for Plantronics USB headset. So pass longer timeout (300ms) to function libusb_control_transfer will make USB headset of Plantronics work. This change only results a longer execution time in ENUMERATION process for few devices like Plantronics USB headset which need more time to do its internal operations. For most USB devices, time less than 100ms are enough to complete the execution of libusb_control_transfer. So basically it will not affect the whole system performance. In the long term, a better solution (eg: async control transfer) will be introduced to replace current implementation. Change-Id: I380e0cc337ec5741b1e4ce989abacce826b7dde4 Tracked-On: Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com> Reviewed-by: Liang Yang <liang3.yang@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
parent
3389e83177
commit
b95f93927b
|
@ -772,9 +772,13 @@ usb_dev_request(void *pdata, struct usb_data_xfer *xfer)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* send it to physical device */
|
/* send it to physical device */
|
||||||
/* TODO: should this be async operation? */
|
/* FIXME: In the process of implementation of USB isochronouse transfer,
|
||||||
|
* the timeout time is not enough for Plantronics headset. So this
|
||||||
|
* issue should be investigated detailly, and at worst situation, the
|
||||||
|
* control transfer should be also changed to async operation.
|
||||||
|
*/
|
||||||
rc = libusb_control_transfer(udev->handle, request_type, request,
|
rc = libusb_control_transfer(udev->handle, request_type, request,
|
||||||
value, index, data, len, 100);
|
value, index, data, len, 300);
|
||||||
|
|
||||||
if (rc >= 0 && blk) {
|
if (rc >= 0 && blk) {
|
||||||
blk->blen = len - rc;
|
blk->blen = len - rc;
|
||||||
|
|
Loading…
Reference in New Issue