[PATCH 1/2] kernel: usb: Autoprobe g_serial
Linus Walleij
linus.walleij at linaro.org
Sat Nov 11 14:02:20 PST 2023
For devices using USB gadget serial we need to probe the modules
usb_f_acm and g_serial in order, then the available UDC (USB device
controller) interface will be hooked up to a serial port as
/dev/ttyGS0. (On the host side this appears as /dev/ttyACM0
when plugging in the USB cable.)
I don't quite understand why this wasn't done before for the
module explicitly called kmod-usb-serial.
Before this patch we have to enter a console and type
modprobe g_serial
To get a serial console on /dev/ttyGS0, after this it is
automatic.
Since you might only have the serial console, it is a bit
catch 22 to have to use a serial console to activate the
serial console.
Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
package/kernel/linux/modules/usb.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk
index 0a5f5a8993c9..f54dc4380737 100644
--- a/package/kernel/linux/modules/usb.mk
+++ b/package/kernel/linux/modules/usb.mk
@@ -207,7 +207,7 @@ define KernelPackage/usb-gadget-serial
$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_obex.ko \
$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_serial.ko \
$(LINUX_DIR)/drivers/usb/gadget/legacy/g_serial.ko
- AUTOLOAD:=$(call AutoLoad,52,usb_f_acm)
+ AUTOLOAD:=$(call AutoLoad,52,usb_f_acm g_serial)
$(call AddDepends/usb)
endef
--
2.34.1
More information about the openwrt-devel
mailing list