Serial port ttyUSB2/3 not detected

I have noticed an issue with the latest build. Here is the link to the build (19.07.4) that works:

https://downloads.openwrt.org/releases/19.07.4/targets/at91/sama5/at91-sama5d27_som1_ek-ext4-sdcard.img.gz

Adding support for interface with the above image:

root@OpenWrt:~# opkg install kmod-usb-serial-option kmod-usb-serial kmod-usb-serial-wwan
Installing kmod-usb-serial-option (4.14.195-1) to root...
Downloading http://downloads.openwrt.org/releases/19.07.4/targets/at91/sama5/packages/kmod-usb-serial-option_4.14.195-1_arm_cortex-a5_vfpv4.ipk
Installing kmod-usb-serial (4.14.195-1) to root...
Downloading http://downloads.openwrt.org/releases/19.07.4/targets/at91/sama5/packages/kmod-usb-serial_4.14.195-1_arm_cortex-a5_vfpv4.ipk
Installing kmod-usb-serial-wwan (4.14.195-1) to root...
Downloading http://downloads.openwrt.org/releases/19.07.4/targets/at91/sama5/packages/kmod-usb-serial-wwan_4.14.195-1_arm_cortex-a5_vfpv4.ipk
Package kmod-usb-serial (4.14.195-1) installed in root is up to date.
Package kmod-usb-serial-wwan (4.14.195-1) installed in root is up to date.
Configuring kmod-usb-serial.
[   82.940000] kmodloader: loading kernel modules from /etc/modules.d/*
[   82.960000] usbcore: registered new interface driver option
[   82.970000] usbserial: USB Serial support registered for GSM modem (1-port)
[   82.980000] option 1-2:1.0: GSM modem (1-port) converter detected
[   82.980000] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
[   82.990000] option 1-2:1.1: GSM modem (1-port) converter detected
[   83.000000] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1
[   83.000000] option 1-2:1.2: GSM modem (1-port) converter detected
[   83.010000] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB2
[   83.020000] option 1-2:1.3: GSM modem (1-port) converter detected
[   83.030000] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB3
[   83.110000] kmodloader: 1 module could not be probed
[   83.110000] kmodloader: - at91_udc - 0
Configuring kmod-usb-serial-wwan.
[   83.350000] kmodloader: loading kernel modules from /etc/modules.d/*
[   83.390000] kmodloader: 1 module could not be probed
[   83.390000] kmodloader: - at91_udc - 0
Configuring kmod-usb-serial-option.
[   83.810000] kmodloader: loading kernel modules from /etc/modules.d/*
[   83.850000] kmodloader: 1 module could not be probed
[   83.850000] kmodloader: - at91_udc - 0
root@OpenWrt:~#

Here is the latest build ((19.07.4)) that does not detect the serial port:

https://downloads.openwrt.org/releases/19.07.5/targets/at91/sama5/ at91-sama5d27_som1_ek-ext4-sdcard.img.gz

Adding support for interface with the above image:

root@OpenWrt:~# opkg install kmod-usb-serial-option kmod-usb-serial kmod-usb-serial-wwan
Installing kmod-usb-serial-option (4.14.209-1) to root...
Downloading http://downloads.openwrt.org/releases/19.07.5/targets/at91/sama5/packages/kmod-usb-serial-option_4.14.209-1_arm_cortex-a5_vfpv4.ipk
Installing kmod-usb-serial (4.14.209-1) to root...
Downloading http://downloads.openwrt.org/releases/19.07.5/targets/at91/sama5/packages/kmod-usb-serial_4.14.209-1_arm_cortex-a5_vfpv4.ipk
Installing kmod-usb-serial-wwan (4.14.209-1) to root...
Downloading http://downloads.openwrt.org/releases/19.07.5/targets/at91/sama5/packages/kmod-usb-serial-wwan_4.14.209-1_arm_cortex-a5_vfpv4.ipk
Package kmod-usb-serial (4.14.209-1) installed in root is up to date.
Package kmod-usb-serial-wwan (4.14.209-1) installed in root is up to date.
Configuring kmod-usb-serial.
[  124.110000] kmodloader: loading kernel modules from /etc/modules.d/*
[  124.130000] usbcore: registered new interface driver option
[  124.140000] usbserial: USB Serial support registered for GSM modem (1-port)
[  124.150000] option 1-2:1.0: GSM modem (1-port) converter detected
[  124.150000] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
[  124.160000] option 1-2:1.1: GSM modem (1-port) converter detected
[  124.170000] usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1
[  124.230000] kmodloader: 1 module could not be probed
[  124.230000] kmodloader: - at91_udc - 0
Configuring kmod-usb-serial-wwan.
[  124.460000] kmodloader: loading kernel modules from /etc/modules.d/*
[  124.500000] kmodloader: 1 module could not be probed
[  124.500000] kmodloader: - at91_udc - 0
Configuring kmod-usb-serial-option.
[  124.770000] kmodloader: loading kernel modules from /etc/modules.d/*
[  124.810000] kmodloader: 1 module could not be probed
[  124.850000] kmodloader: - at91_udc - 0
root@OpenWrt:~#

Notice ttyUSB2 and ttyUSB3 do not get detected in the second case (19.07.5) . As a result, I am not able to create a serial session to the modem.

Any help will be greatly appreciated.

What modem is this? It's not a Quectel BG96 by any chance? If not, could you provide the relevant part of /sys/kernel/debug/usb/devices?

If it is a BG96, then the fix is in Linux v4.14.212. Which probably won't help you until OpenWrt 19.07.5 is released. You'll either have to upgrade/patch the driver yourself or downgrade OpenWrt until then.

Sorry about all this. My mistake. Details in https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/usb/serial/option.c?id=c98fff7332dbd6e028969f8c2bda3d7bc7a024d8

Thanks that's good to know. Yes it is Quectel BG96.

I can't downgrade since a critical issue I had reported (DHCP not working on cold start) has been fixed in 19.07.5

I'll try the upgrade/patch approach, although, since I am new to openWrt I am not sure how far I'll get.

Thanks.