RM510Q-GL failing to set usb configuation

I’m observing error when trying to use RM510Q-GL module on Atom x6413E system. Kernel fails to set USB configuration when module is inserted in USB 3.0 enabled B-Key slot.

[ 8546.497670] usb 2-4: new SuperSpeed Plus Gen 2x1 USB device number 2 using xhci_hcd
[ 8546.519664] usb 2-4: New USB device found, idVendor=2c7c, idProduct=0800, bcdDevice= 4.14
[ 8546.519668] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 8546.519670] usb 2-4: Product: RM510Q-GL
[ 8546.519671] usb 2-4: Manufacturer: Quectel
[ 8546.519673] usb 2-4: SerialNumber: xxxxxxxx
[ 8546.524098] usb 2-4: can't set config #1, error -32

Similar issue is observed with Windows 10 and on 2 different devices, which excludes HW failure or OS issue.
Same RM510Q-GL works fine in another (older Xeon-D) system (also USB 3.0 enabled slot) so this is not faulty module issue.

Further debugging shows that XHCI driver reports Stall after SET_CONFIGURATION:

     kworker/3:0-34      [003] .....  8546.526953: xhci_urb_enqueue: ep0out-control: urb 00000000a1de16e0 pipe 2147484160 slot 2 length 0/0 sgs 0/0 stream 0 flags 00000000
     kworker/3:0-34      [003] d....  8546.526956: xhci_queue_trb: CTRL: bRequestType 00 bRequest 09 wValue 0001 wIndex 0000 wLength 0 length 8 TD size 0 intr 0 type 'Setup Stage' flags I:i:c
     kworker/3:0-34      [003] d....  8546.526956: xhci_inc_enq: CTRL 000000009188503a: enq 0x000000010ac69210(0x000000010ac69000) deq 0x000000010ac69200(0x000000010ac69000) segs 2 stream 0 free_trbs 508 bounce 0 cycle 1
     kworker/3:0-34      [003] d....  8546.526956: xhci_queue_trb: CTRL: Buffer 0000000000000000 length 0 TD size 0 intr 0 type 'Status Stage' flags I:c:e:C
     kworker/3:0-34      [003] d....  8546.526956: xhci_inc_enq: CTRL 000000009188503a: enq 0x000000010ac69220(0x000000010ac69000) deq 0x000000010ac69200(0x000000010ac69000) segs 2 stream 0 free_trbs 507 bounce 0 cycle 1
     kworker/3:0-34      [003] d....  8546.526957: xhci_ring_ep_doorbell: Ring doorbell for Slot 2 ep0in
          <idle>-0       [000] d.h..  8546.527723: xhci_handle_event: EVENT: TRB 000000010ac69210 status 'Stall Error' len 0 slot 2 ep 1 type 'Transfer Event' flags e:C

Any idea what might be wrong here?

Thanks in advance!

This situation it is mostly caused by the USB host. Generally speaking, if you see an error like can’t set config #1, error -32, it is caused due to the hardware error, or the driver of the USB host controller.

You can try to use the USB port, or even try the USB2.0 port, or use another the USB cable.

You can also try
echo 1 > /sys/bus/usb/devices/2-4/bConfigurationValue
to activate the configuration.

Please note that in the same slot Sierra Wireless em7455 works without any issues as ISB 3.0 device, so I will not rush into conclusion that this is host issue. It is unlikely driver issue as both windows and latest mainline linux doesn’t work.

Setting configuration trough sysfs doesn’t work, same stall observed in xhci debugs after SET_CONFIGURATION control message.

it is weird issue, as this is not 1st usb control transfer which happens. Card nicely replies to other control transfers, only SET_CONFIGURATION is either not received by the card or card refuses to reply for some reason.

If so you can use usbmon to capture the log of the usb bus.

Here is full usbmon for that card:

ffff93e291217840 3537482731 S Ci:2:002:0 s 80 06 0100 0000 0008 8 <
ffff93e291217840 3537483792 C Ci:2:002:0 0 8 = 12012003 00000009
ffff93e291217840 3537483798 S Co:2:002:0 s 00 31 0028 0000 0000 0
ffff93e291217840 3537483856 C Co:2:002:0 0 0
ffff93e291217840 3537483861 S Ci:2:002:0 s 80 06 0100 0000 0012 18 <
ffff93e291217840 3537484053 C Ci:2:002:0 0 18 = 12012003 00000009 7c2c0008 14040102 0301
ffff93e291217840 3537484058 S Ci:2:002:0 s 80 06 0f00 0000 0005 5 <
ffff93e291217840 3537484233 C Ci:2:002:0 0 5 = 050f2a00 03
ffff93e291217840 3537484237 S Ci:2:002:0 s 80 06 0f00 0000 002a 42 <
ffff93e291217840 3537484406 C Ci:2:002:0 0 42 = 050f2a00 03071002 06000000 0a100300 0f000101 f4011410 0a000100 00000011
ffff93e291217840 3537484413 S Ci:2:002:0 s 80 06 0200 0000 0009 9 <
ffff93e291217840 3537484590 C Ci:2:002:0 0 9 = 09022501 050104a0 70
ffff93e291217840 3537484593 S Ci:2:002:0 s 80 06 0200 0000 0125 293 <
ffff93e291217840 3537484772 C Ci:2:002:0 0 293 = 09022501 050104a0 70090400 0002ffff 30000705 81020004 00063000 00000007
ffff93e291217cc0 3537484781 S Ci:2:002:0 s 80 06 0300 0000 00ff 255 <
ffff93e291217cc0 3537484966 C Ci:2:002:0 0 4 = 04030904
ffff93e291217cc0 3537484969 S Ci:2:002:0 s 80 06 0302 0409 00ff 255 <
ffff93e291217cc0 3537485143 C Ci:2:002:0 0 20 = 14035200 4d003500 31003000 51002d00 47004c00
ffff93e291217cc0 3537485148 S Ci:2:002:0 s 80 06 0301 0409 00ff 255 <
ffff93e291217cc0 3537485317 C Ci:2:002:0 0 16 = 10035100 75006500 63007400 65006c00
ffff93e291217cc0 3537485320 S Ci:2:002:0 s 80 06 0303 0409 00ff 255 <
ffff93e291217cc0 3537485490 C Ci:2:002:0 0 18 = 12033100 32003500 62003500 31003200 3200
ffff93e299c4bf00 3537488315 S Co:2:002:0 s 00 09 0001 0000 0000 0
ffff93e299c4bf00 3537489147 C Co:2:002:0 -32 0

Is there anything else I can do to help resolving this issue?

Thanks!

From the usb log
We can see that it’s noproblem to

Get_Descriptor
Get_Configuration

but failed in Set_Configuration
I can’t find the reason why it is.

Yes, so should I give up and declare that this Quectel module is not compatible with Intel Elkhart Lake or there is still hope that this can be fixed?