All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Mark Einon <mark.einon@gmail.com>
Cc: linux1394-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	stern@rowland.harvard.edu
Subject: Re: [PATCH v3] firewire: Fix ohci free_irq() warning
Date: Sun, 17 Feb 2013 09:41:00 +0100	[thread overview]
Message-ID: <20130217094100.7a5d17e3@stein> (raw)
In-Reply-To: <1360061927-3359-1-git-send-email-mark.einon@gmail.com>

On Feb 05 Mark Einon wrote:
> This patch fixes the kernel warning below, 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_suspend() and once then in
> pci_remove().
> 
> The fix breaks up the ohci_enable() call into four separate calls -
> ohci_enable_regs(), ohci_create_irq(), ohci_enable_irq() and
> ohci_enable_run(). The original call sequence of ohci_enable() is replaced
> by the four calls, but the ohci_enable() called from pci_resume() is
> replaced by three of the calls, missing out ohci_create_irq().
> 
> Finally, a new call, ohci_disable_irq(), replaces the free_irq() in
> pci_suspend() which sets the irq mask to zero.
[...]

Hi,
I haven't forgotten about this patch; just didn't fully check it yet
because I still wanted to look whether there is a more minimalistic
way.  Perhaps I'll post something in the next days.

> @@ -3766,7 +3811,7 @@ static int pci_suspend(struct pci_dev *dev, pm_message_t state)
>  	int err;
>  
>  	software_reset(ohci);
> -	free_irq(dev->irq, ohci);
> +	ohci_disable_irq(ohci);
>  	pci_disable_msi(dev);
>  	err = pci_save_state(dev);
>  	if (err) {
> @@ -3802,10 +3847,13 @@ static int pci_resume(struct pci_dev *dev)
>  		reg_write(ohci, OHCI1394_GUIDHi, (u32)(ohci->card.guid >> 32));
>  	}
>  
> -	err = ohci_enable(&ohci->card, NULL, 0);
> +	err = ohci_enable_regs(&ohci->card, NULL, 0);
>  	if (err)
>  		return err;
>  
> +	ohci_enable_irq(ohci);
> +	ohci_enable_run(ohci);
> +
>  	ohci_resume_iso_dma(ohci);
>  
>  	return 0;

Looks like pci_{en,dis}able_msi are now unbalanced.  I suppose we better
place them immediately around {request,free}_irq.
-- 
Stefan Richter
-=====-===-= --=- =---=
http://arcgraph.de/sr/

      reply	other threads:[~2013-02-17  8:41 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
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 [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=20130217094100.7a5d17e3@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=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.