All of lore.kernel.org
 help / color / mirror / Atom feed
* [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; 6+ 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] 6+ messages in thread
[parent not found: <200408242225.i7OMPGLQ029847@hera.kernel.org>]

end of thread, other threads:[~2004-08-25 15:07 UTC | newest]

Thread overview: 6+ 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
     [not found] <200408242225.i7OMPGLQ029847@hera.kernel.org>
2004-08-25  0:40 ` Jeff Garzik
2004-08-25  5:49   ` Ralf Baechle
2004-08-25 15:03   ` Bjorn Helgaas
2004-08-25 15:06     ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.