Skip to contentSkip to conversation

PCIe: portdrv: call pci_disable_device during remove

PATCH In review Alex Chiang 2 participants 3 messages Mar 8, 2009 – Mar 9, 2009 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCIe: portdrv: call pci_disable_device during remove

The PCIe port driver calls pci_enable_device when registering ports, but never calls pci_disable_device during removal.

---
This patch is against jbarnes's linux-next branch.
---

drivers/pci/pcie/portdrv_core.c +1 -0
index 5a5bfe7..e399825 100644
@@ -473,6 +473,7 @@ void pcie_port_device_remove(struct pci_dev *dev)
 	struct pcie_port_data *port_data = pci_get_drvdata(dev);
 
 	device_for_each_child(&dev->dev, NULL, remove_iter);
+	pci_disable_device(dev);
 
 	switch (port_data->port_irq_mode) {
 	case PCIE_PORT_MSIX_MODE:
#1 lore raw

Forgot to cc Rafael on this one.

/ac

* Alex Chiang <[email protected]>:

Quoted 24 lines

The PCIe port driver calls pci_enable_device when registering ports, but never calls pci_disable_device during removal.

---
This patch is against jbarnes's linux-next branch.
---

drivers/pci/pcie/portdrv_core.c +1 -1
index 5a5bfe7..e399825 100644
@@ -473,6 +473,7 @@ void pcie_port_device_remove(struct pci_dev *dev)
 	struct pcie_port_data *port_data = pci_get_drvdata(dev);
 
 	device_for_each_child(&dev->dev, NULL, remove_iter);
+	pci_disable_device(dev);
 
 	switch (port_data->port_irq_mode) {
 	case PCIE_PORT_MSIX_MODE:
--

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Acked-by on v1 1/1
#2 lore raw
In reply to Alex Chiang
Quoted 4 lines · Alex Chiang

The PCIe port driver calls pci_enable_device when registering ports, but never calls pci_disable_device during removal.

Quoted 16 lines

---
This patch is against jbarnes's linux-next branch.
---

drivers/pci/pcie/portdrv_core.c +1 -1
index 5a5bfe7..e399825 100644
@@ -473,6 +473,7 @@ void pcie_port_device_remove(struct pci_dev *dev)
 	struct pcie_port_data *port_data = pci_get_drvdata(dev);
 
 	device_for_each_child(&dev->dev, NULL, remove_iter);
+	pci_disable_device(dev);
 
 	switch (port_data->port_irq_mode) {
 	case PCIE_PORT_MSIX_MODE:
--