From: Peter Hurley <peter@hurleysoftware.com>
To: Mark Einon <mark.einon@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
Stefan Richter <stefanr@s5r6.in-berlin.de>,
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: Fri, 01 Feb 2013 16:14:30 -0500 [thread overview]
Message-ID: <1359753270.22968.19.camel@thor.lan> (raw)
In-Reply-To: <1359752988.22968.16.camel@thor.lan>
On Fri, 2013-02-01 at 16:09 -0500, Peter Hurley wrote:
> On Fri, 2013-02-01 at 19:13 +0000, Mark Einon wrote:
> > On 31 January 2013 15:04, Alan Stern <stern@rowland.harvard.edu> wrote:
> > > On Wed, 30 Jan 2013, Mark Einon wrote:
> > >
> > >> >> > >> This patch fixes the kernel warning generated when putting an MSI MS-1727
> > >> >> > >> GT740 laptop into suspend mode. The call sequence in this case calls
> > >> >> > >> free_irq() twice, once in pci_remove() and once then in pci_suspend().
> > >> >> > >
> > >> >> > > You mean /first/ in pci_suspend() and /then/ in pci_remove() on the
> > >> >> > > already suspended devices, right?
> > >> >> >
> > >> >> > Yes, I did. The call sequence is suspend then resume. My bad.
> > >> >
> > >> > 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?
> > >>
> > >> This sounds reasonable to me - I think we could probably get rid of
> > >> the request_irq() call from resume, and use
> > >> disable_irq()/enable_irq()?
> > >
> > > Why mess around with IRQ settings at all? Just have the suspend
> > > routine tell the controller to stop generating them.
> > >
> > > Alan Stern
> > >
> >
> > I looked into doing this; using context_stop() to stop the controller running.
> >
> > However, removing the enable_irq() from pci_resume() involves not
> > calling ohci_enable() (as it is also the fw_card_driver.enable
> > function, and can't easily be modified). As this call involves a lot
> > of register writes and I have no devices to test, I decided against
> > it.
> >
> > I'll send an updated patch for consideration that merely uses a bool
> > to stop the irq being freed twice - crude, but it works without
> > changing too much code.
Sorry that should read...
> Hi Mark,
>
> I think what Alan means is that the suspend/resume code should just
> mask/unmask interrupts at the OHCI controller, via the OHCI
> IntEventClear/Set registers (naturally, saving the current mask and
^^^^^^^^
IntMaskClear/Set
by clearing/setting masterIntEnable
> restoring it on resume).
>
> Of course, there's a lot more to do with an OHCI controller -- as you
> note. Like stopping running DMA contexts :) And restarting them on
> resume.
>
> I'd do it, but I'm buried to my eyeballs in tty right now -- not fun. I
> can _eventually_ do this as I need to address problems with the FW643
> anyway at some point, but it's going to be a little while.
>
> In the meantime, I'm a little confused: you say you can't test this code
> because you have no hardware; but then how'd you trip this bug?
>
> Regards,
> Peter Hurley
next prev parent reply other threads:[~2013-02-01 21:16 UTC|newest]
Thread overview: 21+ 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-30 23:45 ` Mark Einon
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 [this message]
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: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-01-29 2:15 ` Greg KH
2013-02-01 19:50 ` [PATCH v2] " Mark Einon
2013-02-05 10:58 ` [PATCH v3] " 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=1359753270.22968.19.camel@thor.lan \
--to=peter@hurleysoftware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux1394-devel@lists.sourceforge.net \
--cc=mark.einon@gmail.com \
--cc=stefanr@s5r6.in-berlin.de \
--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