From patchwork Mon Aug 5 14:04:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heikki Krogerus X-Patchwork-Id: 2838710 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D09A69F485 for ; Mon, 5 Aug 2013 14:04:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DE58020145 for ; Mon, 5 Aug 2013 14:04:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D93C620165 for ; Mon, 5 Aug 2013 14:04:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753239Ab3HEOEh (ORCPT ); Mon, 5 Aug 2013 10:04:37 -0400 Received: from mga09.intel.com ([134.134.136.24]:46076 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753213Ab3HEOEh (ORCPT ); Mon, 5 Aug 2013 10:04:37 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 05 Aug 2013 07:01:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.89,818,1367996400"; d="scan'208,223";a="357735446" Received: from kuha.fi.intel.com (HELO hk) ([10.237.72.54]) by orsmga001.jf.intel.com with SMTP; 05 Aug 2013 07:04:17 -0700 Received: by hk (sSMTP sendmail emulation); Mon, 05 Aug 2013 17:04:16 +0300 Date: Mon, 5 Aug 2013 17:04:16 +0300 From: Heikki Krogerus To: Prarit Bhargava , "Rafael J. Wysocki" Cc: linux-acpi@vger.kernel.org, Len Brown , Bjorn Helgaas , Myron Stowe , linux-pci@vger.kernel.org Subject: Re: [PATCH] acpi, acpi_pci_irq_enable must return an error if ACPI cannot map an IRQ. Message-ID: <20130805140416.GA3882@xps8300> References: <1373900260-1599-1-git-send-email-prarit@redhat.com> <51F0F67F.8070200@redhat.com> <51FEE549.3050001@redhat.com> <2316212.cUEmm9I6aI@vostro.rjw.lan> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <2316212.cUEmm9I6aI@vostro.rjw.lan> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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, Tested-by: Prarit Bhargava From fdf8fbe4e75e7e320eba86ec51c9ede2495f30cd Mon Sep 17 00:00:00 2001 From: Heikki Krogerus 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 --- 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