2016-04-27 04:27:15

by Craig McQueen

[permalink] [raw]
Subject: rt2800 and BeagleBone Black kernel panic when connecting to access point

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).

1) Install Ubuntu 16.04 on a BeagleBone Black.
2) Add lines to /etc/network/interfaces for the device to connect to a WPA2 access point.
3) Plug the rt2800 USB Wi-Fi device into the BeagleBone Black.

Apparently when it tries to connect to the access point, I get a kernel panic. If I don't configure it (step 2 above) then the kernel panic doesn't happen.

I've tested this with two access points: my Android phone acting as a hotspot, and a cheap TP-Link TD-W8968.

Serial debug console shows:

[ 306.884793] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x1004 with error -110
[ 306.996804] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x1004 with error -110
[ 307.057021] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x0500 with error -19
[ 307.102417] Unable to handle kernel NULL pointer dereference at virtual address 0000002c
[ 307.110768] pgd = ddd34000
[ 307.113555] [0000002c] *pgd=00000000
[ 307.117257] Internal error: Oops: 5 [#1] SMP THUMB2
[ 307.122269] Modules linked in: arc4 rt2800usb rt2800lib rt2x00usb rt2x00lib mac80211 crc_ccitt cfg80211 rfkill snd_soc_simple_card omap_aes omap_sham usb_f_ecm g_ether usb_f_rndis u_ether libcomposite omap_rng rng_core snd_soc_davinci_mcasp snd_soc_edma snd_soc_omap spi_omap2_mcspi snd_soc_hdmi_codec snd_soc_core snd_pcm_dmaengine snd_pcm snd_timer snd soundcore evdev uio_pdrv_genirq uio tilcdc tda998x
[ 307.159448] CPU: 0 PID: 875 Comm: wpa_supplicant Not tainted 4.4.6-ti-r15 #1
[ 307.166672] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 307.172921] task: dcf56180 ti: dd8e6000 task.ti: dd8e6000
[ 307.178470] PC is at _raw_spin_lock_irqsave+0x14/0x40
[ 307.183755] LR is at rt2x00queue_get_entry+0x1e/0x54 [rt2x00lib]
[ 307.189928] pc : [<c06e2560>] lr : [<bfa9b99b>] psr: 800b01b3
[ 307.189928] sp : dd8e79a0 ip : 00000000 fp : dc94f900
[ 307.201687] r10: c0b5ba88 r9 : dcda6928 r8 : dcda692c
[ 307.207042] r7 : 00000054 r6 : 0000002c r5 : 00000000 r4 : 00000002
[ 307.213731] r3 : 00000150 r2 : 0000002c r1 : 00000001 r0 : 800b0193
[ 307.220423] Flags: Nzcv IRQs off FIQs on Mode SVC_32 ISA Thumb Segment none
[ 307.228007] Control: 50c5387d Table: 9dd34019 DAC: 00000051
[ 307.233896] Process wpa_supplicant (pid: 875, stack limit = 0xdd8e6218)
[ 307.240675] Stack: (0xdd8e79a0 to 0xdd8e8000)
[ 307.245159] 79a0: 00000150 00000002 00000000 00000054 ddf26de0 bfac8803 ddf26de0 ddf27144
[ 307.253559] 79c0: dcda6800 00000000 dcda692c bfac8971 00000000 c04fc087 c000a439 dde057c0
[ 307.261945] 79e0: dc94f900 bfaab2ff bfaab2e9 dc94f900 000b0113 c04fc1d3 ddcc4038 dc94f914
[ 307.270331] 7a00: dcda6924 dd8e7a14 00000000 c04fc2dd df925d8c dd8e7a14 dd8e7a14 dc8ba606
[ 307.278715] 7a20: df925d80 dcda6938 00000000 00000000 000f4240 c095df60 c095dfa8 dcda6934
[ 307.287099] 7a40: 00000018 c0034acf c0b5b098 00000006 c0c29d8c 00000040 dd8e6000 dd8e7b90
[ 307.295483] 7a60: 00000007 c0034c85 004c4b29 00000000 00000101 dd8e7a68 c0b5b080 c0c40380
[ 307.303889] 7a80: 0000000a 000006e1 c0b5b140 00400140 c00856ed 200b0113 ffffe000 dddfc2bc
[ 307.312282] 7aa0: 00000000 00000304 dd8e7b90 ddf0e840 0000000f c0034ea7 000001ff c0034f33
[ 307.320666] 7ac0: 0000001e dddfc000 da84ec40 c0628085 dd8e7ca0 dddfc090 60000013 00000000
[ 307.329050] 7ae0: da84ec40 dd8e7b90 ddf0e840 00000005 00000000 ddf0e840 0000000f c05f11e5
[ 307.337437] 7b00: 00000000 00000020 00007ea0 ddf0e840 00000020 c014402d 00000000 00007ea0
[ 307.351143] 7b20: 00000000 00000000 00000000 dd8e7e50 dd8e7e4c dd8e7e48 dd8e7e40 dd8e7e44
[ 307.364750] 7b40: dd8e7e48 00000000 00000000 00000000 00000000 00000000 024152c0 dd8e7e24
[ 307.378341] 7b60: c0b5d930 00000000 dd8e7f74 dd8e7b88 c0b5ba88 dd8e6000 004c4b29 00000000
[ 307.391976] 7b80: 00000001 3b9aca00 a6ad6574 00000048 00000000 000000db 00000000 dcf56180
[ 307.405640] 7ba0: 00000000 00000000 00000008 ddf0e840 000000db 00000000 dd8e7b90 c01439a1
[ 307.419316] 7bc0: dc026784 dc026784 dc026780 ddf4bcc0 000000db 00000000 dd8e7b90 c01439a1
[ 307.433008] 7be0: dc026204 dc026204 dc026200 ddf4bf00 000000db 00000000 dd8e7b90 c01439a1
[ 307.446684] 7c00: dc02612c dc02612c dc026128 ddf4bc00 000000db 00000000 dd8e7b90 c01439a1
[ 307.460325] 7c20: dc026984 dc026984 dc026980 dc060cc0 000000db 00000000 dd8e7b90 c01439a1
[ 307.473925] 7c40: dc026144 dc026144 dc026140 dc0603c0 000000db 00000000 dd8e7b90 c01439a1
[ 307.487339] 7c60: ddb1b104 ddb1b104 ddb1b100 dc0609c0 000000db 00000000 dd8e7b90 c01439a1
[ 307.500597] 7c80: dde03844 dde03844 dde03840 dc060e40 000000db 00000000 dd8e7b90 c01439a1
[ 307.513712] 7ca0: dde037c4 dde037c4 dde037c0 ddb7b000 dcf0c480 c0627d0b 00000004 00000002
[ 307.526882] 7cc0: ffffffed dc8ba606 dc138f00 ddb7b000 dcf0c300 dd8e7d10 dc138f00 dcf0c300
[ 307.539972] 7ce0: 00000000 c06281c9 dd8e7d10 c06e1163 c0b5ba88 c06e1163 bf99f4cc c062a553
[ 307.553056] 7d00: 00000000 c0c25540 000000cc c00583d7 c0629e85 c0629e4d bf99726c bf9a7980
[ 307.566185] 7d20: 00000000 dd8e6000 c06ec750 00000000 dcd2e8a0 00000000 00000000 dd8e6000
[ 307.579343] 7d40: c0b5cb94 c0b5ba88 024200ca dc8ba606 dcdadb00 dc138f00 dcf0c300 c05fb77d
[ 307.592434] 7d60: dd8e7de0 c05fb81f dcf0c300 00000000 dd8e7de0 c00f8b8b dfda1340 dfda1460
[ 307.605436] 7d80: 00000003 c00f8ccf 00000008 00000000 40000093 c001a411 0009a5fd 9a5fd18f
[ 307.618349] 7da0: dde007bc 00000000 00000000 c00f451f dfd22794 00000000 00000000 dc8ba606
[ 307.631178] 7dc0: dfd22794 00000001 da8b0960 c00f451f 00000000 00000000 00000000 7f5e0000
[ 307.643956] 7de0: 0000014f 00000000 0014f000 dc8ba606 00000070 00000004 dd8e7e3c c0b5ba88
[ 307.656720] 7e00: 0000000f 7fdbf350 7fdbf3d8 dd8e7e3c 7fdbf948 c014434d dd8e7f74 00000051
[ 307.669494] 7e20: 00000070 dd8e7e3c dd8e7e40 dd8e7e44 dd8e7e48 dd8e7e4c dd8e7e50 00007ea0
[ 307.682259] 7e40: 00000000 00000000 00000000 00000000 00000000 ddfb0c74 7f5e0000 dde00000
[ 307.695032] 7e60: ddcaa000 00000000 00000054 00000061 7f5e0000 ffffe000 00000000 00000070
[ 307.707785] 7e80: dde00780 dc8ba606 00000000 dd8e7fb0 dcf56180 80000007 7f5e07fc ddfb0c40
[ 307.720566] 7ea0: dcd2e720 ddfb0c78 00000054 c06e349b 00000000 00000000 7f6dcad8 c05f2b6d
[ 307.733379] 7ec0: dd8e7ee0 00000000 00000000 00000000 00000000 000008fc dd8e7f04 c008a4db
[ 307.746185] 7ee0: 04f2e6a2 00000000 a8e0fcc7 ffffffff ffffffff c0143dfb 00000133 0207683c
[ 307.759065] 7f00: 8dbe2200 c0b5ba88 dd8e7f74 3b9a9738 00000004 dd8e7f30 7fdbf948 c0143dfb
[ 307.771961] 7f20: 7f6dcad8 00000004 3b9a9738 c0b5ba88 00000138 02073574 00000004 dc8ba606
[ 307.784855] 7f40: 0207683c bed1db24 c0b5ba88 0000000f 7fdbf350 7fdbf3d8 7fdbf948 dd8e7f74
[ 307.797776] 7f60: 7f6dcad8 c0144645 dd8e7f74 00000107 c000eda4 00000138 02073574 00000004
[ 307.810714] 7f80: 000f4233 dc8ba606 bed1db24 7fdbf298 7f6dcad8 0000008e c000eda4 dd8e6000
[ 307.823633] 7fa0: 00000000 c000ebe1 bed1db24 7fdbf298 0000000f 7fdbf350 7fdbf3d8 7fdbf948
[ 307.836538] 7fc0: bed1db24 7fdbf298 7f6dcad8 0000008e 7fdb1568 7fdbf350 7fdbf3d8 7f6dcad8
[ 307.849434] 7fe0: 00000000 bed1daf0 7f599bf3 b6cdc548 00000030 0000000f ff76fea7 ffff88ef
[ 307.862403] [<c06e2560>] (_raw_spin_lock_irqsave) from [<bfa9b99b>] (rt2x00queue_get_entry+0x1e/0x54 [rt2x00lib])
[ 307.877604] [<bfa9b99b>] (rt2x00queue_get_entry [rt2x00lib]) from [<bfac8803>] (rt2800usb_txstatus_pending+0x1a/0x54 [rt2800usb])
[ 307.898952] [<bfac8803>] (rt2800usb_txstatus_pending [rt2800usb]) from [<bfac8971>] (rt2800usb_tx_sta_fifo_read_completed+0x78/0xe8 [rt2800usb])
[ 307.922051] [<bfac8971>] (rt2800usb_tx_sta_fifo_read_completed [rt2800usb]) from [<bfaab2ff>] (rt2x00usb_register_read_async_cb+0x16/0x34 [rt2x00usb])
[ 307.946065] [<bfaab2ff>] (rt2x00usb_register_read_async_cb [rt2x00usb]) from [<c04fc1d3>] (__usb_hcd_giveback_urb+0x4b/0xdc)
[ 307.962810] [<c04fc1d3>] (__usb_hcd_giveback_urb) from [<c04fc2dd>] (usb_giveback_urb_bh+0x79/0xb8)
[ 307.977423] [<c04fc2dd>] (usb_giveback_urb_bh) from [<c0034acf>] (__tasklet_action+0x5b/0xe8)
[ 307.991555] [<c0034acf>] (__tasklet_action) from [<c0034c85>] (__do_softirq+0x85/0x234)
[ 308.005182] [<c0034c85>] (__do_softirq) from [<c0034ea7>] (do_softirq.part.6+0x33/0x38)
[ 308.018813] [<c0034ea7>] (do_softirq.part.6) from [<c0034f33>] (__local_bh_enable_ip+0x87/0x90)
[ 308.033175] [<c0034f33>] (__local_bh_enable_ip) from [<c0628085>] (netlink_poll+0xf1/0x138)
[ 308.047248] [<c0628085>] (netlink_poll) from [<c05f11e5>] (sock_poll+0x59/0xb0)
[ 308.060337] [<c05f11e5>] (sock_poll) from [<c014402d>] (do_select+0x221/0x44c)
[ 308.073395] [<c014402d>] (do_select) from [<c014434d>] (core_sys_select+0xf5/0x338)
[ 308.086929] [<c014434d>] (core_sys_select) from [<c0144645>] (SyS_select+0xb5/0xf4)
[ 308.100533] [<c0144645>] (SyS_select) from [<c000ebe1>] (ret_fast_syscall+0x1/0x52)
[ 308.114190] Code: 8000 b672 f892 f000 (e852) 3f00
[ 308.124989] ---[ end trace 727b461c8c30b5e7 ]---
[ 308.135586] Kernel panic - not syncing: Fatal exception in interrupt
[ 308.147983] ---[ end Kernel panic - not syncing: Fatal exception in interrupt

--
Craig McQueen



2016-04-27 05:56:50

by Craig McQueen

[permalink] [raw]
Subject: RE: rt2800 and BeagleBone Black kernel panic when connecting to access point

Vishal Thanki wrote:
> Hi,
>
> On Wed, Apr 27, 2016 at 02:21:36PM +1000, Craig McQueen 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).
> >
> > 1) Install Ubuntu 16.04 on a BeagleBone Black.
> > 2) Add lines to /etc/network/interfaces for the device to connect to a
> WPA2 access point.
> > 3) Plug the rt2800 USB Wi-Fi device into the BeagleBone Black.
> >
> > Apparently when it tries to connect to the access point, I get a kernel panic.
> If I don't configure it (step 2 above) then the kernel panic doesn't happen.
> >
> > I've tested this with two access points: my Android phone acting as a
> hotspot, and a cheap TP-Link TD-W8968.
> >
> > Serial debug console shows:
> > ...
>
> I have seen a similar crash and fixed it as a part of following commit:
>
> 8b4c0009313f3d42e2540e3e1f776097dd0db73d
>
> But it would be helpful if you can get paste the entire kernel log.
> Because in my case, I used to see a USB Disconnect event for the rt2800
> driver and the crash was caused due to that.

Okay, see the attached file. I can't see a USB Disconnect event for the rt2800, until the end (line 561, timestamp 222.861630) which is when I unplugged the USB hub.

--
Craig McQueen


Attachments:
2016-04-27_Ubuntu_16_04_hub_connection_unplug_lockup-c.txt (41.55 kB)
2016-04-27_Ubuntu_16_04_hub_connection_unplug_lockup-c.txt

2016-04-27 23:23:51

by Craig McQueen

[permalink] [raw]
Subject: RE: rt2800 and BeagleBone Black kernel panic when connecting to access point

VmlzaGFsIFRoYW5raSB3cm90ZToNCj4gT24gV2VkLCBBcHIgMjcsIDIwMTYgYXQgNzo1NiBBTSwg
Q3JhaWcgTWNRdWVlbg0KPiA8Y3JhaWcubWNxdWVlbkBpbm5lcnJhbmdlLmNvbT4gd3JvdGU6DQo+
ID4gVmlzaGFsIFRoYW5raSB3cm90ZToNCj4gPj4gSGksDQo+ID4+DQo+ID4+IE9uIFdlZCwgQXBy
IDI3LCAyMDE2IGF0IDAyOjIxOjM2UE0gKzEwMDAsIENyYWlnIE1jUXVlZW4gd3JvdGU6DQo+ID4+
ID4gSSBoYXZlIGEgRC1MaW5rIERXQS0xNDAgVVNCIFdpLUZpIGRldmljZSB3aGljaCBpcyBydDI4
MDAgYmFzZWQNCj4gPj4gPiAoNTM5Mg0KPiA+PiBjaGlwc2V0KS4gSSd2ZSBiZWVuIHRlc3Rpbmcg
aXQgb24gYSBCZWFnbGVCb25lIEJsYWNrIHJ1bm5pbmcgYW4NCj4gPj4gVWJ1bnR1IDE2LjA0IGlt
YWdlICg0LjQuNiBrZXJuZWwpLg0KPiA+PiA+DQo+ID4+ID4gMSkgSW5zdGFsbCBVYnVudHUgMTYu
MDQgb24gYSBCZWFnb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dIChrdGhy
ZWFkKzB4YWIvMHhjMCkNClsgIDY2Mi4yNDkyOTldIFs8YzAwNDdmYWI+XSAoa3RocmVhZCkgZnJv
bSBbPGMwMDBlY2I1Pl0gKHJldF9mcm9tX2ZvcmsrMHgxMS8weDFjKQ0KWyAgNjYyLjI2MTA1NF0g
Q29kZTogODAwMCBiNjcyIGY4OTIgZjAwMCAoZTg1MikgM2YwMA0KWyAgNjYyLjI3NzQ5OF0gLS0t
WyBlbmQgdHJhY2UgNjExYzIxMWFlZDJlNDU3MSBdLS0tDQpbICA2NjIuMjg2NDQzXSBLZXJuZWwg
cGFuaWMgLSBub3Qgc3luY2luZzogRmF0YWwgZXhjZXB0aW9uIGluIGludGVycnVwdA0KWyAgNjYy
LjI5NzA3Ml0gLS0tWyBlbmQgS2VybmVsIHBhbmljIC0gbm90IHN5bmNpbmc6IEZhdGFsIGV4Y2Vw
dGlvbiBpbiBpbnRlcnJ1cHQNCg0KLS0gDQpDcmFpZyBNY1F1ZWVuDQoNCg==

2016-04-27 05:28:34

by Vishal Thanki

[permalink] [raw]
Subject: Re: rt2800 and BeagleBone Black kernel panic when connecting to access point

Hi,

On Wed, Apr 27, 2016 at 02:21:36PM +1000, Craig McQueen 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).
>
> 1) Install Ubuntu 16.04 on a BeagleBone Black.
> 2) Add lines to /etc/network/interfaces for the device to connect to a WPA2 access point.
> 3) Plug the rt2800 USB Wi-Fi device into the BeagleBone Black.
>
> Apparently when it tries to connect to the access point, I get a kernel panic. If I don't configure it (step 2 above) then the kernel panic doesn't happen.
>
> I've tested this with two access points: my Android phone acting as a hotspot, and a cheap TP-Link TD-W8968.
>
> Serial debug console shows:
>
> [ 306.884793] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x1004 with error -110
> [ 306.996804] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x1004 with error -110
> [ 307.057021] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x0500 with error -19
> [ 307.102417] Unable to handle kernel NULL pointer dereference at virtual address 0000002c
> [ 307.110768] pgd = ddd34000
> [ 307.113555] [0000002c] *pgd=00000000
> [ 307.117257] Internal error: Oops: 5 [#1] SMP THUMB2
> [ 307.122269] Modules linked in: arc4 rt2800usb rt2800lib rt2x00usb rt2x00lib mac80211 crc_ccitt cfg80211 rfkill snd_soc_simple_card omap_aes omap_sham usb_f_ecm g_ether usb_f_rndis u_ether libcomposite omap_rng rng_core snd_soc_davinci_mcasp snd_soc_edma snd_soc_omap spi_omap2_mcspi snd_soc_hdmi_codec snd_soc_core snd_pcm_dmaengine snd_pcm snd_timer snd soundcore evdev uio_pdrv_genirq uio tilcdc tda998x
> [ 307.159448] CPU: 0 PID: 875 Comm: wpa_supplicant Not tainted 4.4.6-ti-r15 #1
> [ 307.166672] Hardware name: Generic AM33XX (Flattened Device Tree)
> [ 307.172921] task: dcf56180 ti: dd8e6000 task.ti: dd8e6000
> [ 307.178470] PC is at _raw_spin_lock_irqsave+0x14/0x40
> [ 307.183755] LR is at rt2x00queue_get_entry+0x1e/0x54 [rt2x00lib]
> [ 307.189928] pc : [<c06e2560>] lr : [<bfa9b99b>] psr: 800b01b3
> [ 307.189928] sp : dd8e79a0 ip : 00000000 fp : dc94f900
> [ 307.201687] r10: c0b5ba88 r9 : dcda6928 r8 : dcda692c
> [ 307.207042] r7 : 00000054 r6 : 0000002c r5 : 00000000 r4 : 00000002
> [ 307.213731] r3 : 00000150 r2 : 0000002c r1 : 00000001 r0 : 800b0193
> [ 307.220423] Flags: Nzcv IRQs off FIQs on Mode SVC_32 ISA Thumb Segment none
> [ 307.228007] Control: 50c5387d Table: 9dd34019 DAC: 00000051
> [ 307.233896] Process wpa_supplicant (pid: 875, stack limit = 0xdd8e6218)
> [ 307.240675] Stack: (0xdd8e79a0 to 0xdd8e8000)
> [ 307.245159] 79a0: 00000150 00000002 00000000 00000054 ddf26de0 bfac8803 ddf26de0 ddf27144
> [ 307.253559] 79c0: dcda6800 00000000 dcda692c bfac8971 00000000 c04fc087 c000a439 dde057c0
> [ 307.261945] 79e0: dc94f900 bfaab2ff bfaab2e9 dc94f900 000b0113 c04fc1d3 ddcc4038 dc94f914
> [ 307.270331] 7a00: dcda6924 dd8e7a14 00000000 c04fc2dd df925d8c dd8e7a14 dd8e7a14 dc8ba606
> [ 307.278715] 7a20: df925d80 dcda6938 00000000 00000000 000f4240 c095df60 c095dfa8 dcda6934
> [ 307.287099] 7a40: 00000018 c0034acf c0b5b098 00000006 c0c29d8c 00000040 dd8e6000 dd8e7b90
> [ 307.295483] 7a60: 00000007 c0034c85 004c4b29 00000000 00000101 dd8e7a68 c0b5b080 c0c40380
> [ 307.303889] 7a80: 0000000a 000006e1 c0b5b140 00400140 c00856ed 200b0113 ffffe000 dddfc2bc
> [ 307.312282] 7aa0: 00000000 00000304 dd8e7b90 ddf0e840 0000000f c0034ea7 000001ff c0034f33
> [ 307.320666] 7ac0: 0000001e dddfc000 da84ec40 c0628085 dd8e7ca0 dddfc090 60000013 00000000
> [ 307.329050] 7ae0: da84ec40 dd8e7b90 ddf0e840 00000005 00000000 ddf0e840 0000000f c05f11e5
> [ 307.337437] 7b00: 00000000 00000020 00007ea0 ddf0e840 00000020 c014402d 00000000 00007ea0
> [ 307.351143] 7b20: 00000000 00000000 00000000 dd8e7e50 dd8e7e4c dd8e7e48 dd8e7e40 dd8e7e44
> [ 307.364750] 7b40: dd8e7e48 00000000 00000000 00000000 00000000 00000000 024152c0 dd8e7e24
> [ 307.378341] 7b60: c0b5d930 00000000 dd8e7f74 dd8e7b88 c0b5ba88 dd8e6000 004c4b29 00000000
> [ 307.391976] 7b80: 00000001 3b9aca00 a6ad6574 00000048 00000000 000000db 00000000 dcf56180
> [ 307.405640] 7ba0: 00000000 00000000 00000008 ddf0e840 000000db 00000000 dd8e7b90 c01439a1
> [ 307.419316] 7bc0: dc026784 dc026784 dc026780 ddf4bcc0 000000db 00000000 dd8e7b90 c01439a1
> [ 307.433008] 7be0: dc026204 dc026204 dc026200 ddf4bf00 000000db 00000000 dd8e7b90 c01439a1
> [ 307.446684] 7c00: dc02612c dc02612c dc026128 ddf4bc00 000000db 00000000 dd8e7b90 c01439a1
> [ 307.460325] 7c20: dc026984 dc026984 dc026980 dc060cc0 000000db 00000000 dd8e7b90 c01439a1
> [ 307.473925] 7c40: dc026144 dc026144 dc026140 dc0603c0 000000db 00000000 dd8e7b90 c01439a1
> [ 307.487339] 7c60: ddb1b104 ddb1b104 ddb1b100 dc0609c0 000000db 00000000 dd8e7b90 c01439a1
> [ 307.500597] 7c80: dde03844 dde03844 dde03840 dc060e40 000000db 00000000 dd8e7b90 c01439a1
> [ 307.513712] 7ca0: dde037c4 dde037c4 dde037c0 ddb7b000 dcf0c480 c0627d0b 00000004 00000002
> [ 307.526882] 7cc0: ffffffed dc8ba606 dc138f00 ddb7b000 dcf0c300 dd8e7d10 dc138f00 dcf0c300
> [ 307.539972] 7ce0: 00000000 c06281c9 dd8e7d10 c06e1163 c0b5ba88 c06e1163 bf99f4cc c062a553
> [ 307.553056] 7d00: 00000000 c0c25540 000000cc c00583d7 c0629e85 c0629e4d bf99726c bf9a7980
> [ 307.566185] 7d20: 00000000 dd8e6000 c06ec750 00000000 dcd2e8a0 00000000 00000000 dd8e6000
> [ 307.579343] 7d40: c0b5cb94 c0b5ba88 024200ca dc8ba606 dcdadb00 dc138f00 dcf0c300 c05fb77d
> [ 307.592434] 7d60: dd8e7de0 c05fb81f dcf0c300 00000000 dd8e7de0 c00f8b8b dfda1340 dfda1460
> [ 307.605436] 7d80: 00000003 c00f8ccf 00000008 00000000 40000093 c001a411 0009a5fd 9a5fd18f
> [ 307.618349] 7da0: dde007bc 00000000 00000000 c00f451f dfd22794 00000000 00000000 dc8ba606
> [ 307.631178] 7dc0: dfd22794 00000001 da8b0960 c00f451f 00000000 00000000 00000000 7f5e0000
> [ 307.643956] 7de0: 0000014f 00000000 0014f000 dc8ba606 00000070 00000004 dd8e7e3c c0b5ba88
> [ 307.656720] 7e00: 0000000f 7fdbf350 7fdbf3d8 dd8e7e3c 7fdbf948 c014434d dd8e7f74 00000051
> [ 307.669494] 7e20: 00000070 dd8e7e3c dd8e7e40 dd8e7e44 dd8e7e48 dd8e7e4c dd8e7e50 00007ea0
> [ 307.682259] 7e40: 00000000 00000000 00000000 00000000 00000000 ddfb0c74 7f5e0000 dde00000
> [ 307.695032] 7e60: ddcaa000 00000000 00000054 00000061 7f5e0000 ffffe000 00000000 00000070
> [ 307.707785] 7e80: dde00780 dc8ba606 00000000 dd8e7fb0 dcf56180 80000007 7f5e07fc ddfb0c40
> [ 307.720566] 7ea0: dcd2e720 ddfb0c78 00000054 c06e349b 00000000 00000000 7f6dcad8 c05f2b6d
> [ 307.733379] 7ec0: dd8e7ee0 00000000 00000000 00000000 00000000 000008fc dd8e7f04 c008a4db
> [ 307.746185] 7ee0: 04f2e6a2 00000000 a8e0fcc7 ffffffff ffffffff c0143dfb 00000133 0207683c
> [ 307.759065] 7f00: 8dbe2200 c0b5ba88 dd8e7f74 3b9a9738 00000004 dd8e7f30 7fdbf948 c0143dfb
> [ 307.771961] 7f20: 7f6dcad8 00000004 3b9a9738 c0b5ba88 00000138 02073574 00000004 dc8ba606
> [ 307.784855] 7f40: 0207683c bed1db24 c0b5ba88 0000000f 7fdbf350 7fdbf3d8 7fdbf948 dd8e7f74
> [ 307.797776] 7f60: 7f6dcad8 c0144645 dd8e7f74 00000107 c000eda4 00000138 02073574 00000004
> [ 307.810714] 7f80: 000f4233 dc8ba606 bed1db24 7fdbf298 7f6dcad8 0000008e c000eda4 dd8e6000
> [ 307.823633] 7fa0: 00000000 c000ebe1 bed1db24 7fdbf298 0000000f 7fdbf350 7fdbf3d8 7fdbf948
> [ 307.836538] 7fc0: bed1db24 7fdbf298 7f6dcad8 0000008e 7fdb1568 7fdbf350 7fdbf3d8 7f6dcad8
> [ 307.849434] 7fe0: 00000000 bed1daf0 7f599bf3 b6cdc548 00000030 0000000f ff76fea7 ffff88ef
> [ 307.862403] [<c06e2560>] (_raw_spin_lock_irqsave) from [<bfa9b99b>] (rt2x00queue_get_entry+0x1e/0x54 [rt2x00lib])

I have seen a similar crash and fixed it as a part of following commit:

8b4c0009313f3d42e2540e3e1f776097dd0db73d

But it would be helpful if you can get paste the entire kernel log.
Because in my case, I used to see a USB Disconnect event for the rt2800
driver and the crash was caused due to that.

Thanks,
Vishal

> [ 307.877604] [<bfa9b99b>] (rt2x00queue_get_entry [rt2x00lib]) from [<bfac8803>] (rt2800usb_txstatus_pending+0x1a/0x54 [rt2800usb])
> [ 307.898952] [<bfac8803>] (rt2800usb_txstatus_pending [rt2800usb]) from [<bfac8971>] (rt2800usb_tx_sta_fifo_read_completed+0x78/0xe8 [rt2800usb])
> [ 307.922051] [<bfac8971>] (rt2800usb_tx_sta_fifo_read_completed [rt2800usb]) from [<bfaab2ff>] (rt2x00usb_register_read_async_cb+0x16/0x34 [rt2x00usb])
> [ 307.946065] [<bfaab2ff>] (rt2x00usb_register_read_async_cb [rt2x00usb]) from [<c04fc1d3>] (__usb_hcd_giveback_urb+0x4b/0xdc)
> [ 307.962810] [<c04fc1d3>] (__usb_hcd_giveback_urb) from [<c04fc2dd>] (usb_giveback_urb_bh+0x79/0xb8)
> [ 307.977423] [<c04fc2dd>] (usb_giveback_urb_bh) from [<c0034acf>] (__tasklet_action+0x5b/0xe8)
> [ 307.991555] [<c0034acf>] (__tasklet_action) from [<c0034c85>] (__do_softirq+0x85/0x234)
> [ 308.005182] [<c0034c85>] (__do_softirq) from [<c0034ea7>] (do_softirq.part.6+0x33/0x38)
> [ 308.018813] [<c0034ea7>] (do_softirq.part.6) from [<c0034f33>] (__local_bh_enable_ip+0x87/0x90)
> [ 308.033175] [<c0034f33>] (__local_bh_enable_ip) from [<c0628085>] (netlink_poll+0xf1/0x138)
> [ 308.047248] [<c0628085>] (netlink_poll) from [<c05f11e5>] (sock_poll+0x59/0xb0)
> [ 308.060337] [<c05f11e5>] (sock_poll) from [<c014402d>] (do_select+0x221/0x44c)
> [ 308.073395] [<c014402d>] (do_select) from [<c014434d>] (core_sys_select+0xf5/0x338)
> [ 308.086929] [<c014434d>] (core_sys_select) from [<c0144645>] (SyS_select+0xb5/0xf4)
> [ 308.100533] [<c0144645>] (SyS_select) from [<c000ebe1>] (ret_fast_syscall+0x1/0x52)
> [ 308.114190] Code: 8000 b672 f892 f000 (e852) 3f00
> [ 308.124989] ---[ end trace 727b461c8c30b5e7 ]---
> [ 308.135586] Kernel panic - not syncing: Fatal exception in interrupt
> [ 308.147983] ---[ end Kernel panic - not syncing: Fatal exception in interrupt
>
> --
> Craig McQueen
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

2016-04-27 10:23:50

by Vishal Thanki

[permalink] [raw]
Subject: Re: rt2800 and BeagleBone Black kernel panic when connecting to access point

On Wed, Apr 27, 2016 at 7:56 AM, Craig McQueen
<[email protected]> wrote:
> Vishal Thanki wrote:
>> Hi,
>>
>> On Wed, Apr 27, 2016 at 02:21:36PM +1000, Craig McQueen 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).
>> >
>> > 1) Install Ubuntu 16.04 on a BeagleBone Black.
>> > 2) Add lines to /etc/network/interfaces for the device to connect to a
>> WPA2 access point.
>> > 3) Plug the rt2800 USB Wi-Fi device into the BeagleBone Black.
>> >
>> > Apparently when it tries to connect to the access point, I get a kernel panic.
>> If I don't configure it (step 2 above) then the kernel panic doesn't happen.
>> >
>> > I've tested this with two access points: my Android phone acting as a
>> hotspot, and a cheap TP-Link TD-W8968.
>> >
>> > Serial debug console shows:
>> > ...
>>
>> I have seen a similar crash and fixed it as a part of following commit:
>>
>> 8b4c0009313f3d42e2540e3e1f776097dd0db73d
>>
>> But it would be helpful if you can get paste the entire kernel log.
>> Because in my case, I used to see a USB Disconnect event for the rt2800
>> driver and the crash was caused due to that.
>
> Okay, see the attached file. I can't see a USB Disconnect event for the rt2800, until the end (line 561, timestamp 222.861630) which is when I unplugged the USB hub.
>

