Sony needed to increase the limit for a UVC device with > 4KiB
descriptors, but there wasn't one clean place to do that. Tidy up, and
also go straight to *16KiB* which was the largest buffer any copy of
this code was using to date.
Test: treehugger
Change-Id: Ide41a217dcf4291a7d38836264f59e06967d9d91
usb_device_get_string converts incoming ucs-2 text
to ascii by truncating the upper byte of each
character. This is error prone.
This patch introduces usb_device_get_string_ucs2
to access raw USB string descriptors, as well as
changes usb_device_get_string to replace any non
ascii character with '?'.
Bug: 70163357
Change-Id: If8f98fee4be6ea75dc0f7ce7beba7fd7b6aabf88
Test: Connected & disconnected a NuForceDAC.
usb_device_control_transfer used to use "0" value in control_transfer
call which resulted in unlimited timeout. In case of bad USB devices
connected it resulted in usbhost stuck state.
Bug: 31923641
Test: manual run and test with bad devices.
Change-Id: I4a2a691a6d83107f72ba506522c932085bd09624
Parameter is implicily converted to unsigned when assigned to the struct,
so make sure users are aware of this.
Test: compiled
Change-Id: I25ca6b24591497aa4e7ce8db262ce1099c2b7b09