PCI: Remove duplicate pci_disable_device() from pcie_portdrv_remove()

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Nov 22 17:59:09 EST 2013


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=e7cc5cf74544d97d7b69e2701595037474db1f96
Commit:     e7cc5cf74544d97d7b69e2701595037474db1f96
Parent:     f7625980f5820edd1a73536e1a03bcbc1f889fec
Author:     Yinghai Lu <yinghai at kernel.org>
AuthorDate: Mon Nov 18 17:02:45 2013 -0700
Committer:  Bjorn Helgaas <bhelgaas at google.com>
CommitDate: Wed Nov 20 16:05:49 2013 -0700

    PCI: Remove duplicate pci_disable_device() from pcie_portdrv_remove()
    
    The pcie_portdrv .probe() method calls pci_enable_device() once, in
    pcie_port_device_register(), but the .remove() method calls
    pci_disable_device() twice, in pcie_port_device_remove() and in
    pcie_portdrv_remove().
    
    That causes a "disabling already-disabled device" warning when removing a
    PCIe port device.  This happens all the time when removing Thunderbolt
    devices, but is also easy to reproduce with, e.g.,
    "echo 0000:00:1c.3 > /sys/bus/pci/drivers/pcieport/unbind"
    
    This patch removes the disable from pcie_portdrv_remove().
    
    [bhelgaas: changelog, tag for stable]
    Reported-by: David Bulkow <David.Bulkow at stratus.com>
    Reported-by: Mika Westerberg <mika.westerberg at linux.intel.com>
    Signed-off-by: Yinghai Lu <yinghai at kernel.org>
    Signed-off-by: Bjorn Helgaas <bhelgaas at google.com>
    CC: stable at vger.kernel.org	# v2.6.32+
---
 drivers/pci/pcie/portdrv_pci.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
index cd1e57e..0d8fdc4 100644
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -223,7 +223,6 @@ static int pcie_portdrv_probe(struct pci_dev *dev,
 static void pcie_portdrv_remove(struct pci_dev *dev)
 {
 	pcie_port_device_remove(dev);
-	pci_disable_device(dev);
 }
 
 static int error_detected_iter(struct device *device, void *data)



More information about the linux-mtd-cvs mailing list