From fef314ea8a9ea9179920b58c4a38537714998aed Mon Sep 17 00:00:00 2001 From: Kieran Cyphus Date: Tue, 1 Nov 2022 15:31:53 +0800 Subject: [PATCH 1/2] Dumpstate: include `LoggingMaskHistory.csv` on bugreport Bug: 241739027 Test: trigger bugreport with `adb bugreport` and inspect the logs to to make sure it is copying over LoggingMaskHistory and including it in the tar file at the end. Change-Id: I93ad2655193c57a0782c1535dc1cde3d0db1aeec --- dumpstate/Dumpstate.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dumpstate/Dumpstate.cpp b/dumpstate/Dumpstate.cpp index d9ae8b91..b111ebf7 100644 --- a/dumpstate/Dumpstate.cpp +++ b/dumpstate/Dumpstate.cpp @@ -30,6 +30,7 @@ #include "DumpstateUtil.h" #define MODEM_LOG_DIRECTORY "/data/vendor/radio/logs/always-on" +#define MODEM_LOG_MASK_HISTORY_DIRECTORY "/data/vendor/radio/logs/mask_history" #define MODEM_EXTENDED_LOG_DIRECTORY "/data/vendor/radio/extended_logs" #define RIL_LOG_DIRECTORY "/data/vendor/radio" #define RIL_LOG_DIRECTORY_PROPERTY "persist.vendor.ril.log.base_dir" @@ -1158,8 +1159,10 @@ void Dumpstate::dumpModemSection(int fd) { void Dumpstate::dumpModemLogs(int fd, const std::string &destDir) { std::string extendedLogDir = MODEM_EXTENDED_LOG_DIRECTORY; + std::string modemLogMaskHistoryDir = MODEM_LOG_MASK_HISTORY_DIRECTORY; dumpLogs(fd, extendedLogDir, destDir, 20, EXTENDED_LOG_PREFIX); + dumpLogs(fd, modemLogMaskHistoryDir, destDir, 1, "LoggingMask"); dumpModemEFS(destDir); } From 0c3dc78fb998126d76389c138a75eb343a5c2864 Mon Sep 17 00:00:00 2001 From: Puma Hsu Date: Wed, 23 Nov 2022 15:14:12 +0800 Subject: [PATCH 2/2] 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