Skip to contentSkip to conversation

rt2x00: usb: fix reset resume

PATCH In review Stanislaw Gruszka 3 participants 5 messages Oct 16, 2012 – Oct 25, 2012 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rt2x00: usb: fix reset resume

Patch fixes warnings like below happened on resume:

WARNING: at net/mac80211/driver-ops.h:12 check_sdata_in_driver+0x32/0x34()

Problem is that in __ieee80211_susped() we remove sdata (i.e wlan0 interface) and then during resume we call usb_unbind_interface() -> ieee80211_unregister_hw() with sdata removed.

Patch fixes problem by adding .reset_resume calback, hence we do not unbind usb device on resume. This callback can be the same as normal .resume callback, sice we do all needed initalization during interface start, which is performed on resume [ ieee80211_resume() -> ieee80211_reconfig() -> rt2x00mac_start() -> rt2x00lib_start ].

Resolves:
https://bugzilla.kernel.org/show_bug.cgi?id=48041

---
 drivers/net/wireless/rt2x00/rt2500usb.c |    1 +
 drivers/net/wireless/rt2x00/rt2800usb.c |    1 +
 drivers/net/wireless/rt2x00/rt73usb.c   |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)
drivers/net/wireless/rt2x00/rt2500usb.c +1 -0
index a12e84f..6b2e1e4 100644
@@ -1988,6 +1988,7 @@ static struct usb_driver rt2500usb_driver = {
 	.disconnect	= rt2x00usb_disconnect,
 	.suspend	= rt2x00usb_suspend,
 	.resume		= rt2x00usb_resume,
+	.reset_resume	= rt2x00usb_resume,
 	.disable_hub_initiated_lpm = 1,
 };
 
drivers/net/wireless/rt2x00/rt2800usb.c +1 -0
index c9e9370..3b8fb5a 100644
@@ -1282,6 +1282,7 @@ static struct usb_driver rt2800usb_driver = {
 	.disconnect	= rt2x00usb_disconnect,
 	.suspend	= rt2x00usb_suspend,
 	.resume		= rt2x00usb_resume,
+	.reset_resume	= rt2x00usb_resume,
 	.disable_hub_initiated_lpm = 1,
 };
 
drivers/net/wireless/rt2x00/rt73usb.c +1 -0
index e5eb43b..24eec66 100644
@@ -2535,6 +2535,7 @@ static struct usb_driver rt73usb_driver = {
 	.disconnect	= rt2x00usb_disconnect,
 	.suspend	= rt2x00usb_suspend,
 	.resume		= rt2x00usb_resume,
+	.reset_resume	= rt2x00usb_resume,
 	.disable_hub_initiated_lpm = 1,
 };
 
Signature · 1 line
1.7.1
Acked-by on v1 1/1
#1 lore raw
Quoted 14 lines · Stanislaw Gruszka

Patch fixes warnings like below happened on resume:

WARNING: at net/mac80211/driver-ops.h:12 check_sdata_in_driver+0x32/0x34()

Problem is that in __ieee80211_susped() we remove sdata (i.e wlan0 interface) and then during resume we call usb_unbind_interface() -> ieee80211_unregister_hw() with sdata removed.

Patch fixes problem by adding .reset_resume calback, hence we do not unbind usb device on resume. This callback can be the same as normal .resume callback, sice we do all needed initalization during interface start, which is performed on resume [ ieee80211_resume() -> ieee80211_reconfig() -> rt2x00mac_start() -> rt2x00lib_start ].

Quoted 7 lines

Resolves:
https://bugzilla.kernel.org/show_bug.cgi?id=48041

Quoted 49 lines
---
 drivers/net/wireless/rt2x00/rt2500usb.c |    1 +
 drivers/net/wireless/rt2x00/rt2800usb.c |    1 +
 drivers/net/wireless/rt2x00/rt73usb.c   |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)
drivers/net/wireless/rt2x00/rt2500usb.c +1 -0
index a12e84f..6b2e1e4 100644
@@ -1988,6 +1988,7 @@ static struct usb_driver rt2500usb_driver = {
        .disconnect     = rt2x00usb_disconnect,
        .suspend        = rt2x00usb_suspend,
        .resume         = rt2x00usb_resume,
+       .reset_resume   = rt2x00usb_resume,
        .disable_hub_initiated_lpm = 1,
 };
 
drivers/net/wireless/rt2x00/rt2800usb.c +1 -0
index c9e9370..3b8fb5a 100644
@@ -1282,6 +1282,7 @@ static struct usb_driver rt2800usb_driver = {
        .disconnect     = rt2x00usb_disconnect,
        .suspend        = rt2x00usb_suspend,
        .resume         = rt2x00usb_resume,
+       .reset_resume   = rt2x00usb_resume,
        .disable_hub_initiated_lpm = 1,
 };
 
drivers/net/wireless/rt2x00/rt73usb.c +1 -1
index e5eb43b..24eec66 100644
@@ -2535,6 +2535,7 @@ static struct usb_driver rt73usb_driver = {
        .disconnect     = rt2x00usb_disconnect,
        .suspend        = rt2x00usb_suspend,
        .resume         = rt2x00usb_resume,
+       .reset_resume   = rt2x00usb_resume,
        .disable_hub_initiated_lpm = 1,
 };
 
--

1.7.1

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

Signature · 2 lines
---
Gertjan
#2 lore raw
In reply to Stanislaw Gruszka
Quoted 14 lines · Stanislaw Gruszka

Patch fixes warnings like below happened on resume:

WARNING: at net/mac80211/driver-ops.h:12 check_sdata_in_driver+0x32/0x34()

Problem is that in __ieee80211_susped() we remove sdata (i.e wlan0 interface) and then during resume we call usb_unbind_interface() -> ieee80211_unregister_hw() with sdata removed.

Patch fixes problem by adding .reset_resume calback, hence we do not unbind usb device on resume. This callback can be the same as normal .resume callback, sice we do all needed initalization during interface start, which is performed on resume [ ieee80211_resume() -> ieee80211_reconfig() -> rt2x00mac_start() -> rt2x00lib_start ].

Quoted 7 lines

Resolves:
https://bugzilla.kernel.org/show_bug.cgi?id=48041

NACK for this patch, Randomly I'm able to reproduce strange crashes when suspending and transiting data, which seem to not happen without this patch. Until I'll figure this out, let's not apply the patch.

Stanislaw

#3 lore raw
Quoted 18 lines · Stanislaw Gruszka
Quoted 17 lines · Stanislaw Gruszka

Patch fixes warnings like below happened on resume:

WARNING: at net/mac80211/driver-ops.h:12 check_sdata_in_driver+0x32/0x34()

Problem is that in __ieee80211_susped() we remove sdata (i.e wlan0 interface) and then during resume we call usb_unbind_interface() -> ieee80211_unregister_hw() with sdata removed.

Patch fixes problem by adding .reset_resume calback, hence we do not unbind usb device on resume. This callback can be the same as normal .resume callback, sice we do all needed initalization during interface start, which is performed on resume [ ieee80211_resume() -> ieee80211_reconfig() -> rt2x00mac_start() -> rt2x00lib_start ].

Resolves:
https://bugzilla.kernel.org/show_bug.cgi?id=48041

Quoted 8 lines
Quoted 4 lines

NACK for this patch, Randomly I'm able to reproduce strange crashes when suspending and transiting data, which seem to not happen without this patch. Until I'll figure this out, let's not apply the patch.

Of course, I just applied this today...any chance for a fixup?

John

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
#4 lore raw
Quoted 24 lines · John W. Linville
Quoted 23 lines · Stanislaw Gruszka
Quoted 21 lines · Stanislaw Gruszka

Patch fixes warnings like below happened on resume:

WARNING: at net/mac80211/driver-ops.h:12 check_sdata_in_driver+0x32/0x34()

Problem is that in __ieee80211_susped() we remove sdata (i.e wlan0 interface) and then during resume we call usb_unbind_interface() -> ieee80211_unregister_hw() with sdata removed.

Patch fixes problem by adding .reset_resume calback, hence we do not unbind usb device on resume. This callback can be the same as normal .resume callback, sice we do all needed initalization during interface start, which is performed on resume [ ieee80211_resume() -> ieee80211_reconfig() -> rt2x00mac_start() -> rt2x00lib_start ].

Resolves:
https://bugzilla.kernel.org/show_bug.cgi?id=48041

Quoted 5 lines
Quoted 3 lines

NACK for this patch, Randomly I'm able to reproduce strange crashes when suspending and transiting data, which seem to not happen without this patch. Until I'll figure this out, let's not apply the patch.

Of course, I just applied this today...any chance for a fixup?

This problem is tricky, I'm not expecting fix soon. However I can not reproduce it on 3.7 and can on 3.6. So I think patch can go to 3.7 . Could you remove cc stable from it? If not, I'll NACK backported patch, when GregKH will send information about the backport.

Stanislaw