aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-09-13 10:06:48 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-26 16:20:40 -0400
commitbcdee04ea7ae0406ae69094f6df1aacb66a69a0b (patch)
tree099204644828227e4bede29f2e9a818c7bac46e6 /drivers/misc
parent221b7b5796b520b51c34c40239d77921ba39225b (diff)
MISC: hpilo, remove pci_disable_device
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 <jslaby@suse.cz> Cc: Grant Grundler <grundler@parisc-linux.org> Cc: Nobin Mathew <nobin.mathew@gmail.com> Cc: Robert Hancock <hancockr@shaw.ca> Cc: Arnd Bergmann <arnd@arndb.de> Cc: David Altobelli <david.altobelli@hp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/hpilo.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/misc/hpilo.c b/drivers/misc/hpilo.c
index 6df0da4085e3..12ccdf94e4fa 100644
--- a/drivers/misc/hpilo.c
+++ b/drivers/misc/hpilo.c
@@ -736,7 +736,14 @@ static void ilo_remove(struct pci_dev *pdev)
736 free_irq(pdev->irq, ilo_hw); 736 free_irq(pdev->irq, ilo_hw);
737 ilo_unmap_device(pdev, ilo_hw); 737 ilo_unmap_device(pdev, ilo_hw);
738 pci_release_regions(pdev); 738 pci_release_regions(pdev);
739 pci_disable_device(pdev); 739 /*
740 * pci_disable_device(pdev) used to be here. But this PCI device has
741 * two functions with interrupt lines connected to a single pin. The
742 * other one is a USB host controller. So when we disable the PIN here
743 * e.g. by rmmod hpilo, the controller stops working. It is because
744 * the interrupt link is disabled in ACPI since it is not refcounted
745 * yet. See acpi_pci_link_free_irq called from acpi_pci_irq_disable.
746 */
740 kfree(ilo_hw); 747 kfree(ilo_hw);
741 ilo_hwdev[(minor / max_ccb)] = 0; 748 ilo_hwdev[(minor / max_ccb)] = 0;
742} 749}
@@ -826,7 +833,7 @@ unmap:
826free_regions: 833free_regions:
827 pci_release_regions(pdev); 834 pci_release_regions(pdev);
828disable: 835disable:
829 pci_disable_device(pdev); 836/* pci_disable_device(pdev); see comment in ilo_remove */
830free: 837free:
831 kfree(ilo_hw); 838 kfree(ilo_hw);
832out: 839out: