Commit aa22e9a9 authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Linus Torvalds

[PATCH] ioc3-eth.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 41b3f604
...@@ -1172,9 +1172,14 @@ static int __devinit ioc3_probe(struct pci_dev *pdev, ...@@ -1172,9 +1172,14 @@ static int __devinit ioc3_probe(struct pci_dev *pdev,
u32 vendor, model, rev; u32 vendor, model, rev;
int err; int err;
if (pci_enable_device(pdev))
return -ENODEV;
dev = alloc_etherdev(sizeof(struct ioc3_private)); dev = alloc_etherdev(sizeof(struct ioc3_private));
if (!dev) if (!dev) {
return -ENOMEM; err = -ENOMEM;
goto out_disable;
}
err = pci_request_regions(pdev, "ioc3"); err = pci_request_regions(pdev, "ioc3");
if (err) if (err)
...@@ -1269,6 +1274,8 @@ static int __devinit ioc3_probe(struct pci_dev *pdev, ...@@ -1269,6 +1274,8 @@ static int __devinit ioc3_probe(struct pci_dev *pdev,
pci_release_regions(pdev); pci_release_regions(pdev);
out_free: out_free:
free_netdev(dev); free_netdev(dev);
out_disable:
pci_disable_device(pdev);
return err; return err;
} }
...@@ -1282,6 +1289,7 @@ static void __devexit ioc3_remove_one (struct pci_dev *pdev) ...@@ -1282,6 +1289,7 @@ static void __devexit ioc3_remove_one (struct pci_dev *pdev)
iounmap(ioc3); iounmap(ioc3);
pci_release_regions(pdev); pci_release_regions(pdev);
free_netdev(dev); free_netdev(dev);
pci_disable_device(pdev);
} }
static struct pci_device_id ioc3_pci_tbl[] = { static struct pci_device_id ioc3_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