From 8d0a51e5911d50cf7ef41bbc0f19661b9e6ee5f4 Mon Sep 17 00:00:00 2001 From: Roy Luo Date: Fri, 23 Aug 2024 18:10:22 +0000 Subject: [PATCH] usb: correct sys.usb.controller sysprop system/core/init/init.cpp SetUsbController picks the first udc device if there're multiple udc devices present on the system to populate sys.usb.controller system property. CONFIG_USB_DUMMY_HCD enabled in kernel-5.10 GKI would introduce a dummy udc device named "dummy_udc.0". Depends on timing, the dummy device might be picked up by the init process and incorrectly populate sys.usb.controller. This issue only applies to devices on kernel-5.10 GKI, the WAR is to overwrite the sysprop if it's incorrectly populated by the dummy udc. Bug: 333778731 Test: tested on Cheetah Flag: EXEMPT bugfix Change-Id: Idefd1a5d8154a51792c6cb52ee6d11cbb7f6df78 --- conf/init.gs101.usb.rc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/conf/init.gs101.usb.rc b/conf/init.gs101.usb.rc index 69bbf493..0243d0f1 100644 --- a/conf/init.gs101.usb.rc +++ b/conf/init.gs101.usb.rc @@ -414,3 +414,7 @@ on property:vendor.usb.contaminantdisable=true on property:ro.bootmode=usbuwb setprop persist.vendor.usb.usbradio.config uwb_acm + +# WAR for kernel 5.10 with CONFIG_USB_DUMMY_HCD enabled +on property:sys.usb.controller=dummy_udc.0 + setprop sys.usb.controller "11110000.dwc3"