All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pekka Enberg <penberg@cs.helsinki.fi>
To: luoyi <luoyi.ly@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>, linux-kernel@vger.kernel.org
Subject: Re: w35und driver unusable
Date: Mon, 23 Mar 2009 10:20:04 +0200	[thread overview]
Message-ID: <1237796404.6313.32.camel@penberg-laptop> (raw)
In-Reply-To: <e9e614960903180722h49f3719fp3a947fd194066233@mail.gmail.com>

Hi!

On Wed, 2009-03-18 at 22:22 +0800, luoyi wrote:
> just rmmod and modprobe it will trigger the oops.
> 
> I've just upload a oops snapshot picture onto flickr:
> 
> http://www.flickr.com/photos/21260339@N03/3364812089/
> 
> hope it will help for you.

Can you try this patch, please?

>From 727c633f7ac374261752b269ee77c007bd55a527 Mon Sep 17 00:00:00 2001
From: Pekka Enberg <penberg@cs.helsinki.fi>
Date: Mon, 23 Mar 2009 10:17:36 +0200
Subject: [PATCH] w35und: unregister device from the ieee80211 stack upon ->disconnect()

This patch fixes an oops when the w35und module is removed from the kernel and
added back.

Reported-by: luoyi <luoyi.ly@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
 drivers/staging/winbond/wbusb.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
index f716b2e..7a7aa9a 100644
--- a/drivers/staging/winbond/wbusb.c
+++ b/drivers/staging/winbond/wbusb.c
@@ -386,7 +386,7 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id
 	if (err)
 		goto error_free_hw;
 
-	usb_set_intfdata(intf, priv);
+	usb_set_intfdata(intf, dev);
 
 	return 0;
 
@@ -415,10 +415,15 @@ static void wb35_hw_halt(struct wbsoft_priv *adapter)
 
 static void wb35_disconnect(struct usb_interface *intf)
 {
-	struct wbsoft_priv *priv = usb_get_intfdata(intf);
+	struct ieee80211_hw *hw = usb_get_intfdata(intf);
+	struct wbsoft_priv *priv = hw->priv;
 
 	wb35_hw_halt(priv);
 
+	ieee80211_stop_queues(hw);
+	ieee80211_unregister_hw(hw);
+	ieee80211_free_hw(hw);
+
 	usb_set_intfdata(intf, NULL);
 	usb_put_dev(interface_to_usbdev(intf));
 }
-- 
1.5.4.3




      reply	other threads:[~2009-03-23  8:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-17  4:41 w35und driver unusable luoyi
2009-03-17  6:07 ` Pekka Enberg
2009-03-17  9:03   ` Pavel Machek
2009-03-17 12:43     ` luoyi
2009-03-17 16:38       ` Pekka Enberg
     [not found]       ` <84144f020903170940nf76d905t43bfa497bd5fe6d5@mail.gmail.com>
2009-03-18 14:22         ` luoyi
2009-03-23  8:20           ` Pekka Enberg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1237796404.6313.32.camel@penberg-laptop \
    --to=penberg@cs.helsinki.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luoyi.ly@gmail.com \
    --cc=pavel@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.