User avatar
jbeale
Posts: 3747
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

rtl_usb: Urb has error status 0xFFFFFFB9

Mon Nov 02, 2020 3:39 pm

I'm using an external wifi dongle (RTL8192CU based) on a Pi 3B because it has external antennas, for longer range. I noticed it had lost connection to my router after about a day of normal operation. However I noticed the green light on the dongle was still on, indicating the USB port was still active. I don't know if this is somehow related to a DHCP lease time. At any rate, unplugging and re-plugging the USB cable fixed the problem, and the Pi was never reset.

Code: Select all

$ cat /proc/device-tree/model
Raspberry Pi 3 Model B Rev 1.2

$ uname -a
Linux rp52 5.4.51-v7+ #1333 SMP Mon Aug 10 16:45:19 BST 2020 armv7l GNU/Linux

$ lsusb 
Bus 001 Device 006: ID 0bda:8178 Realtek Semiconductor Corp. RTL8192CU 802.11n WLAN Adapter
During the approx. two seconds when the cable was unplugged, I had over 52 thousand lines spammed to the /var/log/syslog file, about 15 microseconds apart, of the form:

Code: Select all

Nov  2 07:14:26 rp52 kernel: [152553.815121] rtl_usb: Urb has error status 0xFFFFFFB9
Nov  2 07:14:26 rp52 kernel: [152553.815352] rtl_usb: Urb has error status 0xFFFFFFB9
Nov  2 07:14:26 rp52 kernel: [152553.815453] rtl_usb: Urb has error status 0xFFFFFFB9
Nov  2 07:14:26 rp52 kernel: [152553.815574] rtl_usb: Urb has error status 0xFFFFFFB9
Nov  2 07:14:26 rp52 kernel: [152553.815683] rtl_usb: Urb has error status 0xFFFFFFB9
Nov  2 07:14:26 rp52 kernel: [152553.815790] rtl_usb: Urb has error status 0xFFFFFFB
...
Nov  2 07:14:28 rp52 kernel: [152556.012066] rtl_usb: Urb has error status 0xFFFFFFB9
Nov  2 07:14:28 rp52 kernel: [152556.012079] rtl_usb: Urb has error status 0xFFFFFFB9
Nov  2 07:14:28 rp52 kernel: [152556.012093] rtl_usb: Urb has error status 0xFFFFFFB9
Nov  2 07:14:28 rp52 kernel: [152556.012107] rtl_usb: Urb has error status 0xFFFFFFB9
This makes me think the USB-disconnect event was somehow not recognized or understood by the OS, surely this is not an intended behavior?

jdb
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2508
Joined: Thu Jul 11, 2013 2:37 pm

Re: rtl_usb: Urb has error status 0xFFFFFFB9

Mon Nov 02, 2020 4:21 pm

Urgh. This is a bit pants

https://elixir.bootlin.com/linux/v5.4.7 ... usb.c#L852

1. The status should be parsed as a signed int, not converted to hex.
2. Certain URB error codes *need* to be handled by the driver - as they report endpoint stalls as well as disconnects/protocol errors.
3. The driver does neither of these things, and immediately resubmits URBs, so error spam is inevitable

0xffb9 => -71 which is roughly translated as "protocol error" - i.e. the transaction failed to complete because a packet CRC was invalid, or lack of response from the device. It doesn't automatically imply the device is disconnected, but you usually get brief bursts of errors as a consequence of a disconnect.

I would guess that the extreme amounts of spam are preventing the kernel's hub task from completing the necessary disconnect processing.
Rockets are loud.
https://astro-pi.org

User avatar
jbeale
Posts: 3747
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: rtl_usb: Urb has error status 0xFFFFFFB9

Mon Nov 02, 2020 5:29 pm

Thank you very much for the prompt and informative reply! As this device uses an older wifi chipset, I assume there's not much likelihood the driver for it will change at this point, so I guess "it is what it is".

Return to “Troubleshooting”