All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: crash with rt61pci when resuming with card ejected
Date: Sat, 1 Nov 2008 09:58:09 +0100	[thread overview]
Message-ID: <200811010958.09194.IvDoorn@gmail.com> (raw)
In-Reply-To: <1225491085.3550.5.camel@johannes.berg>

On Friday 31 October 2008, Johannes Berg wrote:
> On Fri, 2008-10-31 at 23:01 +0100, Ivo van Doorn wrote:
> 
> > > Now it crashes in config_pairwise_key or something like that, I can send
> > > you the image if you want.
> > 
> > No need. :)
> > I assume mac80211 calls set_key() to disable all hardware keys when
> > ieee80211_unregister_hw() is being called. I'll cook up a patch to catch
> > that as well.
> 
> Yep, that's it, it does it by way of turning off all interfaces,
> removing all stations etc. Of course, if it would implement
> suspend/resume properly then it would have removed the keys already
> before suspend and be putting them back at resume...

Could you try this patch? It doesn't matter if it is on top or as a replacement
of my previous patch.

This patch should also fix suspend/resume handling in general, I suddenly realized
there was quite a big bug in there regarding EEPROM/CSR handling. 

Thanks,

Ivo

---
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c
index adf2876..d2c6bc9 100644
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
@@ -350,8 +350,6 @@ int rt2x00pci_suspend(struct pci_dev *pci_dev, pm_message_t state)
 	if (retval)
 		return retval;
 
-	rt2x00pci_free_reg(rt2x00dev);
-
 	pci_save_state(pci_dev);
 	pci_disable_device(pci_dev);
 	return pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state));
@@ -371,10 +369,6 @@ int rt2x00pci_resume(struct pci_dev *pci_dev)
 		return -EIO;
 	}
 
-	retval = rt2x00pci_alloc_reg(rt2x00dev);
-	if (retval)
-		return retval;
-
 	retval = rt2x00lib_resume(rt2x00dev);
 	if (retval)
 		goto exit_free_reg;
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c
index b73a7e0..6198cf3 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.c
@@ -597,8 +597,6 @@ int rt2x00usb_suspend(struct usb_interface *usb_intf, pm_message_t state)
 	if (retval)
 		return retval;
 
-	rt2x00usb_free_reg(rt2x00dev);
-
 	/*
 	 * Decrease usbdev refcount.
 	 */
@@ -616,10 +614,6 @@ int rt2x00usb_resume(struct usb_interface *usb_intf)
 
 	usb_get_dev(interface_to_usbdev(usb_intf));
 
-	retval = rt2x00usb_alloc_reg(rt2x00dev);
-	if (retval)
-		return retval;
-
 	retval = rt2x00lib_resume(rt2x00dev);
 	if (retval)
 		goto exit_free_reg;

  reply	other threads:[~2008-11-01  8:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-30 10:12 crash with rt61pci when resuming with card ejected Johannes Berg
2008-10-30 21:47 ` Ivo van Doorn
2008-10-30 22:07   ` Johannes Berg
2008-10-30 23:07   ` Johannes Berg
2008-10-31 19:31     ` Ivo van Doorn
2008-10-31 21:47       ` Johannes Berg
2008-10-31 22:01         ` Ivo van Doorn
2008-10-31 22:11           ` Johannes Berg
2008-11-01  8:58             ` Ivo van Doorn [this message]
2008-11-01  9:15               ` Johannes Berg
2008-11-01 10:29                 ` Ivo van Doorn
2008-11-01 12:05                   ` Johannes Berg
2008-11-01 15:25                     ` Ivo van Doorn
2008-11-01 15:34                       ` Johannes Berg
2008-11-01 23:10                         ` Ivo van Doorn

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=200811010958.09194.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /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.