2016-04-28 05:02:17

by Craig McQueen

[permalink] [raw]
Subject: RE: rt2800 and BeagleBone Black soft lockup when unplugging from USB hub

I previously wrote:
>
> I have a D-Link DWA-140 USB Wi-Fi device which is rt2800 based (5392
> chipset). I've been testing it on a BeagleBone Black running an Ubuntu 16.04
> image (4.4.6 kernel), with a USB hub.
>
> When I unplug the Wi-Fi device from the USB hub, and it's connected to an
> access point, and then I unplug it, the OS appears to lock up. I get messages
> about a soft lockup on the serial console:
>
> [ 9736.136702] NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s!
> [kworker/u2:0:1129] [ 9764.136701] NMI watchdog: BUG: soft lockup - CPU#0
> stuck for 22s! [kworker/u2:0:1129] [ 9792.136701] NMI watchdog: BUG: soft
> lockup - CPU#0 stuck for 22s! [kworker/u2:0:1129] [ 9820.136699] NMI
> watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [kworker/u2:0:1129] [
> 9848.136696] NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s!
> [kworker/u2:0:1129]
>
> This will repeat indefinitely, until I unplug the hub, which resolves the soft
> lockup and then the system seems to function normally.
>
> I've attached a dmesg log of the soft lockup stack traces. They seem to
> indicate a lockup in workqueue rt2x00usb_work_rxdone() (specifically in
> usb_hcd_submit_urb() called from rt2x00usb_kick_rx_entry() called from
> rt2x00usb_clear_entry()).
>
> I originally found this bug on a 3.14.x kernel built with Yocto for a BeagleBone
> Black-based product. So it seems this is a bug that has been around for some
> time.

I should also note that on the 3.14.x Yocto-built kernel on BeagleBone Black, this bug does not occur if the rt2800 device is unplugged directly from the BBB's USB port. It only occurs if unplugged from a hub.

I have tested this on an i586 based eBox-3310A mini-PC running Debian 8.4, which has a 3.16.0 kernel, with the same hub and same rt2800 device. But I was not able to reproduce this issue.

--
Craig McQueen