From 0c3dc78fb998126d76389c138a75eb343a5c2864 Mon Sep 17 00:00:00 2001 From: Puma Hsu Date: Wed, 23 Nov 2022 15:14:12 +0800 Subject: [PATCH] usb: modify the initial_descriptor_timeout to 500ms Since retry times of kernel driver are 24 during USB enumeration, the total time of bad USB enumeration will waste 48 seconds. This patch will reduce the timeout from 2 seconds to 500ms, so the total time is changed to 12 seconds. (cherry-pick from commit dd9bb5578cd197b44f32c0c19aca79610b5bdd54) Bug: 256100001 Test: the timeout value is 500 Change-Id: I6c30e3c9168242f5c22443cbd5622892617e0520 Signed-off-by: Puma Hsu --- conf/init.gs201.usb.rc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conf/init.gs201.usb.rc b/conf/init.gs201.usb.rc index 4ac57f92..c57e2c56 100644 --- a/conf/init.gs201.usb.rc +++ b/conf/init.gs201.usb.rc @@ -152,6 +152,8 @@ on early-boot on boot write /config/usb_gadget/g1/bcdDevice 0x0510 + # Set USB timeout + write sys/module/usbcore/parameters/initial_descriptor_timeout 500 # Use USB Gadget HAL setprop sys.usb.configfs 2