Commit 0ad8ac84 authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Linus Torvalds

[PATCH] de4x5.c: add missing pci_enable_device()

Add pci_enable_device()/pci_disable_device().  In the past, drivers
often worked without this, but it is now required in order to route
PCI interrupts correctly.
Signed-off-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent aa22e9a9
...@@ -2242,8 +2242,13 @@ static int __devinit de4x5_pci_probe (struct pci_dev *pdev, ...@@ -2242,8 +2242,13 @@ static int __devinit de4x5_pci_probe (struct pci_dev *pdev,
return -ENODEV; return -ENODEV;
/* Ok, the device seems to be for us. */ /* Ok, the device seems to be for us. */
if (!(dev = alloc_etherdev (sizeof (struct de4x5_private)))) if (pci_enable_device (pdev))
return -ENOMEM; return -ENODEV;
if (!(dev = alloc_etherdev (sizeof (struct de4x5_private)))) {
error = -ENOMEM;
goto disable_dev;
}
lp = netdev_priv(dev); lp = netdev_priv(dev);
lp->bus = PCI; lp->bus = PCI;
...@@ -2327,6 +2332,8 @@ static int __devinit de4x5_pci_probe (struct pci_dev *pdev, ...@@ -2327,6 +2332,8 @@ static int __devinit de4x5_pci_probe (struct pci_dev *pdev,
release_region (iobase, DE4X5_PCI_TOTAL_SIZE); release_region (iobase, DE4X5_PCI_TOTAL_SIZE);
free_dev: free_dev:
free_netdev (dev); free_netdev (dev);
disable_dev:
pci_disable_device (pdev);
return error; return error;
} }
...@@ -2341,6 +2348,7 @@ static void __devexit de4x5_pci_remove (struct pci_dev *pdev) ...@@ -2341,6 +2348,7 @@ static void __devexit de4x5_pci_remove (struct pci_dev *pdev)
unregister_netdev (dev); unregister_netdev (dev);
free_netdev (dev); free_netdev (dev);
release_region (iobase, DE4X5_PCI_TOTAL_SIZE); release_region (iobase, DE4X5_PCI_TOTAL_SIZE);
pci_disable_device (pdev);
} }
static struct pci_device_id de4x5_pci_tbl[] = { static struct pci_device_id de4x5_pci_tbl[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment