From: aris@cathedrallabs.org
To: linux-kernel@vger.kernel.org
Cc: torvalds@transmeta.com
Subject: [PATCH][2.4] eepro 0.12c
Date: Mon, 8 Jan 2001 23:49:48 +0000 (/etc/localtime) [thread overview]
Message-ID: <Pine.LNX.4.21.0101082332220.195-200000@matthew.cathedral.com> (raw)
[-- Attachment #1: Type: TEXT/PLAIN, Size: 514 bytes --]
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
-----------------------------------------------------------
[-- Attachment #2: Type: TEXT/PLAIN, Size: 2916 bytes --]
--- 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);
}
reply other threads:[~2001-01-09 1:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.21.0101082332220.195-200000@matthew.cathedral.com \
--to=aris@cathedrallabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).