diff mbox

acpi, acpi_pci_irq_enable must return an error if ACPI cannot map an IRQ.

Message ID 20130805140416.GA3882@xps8300
State Not Applicable
Headers show

Commit Message

Heikki Krogerus Aug. 5, 2013, 2:04 p.m. UTC
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,

Comments

Prarit Bhargava Aug. 6, 2013, 2:37 p.m. UTC | #1
On 08/05/2013 10:04 AM, Heikki Krogerus wrote:
> 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?
> 

Testing this right now ... I'll get back to everyone when I have results.

P.

> Thanks,
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael J. Wysocki Aug. 6, 2013, 10:44 p.m. UTC | #2
On Tuesday, August 06, 2013 10:37:52 AM Prarit Bhargava wrote:
> On 08/05/2013 10:04 AM, Heikki Krogerus wrote:
> > 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?
> > 
> 
> Testing this right now ... I'll get back to everyone when I have results.

In the meantime I've dropped that commit from linux-next as it caused the xHCI
breakage to happen.

Thanks,
Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Prarit Bhargava Aug. 7, 2013, 12:39 p.m. UTC | #3
On 08/06/2013 06:44 PM, Rafael J. Wysocki wrote:
> On Tuesday, August 06, 2013 10:37:52 AM Prarit Bhargava wrote:
>> On 08/05/2013 10:04 AM, Heikki Krogerus wrote:
>>> 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?
>>>
>>
>> Testing this right now ... I'll get back to everyone when I have results.
> 
> In the meantime I've dropped that commit from linux-next as it caused the xHCI
> breakage to happen.

Thanks Rafael.

Heikki, I tested your patch and found that it solves my problem.  Sorry for the
breakage :(

Can you add a

Tested-by: Prarit Bhargava <prarit@redhat.com>

to your patch?

Thanks,

P.
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Heikki Krogerus Aug. 7, 2013, 1:29 p.m. UTC | #4
Hi,

On Wed, Aug 07, 2013 at 08:39:02AM -0400, Prarit Bhargava wrote:
> On 08/06/2013 06:44 PM, Rafael J. Wysocki wrote:
> > In the meantime I've dropped that commit from linux-next as it caused the xHCI
> > breakage to happen.
> 
> Thanks Rafael.
> 
> Heikki, I tested your patch and found that it solves my problem.  Sorry for the
> breakage :(
> 
> Can you add a
> 
> Tested-by: Prarit Bhargava <prarit@redhat.com>
> 
> to your patch?

Well, it would be more clear to me if you send new version of the
patch that combines the two, since Rafael dropped the original.

Thanks,
Rafael J. Wysocki Aug. 7, 2013, 11:04 p.m. UTC | #5
On Wednesday, August 07, 2013 04:29:20 PM Heikki Krogerus wrote:
> Hi,
> 
> On Wed, Aug 07, 2013 at 08:39:02AM -0400, Prarit Bhargava wrote:
> > On 08/06/2013 06:44 PM, Rafael J. Wysocki wrote:
> > > In the meantime I've dropped that commit from linux-next as it caused the xHCI
> > > breakage to happen.
> > 
> > Thanks Rafael.
> > 
> > Heikki, I tested your patch and found that it solves my problem.  Sorry for the
> > breakage :(
> > 
> > Can you add a
> > 
> > Tested-by: Prarit Bhargava <prarit@redhat.com>
> > 
> > to your patch?
> 
> Well, it would be more clear to me if you send new version of the
> patch that combines the two, since Rafael dropped the original.

Well, could you please rebase your patch on top of the Linus' tree and resend
it?

Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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