linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Prarit Bhargava <prarit@redhat.com>, "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: linux-acpi@vger.kernel.org, Len Brown <lenb@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Myron Stowe <mstowe@redhat.com>,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH] acpi, acpi_pci_irq_enable must return an error if ACPI cannot map an IRQ.
Date: Mon, 5 Aug 2013 17:04:16 +0300	[thread overview]
Message-ID: <20130805140416.GA3882@xps8300> (raw)
In-Reply-To: <2316212.cUEmm9I6aI@vostro.rjw.lan>

[-- Attachment #1: Type: text/plain, Size: 610 bytes --]

Hi,

On Mon, Aug 05, 2013 at 03:30:16PM +0200, Rafael J. Wysocki wrote:
> On Sunday, August 04, 2013 07:35:37 PM Prarit Bhargava wrote:
> > Hey Rafael,
> > 
> > I know you're busy but I was just wondering if this was queued up anywhere or if
> > you had any other questions?
> 
> Should be qeued up for 3.12 (currently in linux-next).

This breaks my xHCI :(

If the issues is that you are not getting any interrupt, then should
it not be checked separately and only fail in that case? I'm attaching
a patch that I made on top of linux-next, where I do just that. Would
that work for you?

Thanks,

-- 
heikki

[-- Attachment #2: 0001-ACPI-fix-the-behaviour-of-acpi_pci_irq_enable.patch --]
[-- Type: text/x-diff, Size: 1596 bytes --]

>From fdf8fbe4e75e7e320eba86ec51c9ede2495f30cd Mon Sep 17 00:00:00 2001
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Date: Mon, 5 Aug 2013 15:48:43 +0300
Subject: [PATCH] ACPI: fix the behaviour of acpi_pci_irq_enable()

acpi_pci_irq_enable() should not return error when PCI
provides an IRQ for the device even if ACPI does not know
the IRQ. This will change this case so that the function
only return error when there is no IRQ at all.

Without this the xHCI controller on my PC is allocated an
IRQ but still fails to be probed as pci_enable_device()
returns an error.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
 drivers/acpi/pci_irq.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
index 9681847..3c0b474 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -419,8 +419,15 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
 	 */
 	if (gsi < 0) {
 		u32 dev_gsi;
+
+		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);
@@ -430,7 +437,6 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
 		} else {
 			dev_warn(&dev->dev, "PCI INT %c: no GSI\n",
 				 pin_name(pin));
-			return -ENOENT;
 		}
 
 		return 0;
-- 
1.8.3.2


  reply	other threads:[~2013-08-05 14:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-15 14:57 [PATCH] acpi, acpi_pci_irq_enable must return an error if ACPI cannot map an IRQ Prarit Bhargava
2013-07-24 23:35 ` Rafael J. Wysocki
2013-07-25  0:01   ` Prarit Bhargava
2013-07-25  9:57     ` Prarit Bhargava
2013-07-25 12:10       ` Rafael J. Wysocki
2013-08-04 23:35       ` Prarit Bhargava
2013-08-05 13:30         ` Rafael J. Wysocki
2013-08-05 14:04           ` Heikki Krogerus [this message]
2013-08-06 14:37             ` Prarit Bhargava
2013-08-06 22:44               ` Rafael J. Wysocki
2013-08-07 12:39                 ` Prarit Bhargava
2013-08-07 13:29                   ` Heikki Krogerus
2013-08-07 23:04                     ` Rafael J. Wysocki

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=20130805140416.GA3882@xps8300 \
    --to=heikki.krogerus@linux.intel.com \
    --cc=bhelgaas@google.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mstowe@redhat.com \
    --cc=prarit@redhat.com \
    --cc=rjw@sisk.pl \
    /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).