The attached file seem to report a different kind of crash (soft
lockup) while the crash reported in the 1st email of yours is
different (NULL pointer dereference).
I am not sure about this soft lockup problem though.

> --
> Craig McQueen
>

2016-04-28 07:52:16

by Vishal Thanki

[permalink] [raw]
Subject: Re: rt2800 and BeagleBone Black kernel panic when connecting to access point

On Thu, Apr 28, 2016 at 1:23 AM, Craig McQueen
<[email protected]> wrote:
> Vishal Thanki wrote:
>> On Wed, Apr 27, 2016 at 7:56 AM, Craig McQueen
>> <[email protected]> wrote:
>> > Vishal Thanki wrote:
>> >> Hi,
>> >>
>> >> On Wed, Apr 27, 2016 at 02:21:36PM +1000, Craig McQueen 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).
>> >> >
>> >> > 1) Install Ubuntu 16.04 on a BeagleBone Black.
>> >> > 2) Add lines to /etc/network/interfaces for the device to connect
>> >> > to a
>> >> WPA2 access point.
>> >> > 3) Plug the rt2800 USB Wi-Fi device into the BeagleBone Black.
>> >> >
>> >> > Apparently when it tries to connect to the access point, I get a kernel
>> panic.
>> >> If I don't configure it (step 2 above) then the kernel panic doesn't happen.
>> >> >
>> >> > I've tested this with two access points: my Android phone acting as
>> >> > a
>> >> hotspot, and a cheap TP-Link TD-W8968.
>> >> >
>> >> > Serial debug console shows:
>> >> > ...
>> >>
>> >> I have seen a similar crash and fixed it as a part of following commit:
>> >>
>> >> 8b4c0009313f3d42e2540e3e1f776097dd0db73d
>> >>
>> >> But it would be helpful if you can get paste the entire kernel log.
>> >> Because in my case, I used to see a USB Disconnect event for the
>> >> rt2800 driver and the crash was caused due to that.
>> >
>> > Okay, see the attached file. I can't see a USB Disconnect event for the
>> rt2800, until the end (line 561, timestamp 222.861630) which is when I
>> unplugged the USB hub.
>> >
>>
>> The attached file seem to report a different kind of crash (soft
>> lockup) while the crash reported in the 1st email of yours is different (NULL
>> pointer dereference).
>> I am not sure about this soft lockup problem though.
>
> Sorry, my mistake, since I was reporting 3 different issues with the rt2800 driver.
>
> How is the following? I do see a line saying USB disconnect at timestamp 661.652499.
>

