lkml.org 
[lkml]   [1999]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectA patch for eepro driver
Date
From
Hi,

Here is a patch for eepro100 in Linux 2.2.12. Without this patch,
the machine will lock up when the interface is enabled if there are
several devices sharing the same interrupt with eepro100 and they
are registered first.

Thanks.


--
H.J. Lu (hjl@gnu.org)
--
--- linux/drivers/net/eepro100.c Wed Oct 13 12:03:37 1999
+++ linux-test/drivers/net/eepro100.c Fri Oct 15 11:27:28 1999
@@ -823,6 +823,18 @@ speedo_open(struct device *dev)
dev->interrupt = 0;
dev->start = 1;

+ /*
+ * Request the IRQ last, after we have set up all data structures.
+ * It would be bad to get an interrupt before we're ready.
+ *
+ * Register ourself first before turn on the interrupt. Someone
+ * else may share the same interrupt. H.J.
+ */
+ if (request_irq(dev->irq, &speedo_interrupt, SA_SHIRQ,
+ "Intel EtherExpress Pro 10/100 Ethernet", dev)) {
+ return -EAGAIN;
+ }
+
/* Start the chip's Tx process and unmask interrupts. */
/* Todo: verify that we must wait for previous command completion. */
wait_for_cmd_done(ioaddr + SCBCmd);
@@ -843,15 +855,6 @@ speedo_open(struct device *dev)

wait_for_cmd_done(ioaddr + SCBCmd);
outw(CU_DUMPSTATS, ioaddr + SCBCmd);
-
- /*
- * Request the IRQ last, after we have set up all data structures.
- * It would be bad to get an interrupt before we're ready.
- */
- if (request_irq(dev->irq, &speedo_interrupt, SA_SHIRQ,
- "Intel EtherExpress Pro 10/100 Ethernet", dev)) {
- return -EAGAIN;
- }

/* No need to wait for the command unit to accept here. */
if ((sp->phy[0] & 0x8000) == 0)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.153 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site