lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <PA4PR04MB9640A6C1E25988292480132889E39@PA4PR04MB9640.eurprd04.prod.outlook.com>
Date:   Tue, 13 Dec 2022 08:12:11 +0000
From:   Jun Li <jun.li@....com>
To:     Fabio Estevam <festevam@...il.com>,
        "bjorn@...k.no" <bjorn@...k.no>,
        Peter Chen <peter.chen@...nel.org>, Marek Vasut <marex@...x.de>
CC:     netdev <netdev@...r.kernel.org>,
        USB list <linux-usb@...r.kernel.org>,
        Alexander Stein <alexander.stein@...tq-group.com>,
        Schrempf Frieder <frieder.schrempf@...tron.de>
Subject: RE: imx7: USB modem reset causes modem to not re-connect



> -----Original Message-----
> From: Fabio Estevam <festevam@...il.com>
> Sent: Tuesday, December 13, 2022 2:11 AM
> To: bjorn@...k.no; Peter Chen <peter.chen@...nel.org>; Marek Vasut
> <marex@...x.de>; Jun Li <jun.li@....com>
> Cc: netdev <netdev@...r.kernel.org>; USB list <linux-usb@...r.kernel.org>;
> Alexander Stein <alexander.stein@...tq-group.com>; Schrempf Frieder
> <frieder.schrempf@...tron.de>
> 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