All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Mark Einon <mark.einon@gmail.com>,
	Peter Hurley <peter@hurleysoftware.com>,
	linux1394-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH] firewire: Fix ohci free_irq() warning
Date: Sat, 2 Feb 2013 16:30:30 +0100	[thread overview]
Message-ID: <20130202163030.7dc47112@stein> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1302021010340.25931-100000@netrider.rowland.org>

On Feb 02 Alan Stern wrote:
> On Sat, 2 Feb 2013, Stefan Richter wrote:
> 
> > On Feb 01 Mark Einon wrote:
> > > On 1 February 2013 21:09, Peter Hurley <peter@hurleysoftware.com> wrote:
> > > >>>> On Jan 29 Alan Stern wrote:
> > > >>>>> Why does the pci_suspend routine call free_irq() at all?  As far as I 
> > > >>>>> know, it's not supposed to do that.  Won't the device continue to use 
> > > >>>>> the same IRQ after it is resumed?
> > 
> > As far as I can tell, it happened to be done that way as a side effect of
> > how the probe() and resume() methods share code.  It has remained like
> > this since the initial implementation:
> > http://git.kernel.org/linus/2aef469a35a2
> 
> At one point, quite a few years ago, Linus complained about drivers the 
> release IRQs during suspend only to reacquire them during resume.  A 
> little refactoring should be able to separate out resource 
> acquisition/release (done only during probe and remove) from activation 
> and shutdown (also done during resume and suspend).
> 
> > Still, at this point I would like to learn whether .suspend() followed
> > by .remove() is a valid order of sequence which drivers must support
> > before I prepare myself to get comfortable with a refactoring of
> > firewire-ohci's .probe()/.resume()/suspend()/remove().  Obviously, so far
> > my assumption was that a successful .suspend() can only ever be followed
> > by .resume().
> 
> It depends on the subsystem.  Some subsystems do have suspend -> remove
> transitions and others don't.  In general, it's a good idea for drivers
> to be prepared for removal while the system is asleep.  Presumably any
> hot-unpluggable bus (which includes most of the important buses these
> days) would have to support it.

OK, thank you.  In this case we are of course dealing with the pci
subsystem (and with PCI/ CardBus/ PCI Express/ ExpressCard attached
hardware).  Maybe I should have addressed my question to linux-pci
instead of linux-pm; however, if this is the general expectation,
then I too prefer firewire-ohci to be able to handle it even if the pci
subsystem wouldn't require it presently (which now sounds unlikely).
-- 
Stefan Richter
-=====-===-= --=- ---=-
http://arcgraph.de/sr/

WARNING: multiple messages have this Message-ID (diff)
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Mark Einon <mark.einon@gmail.com>,
	Peter Hurley <peter@hurleysoftware.com>,
	<linux1394-devel@lists.sourceforge.net>,
	<linux-kernel@vger.kernel.org>, <linux-pm@vger.kernel.org>
Subject: Re: [PATCH] firewire: Fix ohci free_irq() warning
Date: Sat, 2 Feb 2013 16:30:30 +0100	[thread overview]
Message-ID: <20130202163030.7dc47112@stein> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1302021010340.25931-100000@netrider.rowland.org>

On Feb 02 Alan Stern wrote:
> On Sat, 2 Feb 2013, Stefan Richter wrote:
> 
> > On Feb 01 Mark Einon wrote:
> > > On 1 February 2013 21:09, Peter Hurley <peter@hurleysoftware.com> wrote:
> > > >>>> On Jan 29 Alan Stern wrote:
> > > >>>>> Why does the pci_suspend routine call free_irq() at all?  As far as I 
> > > >>>>> know, it's not supposed to do that.  Won't the device continue to use 
> > > >>>>> the same IRQ after it is resumed?
> > 
> > As far as I can tell, it happened to be done that way as a side effect of
> > how the probe() and resume() methods share code.  It has remained like
> > this since the initial implementation:
> > http://git.kernel.org/linus/2aef469a35a2
> 
> At one point, quite a few years ago, Linus complained about drivers the 
> release IRQs during suspend only to reacquire them during resume.  A 
> little refactoring should be able to separate out resource 
> acquisition/release (done only during probe and remove) from activation 
> and shutdown (also done during resume and suspend).
> 
> > Still, at this point I would like to learn whether .suspend() followed
> > by .remove() is a valid order of sequence which drivers must support
> > before I prepare myself to get comfortable with a refactoring of
> > firewire-ohci's .probe()/.resume()/suspend()/remove().  Obviously, so far
> > my assumption was that a successful .suspend() can only ever be followed
> > by .resume().
> 
> It depends on the subsystem.  Some subsystems do have suspend -> remove
> transitions and others don't.  In general, it's a good idea for drivers
> to be prepared for removal while the system is asleep.  Presumably any
> hot-unpluggable bus (which includes most of the important buses these
> days) would have to support it.

OK, thank you.  In this case we are of course dealing with the pci
subsystem (and with PCI/ CardBus/ PCI Express/ ExpressCard attached
hardware).  Maybe I should have addressed my question to linux-pci
instead of linux-pm; however, if this is the general expectation,
then I too prefer firewire-ohci to be able to handle it even if the pci
subsystem wouldn't require it presently (which now sounds unlikely).
-- 
Stefan Richter
-=====-===-= --=- ---=-
http://arcgraph.de/sr/

  reply	other threads:[~2013-02-02 15:30 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-28 22:09 [PATCH] firewire: Fix ohci free_irq() warning Mark Einon
2013-01-28 23:01 ` Stefan Richter
2013-01-29 12:44   ` Mark Einon
2013-01-29 16:04     ` Stefan Richter
2013-01-29 17:01       ` Alan Stern
2013-01-29 17:01         ` Alan Stern
2013-01-30 23:45         ` Mark Einon
2013-01-31 15:04           ` Alan Stern
2013-01-31 15:04             ` Alan Stern
2013-02-01 19:13             ` Mark Einon
2013-02-01 21:09               ` Peter Hurley
2013-02-01 21:14                 ` Peter Hurley
2013-02-01 23:00                 ` Mark Einon
2013-02-02 15:01                   ` Stefan Richter
2013-02-02 15:16                     ` Alan Stern
2013-02-02 15:16                       ` Alan Stern
2013-02-02 15:30                       ` Stefan Richter [this message]
2013-02-02 15:30                         ` Stefan Richter
2013-01-30 23:43       ` Mark Einon
2013-02-02 14:24         ` Stefan Richter
2013-02-02 15:21           ` Alan Stern
2013-02-02 15:21             ` Alan Stern
2013-01-29  2:15 ` Greg KH
2013-02-01 19:50 ` [PATCH v2] " Mark Einon
2013-02-01 19:50   ` Mark Einon
2013-02-05 10:58   ` [PATCH v3] " Mark Einon
2013-02-05 10:58     ` Mark Einon
2013-02-17  8:41     ` Stefan Richter

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=20130202163030.7dc47112@stein \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=mark.einon@gmail.com \
    --cc=peter@hurleysoftware.com \
    --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 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.