MISC: hpilo, remove pci_disable_device
[pandora-kernel.git] / drivers / misc / hpilo.c
index 557a8c2..9c99680 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Driver for HP iLO/iLO2 management processor.
+ * Driver for the HP iLO management processor.
  *
  * Copyright (C) 2008 Hewlett-Packard Development Company, L.P.
  *     David Altobelli <david.altobelli@hp.com>
@@ -640,6 +640,7 @@ static const struct file_operations ilo_fops = {
        .poll           = ilo_poll,
        .open           = ilo_open,
        .release        = ilo_close,
+       .llseek         = noop_llseek,
 };
 
 static irqreturn_t ilo_isr(int irq, void *data)
@@ -734,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;
 }
@@ -819,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: