All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Bjorn Helgaas <bhelgaas@google.com>
Cc: Prarit Bhargava <prarit@redhat.com>,
	linux-acpi@vger.kernel.org, Linux PCI <linux-pci@vger.kernel.org>
Subject: Re: [PATCH 1/2] ACPI / PCI: don't allow PCI devices without irq to be enabled
Date: Thu, 08 Aug 2013 15:57:06 +0200	[thread overview]
Message-ID: <14983102.aCV009CSMA@vostro.rjw.lan> (raw)
In-Reply-To: <1375965314-24232-2-git-send-email-heikki.krogerus@linux.intel.com>

On Thursday, August 08, 2013 03:35:13 PM Heikki Krogerus wrote:
> If there is no ACPI entry for the irq, returning error from
> acpi_pci_enable_irq() if the irq is 0.
> 
> Prarit Bhargava reported an issue where he noticed that his
> Dell PowerEdge 840 has buggy BIOS that does not supply ACPI
> entries for irq with some devices. That lead into kernel
> generating a warning "genirq: Flags mismatch irq 0...". This
> will fix that issue.
> 
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Tested-by: Prarit Bhargava <prarit@redhat.com>

Hi Bjorn,

Any objections to this?

Rafael


> ---
>  drivers/acpi/pci_irq.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
> index 41c5e1b..902ed1c 100644
> --- a/drivers/acpi/pci_irq.c
> +++ b/drivers/acpi/pci_irq.c
> @@ -419,8 +419,16 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
>  	 */
>  	if (gsi < 0) {
>  		u32 dev_gsi;
> +
> +		/* Not accepting 0 as valid PCI IRQ. */
> +		if (!dev->irq) {
> +			dev_err(&dev->dev, "PCI INT %c: no IRQ\n",
> +				pin_name(pin));
> +			return -ENOENT;
> +		}
> +
>  		/* Interrupt Line values above 0xF are forbidden */
> -		if (dev->irq > 0 && (dev->irq <= 0xF) &&
> +		if ((dev->irq <= 0xF) &&
>  		    (acpi_isa_irq_to_gsi(dev->irq, &dev_gsi) == 0)) {
>  			dev_warn(&dev->dev, "PCI INT %c: no GSI - using ISA IRQ %d\n",
>  				 pin_name(pin), dev->irq);
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  reply	other threads:[~2013-08-08 13:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-08 12:35 [PATCH 0/2] ACPI: return error in acpi_pci_irq_enable when there is no irq Heikki Krogerus
2013-08-08 12:35 ` [PATCH 1/2] ACPI / PCI: don't allow PCI devices without irq to be enabled Heikki Krogerus
2013-08-08 13:57   ` Rafael J. Wysocki [this message]
2013-08-12 21:14     ` Bjorn Helgaas
2013-08-12 21:32       ` Yinghai Lu
2013-08-12 22:32         ` Bjorn Helgaas
2013-08-23 17:00           ` Bjorn Helgaas
2013-10-03 23:58           ` Prarit Bhargava
2013-08-08 12:35 ` [PATCH 2/2] ACPI / PCI: remove an extra check from acpi_pci_irq_enable() Heikki Krogerus
2013-08-08 13:58   ` Rafael J. Wysocki
2013-08-12 21:15     ` Bjorn Helgaas
2013-09-13 12:52 ` [PATCH 0/2] ACPI: return error in acpi_pci_irq_enable when there is no irq Prarit Bhargava
2013-09-13 23:43   ` Rafael J. Wysocki
2013-09-13 23:55     ` Bjorn Helgaas
2013-09-16  7:40       ` Heikki Krogerus
2013-09-16 10:28         ` Heikki Krogerus

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=14983102.aCV009CSMA@vostro.rjw.lan \
    --to=rjw@sisk.pl \
    --cc=bhelgaas@google.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=prarit@redhat.com \
    /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.