* [PATCH] PCIe: portdrv: call pci_disable_device during remove
@ 2009-03-08 2:35 Alex Chiang
2009-03-08 10:17 ` Rafael J. Wysocki
0 siblings, 1 reply; 5+ messages in thread
From: Alex Chiang @ 2009-03-08 2:35 UTC (permalink / raw)
To: Jesse Barnes, rjw, matthew; +Cc: stable, linux-pci, linux-kernel
The PCIe port driver calls pci_enable_device() during probe but
never calls pci_disable_device() during remove.
Cc: stable@kernel.org
Signed-off-by: Alex Chiang <achiang@hp.com>
---
This is a bug in the original PCIe port driver code, and should
be backported to the .27 and .28 stable series.
The implementation of the PCIe port driver is different in
linux-next, and I have a different patch for that.
---
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
index 248b4db..5ea566e 100644
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -103,6 +103,7 @@ static int __devinit 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);
kfree(pci_get_drvdata(dev));
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] PCIe: portdrv: call pci_disable_device during remove
@ 2009-03-08 4:46 Alex Chiang
2009-03-09 0:29 ` Alex Chiang
2009-03-09 21:28 ` Rafael J. Wysocki
0 siblings, 2 replies; 5+ messages in thread
From: Alex Chiang @ 2009-03-08 4:46 UTC (permalink / raw)
To: Jesse Barnes; +Cc: linux-pci, linux-kernel
The PCIe port driver calls pci_enable_device when registering
ports, but never calls pci_disable_device during removal.
Signed-off-by: Alex Chiang <achiang@hp.com>
---
This patch is against jbarnes's linux-next branch.
---
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
index 5a5bfe7..e399825 100644
--- a/drivers/pci/pcie/portdrv_core.c
+++ b/drivers/pci/pcie/portdrv_core.c
@@ -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:
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] PCIe: portdrv: call pci_disable_device during remove
2009-03-08 2:35 Alex Chiang
@ 2009-03-08 10:17 ` Rafael J. Wysocki
0 siblings, 0 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2009-03-08 10:17 UTC (permalink / raw)
To: Alex Chiang; +Cc: Jesse Barnes, matthew, stable, linux-pci, linux-kernel
On Sunday 08 March 2009, Alex Chiang wrote:
> The PCIe port driver calls pci_enable_device() during probe but
> never calls pci_disable_device() during remove.
>
> Cc: stable@kernel.org
> Signed-off-by: Alex Chiang <achiang@hp.com>
> ---
> This is a bug in the original PCIe port driver code, and should
> be backported to the .27 and .28 stable series.
>
> The implementation of the PCIe port driver is different in
> linux-next, and I have a different patch for that.
Fine with me.
> ---
> diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
> index 248b4db..5ea566e 100644
> --- a/drivers/pci/pcie/portdrv_pci.c
> +++ b/drivers/pci/pcie/portdrv_pci.c
> @@ -103,6 +103,7 @@ static int __devinit 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);
> kfree(pci_get_drvdata(dev));
> }
Thanks,
Rafael
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PCIe: portdrv: call pci_disable_device during remove
2009-03-08 4:46 [PATCH] PCIe: portdrv: call pci_disable_device during remove Alex Chiang
@ 2009-03-09 0:29 ` Alex Chiang
2009-03-09 21:28 ` Rafael J. Wysocki
1 sibling, 0 replies; 5+ messages in thread
From: Alex Chiang @ 2009-03-09 0:29 UTC (permalink / raw)
To: Jesse Barnes, linux-pci, linux-kernel; +Cc: rjw
Forgot to cc Rafael on this one.
/ac
* Alex Chiang <achiang@hp.com>:
> The PCIe port driver calls pci_enable_device when registering
> ports, but never calls pci_disable_device during removal.
>
> Signed-off-by: Alex Chiang <achiang@hp.com>
> ---
> This patch is against jbarnes's linux-next branch.
> ---
> diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
> index 5a5bfe7..e399825 100644
> --- a/drivers/pci/pcie/portdrv_core.c
> +++ b/drivers/pci/pcie/portdrv_core.c
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PCIe: portdrv: call pci_disable_device during remove
2009-03-08 4:46 [PATCH] PCIe: portdrv: call pci_disable_device during remove Alex Chiang
2009-03-09 0:29 ` Alex Chiang
@ 2009-03-09 21:28 ` Rafael J. Wysocki
1 sibling, 0 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2009-03-09 21:28 UTC (permalink / raw)
To: Alex Chiang; +Cc: Jesse Barnes, linux-pci, linux-kernel
On Sunday 08 March 2009, Alex Chiang wrote:
> The PCIe port driver calls pci_enable_device when registering
> ports, but never calls pci_disable_device during removal.
>
> Signed-off-by: Alex Chiang <achiang@hp.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
> This patch is against jbarnes's linux-next branch.
> ---
> diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
> index 5a5bfe7..e399825 100644
> --- a/drivers/pci/pcie/portdrv_core.c
> +++ b/drivers/pci/pcie/portdrv_core.c
> @@ -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:
> --
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-03-09 21:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-08 4:46 [PATCH] PCIe: portdrv: call pci_disable_device during remove Alex Chiang
2009-03-09 0:29 ` Alex Chiang
2009-03-09 21:28 ` Rafael J. Wysocki
-- strict thread matches above, loose matches on Subject: below --
2009-03-08 2:35 Alex Chiang
2009-03-08 10:17 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox