Files
kernel_common_drivers/drivers/usb
dian.shao e915cd4851 usb: crg udc rewrite failed with WARNING [1/1]
PD#SWPL-228288

Problem:
1.
--------------crg_rewrite_udc_for_error---
android_work: sent uevent USB_STATE=DISCONNECTED
------------[ cut here ]------------
WARNING: CPU: 2 PID: 74 at drivers/usb/gadget/function/
f_fs.c:1872 ffs_func_bind
read descriptors
Modules linked in: ...
read strings
CPU: 2 PID: 74 Comm: kworker/2:1 Tainted: P
Workqueue: events_long crg_rewrite_udc_for_error [amlogic_usb]
show_stack
dump_stack_lvl
__warn
warn_slowpath_fmt
ffs_func_bind
usb_add_function
configfs_composite_bind
udc_bind_to_driver
usb_gadget_probe_driver
crg_rewrite_otg_write_UDC [amlogic_usb]
udc xxx.crgudc20: failed to start g1: -77
android_work: sent uevent USB_STATE=CONNECTED
android_work: sent uevent USB_STATE=DISCONNECTED
android_work: sent uevent USB_STATE=CONNECTED
android_work: sent uevent USB_STATE=CONFIGURED
2.crg_udc_pm_cb call took too long during resume on
critical path

Solution:
1. Add polling wait between usb_gadget_unregister_driver()
and usb_gadget_probe_driver().
2. move crg_udc_resume_post() to kworker.

Verify:
T963D5.

Change-Id: I6e0e934f9b6c689bd80edc72d589d64b80ae3ec9
Signed-off-by: dian.shao <dian.shao@amlogic.com>
2025-11-06 01:23:21 -07:00
..
2025-03-18 04:00:08 -08:00
2025-01-01 22:59:14 -08:00
2025-01-01 22:59:14 -08:00
2025-04-01 20:47:24 -08:00
2025-02-12 05:56:40 -08:00