diff options
author | Kuen-Han Tsai <khtsai@google.com> | 2023-12-12 14:07:27 +0800 |
---|---|---|
committer | Kuen-Han Tsai <khtsai@google.com> | 2023-12-12 14:07:27 +0800 |
commit | 93d9eb0a8f74ce233918f591a2eb022c3e1a9a56 (patch) | |
tree | 9c992ceedf2e048b9ff350f924fde87218eecb06 | |
parent | 1819593a37517267199697f9bfc51c3d6c7de4b5 (diff) | |
download | gs101-93d9eb0a8f74ce233918f591a2eb022c3e1a9a56.tar.gz |
usb: enable media-presence polling for SD cards
After USB enumeration, some SD card readers do not send signals to the
device when the SD card is inserted or removed.
To support SD card hotplugging, this patch enables in-kernel
media-presence polling, which will check the SD card status every 2
seconds after a SD card reader is attached.
Bug: 186479576
Test: SD card insertion/removal and data copy (see b/301566595)
Change-Id: I29c352696cd9d31168a8eac8c58d23adb484f5d0
Signed-off-by: Kuen-Han Tsai <khtsai@google.com>
-rw-r--r-- | conf/init.gs101.usb.rc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/conf/init.gs101.usb.rc b/conf/init.gs101.usb.rc index 724019e2..69bbf493 100644 --- a/conf/init.gs101.usb.rc +++ b/conf/init.gs101.usb.rc @@ -368,6 +368,8 @@ on boot write /config/usb_gadget/g1/bcdDevice 0x0510 # Use USB Gadget HAL setprop sys.usb.configfs 2 + # Enable in-kernel media-presence polling for SD cards + write /sys/module/block/parameters/events_dfl_poll_msecs 2000 on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb && property:sys.usb.configfs=1 write /config/usb_gadget/g1/idProduct 0x4EE7 |