From patchwork Mon Dec 10 20:43:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herton Ronaldo Krzesinski X-Patchwork-Id: 205031 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 1D6C42C0291 for ; Tue, 11 Dec 2012 07:43:59 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TiACf-0005CC-1N; Mon, 10 Dec 2012 20:43:53 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1TiACc-0005BN-UF for kernel-team@lists.ubuntu.com; Mon, 10 Dec 2012 20:43:50 +0000 Received: from [186.212.211.197] (helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1TiACa-0001bt-3g; Mon, 10 Dec 2012 20:43:48 +0000 From: Herton Ronaldo Krzesinski To: Jiri Slaby Subject: [ 3.5.y.z extended stable ] Patch "MISC: hpilo, remove pci_disable_device" has been added to staging queue Date: Mon, 10 Dec 2012 18:43:45 -0200 Message-Id: <1355172225-23578-1-git-send-email-herton.krzesinski@canonical.com> X-Mailer: git-send-email 1.7.9.5 X-Extended-Stable: 3.5 Cc: Robert Hancock , Grant Grundler , Arnd Bergmann , Greg Kroah-Hartman , kernel-team@lists.ubuntu.com, David Altobelli , Nobin Mathew X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com This is a note to let you know that I have just added a patch titled MISC: hpilo, remove pci_disable_device to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree which can be found at: http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue If you, or anyone else, feels it should not be added to this tree, please reply to this email. For more information about the 3.5.y.z tree, see https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable Thanks. -Herton ------ From e488ed05d2a74a39f652ee2ce8c039f5dcc1a403 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Thu, 13 Sep 2012 16:06:48 +0200 Subject: [PATCH 08/11] MISC: hpilo, remove pci_disable_device commit bcdee04ea7ae0406ae69094f6df1aacb66a69a0b upstream. pci_disable_device(pdev) used to be in pci remove function. But this PCI device has two functions with interrupt lines connected to a single pin. The other one is a USB host controller. So when we disable the PIN there e.g. by rmmod hpilo, the controller stops working. It is because the interrupt link is disabled in ACPI since it is not refcounted yet. See acpi_pci_link_free_irq called from acpi_pci_irq_disable. It is not the best solution whatsoever, but as a workaround until the ACPI irq link refcounting is sorted out this should fix the reported errors. References: https://lkml.org/lkml/2008/11/4/535 Signed-off-by: Jiri Slaby Cc: Grant Grundler Cc: Nobin Mathew Cc: Robert Hancock Cc: Arnd Bergmann Cc: David Altobelli Signed-off-by: Greg Kroah-Hartman Signed-off-by: Herton Ronaldo Krzesinski --- drivers/misc/hpilo.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) -- 1.7.9.5 diff --git a/drivers/misc/hpilo.c b/drivers/misc/hpilo.c index fffc227..9c99680 100644 --- a/drivers/misc/hpilo.c +++ b/drivers/misc/hpilo.c @@ -735,7 +735,14 @@ static void ilo_remove(struct pci_dev *pdev) free_irq(pdev->irq, ilo_hw); ilo_unmap_device(pdev, ilo_hw); pci_release_regions(pdev); - pci_disable_device(pdev); + /* + * pci_disable_device(pdev) used to be here. But this PCI device has + * two functions with interrupt lines connected to a single pin. The + * other one is a USB host controller. So when we disable the PIN here + * e.g. by rmmod hpilo, the controller stops working. It is because + * the interrupt link is disabled in ACPI since it is not refcounted + * yet. See acpi_pci_link_free_irq called from acpi_pci_irq_disable. + */ kfree(ilo_hw); ilo_hwdev[(minor / MAX_CCB)] = 0; } @@ -820,7 +827,7 @@ unmap: free_regions: pci_release_regions(pdev); disable: - pci_disable_device(pdev); +/* pci_disable_device(pdev); see comment in ilo_remove */ free: kfree(ilo_hw); out: