Thread (5 messages) 5 messages, 3 authors, 2021-01-04

RE: [PATCH v2] usb: gadget: configfs: Preserve function ordering after bind failure

From: Peter Chen <hidden>
Date: 2021-01-04 01:00:35

 
quoted
Hi Jack,

I am curious what features are broken if the functions are added with
not planned order?
Hi Peter,

This is mainly an issue for devices with functions that use vendor- specific
instead of standard class/subclass IDs for their interface descriptors. Android
ADB and Qualcomm QMI are a couple examples. So host interface drivers
would only be able to install or bind based on matching VID/PID and interface
position only. This is true for both Windows as well as Linux (see
USB_DEVICE_INTERFACE_NUMBER).

So if the gadget's function bind order gets jumbled up from the intended order,
the resulting assigned interface numbers would be different and the host would
not match its drivers to the correct interface. Instead we see the host driver
gets bound but the endpoints it communicates with are wrong as they are for a
completely different interface.

Thanks,
Jack
 
Thanks for your information, jack. But does Android ADB has specific host driver, I am
assumed it uses drivers/usb/core/devio.c, am I wrong?

Peter
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help