Commit b96dd1b8 authored by Linyu Yuan's avatar Linyu Yuan Committed by Android Build Cherrypicker Worker
Browse files

BACKPORT: usb: gadget: unconditionally allocate hs/ss descriptor in bind operation



Take f_midi_bind() for example,  when composite layer call it, it will
allocate hs descriptor by calling gadget_is_dualspeed() API to check
gadget max support speed capability, but most other gadget function didn't
do like this.

To follow other function drivers, it is safe to remove the check which
mean support all possible link speed by default in function driver.

Similar change apply to midi2 and uvc.

Also in midi and midi2, as there is no descriptor difference between
super speed and super speed plus, follow other gadget function drivers,
do not allocate descriptor for super speed plus, composite layer will
handle it properly.

Signed-off-by: default avatarLinyu Yuan <quic_linyyuan@quicinc.com>
Link: https://lore.kernel.org/r/20230803091053.9714-5-quic_linyyuan@quicinc.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 301887900
(cherry picked from commit 46decc82
 https://kernel.googlesource.com/pub/scm/linux/kernel/git/gregkh/usb

 usb-next)
[arakesh: f_midi2.c doesn't exist, so dropped those changes]
Signed-off-by: default avatarAvichal Rakesh <arakesh@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:575177ced7a86baad0b0a210376ecb0a98a64702)
Merged-In: I8b287266b3973c66e559bd3eea9adbe95e051be7
Change-Id: I8b287266b3973c66e559bd3eea9adbe95e051be7
parent 34de8579
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment