All of lore.kernel.org
 help / color / mirror / Atom feed
* imx7: USB modem reset causes modem to not re-connect
@ 2022-12-12 18:10 Fabio Estevam
  2022-12-12 19:01 ` Fabio Estevam
  2022-12-13  8:12 ` Jun Li
  0 siblings, 2 replies; 8+ messages in thread
From: Fabio Estevam @ 2022-12-12 18:10 UTC (permalink / raw)
  To: bjorn, Peter Chen, Marek Vasut, Li Jun
  Cc: netdev, USB list, Alexander Stein, Schrempf Frieder

Hi,

On an imx7d-based board running kernel 5.10.158, I noticed that a
Quectel BG96 modem is gone after sending a reset command via AT:

# microcom /dev/ttyUSB3
>AT+CFUN=1,1
OK
 usb 2-1: USB disconnect, device number 6
option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
option 2-1:1.0: device disconnected
option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
option 2-1:1.1: device disconnected
option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
option 2-1:1.2: device disconnected
option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
option 2-1:1.3: device disconnected
qmi_wwan 2-1:1.4 wwan0: unregister 'qmi_wwan' usb-ci_hdrc.1-1, WWAN/QMI device

# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The USB modem is gone.

Forcing an 'echo on' to power/control makes the USB modem reappear:

# echo 'on' > /sys/bus/usb/devices/usb2/power/control
usb 2-1: new high-speed USB device number 7 using ci_hdrc
 usb 2-1: New USB device found, idVendor=2c7c, idProduct=0296, bcdDevice= 0.00
 usb 2-1: New USB device strings: Mfr=3, Product=2, SerialNumber=4
usb 2-1: Product: Qualcomm CDMA Technologies MSM
 usb 2-1: Manufacturer: Qualcomm, Incorporated
usb 2-1: SerialNumber: 7d1563c1
option 2-1:1.0: GSM modem (1-port) converter detected
usb 2-1: GSM modem (1-port) converter now attached to ttyUSB0
 option 2-1:1.1: GSM modem (1-port) converter detected
usb 2-1: GSM modem (1-port) converter now attached to ttyUSB1
option 2-1:1.2: GSM modem (1-port) converter detected
 usb 2-1: GSM modem (1-port) converter now attached to ttyUSB2
option 2-1:1.3: GSM modem (1-port) converter detected
usb 2-1: GSM modem (1-port) converter now attached to ttyUSB3
qmi_wwan 2-1:1.4: cdc-wdm0: USB WDM device
qmi_wwan 2-1:1.4 wwan0: register 'qmi_wwan' at usb-ci_hdrc.1-1,
WWAN/QMI device, 12:bc:8c:zz:yy:xx

# lsusb
Bus 002 Device 007: ID 2c7c:0296 Quectel Wireless Solutions Co., Ltd.
BG96 CAT-M1/NB-IoT modem
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Sending the AT reset command afterward works fine, and the modem keeps
connected.

Previously, this board used a vendor-based 4.14 kernel and such a
problem did not happen.

Kernels 5.10 and 4.14 have the same 'auto' option selected by default.

Also tested kernel 6.1 and it behaves the same as 5.10.158.

What can be done so that the reset modem command does not cause the
modem to disappear by default?

Thanks,

Fabio Estevam

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-12-16 12:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-12 18:10 imx7: USB modem reset causes modem to not re-connect Fabio Estevam
2022-12-12 19:01 ` Fabio Estevam
2022-12-13  7:31   ` Alexander Stein
2022-12-13  8:15   ` Jun Li
2022-12-13  9:33     ` Fabio Estevam
2022-12-13 11:17       ` Jun Li
2022-12-16 12:00         ` Fabio Estevam
2022-12-13  8:12 ` Jun Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.