Yes, this is the exact crash which I used to hit. It is fixed by
following commit in wireless-drivers-next.git

8b4c0009313f3d42e2540e3e1f776097dd0db73d
(rt2x00usb: Use usb anchor to manage URB)

You may want to cherry pick the change and give it a try.

~
Vishal

> craigm@beaglebone-craig:~$ echo 8 | sudo tee /proc/sys/kernel/printk
> 8
>
> [now I plug in the rt2800 device]
>
> [ 657.029785] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in a_wait_bcon (99, VALID), retry #1, port1 00000104
> [ 657.536405] usb 1-1: new high-speed USB device number 2 using musb-hdrc
> [ 657.688759] usb 1-1: New USB device found, idVendor=2001, idProduct=3c20
> [ 657.695929] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> [ 657.703546] usb 1-1: Product: 802.11 n WLAN
> [ 657.708027] usb 1-1: Manufacturer: Ralink
> [ 657.712330] usb 1-1: SerialNumber: 1.0
> [ 659.116390] usb 1-1: reset high-speed USB device number 2 using musb-hdrc
> [ 659.261736] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5392, rev 0223 detected
> [ 659.285805] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5372 detected
> [ 659.392270] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
> [ 659.427010] usbcore: registered new interface driver rt2800usb
> [ 659.527755] rt2800usb 1-1:1.0 wlx9cd64384611d: renamed from wlan0
> [ 659.885529] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
> [ 659.898385] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.29
> [ 660.060491] IPv6: ADDRCONF(NETDEV_UP): wlx9cd64384611d: link is not ready
> [ 661.361740] musb-hdrc musb-hdrc.1.auto: VBUS_ERROR in a_host (91, <VBusValid), retry #1, port1 00000507
> [ 661.492518] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x1004 with error -110
> [ 661.604463] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x1004 with error -110
> [ 661.652499] usb 1-1: USB disconnect, device number 2
> [ 661.664610] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x0500 with error -19
> [ 661.705415] ieee80211 ÀáÝ: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -108
> [ 661.715004] Unable to handle kernel NULL pointer dereference at virtual address 0000002c
> [ 661.723265] pgd = c0004000
> [ 661.726028] [0000002c] *pgd=00000000
> [ 661.729695] Internal error: Oops: 5 [#1] SMP THUMB2
> [ 661.734676] Modules linked in: arc4 rt2800usb rt2800lib rt2x00usb rt2x00lib mac80211 crc_ccitt binfmt_misc cfg80211 rfkill snd_soc_simple_card omap_sham omap_aes usb_f_ecm g_ether usb_f_rndis u_ether libcomposite omap_rng rng_core snd_soc_davinci_mcasp snd_soc_edma snd_soc_omap spi_omap2_mcspi snd_soc_hdmi_codec snd_soc_core snd_pcm_dmaengine snd_pcm snd_timer snd soundcore evdev uio_pdrv_genirq uio tilcdc tda998x
> [ 661.772528] CPU: 0 PID: 3 Comm: ksoftirqd/0 Not tainted 4.4.6-ti-r15 #1
> [ 661.779270] Hardware name: Generic AM33XX (Flattened Device Tree)
> [ 661.785482] task: dd8d0d00 ti: dd8e4000 task.ti: dd8e4000
> [ 661.790996] PC is at _raw_spin_lock_irqsave+0x14/0x40
> [ 661.796235] LR is at rt2x00queue_get_entry+0x1e/0x54 [rt2x00lib]
> [ 661.802362] pc : [<c06e2560>] lr : [<bfa8c99b>] psr: 800b01b3
> [ 661.802362] sp : dd8e5e20 ip : 00000000 fp : dc1dbd80
> [ 661.822042] r10: c0b5ba88 r9 : dcda6928 r8 : dcda692c
> [ 661.831251] r7 : 00000054 r6 : 0000002c r5 : 00000000 r4 : 00000002
> [ 661.841846] r3 : 00000150 r2 : 0000002c r1 : 00000001 r0 : 800b0193
> [ 661.852429] Flags: Nzcv IRQs off FIQs on Mode SVC_32 ISA Thumb Segment none
> [ 661.863910] Control: 50c5387d Table: 9cf24019 DAC: 00000051
> [ 661.873715] Process ksoftirqd/0 (pid: 3, stack limit = 0xdd8e4218)
> [ 661.883986] Stack: (0xdd8e5e20 to 0xdd8e6000)
> [ 661.892443] 5e20: 00000150 00000002 00000000 00000054 ddba6de0 bfab9803 ddba6de0 ddba7144
> [ 661.904811] 5e40: dcda6800 00000000 dcda692c bfab9971 00000000 c04fc087 00000000 ddbece80
> [ 661.917250] 5e60: dc1dbd80 bfa9c2ff bfa9c2e9 dc1dbd80 000b0113 c04fc1d3 ddf02c38 dc1dbd94
> [ 661.929622] 5e80: dcda6924 dd8e5e94 00000000 c04fc2dd 0000000a dd8e5e94 dd8e5e94 dc8ba606
> [ 661.941949] 5ea0: dd8e5eb8 dcda6938 00000000 00000000 000f4240 c095df60 c095dfa8 dcda6934
> [ 661.954257] 5ec0: 00000018 c0034acf c0b5b098 00000006 c0c29d8c 00000040 dd8e4000 c0b5ba88
> [ 661.966568] 5ee0: 00000007 c0034c85 00000000 c06df8db 00000100 dd8e5ee8 c0b5b080 c0c40380
> [ 661.978913] 5f00: 0000000a 00016129 c0b5b140 04208040 dd8e4000 dd8e4000 00000000 dd89a9c0
> [ 661.991259] 5f20: 00000000 c0b78970 c0b5ba88 ffffe000 00000000 c0034e61 c0034e35 c004a84d
> [ 662.003650] 5f40: 00000000 dc8ba606 00000000 dd89aa00 dd89a9c0 c004a791 00000000 00000000
> [ 662.016041] 5f60: 00000000 c0047fab 00000001 00000000 dd89a9c0 00000000 00030003 dd8e5f7c
> [ 662.028454] 5f80: dd8e5f7c 00000000 00000000 dd8e5f8c dd8e5f8c dc8ba606 ffffffff dd89aa00
> [ 662.040848] 5fa0: c0047f01 00000000 00000000 c000ecb5 00000000 00000000 00000000 00000000
> [ 662.053271] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> [ 662.065641] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 9ffffefd fffff2de
> [ 662.078022] [<c06e2560>] (_raw_spin_lock_irqsave) from [<bfa8c99b>] (rt2x00queue_get_entry+0x1e/0x54 [rt2x00lib])
> [ 662.092636] [<bfa8c99b>] (rt2x00queue_get_entry [rt2x00lib]) from [<bfab9803>] (rt2800usb_txstatus_pending+0x1a/0x54 [rt2800usb])
> [ 662.112800] [<bfab9803>] (rt2800usb_txstatus_pending [rt2800usb]) from [<bfab9971>] (rt2800usb_tx_sta_fifo_read_completed+0x78/0xe8 [rt2800usb])
> [ 662.134536] [<bfab9971>] (rt2800usb_tx_sta_fifo_read_completed [rt2800usb]) from [<bfa9c2ff>] (rt2x00usb_register_read_async_cb+0x16/0x34 [rt2x00usb])
> [ 662.156975] [<bfa9c2ff>] (rt2x00usb_register_read_async_cb [rt2x00usb]) from [<c04fc1d3>] (__usb_hcd_giveback_urb+0x4b/0xdc)
> [ 662.172846] [<c04fc1d3>] (__usb_hcd_giveback_urb) from [<c04fc2dd>] (usb_giveback_urb_bh+0x79/0xb8)
> [ 662.186507] [<c04fc2dd>] (usb_giveback_urb_bh) from [<c0034acf>] (__tasklet_action+0x5b/0xe8)
> [ 662.199622] [<c0034acf>] (__tasklet_action) from [<c0034c85>] (__do_softirq+0x85/0x234)
> [ 662.212178] [<c0034c85>] (__do_softirq) from [<c0034e61>] (run_ksoftirqd+0x2d/0x40)
> [ 662.224369] [<c0034e61>] (run_ksoftirqd) from [<c004a84d>] (smpboot_thread_fn+0xbd/0x124)
> [ 662.237125] [<c004a84d>] (smpboot_thread_fn) from [<c0047fab>] (kthread+0xab/0xc0)
> [ 662.249299] [<c0047fab>] (kthread) from [<c000ecb5>] (ret_from_fork+0x11/0x1c)
> [ 662.261054] Code: 8000 b672 f892 f000 (e852) 3f00
> [ 662.277498] ---[ end trace 611c211aed2e4571 ]---
> [ 662.286443] Kernel panic - not syncing: Fatal exception in interrupt
> [ 662.297072] ---[ end Kernel panic - not syncing: Fatal exception in interrupt
>
> --
> Craig McQueen
>

2016-06-06 06:57:11

by Craig McQueen

[permalink] [raw]
Subject: RE: rt2800 and BeagleBone Black kernel panic when connecting to access point

Vishal Thanki wrote on 27 April 2016:
> On Wed, Apr 27, 2016 at 02:21:36PM +1000, Craig McQueen 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).
> >
> > 1) Install Ubuntu 16.04 on a BeagleBone Black.
> > 2) Add lines to /etc/network/interfaces for the device to connect to a
> WPA2 access point.
> > 3) Plug the rt2800 USB Wi-Fi device into the BeagleBone Black.
> >
> > Apparently when it tries to connect to the access point, I get a kernel panic.
> If I don't configure it (step 2 above) then the kernel panic doesn't happen.
> >
> > I've tested this with two access points: my Android phone acting as a
> hotspot, and a cheap TP-Link TD-W8968.
> >
> > Serial debug console shows:
> >
> > [ 306.884793] ieee80211 phy0: rt2x00usb_vendor_request: Error -
> > Vendor Request 0x07 failed for offset 0x1004 with error -110 [
> > 306.996804] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor
> > Request 0x06 failed for offset 0x1004 with error -110 [ 307.057021]
> > ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07
> > failed for offset 0x0500 with error -19 [ 307.102417] Unable to
> > handle kernel NULL pointer dereference at virtual address 0000002c [
> > 307.110768] pgd = ddd34000 [ 307.113555] [0000002c] *pgd=00000000 [
> > 307.117257] Internal error: Oops: 5 [#1] SMP THUMB2 [ 307.122269]
> > Modules linked in: arc4 rt2800usb rt2800lib rt2x00usb rt2x00lib
> > mac80211 crc_ccitt cfg80211 rfkill snd_soc_simple_card omap_aes
> > omap_sham usb_f_ecm g_ether usb_f_rndis u_ether libcomposite
> omap_rng
> > rng_core snd_soc_davinci_mcasp snd_soc_edma snd_soc_omap
> spi_omap2_mcspi snd_soc_hdmi_codec snd_soc_core snd_pcm_dmaengine
> snd_pcm snd_timer snd soundcore evdev uio_pdrv_genirq uio tilcdc tda998x
> [ 307.159448] CPU: 0 PID: 875 Comm: wpa_supplicant Not tainted 4.4.6-ti-r15
> #1 [ 307.166672] Hardware name: Generic AM33XX (Flattened Device Tree) [
> 307.172921] task: dcf56180 ti: dd8e6000 task.ti: dd8e6000 [ 307.178470] PC is
> at _raw_spin_lock_irqsave+0x14/0x40 [ 307.183755] LR is at
> rt2x00queue_get_entry+0x1e/0x54 [rt2x00lib]
> > [ 307.189928] pc : [<c06e2560>] lr : [<bfa9b99b>] psr: 800b01b3
> > [ 307.189928] sp : dd8e79a0 ip : 00000000 fp : dc94f900 [
> > 307.201687] r10: c0b5ba88 r9 : dcda6928 r8 : dcda692c [ 307.207042]
> > r7 : 00000054 r6 : 0000002c r5 : 00000000 r4 : 00000002 [
> > 307.213731] r3 : 00000150 r2 : 0000002c r1 : 00000001 r0 : 800b0193
> > [ 307.220423] Flags: Nzcv IRQs off FIQs on Mode SVC_32 ISA Thumb
> > Segment none [ 307.228007] Control: 50c5387d Table: 9dd34019 DAC:
> > 00000051 [ 307.233896] Process wpa_supplicant (pid: 875, stack limit
> > = 0xdd8e6218) [ 307.240675] Stack: (0xdd8e79a0 to 0xdd8e8000) [
> > 307.245159] 79a0: 00000150 00000002 00000000 00000054 ddf26de0
> > bfac8803 ddf26de0 ddf27144 [ 307.253559] 79c0: dcda6800 00000000
> > dcda692c bfac8971 00000000 c04fc087 c000a439 dde057c0 [ 307.261945]
> > 79e0: dc94f900 bfaab2ff bfaab2e9 dc94f900 000b0113 c04fc1d3 ddcc4038
> > dc94f914 [ 307.270331] 7a00: dcda6924 dd8e7a14 00000000 c04fc2dd
> > df925d8c dd8e7a14 dd8e7a14 dc8ba606 [ 307.278715] 7a20: df925d80
> > dcda6938 00000000 00000000 000f4240 c095df60 c095dfa8 dcda6934 [
> > 307.287099] 7a40: 00000018 c0034acf c0b5b098 00000006 c0c29d8c
> > 00000040 dd8e6000 dd8e7b90 [ 307.295483] 7a60: 00000007 c0034c85
> > 004c4b29 00000000 00000101 dd8e7a68 c0b5b080 c0c40380 [ 307.303889]
> > 7a80: 0000000a 000006e1 c0b5b140 00400140 c00856ed 200b0113 ffffe000
> > dddfc2bc [ 307.312282] 7aa0: 00000000 00000304 dd8e7b90 ddf0e840
> > 0000000f c0034ea7 000001ff c0034f33 [ 307.320666] 7ac0: 0000001e
> > dddfc000 da84ec40 c0628085 dd8e7ca0 dddfc090 60000013 00000000 [
> > 307.329050] 7ae0: da84ec40 dd8e7b90 ddf0e840 00000005 00000000
> > ddf0e840 0000000f c05f11e5 [ 307.337437] 7b00: 00000000 00000020
> > 00007ea0 ddf0e840 00000020 c014402d 00000000 00007ea0 [ 307.351143]
> > 7b20: 00000000 00000000 00000000 dd8e7e50 dd8e7e4c dd8e7e48
> dd8e7e40
> > dd8e7e44 [ 307.364750] 7b40: dd8e7e48 00000000 00000000 00000000
> > 00000000 00000000 024152c0 dd8e7e24 [ 307.378341] 7b60: c0b5d930
> > 00000000 dd8e7f74 dd8e7b88 c0b5ba88 dd8e6000 004c4b29 00000000 [
> > 307.391976] 7b80: 00000001 3b9aca00 a6ad6574 00000048 00000000
> > 000000db 00000000 dcf56180 [ 307.405640] 7ba0: 00000000 00000000
> > 00000008 ddf0e840 000000db 00000000 dd8e7b90 c01439a1 [ 307.419316]
> > 7bc0: dc026784 dc026784 dc026780 ddf4bcc0 000000db 00000000 dd8e7b90
> > c01439a1 [ 307.433008] 7be0: dc026204 dc026204 dc026200 ddf4bf00
> > 000000db 00000000 dd8e7b90 c01439a1 [ 307.446684] 7c00: dc02612c
> > dc02612c dc026128 ddf4bc00 000000db 00000000 dd8e7b90 c01439a1 [
> > 307.460325] 7c20: dc026984 dc026984 dc026980 dc060cc0 000000db
> > 00000000 dd8e7b90 c01439a1 [ 307.473925] 7c40: dc026144 dc026144
> > dc026140 dc0603c0 000000db 00000000 dd8e7b90 c01439a1 [ 307.487339]
> > 7c60: ddb1b104 ddb1b104 ddb1b100 dc0609c0 000000db 00000000
> dd8e7b90
> > c01439a1 [ 307.500597] 7c80: dde03844 dde03844 dde03840 dc060e40
> > 000000db 00000000 dd8e7b90 c01439a1 [ 307.513712] 7ca0: dde037c4
> > dde037c4 dde037c0 ddb7b000 dcf0c480 c0627d0b 00000004 00000002 [
> > 307.526882] 7cc0: ffffffed dc8ba606 dc138f00 ddb7b000 dcf0c300
> > dd8e7d10 dc138f00 dcf0c300 [ 307.539972] 7ce0: 00000000 c06281c9
> > dd8e7d10 c06e1163 c0b5ba88 c06e1163 bf99f4cc c062a553 [ 307.553056]
> > 7d00: 00000000 c0c25540 000000cc c00583d7 c0629e85 c0629e4d bf99726c
> > bf9a7980 [ 307.566185] 7d20: 00000000 dd8e6000 c06ec750 00000000
> > dcd2e8a0 00000000 00000000 dd8e6000 [ 307.579343] 7d40: c0b5cb94
> > c0b5ba88 024200ca dc8ba606 dcdadb00 dc138f00 dcf0c300 c05fb77d [
> > 307.592434] 7d60: dd8e7de0 c05fb81f dcf0c300 00000000 dd8e7de0
> > c00f8b8b dfda1340 dfda1460 [ 307.605436] 7d80: 00000003 c00f8ccf
> > 00000008 00000000 40000093 c001a411 0009a5fd 9a5fd18f [ 307.618349]
> > 7da0: dde007bc 00000000 00000000 c00f451f dfd22794 00000000 00000000
> > dc8ba606 [ 307.631178] 7dc0: dfd22794 00000001 da8b0960 c00f451f
> > 00000000 00000000 00000000 7f5e0000 [ 307.643956] 7de0: 0000014f
> > 00000000 0014f000 dc8ba606 00000070 00000004 dd8e7e3c c0b5ba88 [
> > 307.656720] 7e00: 0000000f 7fdbf350 7fdbf3d8 dd8e7e3c 7fdbf948
> > c014434d dd8e7f74 00000051 [ 307.669494] 7e20: 00000070 dd8e7e3c
> > dd8e7e40 dd8e7e44 dd8e7e48 dd8e7e4c dd8e7e50 00007ea0 [ 307.682259]
> > 7e40: 00000000 00000000 00000000 00000000 00000000 ddfb0c74 7f5e0000
> > dde00000 [ 307.695032] 7e60: ddcaa000 00000000 00000054 00000061
> > 7f5e0000 ffffe000 00000000 00000070 [ 307.707785] 7e80: dde00780
> > dc8ba606 00000000 dd8e7fb0 dcf56180 80000007 7f5e07fc ddfb0c40 [
> > 307.720566] 7ea0: dcd2e720 ddfb0c78 00000054 c06e349b 00000000
> > 00000000 7f6dcad8 c05f2b6d [ 307.733379] 7ec0: dd8e7ee0 00000000
> > 00000000 00000000 00000000 000008fc dd8e7f04 c008a4db [ 307.746185]
> > 7ee0: 04f2e6a2 00000000 a8e0fcc7 ffffffff ffffffff c0143dfb 00000133
> > 0207683c [ 307.759065] 7f00: 8dbe2200 c0b5ba88 dd8e7f74 3b9a9738
> > 00000004 dd8e7f30 7fdbf948 c0143dfb [ 307.771961] 7f20: 7f6dcad8
> > 00000004 3b9a9738 c0b5ba88 00000138 02073574 00000004 dc8ba606 [
> > 307.784855] 7f40: 0207683c bed1db24 c0b5ba88 0000000f 7fdbf350
> > 7fdbf3d8 7fdbf948 dd8e7f74 [ 307.797776] 7f60: 7f6dcad8 c0144645
> > dd8e7f74 00000107 c000eda4 00000138 02073574 00000004 [ 307.810714]
> > 7f80: 000f4233 dc8ba606 bed1db24 7fdbf298 7f6dcad8 0000008e c000eda4
> > dd8e6000 [ 307.823633] 7fa0: 00000000 c000ebe1 bed1db24 7fdbf298
> > 0000000f 7fdbf350 7fdbf3d8 7fdbf948 [ 307.836538] 7fc0: bed1db24
> > 7fdbf298 7f6dcad8 0000008e 7fdb1568 7fdbf350 7fdbf3d8 7f6dcad8 [
> > 307.849434] 7fe0: 00000000 bed1daf0 7f599bf3 b6cdc548 00000030
> > 0000000f ff76fea7 ffff88ef [ 307.862403] [<c06e2560>]
> > (_raw_spin_lock_irqsave) from [<bfa9b99b>]
> > (rt2x00queue_get_entry+0x1e/0x54 [rt2x00lib])
>
> I have seen a similar crash and fixed it as a part of following commit:
>
> 8b4c0009313f3d42e2540e3e1f776097dd0db73d
>
> But it would be helpful if you can get paste the entire kernel log.
> Because in my case, I used to see a USB Disconnect event for the rt2800
> driver and the crash was caused due to that.

I finally got around to trying a build of the kernel with that patch applied. However, it did not fix this problem. The device still causes a kernel crash when it is plugged directly into the USB port without a hub in between.

--
Craig McQueen