lkml.org 
[lkml]   [2009]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] PCIe: portdrv: call pci_disable_device during remove
Date
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


\
 
 \ /
  Last update: 2009-03-08 11:19    [from the cache]
©2003-2011 Jasper Spaans