Patchwork [3.5.yuz,extended,stable] Patch "rt2x00: usb: fix reset resume" has been added to staging queue

login
register
mail settings
Submitter Herton Ronaldo Krzesinski
Date Nov. 22, 2012, 4:48 a.m.
Message ID <1353559723-2367-1-git-send-email-herton.krzesinski@canonical.com>
Download mbox | patch
Permalink /patch/200984/
State New
Headers show

Comments

Herton Ronaldo Krzesinski - Nov. 22, 2012, 4:48 a.m.
This is a note to let you know that I have just added a patch titled

    rt2x00: usb: fix reset resume

to the linux-3.5.y-queue branch of the 3.5.yuz extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.yuz tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Herton

------

From 8becf0254a3a0d506fc1882ab52fd4391631c9b1 Mon Sep 17 00:00:00 2001
From: Stanislaw Gruszka <sgruszka@redhat.com>
Date: Tue, 16 Oct 2012 14:34:12 +0200
Subject: [PATCH] rt2x00: usb: fix reset resume

commit 761ce8c41ed20ee3af77f2df527edc3f92e6f3bf upstream.

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

Reported-by: David Herrmann <dh.herrmann@googlemail.com>
Reported-and-tested-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
---
 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(+)

--
1.7.9.5
David Herrmann - Nov. 24, 2012, 4:11 p.m.
Hi

On Thu, Nov 22, 2012 at 5:48 AM, Herton Ronaldo Krzesinski
<herton.krzesinski@canonical.com> wrote:
> This is a note to let you know that I have just added a patch titled
>
>     rt2x00: usb: fix reset resume
>
> to the linux-3.5.y-queue branch of the 3.5.yuz extended stable tree
> which can be found at:
>
>  http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue
>
> If you, or anyone else, feels it should not be added to this tree, please
> reply to this email.

I think this shouldn't be applied to kernels prior to 3.7. Quoting Stanislaw:

> NAK, this patch cause random crashes on 3.6 (reproducible on 3.6,
> not reproducible on 3.7 - seems on 3.7 there are some changes, that
> prevent the crashes).
>
> Greg, please remove it from 3.6 stable queue

Maybe Stanislaw can comment whether this also applies to 3.5 kernels?

Regards
David
Stanislaw Gruszka - Nov. 25, 2012, 7:53 p.m.
On Sat, Nov 24, 2012 at 05:11:38PM +0100, David Herrmann wrote:
> I think this shouldn't be applied to kernels prior to 3.7. Quoting Stanislaw:
> 
> > NAK, this patch cause random crashes on 3.6 (reproducible on 3.6,
> > not reproducible on 3.7 - seems on 3.7 there are some changes, that
> > prevent the crashes).
> >
> > Greg, please remove it from 3.6 stable queue
> 
> Maybe Stanislaw can comment whether this also applies to 3.5 kernels?

It should not be applied, good catch.

Stanislaw
Herton Ronaldo Krzesinski - Nov. 26, 2012, 1:01 p.m.
On Sun, Nov 25, 2012 at 08:53:05PM +0100, Stanislaw Gruszka wrote:
> On Sat, Nov 24, 2012 at 05:11:38PM +0100, David Herrmann wrote:
> > I think this shouldn't be applied to kernels prior to 3.7. Quoting Stanislaw:
> > 
> > > NAK, this patch cause random crashes on 3.6 (reproducible on 3.6,
> > > not reproducible on 3.7 - seems on 3.7 there are some changes, that
> > > prevent the crashes).
> > >
> > > Greg, please remove it from 3.6 stable queue
> > 
> > Maybe Stanislaw can comment whether this also applies to 3.5 kernels?
> 
> It should not be applied, good catch.
> 
> Stanislaw
> 

Indeed, thanks for the report. It's removed now from the queue.

Patch

diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index d6e87c0..9356cda 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -1989,6 +1989,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,
 };

diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index 6b4226b..2140005 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -1322,6 +1322,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,
 };

diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index ceb1c4f..d5ec04a 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -2536,6 +2536,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,
 };