Strange Resume behaviour of N5321 since 4.19

Torsten Hilbrich torsten.hilbrich at secunet.com
Thu Nov 7 15:02:20 UTC 2019


Versions:

ModemManager: 1.10.4
libmbim: 1.18.2
libqmi: 1.22.4

After updating our kernel from kernel v4.14.65 to v4.19.65 we got strange behaviour when performing S3.

The WWAN modem often disappears from the USB bus and reappears with a different ID.

Normal ID:    0bdb:193e
Different ID: 0bdb:193f

When this happens the following can be seen in the kernel logs:

[  224.086896] usb 3-10: new high-speed USB device number 7 using xhci_hcd
[  224.213587] usb 3-10: New USB device found, idVendor=0bdb, idProduct=193f
[  224.213591] usb 3-10: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[  224.213594] usb 3-10: Product: N5321 gw
[  224.213597] usb 3-10: Manufacturer: Lenovo
[  224.213599] usb 3-10: SerialNumber: 837BA41ADA15F060
[  239.585248] usb 3-10: USB disconnect, device number 7
[  239.807960] usb 3-10: new high-speed USB device number 8 using xhci_hcd
[  239.937575] usb 3-10: New USB device found, idVendor=0bdb, idProduct=193e
[  239.937582] usb 3-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  239.937587] usb 3-10: Product: N5321 gw
[  239.937591] usb 3-10: Manufacturer: Lenovo
[  239.937594] usb 3-10: SerialNumber: 837BA41ADA15F0M0

In this time window between 224 and 239 the usb_probe_device routine is running the generic_probe. There the usb_choose_configuration and usb_set_configuration are running.

Sometimes I also see delays and error messages when the usbhid driver tries to bind to this 193f device.

After the delay the device is disconnect and reappears on the bus and is working correctly, detected by the cdc_mbim driver.

I had to work around this problem by avoiding the USB access to this device completely, using a patch like:

diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index a1f225f077cd..9ee031e6b57c 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -254,6 +254,13 @@ static int usb_probe_device(struct device *dev)
 
        dev_dbg(dev, "%s\n", __func__);
 
+       if (udev->descriptor.idVendor == 0x0bdb &&
+           udev->descriptor.idProduct == 0x193f)
+       {
+               dev_info(dev, "ignoring known problematic USB ID 0bdb:193f for N5321 WWAN modem\n");
+               return -ENODEV;
+       }
+
        /* TODO: Add real matching code */
 
        /* The device should always appear to be in use


Is this problem known to anyone?

Is there a better to way to solve this issue than completely ignoring the device?

I have attached the complete kernel logs and the logs from the modem manager. During the log creation no SIM was inserted so this error message is to be expected.

Thanks,

	Torsten


-- 
Dipl.-Inform.
Torsten Hilbrich
Teamleiter Bereich Entwicklung
Abteilung Network & Client Security
Divison Public Authorities
secunet Security Networks AG 
Konrad-Zuse-Platz 2-4
81829 München

Tel: +49-201-5454-3522
Fax: +49-201-5454-1327
torsten.hilbrich at secunet.com
www.secunet.com

______________________________________________________________________

secunet Security Networks AG
Sitz: Kurfürstenstraße 58, 45138 Essen, Deutschland 
Amtsgericht Essen HRB 13615
Vorstand: Axel Deininger (Vors.), Torsten Henn, Dr. Kai Martius, Thomas
          Pleines
Aufsichtsratsvorsitzender: Ralf Wintergerst
______________________________________________________________________

-------------- next part --------------
A non-text attachment was scrubbed...
Name: modem-manager.log.gz
Type: application/gzip
Size: 13568 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20191107/38ac144e/attachment-0002.gz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kernel.log.gz
Type: application/gzip
Size: 19907 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20191107/38ac144e/attachment-0003.gz>


More information about the ModemManager-devel mailing list