lkml.org 
[lkml]   [2001]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH][2.4] eepro 0.12c
hi linus,
driver: eepro
problem: the actual state of driver makes old supported board stop
to function after some time of operation.

please consider applying this patch. the cleanup and cosmetic
changes will be in the next release of driver as you asked for.

-----------------------------------------------------------
aristeu sergio rozanski filho | www.cathedrallabs.org/~aris
aris@cathedrallabs.org | aris@conectiva.com.br
-----------------------------------------------------------

--- linux/drivers/net/eepro.c.old Tue Dec 5 20:29:38 2000
+++ linux/drivers/net/eepro.c Mon Jan 8 22:56:44 2001
@@ -23,6 +23,7 @@
This is a compatibility hardware problem.

Versions:
+ 0.12c fixing some problems with old cards (aris, 01/08/2001)
0.12b misc fixes (aris, 06/26/2000)
0.12a port of version 0.12a of 2.2.x kernels to 2.3.x
(aris (aris@conectiva.com.br), 05/19/2000)
@@ -96,7 +97,7 @@
*/

static const char *version =
- "eepro.c: v0.12b 04/26/2000 aris@conectiva.com.br\n";
+ "eepro.c: v0.12c 01/08/2000 aris@conectiva.com.br\n";

#include <linux/module.h>

@@ -501,8 +502,10 @@
/* set diagnose flag */
#define eepro_diag(ioaddr) outb(DIAGNOSE_CMD, ioaddr)

+#ifdef ANSWER_TX_AND_RX /* experimental way of handling interrupts */
/* ack for rx/tx int */
#define eepro_ack_rxtx(ioaddr) outb (RX_INT | TX_INT, ioaddr + STATUS_REG)
+#endif

/* ack for rx int */
#define eepro_ack_rx(ioaddr) outb (RX_INT, ioaddr + STATUS_REG)
@@ -1067,6 +1070,8 @@
}

eepro_sel_reset(ioaddr);
+ SLOW_DOWN;
+ SLOW_DOWN;

lp->tx_start = lp->tx_end = XMT_LOWER_LIMIT << 8;
lp->tx_last = 0;
@@ -1162,9 +1167,11 @@
while (((status = inb(ioaddr + STATUS_REG)) & 0x06) && (boguscount--))
{
switch (status & (RX_INT | TX_INT)) {
+#ifdef ANSWER_TX_AND_RX
case (RX_INT | TX_INT):
eepro_ack_rxtx(ioaddr);
break;
+#endif
case RX_INT:
eepro_ack_rx(ioaddr);
break;
@@ -1178,6 +1185,9 @@

/* Get the received packets */
eepro_rx(dev);
+#ifndef ANSWER_TX_AND_RX
+ continue;
+#endif
}
if (status & TX_INT) {
if (net_debug > 4)
@@ -1367,7 +1377,11 @@
/* Re-enable RX and TX interrupts */
eepro_en_int(ioaddr);
}
- eepro_complete_selreset(ioaddr);
+ if (lp->eepro == LAN595FX_10ISA) {
+ eepro_complete_selreset(ioaddr);
+ }
+ else
+ eepro_en_rx(ioaddr);
}

/* The horrible routine to read a word from the serial EEPROM. */
@@ -1535,7 +1549,9 @@
printk(KERN_DEBUG "%s: exiting hardware_send_packet routine.\n", dev->name);
return;
}
- netif_stop_queue(dev);
+ if (lp->eepro == LAN595FX_10ISA)
+ netif_stop_queue(dev);
+
if (net_debug > 5)
printk(KERN_DEBUG "%s: exiting hardware_send_packet routine.\n", dev->name);
}
@@ -1654,9 +1670,13 @@
xmt_status = inw(ioaddr+IO_PORT);

if ((xmt_status & TX_DONE_BIT) == 0) {
- udelay(40);
- boguscount--;
- continue;
+ if (lp->eepro == LAN595FX_10ISA) {
+ udelay(40);
+ boguscount--;
+ continue;
+ }
+ else
+ break;
}

xmt_status = inw(ioaddr+IO_PORT);
@@ -1723,7 +1743,7 @@
* interrupt again for tx. in other words: tx timeout what will take
* a lot of time to happen, so we'll do a complete selreset.
*/
- if (!boguscount)
+ if (!boguscount && lp->eepro == LAN595FX_10ISA)
eepro_complete_selreset(ioaddr);
}
\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.023 / U:0.896 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site