2012-07-15 17:35:02

by David Herrmann

[permalink] [raw]
Subject: rt73usb: WARN(x) in check_sdata_in_driver()

Hi

I use an ASUStek WL-167g USB wlan adapter (quite old) using rt73usb.ko
(Ralink). After resuming from suspend I get:

[152743.736783] ------------[ cut here ]------------
[152743.736798] WARNING: at net/mac80211/driver-ops.h:12
ieee80211_send_deauth_disassoc+0x1a8/0x1b0()
[152743.736801] Hardware name: N150P/N210P/N220P
[152743.736804] wlan0: Failed check-sdata-in-driver check, flags: 0x4
[152743.736805] Modules linked in: uhid btusb bluetooth rt73usb
rt2x00usb rt2x00lib crc_itu_t
[152743.736826] Pid: 17390, comm: kworker/u:37 Tainted: G W
3.5.0-rc6-next-20120709+ #11
[152743.736829] Call Trace:
[152743.736840] [<ffffffff81591b00>] ?
ieee80211_send_deauth_disassoc+0x190/0x1b0
[152743.736850] [<ffffffff810309dc>] ? warn_slowpath_common+0x7c/0xc0
[152743.736858] [<ffffffff81030ad7>] ? warn_slowpath_fmt+0x47/0x50
[152743.736866] [<ffffffff81591b18>] ?
ieee80211_send_deauth_disassoc+0x1a8/0x1b0
[152743.736874] [<ffffffff81591c51>] ? ieee80211_set_disassoc+0x131/0x3a0
[152743.736882] [<ffffffff81595e7e>] ? ieee80211_mgd_deauth+0x14e/0x150
[152743.736891] [<ffffffff81566d0f>] ? cfg80211_mlme_down+0x7f/0xd0
[152743.736899] [<ffffffff8156a4f5>] ? __cfg80211_disconnect+0x1d5/0x1f0
[152743.736907] [<ffffffff81045acd>] ? call_usermodehelper_fns+0x12d/0x200
[152743.736915] [<ffffffff8154ef01>] ?
cfg80211_netdev_notifier_call+0x4d1/0x5b0
[152743.736925] [<ffffffff81052f07>] ? notifier_call_chain+0x47/0x70
[152743.736933] [<ffffffff81481dfd>] ? __dev_close_many+0x3d/0xd0
[152743.736939] [<ffffffff81481f54>] ? dev_close_many+0x84/0x100
[152743.736947] [<ffffffff8148208e>] ? rollback_registered_many+0xbe/0x310
[152743.736954] [<ffffffff814822ee>] ? unregister_netdevice_many+0xe/0x60
[152743.736962] [<ffffffff8157f3b6>] ? ieee80211_remove_interfaces+0xa6/0xf0
[152743.736971] [<ffffffff8156fd69>] ? ieee80211_unregister_hw+0x49/0x100
[152743.736987] [<ffffffffa0004dd1>] ?
rt2x00lib_remove_dev+0x151/0x190 [rt2x00lib]
[152743.736998] [<ffffffffa0014fda>] ? rt2x00usb_disconnect+0x3a/0x80
[rt2x00usb]
[152743.737040] [<ffffffff8136da9a>] ? usb_unbind_interface+0x6a/0x1c0
[152743.737052] [<ffffffff81313c27>] ? __device_release_driver+0x77/0xf0
[152743.737061] [<ffffffff81313cc9>] ? device_release_driver+0x29/0x40
[152743.737073] [<ffffffff8136dca7>] ? usb_forced_unbind_intf+0x17/0x20
[152743.737082] [<ffffffff8136dd5a>] ? usb_resume+0xaa/0xd0
[152743.737088] [<ffffffff8135fe90>] ? usb_dev_thaw+0x20/0x20
[152743.737095] [<ffffffff8135fe9f>] ? usb_dev_resume+0xf/0x20
[152743.737103] [<ffffffff8131a5f6>] ? dpm_run_callback.isra.4+0x36/0x80
[152743.737111] [<ffffffff8131ab39>] ? device_resume+0xa9/0x160
[152743.737118] [<ffffffff8131ac04>] ? async_resume+0x14/0x40
[152743.737127] [<ffffffff81053f8a>] ? async_run_entry_fn+0x8a/0x1b0
[152743.737134] [<ffffffff81046df8>] ? process_one_work+0x118/0x370
[152743.737142] [<ffffffff81053f00>] ? async_unregister_domain+0x70/0x70
[152743.737150] [<ffffffff81048470>] ? worker_thread+0x130/0x2e0
[152743.737157] [<ffffffff81048340>] ? manage_workers.isra.28+0x200/0x200
[152743.737166] [<ffffffff8104d6c7>] ? kthread+0x87/0x90
[152743.737174] [<ffffffff815b9a54>] ? kernel_thread_helper+0x4/0x10
[152743.737182] [<ffffffff8104d640>] ? flush_kthread_worker+0x80/0x80
[152743.737189] [<ffffffff815b9a50>] ? gs_change+0xb/0xb
[152743.737193] ---[ end trace 96623291b7d32035 ]---

Sometimes the device still works after resetting it. However,
sometimes it is not working anymore even if I replug the device. Then
khubd hangs non-interrupible while starting wpa_supplicant and I have
about 68 kworker threads in idle state (maybe that's not related). I
get a lot more warnings, including:

WARNING: at net/mac80211/util.c:574 ieee80211_can_queue_work.isra.29+0x2e/0x40()
WARNING: at net/mac80211/driver-ops.h:12 sta_info_move_state+0x3ff/0x450()
WARNING: at net/mac80211/driver-ops.h:12 __sta_info_destroy+0x428/0x430()
WARNING: at net/mac80211/driver-ops.h:12
ieee80211_bss_info_change_notify+0x1fa/0x210()
WARNING: at net/mac80211/driver-ops.h:12 ieee80211_set_wmm_default+0x27d/0x290()
WARNING: at net/mac80211/driver-ops.h:12 ieee80211_do_stop+0x5b2/0x5c0()

I've attached a dmesg log (due to the huge amount of messages it was
truncated). I am running linux-next from last week (I think Tuesday or
Wednesday).

Two internal usb hubs recently stopped working and some other internal
buses, too (I guess due to physical damage but I am not sure) so it
might be a hardware failure. Anyway, maybe someone of you can use this
information. After rebooting everything works fine, btw. And I am not
getting any oopses/panics which makes me quite happy ;)

I haven't found a way to trigger it reliably and recompiling takes
about 45min here so I want to avoid bisecting it. If you don't have
any clue, I can still give it a try ;)

Regards
David


Attachments:
dmesg.txt (242.12 kB)
custom-kernel.config (74.39 kB)
Download all attachments

2012-08-11 19:09:56

by Stanislaw Gruszka

[permalink] [raw]
Subject: Re: rt73usb: WARN(x) in check_sdata_in_driver()

On Sat, Aug 11, 2012 at 08:46:47PM +0200, David Herrmann wrote:
> Yes, I generated the wpa_supplicant.conf via netcfg (a network manager from
> ArchLinux) and used it by hand. I often noticed doing everything by myself
> works, but using netcfg or NetworkManager results in a timeout during
> wlan-connection. Haven't debugged this, but it is not related to this bug
> as it happens with other devices, too.
>
> I now got everything running again, are you still interested in the
> wpa_supplicant.conf? Sorry, for the noice.
> Anyway, I haven't encountered the kernel-warnings, yet, but I will keep
> looking. I haven't found a way to reliably reproduce them, but I saw them
> quite often with linux-next a month ago and they seem to be gone now.
>
> Have you pushed any patches regarding this bug or do you just assume that
> this was some untested code in linux-next that should be fixed in the
> stable series for now?

We have various mac80211 fixes that could be related with this problem,
but I do not see any particular which address that directly. Perhaps
warnings ware some side effect of other bug.

> I will tell you if the bugs occur again, but as I said, they seem gone.
> Anyway, thanks for your time!

Yeh, if warnings come back, please post me wpa_supplicant.conf, and
eventually some other informations important to reproduce the problem
(except .config which you already provided).

Thanks
Stanislaw

2012-08-10 22:27:50

by Stanislaw Gruszka

[permalink] [raw]
Subject: Re: rt73usb: WARN(x) in check_sdata_in_driver()

Hi

On Sun, Jul 15, 2012 at 07:34:58PM +0200, David Herrmann wrote:
> I use an ASUStek WL-167g USB wlan adapter (quite old) using rt73usb.ko
> (Ralink). After resuming from suspend I get:
>
> [152743.736783] ------------[ cut here ]------------
> [152743.736798] WARNING: at net/mac80211/driver-ops.h:12
> ieee80211_send_deauth_disassoc+0x1a8/0x1b0()
> [152743.736801] Hardware name: N150P/N210P/N220P
> [152743.736804] wlan0: Failed check-sdata-in-driver check, flags: 0x4

Does it still happen on 3.5.1 ?

Stanislaw


2012-08-11 18:21:37

by Stanislaw Gruszka

[permalink] [raw]
Subject: Re: rt73usb: WARN(x) in check_sdata_in_driver()

On Sat, Aug 11, 2012 at 03:47:55PM +0200, David Herrmann wrote:
> Hi Stanislaw
>
> On Sat, Aug 11, 2012 at 12:27 AM, Stanislaw Gruszka <[email protected]>wrote:
>
> > Hi
> >
> > On Sun, Jul 15, 2012 at 07:34:58PM +0200, David Herrmann wrote:
> > > I use an ASUStek WL-167g USB wlan adapter (quite old) using rt73usb.ko
> > > (Ralink). After resuming from suspend I get:
> > >
> > > [152743.736783] ------------[ cut here ]------------
> > > [152743.736798] WARNING: at net/mac80211/driver-ops.h:12
> > > ieee80211_send_deauth_disassoc+0x1a8/0x1b0()
> > > [152743.736801] Hardware name: N150P/N210P/N220P
> > > [152743.736804] wlan0: Failed check-sdata-in-driver check, flags: 0x4
> >
> > Does it still happen on 3.5.1 ?
> >
>
> Thanks for asking. With 3.5.1 I get "phy0 -> rt2x00lib_request_firmware:
> Error - Failed to request Firmware."
> But:
> $ wc /lib/firmware/rt73.bin
> 5 44 2048 /lib/firmware/rt73.bin
> So I wonder were that comes from. udevd segfaults twice while hotplugging
> the device. And finally I get "link becomes ready" but I get ENODEV when
> starting wpa_supplicant. It all seems a bit weird and I have no idea how to
> debug this.
>
> I will try putting the firmware blob into the kernel binary.
Looks like some change broke udev, but how? Do you have the same thing with
3.5.0 ? Perhaps updating udev could help.

You do not use NetworkManager or similar only pure wpa_supplicant? That would
explain why I'm not seeing the problem on my setup. Could you provide me
your wpa_supplicant.conf (after removing psk and ssid entries) ?
What wpa_supplicant version you are using?

Thanks
Stanislaw