linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: linux-pm@lists.linux-foundation.org
Cc: Alan Stern <stern@rowland.harvard.edu>,
	Alan Jenkins <alan-jenkins@tuffmail.co.uk>,
	linux-pci@vger.kernel.org,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	ath5k-devel@venema.h4ckr.net
Subject: Re: [linux-pm] PCI hotplug v.s. suspend
Date: Mon, 15 Jun 2009 21:58:30 +0200	[thread overview]
Message-ID: <200906152158.30989.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0906151035560.5057-100000@iolanthe.rowland.org>

On Monday 15 June 2009, Alan Stern wrote:
> On Mon, 15 Jun 2009, Alan Jenkins wrote:
> 
> > Alan Stern wrote:
> > > On Mon, 15 Jun 2009, Alan Jenkins wrote:
> > >
> > >   
> > >> Hi,
> > >>
> > >> I triggered a WARNING while hacking on eeepc-laptop's 
> > >> rfkill-by-pci-hotplug.  I saw "Trying to free already-free IRQ" in 
> > >> ath5k_pci_remove(), because the IRQ was already freed by 
> > >> ath5k_pci_suspend().  My changes to eeepc-laptop had allowed the PCI 
> > >> device to be removed while suspended.
> > >>
> > >> Are PCI drivers supposed to handle remove() while suspended?
> > >>     
> > >
> > > Yes.  You found a bug in the driver.  However it's not clear (to me at
> > > least) whether the bug is that the IRQ is freed in the suspend method
> > > or that there's no check for already-freed in the remove method.  My 
> > > guess is the latter.
> > >
> > > Alan Stern
> > >   
> > 
> > The example in Documentation/power/pci.txt shows free_irq() being called
> > in suspend (and request_irq() in resume).  So the problem is in remove().
> 
> I'm not sure whether the example is trustworthy.  There was some
> discussion quite a while ago regarding whether drivers should free
> their IRQs during suspend, but I don't remember what the outcome was.

No, they shouldn't.

That's why we do the entire suspend_device_irqs() thing etc.

Best,
Rafael

  reply	other threads:[~2009-06-15 19:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-15 10:55 PCI hotplug v.s. suspend Alan Jenkins
2009-06-15 13:58 ` [linux-pm] " Alan Stern
2009-06-15 14:03   ` Alan Jenkins
2009-06-15 14:37     ` Alan Stern
2009-06-15 19:58       ` Rafael J. Wysocki [this message]
2009-06-15 20:34         ` Alan Stern
2009-06-15 20:51           ` Rafael J. Wysocki
2009-06-16  1:01         ` [ath5k-devel] " Bob Copeland
2009-06-18 11:51           ` Alan Jenkins
2009-06-18 18:45             ` Alan Stern
2009-06-18 21:18               ` Alan Jenkins
2009-06-19  8:34                 ` Alan Jenkins
2009-06-19 11:08                   ` Bob Copeland

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=200906152158.30989.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=alan-jenkins@tuffmail.co.uk \
    --cc=ath5k-devel@venema.h4ckr.net \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).