RE: imx7: USB modem reset causes modem to not re-connect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Fabio Estevam <festevam@xxxxxxxxx>
> Sent: Tuesday, December 13, 2022 2:11 AM
> To: bjorn@xxxxxxx; Peter Chen <peter.chen@xxxxxxxxxx>; Marek Vasut
> <marex@xxxxxxx>; Jun Li <jun.li@xxxxxxx>
> Cc: netdev <netdev@xxxxxxxxxxxxxxx>; USB list <linux-usb@xxxxxxxxxxxxxxx>;
> Alexander Stein <alexander.stein@xxxxxxxxxxxxxxx>; Schrempf Frieder
> <frieder.schrempf@xxxxxxxxxx>
> Subject: imx7: USB modem reset causes modem to not re-connect
> 
> 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.

On this try, is the modem "firstly disconnect and then connect" or
it "keeps connects before and after" you sending the AT reset command?

>From your next email, I am seeing it's a "firstly disconnect and then connect"
in that try, I want to understand what's the modem behavior of AT reset
command, both on SW(host driver, force a disconnect?) and HW(modem side,
it actually physically disconnect and then connect?).

Li Jun

> 
> 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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux