USB: f_fs: Use config_ep_by_speed() for ADB endpoints
config_ep_by_speed() configures endpoint based on speed and uses already available endpoint descriptors. Here it overrides maxpacket field based on selected descriptor for endpoint. maxpacket field is used by some of UDC driver to resize TXFIFO for IN endpoint. Due to maxpacket is not being configured with selected endpoint descriptor, UDC driver uses previously stale maxpacket value which results into wrong TXFIFO calculated for used IN endpoint. Fix this issue by calling config_ep_by_speed() for ADB endpoints to make sure that proper value is updated with maxpacket field based on descriptor. Change-Id: I9121f4df898de1455f9be4333ca8d0e744f4eb9e Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This commit is contained in:
parent
574860e439
commit
86751cfb33
1 changed files with 8 additions and 0 deletions
|
@ -1758,6 +1758,14 @@ static int ffs_func_eps_enable(struct ffs_function *func)
|
|||
|
||||
ep->ep->driver_data = ep;
|
||||
ep->ep->desc = ds;
|
||||
|
||||
ret = config_ep_by_speed(func->gadget, &func->function, ep->ep);
|
||||
if (ret) {
|
||||
pr_err("%s(): config_ep_by_speed(%d) err for %s\n",
|
||||
__func__, ret, ep->ep->name);
|
||||
break;
|
||||
}
|
||||
|
||||
ret = usb_ep_enable(ep->ep);
|
||||
if (likely(!ret)) {
|
||||
epfile->ep = ep;
|
||||
|
|
Loading…
Add table
Reference in a new issue