mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
usb: gadget: f_fs: Fix enumeration in fullspeed mode
ffs_func_eps_enable always take the highspeed usb_endpoint_descriptor if it is available. Choose the correct usb_endpoint_descriptor depending on the gadget speed instead. Change-Id: I5b8444cfdf1b6fe1eef25525fb7a0a0f617a353e Signed-off-by: Benoit Goby <benoit@android.com>
This commit is contained in:
committed by
Arve Hjønnevåg
parent
df974627d4
commit
95f0d8bddc
@@ -1569,7 +1569,12 @@ static int ffs_func_eps_enable(struct ffs_function *func)
|
||||
spin_lock_irqsave(&func->ffs->eps_lock, flags);
|
||||
do {
|
||||
struct usb_endpoint_descriptor *ds;
|
||||
ds = ep->descs[ep->descs[1] ? 1 : 0];
|
||||
int desc_idx = ffs->gadget->speed == USB_SPEED_HIGH ? 1 : 0;
|
||||
ds = ep->descs[desc_idx];
|
||||
if (!ds) {
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
ep->ep->driver_data = ep;
|
||||
ep->ep->desc = ds;
|
||||
|
||||
Reference in New Issue
Block a user