RE: rt2800 and BeagleBone Black kernel panic when connecting to access point

2016-06-06 Thread Craig McQueen
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 002c [
> > 307.110768] pgd = ddd34000 [  307.113555] [002c] *pgd= [
> > 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 : []lr : []psr: 800b01b3
> > [  307.189928] sp : dd8e79a0  ip :   fp : dc94f900 [
> > 307.201687] r10: c0b5ba88  r9 : dcda6928  r8 : dcda692c [  307.207042]
> > r7 : 0054  r6 : 002c  r5 :   r4 : 0002 [
> > 307.213731] r3 : 0150  r2 : 002c  r1 : 0001  r0 : 800b0193
> > [  307.220423] Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32  ISA Thumb
> > Segment none [  307.228007] Control: 50c5387d  Table: 9dd34019  DAC:
> > 0051 [  307.233896] Process wpa_supplicant (pid: 875, stack limit
> > = 0xdd8e6218) [  307.240675] Stack: (0xdd8e79a0 to 0xdd8e8000) [
> > 307.245159] 79a0: 0150 0002  0054 ddf26de0
> > bfac8803 ddf26de0 ddf27144 [  307.253559] 79c0: dcda6800 
> > dcda692c bfac8971  c04fc087 c000a439 dde057c0 [  307.261945]
> > 79e0: dc94f900 bfaab2ff bfaab2e9 dc94f900 000b0113 c04fc1d3 ddcc4038
> > dc94f914 [  307.270331] 7a00: dcda6924 dd8e7a14  c04fc2dd
> > df925d8c dd8e7a14 dd8e7a14 dc8ba606 [  307.278715] 7a20: df925d80
> > dcda6938   000f4240 c095df60 c095dfa8 dcda6934 [
> > 307.287099] 7a40: 0018 c0034acf c0b5b098 0006 c0c29d8c
> > 0040 dd8e6000 dd8e7b90 [  307.295483] 7a60: 0007 c0034c85
> > 004c4b29  0101 dd8e7a68 c0b5b080 c0c40380 [  307.303889]
> > 7a80: 000a 06e1 c0b5b140 00400140 c00856ed 200b0113 e000
> > dddfc2bc [  307.312282] 7aa0:  0304 dd8e7b90 ddf0e840
> > 000f c0034ea7 01ff c0034f33 [  307.320666] 7ac0: 001e
> > dddfc000 da84ec40 c0628085 dd8e7ca0 dddfc090 6013  [
> > 307.329050] 7ae0: da84ec40 dd8e7b90 ddf0e840 0005 
> > ddf0e840 000f c05f11e5 [  307.337437] 7b00:  0020
> > 7ea0 ddf0e840 0020 c014402d  7ea0 [  307.351143]
> > 7b20:    dd8e7e50 dd8e7e4c dd8e7e48
> dd8e7e40
> > dd8e7e44 [  307.364750] 7b40: dd8e7e48   
> >   024152c0 dd8e7e24 [  307.378341] 7b60: c0b5d930
> >  dd8e7f74 dd8e7b88 c0b5ba88 dd8e6000 004c4b29  [
> > 307.391976] 7b80: 0001 3b9aca00 a6ad6574 0048 
> > 00db  dcf56180 [  307.405640] 7ba0:  
> > 0008 ddf0e840 00db  dd8e7b90 c01439a1 [  307.419316]
> > 7bc0: dc026784 dc026784 dc026780 ddf4bcc0 00db  dd8e7b90
> > c01439a1 [  307.433008] 7be0: dc026204 dc026204 dc026200 ddf4bf00
> > 00db  dd8e7b90 c01439a1 [  307.446684] 7c00: dc02612c
> > dc02612c dc026128 ddf4bc00 00db  dd8e7b90 c01439a1 [
> > 307.460325] 7c20: dc026984 dc026984 dc026980 dc060cc0 00db
> >  dd8e7b90 c01439a1 [  307.473925] 7c40: dc026144 dc026144
> > dc026140 dc0603c0 00db 

Re: rt2800 and BeagleBone Black kernel panic when connecting to access point

2016-04-28 Thread Vishal Thanki
On Thu, Apr 28, 2016 at 1:23 AM, Craig McQueen
 wrote:
> Vishal Thanki wrote:
>> On Wed, Apr 27, 2016 at 7:56 AM, Craig McQueen
>>  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 0104
> [  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, 
>  [  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 002c
> [  661.723265] pgd = c0004000
> [  661.726028] [002c] *pgd=
> [  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 
> 

RE: rt2800 and BeagleBone Black kernel panic when connecting to access point

2016-04-27 Thread Craig McQueen
Vishal Thanki wrote:
> On Wed, Apr 27, 2016 at 7:56 AM, Craig McQueen
>  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.

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 0104
[  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, 


Re: rt2800 and BeagleBone Black kernel panic when connecting to access point

2016-04-27 Thread Vishal Thanki
On Wed, Apr 27, 2016 at 7:56 AM, Craig McQueen
 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
>
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: rt2800 and BeagleBone Black kernel panic when connecting to access point

2016-04-26 Thread Craig McQueen
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

[  112.308639] NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s! 
[kworker/u2:3:1101]
[  140.309750] NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s! 
[kworker/u2:3:1101]
[  168.310661] NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s! 
[kworker/u2:3:1101]
[  196.311519] NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s! 
[kworker/u2:3:1101]
[  222.813266] cpts: unable to obtain a time stamp

craigm@beaglebone-craig:~$ dmesg
[0.00] Booting Linux on physical CPU 0x0
[0.00] Initializing cgroup subsys cpuset
[0.00] Initializing cgroup subsys cpu
[0.00] Initializing cgroup subsys cpuacct
[0.00] Linux version 4.4.6-ti-r15 (root@b3-jetson-tk1-2gb) (gcc version 
5.3.1 20160330 (Ubuntu/Linaro 5.3.1-13ubuntu3) ) #1 SMP Tue Apr 5 12:32:22 UTC 
2016
[0.00] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=50c5387d
[0.00] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing 
instruction cache
[0.00] Machine model: TI AM335x BeagleBone Black
[0.00] cma: Reserved 24 MiB at 0x9e00
[0.00] Memory policy: Data cache writeback
[0.00] On node 0 totalpages: 130560
[0.00] free_area_init_node: node 0, pgdat c0c25540, node_mem_map 
df96d000
[0.00]   Normal zone: 1152 pages used for memmap
[0.00]   Normal zone: 0 pages reserved
[0.00]   Normal zone: 130560 pages, LIFO batch:31
[0.00] CPU: All CPU(s) started in SVC mode.
[0.00] AM335X ES2.1 (sgx neon )
[0.00] PERCPU: Embedded 13 pages/cpu @df925000 s24268 r8192 d20788 
u53248
[0.00] pcpu-alloc: s24268 r8192 d20788 u53248 alloc=13*4096
[0.00] pcpu-alloc: [0] 0 
[0.00] Built 1 zonelists in Zone order, mobility grouping on.  Total 
pages: 129408
[0.00] Kernel command line: console=tty0 console=ttyO0,115200n8 
root=/dev/mmcblk0p1 rootfstype=ext4 rootwait coherent_pool=1M quiet 
cape_universal=enable
[0.00] PID hash table entries: 2048 (order: 1, 8192 bytes)
[0.00] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[0.00] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[0.00] Memory: 474464K/522240K available (7303K kernel code, 912K 
rwdata, 3696K rodata, 584K init, 906K bss, 23200K reserved, 24576K 
cma-reserved, 0K highmem)
[0.00] Virtual kernel memory layout:
   vector  : 0x - 0x1000   (   4 kB)
   fixmap  : 0xffc0 - 0xfff0   (3072 kB)
   vmalloc : 0xe080 - 0xff80   ( 496 MB)
   lowmem  : 0xc000 - 0xe000   ( 512 MB)
   pkmap   : 0xbfe0 - 0xc000   (   2 MB)
   modules : 0xbf80 - 0xbfe0   (   6 MB)
 .text : 0xc0008000 - 0xc0ac5f34   (11000 kB)
 .init : 0xc0ac6000 - 0xc0b58000   ( 584 kB)
 .data : 0xc0b58000 - 0xc0c3c100   ( 913 kB)
  .bss : 0xc0c3f000 - 0xc0d21b90   ( 907 kB)
[0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[0.00] Hierarchical RCU implementation.
[0.00]  Build-time adjustment of leaf fanout to 32.
[0.00]  RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
[0.00] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=1
[0.00] NR_IRQS:16 nr_irqs:16 16
[0.00] IRQ: Found an INTC at 0xfa20 (revision 5.0) with 128 
interrupts
[0.00] OMAP clockevent source: timer2 at 2400 Hz
[0.11] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 
89478484971ns
[0.30] 

Re: rt2800 and BeagleBone Black kernel panic when connecting to access point

2016-04-26 Thread Vishal Thanki
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 002c
> [  307.110768] pgd = ddd34000
> [  307.113555] [002c] *pgd=
> [  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 : []lr : []psr: 800b01b3
> [  307.189928] sp : dd8e79a0  ip :   fp : dc94f900
> [  307.201687] r10: c0b5ba88  r9 : dcda6928  r8 : dcda692c
> [  307.207042] r7 : 0054  r6 : 002c  r5 :   r4 : 0002
> [  307.213731] r3 : 0150  r2 : 002c  r1 : 0001  r0 : 800b0193
> [  307.220423] Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32  ISA Thumb  
> Segment none
> [  307.228007] Control: 50c5387d  Table: 9dd34019  DAC: 0051
> [  307.233896] Process wpa_supplicant (pid: 875, stack limit = 0xdd8e6218)
> [  307.240675] Stack: (0xdd8e79a0 to 0xdd8e8000)
> [  307.245159] 79a0: 0150 0002  0054 ddf26de0 bfac8803 
> ddf26de0 ddf27144
> [  307.253559] 79c0: dcda6800  dcda692c bfac8971  c04fc087 
> c000a439 dde057c0
> [  307.261945] 79e0: dc94f900 bfaab2ff bfaab2e9 dc94f900 000b0113 c04fc1d3 
> ddcc4038 dc94f914
> [  307.270331] 7a00: dcda6924 dd8e7a14  c04fc2dd df925d8c dd8e7a14 
> dd8e7a14 dc8ba606
> [  307.278715] 7a20: df925d80 dcda6938   000f4240 c095df60 
> c095dfa8 dcda6934
> [  307.287099] 7a40: 0018 c0034acf c0b5b098 0006 c0c29d8c 0040 
> dd8e6000 dd8e7b90
> [  307.295483] 7a60: 0007 c0034c85 004c4b29  0101 dd8e7a68 
> c0b5b080 c0c40380
> [  307.303889] 7a80: 000a 06e1 c0b5b140 00400140 c00856ed 200b0113 
> e000 dddfc2bc
> [  307.312282] 7aa0:  0304 dd8e7b90 ddf0e840 000f c0034ea7 
> 01ff c0034f33
> [  307.320666] 7ac0: 001e dddfc000 da84ec40 c0628085 dd8e7ca0 dddfc090 
> 6013 
> [  307.329050] 7ae0: da84ec40 dd8e7b90 ddf0e840 0005  ddf0e840 
> 000f c05f11e5
> [  307.337437] 7b00:  0020 7ea0 ddf0e840 0020 c014402d 
>  7ea0
> [  307.351143] 7b20:    dd8e7e50 dd8e7e4c dd8e7e48 
> dd8e7e40 dd8e7e44
> [  307.364750] 7b40: dd8e7e48      
> 024152c0 dd8e7e24
> [  307.378341] 7b60: c0b5d930  dd8e7f74 dd8e7b88 c0b5ba88 dd8e6000 
> 004c4b29 
> [  307.391976] 7b80: 0001 3b9aca00 a6ad6574 0048  00db 
>  dcf56180
> [  307.405640] 7ba0:   0008 ddf0e840 00db  
> dd8e7b90 c01439a1
> [  307.419316] 7bc0: dc026784 dc026784 dc026780 ddf4bcc0 00db  
> dd8e7b90 c01439a1
> [  307.433008] 7be0: dc026204 dc026204 dc026200 ddf4bf00 00db  
> dd8e7b90 c01439a1
> [  307.446684] 7c00: dc02612c dc02612c dc026128 ddf4bc00 00db  
> dd8e7b90 c01439a1
> [  307.460325] 7c20: dc026984 dc026984 dc026980 dc060cc0 00db  
> dd8e7b90 c01439a1
> [  307.473925] 7c40: dc026144 dc026144 dc026140 dc0603c0 00db  
> dd8e7b90 c01439a1
> [  307.487339] 7c60: ddb1b104 ddb1b104 ddb1b100 dc0609c0 

RE: rt2800 and BeagleBone Black kernel panic when connecting to access point

2016-04-26 Thread Craig McQueen
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).
> 
> 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.

I should add an extra interesting detail: if I plug the Wi-Fi device into a USB 
hub, instead of directly into the BeagleBone Black, then the kernel panic 
doesn't happen, and I'm able to use it successfully (although with other 
problems which I'll report in further e-mails).

-- 
Craig McQueen


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


rt2800 and BeagleBone Black kernel panic when connecting to access point

2016-04-26 Thread Craig McQueen
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 002c
[  307.110768] pgd = ddd34000
[  307.113555] [002c] *pgd=
[  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 : []lr : []psr: 800b01b3
[  307.189928] sp : dd8e79a0  ip :   fp : dc94f900
[  307.201687] r10: c0b5ba88  r9 : dcda6928  r8 : dcda692c
[  307.207042] r7 : 0054  r6 : 002c  r5 :   r4 : 0002
[  307.213731] r3 : 0150  r2 : 002c  r1 : 0001  r0 : 800b0193
[  307.220423] Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32  ISA Thumb  Segment 
none
[  307.228007] Control: 50c5387d  Table: 9dd34019  DAC: 0051
[  307.233896] Process wpa_supplicant (pid: 875, stack limit = 0xdd8e6218)
[  307.240675] Stack: (0xdd8e79a0 to 0xdd8e8000)
[  307.245159] 79a0: 0150 0002  0054 ddf26de0 bfac8803 
ddf26de0 ddf27144
[  307.253559] 79c0: dcda6800  dcda692c bfac8971  c04fc087 
c000a439 dde057c0
[  307.261945] 79e0: dc94f900 bfaab2ff bfaab2e9 dc94f900 000b0113 c04fc1d3 
ddcc4038 dc94f914
[  307.270331] 7a00: dcda6924 dd8e7a14  c04fc2dd df925d8c dd8e7a14 
dd8e7a14 dc8ba606
[  307.278715] 7a20: df925d80 dcda6938   000f4240 c095df60 
c095dfa8 dcda6934
[  307.287099] 7a40: 0018 c0034acf c0b5b098 0006 c0c29d8c 0040 
dd8e6000 dd8e7b90
[  307.295483] 7a60: 0007 c0034c85 004c4b29  0101 dd8e7a68 
c0b5b080 c0c40380
[  307.303889] 7a80: 000a 06e1 c0b5b140 00400140 c00856ed 200b0113 
e000 dddfc2bc
[  307.312282] 7aa0:  0304 dd8e7b90 ddf0e840 000f c0034ea7 
01ff c0034f33
[  307.320666] 7ac0: 001e dddfc000 da84ec40 c0628085 dd8e7ca0 dddfc090 
6013 
[  307.329050] 7ae0: da84ec40 dd8e7b90 ddf0e840 0005  ddf0e840 
000f c05f11e5
[  307.337437] 7b00:  0020 7ea0 ddf0e840 0020 c014402d 
 7ea0
[  307.351143] 7b20:    dd8e7e50 dd8e7e4c dd8e7e48 
dd8e7e40 dd8e7e44
[  307.364750] 7b40: dd8e7e48      
024152c0 dd8e7e24
[  307.378341] 7b60: c0b5d930  dd8e7f74 dd8e7b88 c0b5ba88 dd8e6000 
004c4b29 
[  307.391976] 7b80: 0001 3b9aca00 a6ad6574 0048  00db 
 dcf56180
[  307.405640] 7ba0:   0008 ddf0e840 00db  
dd8e7b90 c01439a1
[  307.419316] 7bc0: dc026784 dc026784 dc026780 ddf4bcc0 00db  
dd8e7b90 c01439a1
[  307.433008] 7be0: dc026204 dc026204 dc026200 ddf4bf00 00db  
dd8e7b90 c01439a1
[  307.446684] 7c00: dc02612c dc02612c dc026128 ddf4bc00 00db  
dd8e7b90 c01439a1
[  307.460325] 7c20: dc026984 dc026984 dc026980 dc060cc0 00db  
dd8e7b90 c01439a1
[  307.473925] 7c40: dc026144 dc026144 dc026140 dc0603c0 00db  
dd8e7b90 c01439a1
[  307.487339] 7c60: ddb1b104 ddb1b104 ddb1b100 dc0609c0 00db  
dd8e7b90 c01439a1
[  307.500597] 7c80: dde03844 dde03844 dde03840 dc060e40 00db  
dd8e7b90 c01439a1
[  307.513712] 7ca0: dde037c4 dde037c4 dde037c0 ddb7b000 dcf0c480 c0627d0b 
0004 0002
[  307.526882] 7cc0: ffed dc8ba606