mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
usb: gadget: f_uac: update maxpacket in function bind
This patch fixes the bug of RV1126 USB crash when configed as
UVC + UAC + RNDIS + ADB. If we resize txfifo before opening
UAC stream, the maxpacket of epin will be the default value
1024 and txfifo will exceed the maximum limit.
Fixes: e658b2131e ("usb: dwc3: gadget: fix tx fifos resize for disabled eps")
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: I1e892b11a0bdda2877d3e17148867d21cb68238c
This commit is contained in:
@@ -926,6 +926,7 @@ static int f_audio_bind(struct usb_configuration *c, struct usb_function *f)
|
||||
ep = usb_ep_autoconfig(cdev->gadget, &as_in_ep_desc);
|
||||
if (!ep)
|
||||
goto fail;
|
||||
ep->maxpacket = usb_endpoint_maxp(&as_in_ep_desc);
|
||||
audio->in_ep = ep;
|
||||
audio->in_ep->desc = &as_in_ep_desc;
|
||||
}
|
||||
|
||||
@@ -809,6 +809,7 @@ afunc_bind(struct usb_configuration *cfg, struct usb_function *fn)
|
||||
dev_err(dev, "%s:%d Error!\n", __func__, __LINE__);
|
||||
return -ENODEV;
|
||||
}
|
||||
agdev->in_ep->maxpacket = usb_endpoint_maxp(&fs_epin_desc);
|
||||
}
|
||||
|
||||
agdev->in_ep_maxpsize = max_t(u16,
|
||||
|
||||
Reference in New Issue
Block a user