* [PATCH] ioc3-eth.c: add missing pci_enable_device()
@ 2004-08-04 21:38 Bjorn Helgaas
2004-08-19 20:14 ` Ralf Baechle
0 siblings, 1 reply; 2+ messages in thread
From: Bjorn Helgaas @ 2004-08-04 21:38 UTC (permalink / raw)
To: Andrew Morton; +Cc: ralf, linux-mips
I don't have this hardware, so this has not been tested.
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: Bjorn Helgaas <bjorn.helgaas@hp.com>
===== drivers/net/ioc3-eth.c 1.26 vs edited =====
--- 1.26/drivers/net/ioc3-eth.c 2004-06-04 09:49:59 -06:00
+++ edited/drivers/net/ioc3-eth.c 2004-08-04 13:24:07 -06:00
@@ -1172,9 +1172,14 @@
u32 vendor, model, rev;
int err;
+ if (pci_enable_device(pdev))
+ return -ENODEV;
+
dev = alloc_etherdev(sizeof(struct ioc3_private));
- if (!dev)
- return -ENOMEM;
+ if (!dev) {
+ err = -ENOMEM;
+ goto out_disable;
+ }
err = pci_request_regions(pdev, "ioc3");
if (err)
@@ -1269,6 +1274,8 @@
pci_release_regions(pdev);
out_free:
free_netdev(dev);
+out_disable:
+ pci_disable_device(pdev);
return err;
}
@@ -1282,6 +1289,7 @@
iounmap(ioc3);
pci_release_regions(pdev);
free_netdev(dev);
+ pci_disable_device(pdev);
}
static struct pci_device_id ioc3_pci_tbl[] = {
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ioc3-eth.c: add missing pci_enable_device()
2004-08-04 21:38 [PATCH] ioc3-eth.c: add missing pci_enable_device() Bjorn Helgaas
@ 2004-08-19 20:14 ` Ralf Baechle
0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2004-08-19 20:14 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: Andrew Morton, linux-mips
On Wed, Aug 04, 2004 at 03:38:21PM -0600, Bjorn Helgaas wrote:
> I don't have this hardware, so this has not been tested.
Sure, it's SGI hw ;-)
> 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.
Applied.
Ralf
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-08-19 20:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-04 21:38 [PATCH] ioc3-eth.c: add missing pci_enable_device() Bjorn Helgaas
2004-08-19 20:14 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox