From: Jesse Huang <jesse@icplus.com.tw>
To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
akpm@osdl.org, jgarzik@pobox.com, jesse@icplus.com.tw
Subject: [PATCH] Restore the original TX FIFO overflow process.
Date: Fri, 22 Sep 2006 15:30:01 -0400 [thread overview]
Message-ID: <1158953401.2630.0.camel@localhost.localdomain> (raw)
From: Jesse Huang <jesse@icplus.com.tw>
Change Logs:
- Restore the original TX FIFO overflow process.
Signed-off-by: Jesse Huang <jesse@icplus.com.tw>
---
drivers/net/sundance.c | 45 +++++++++++++++++++++++++++------------------
1 files changed, 27 insertions(+), 18 deletions(-)
7d8d60d6b1dbdbc36896148df1cc0242c037d838
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
index a253924..e68d325 100755
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -21,8 +21,8 @@
*/
#define DRV_NAME "sundance"
-#define DRV_VERSION "1.01+LK1.14"
-#define DRV_RELDATE "04-Aug-2006"
+#define DRV_VERSION "1.01+LK1.15"
+#define DRV_RELDATE "22-Sep-2006"
/* The user-configurable values.
@@ -1167,24 +1167,33 @@ static irqreturn_t intr_handler(int irq,
if (tx_status & 0x02)
np->stats.tx_window_errors++;
- /* FIFO ERROR need to be reset tx */
- if (tx_status & 0x10) { /* Reset the Tx. */
- spin_lock(&np->lock);
- reset_tx(dev);
- spin_unlock(&np->lock);
- }
- if (tx_status & 0x1e) {
- /* need to make sure tx enabled */
- int i = 10;
- do {
- iowrite16(ioread16(ioaddr + MACCtrl1) | TxEnable, ioaddr + MACCtrl1);
- if (ioread16(ioaddr + MACCtrl1) & TxEnabled)
- break;
- mdelay(1);
- } while (--i);
+ /*
+ ** This reset has been verified on
+ ** DFE-580TX boards ! phdm@macqel.be.
+ */
+ if (tx_status & 0x10) { /* TxUnderrun */
+ unsigned short txthreshold;
+
+ txthreshold = ioread16 (ioaddr + TxStartThresh);
+ /* Restart Tx FIFO and transmitter */
+ sundance_reset(dev, (NetworkReset|FIFOReset|TxReset) << 16);
+ iowrite16 (txthreshold, ioaddr + TxStartThresh);
+ /* No need to reset the Tx pointer here */
}
+ /* Restart the Tx. */
+ iowrite16 (TxEnable, ioaddr + MACCtrl1);
}
-
+ if (tx_status & 0x1e) {
+ /* need to make sure tx enabled */
+ int i = 10;
+ do {
+ iowrite16(ioread16(ioaddr + MACCtrl1) | TxEnable, ioaddr + MACCtrl1);
+ if (ioread16(ioaddr + MACCtrl1) & TxEnabled)
+ break;
+ mdelay(1);
+ } while (--i);
+ }
+
iowrite16 (0, ioaddr + TxStatus);
tx_status = ioread16 (ioaddr + TxStatus);
if (tx_cnt < 0)
--
1.3.GIT
next reply other threads:[~2006-09-22 7:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-22 19:30 Jesse Huang [this message]
2006-09-23 4:54 ` [PATCH] Restore the original TX FIFO overflow process Andrew Morton
2006-09-23 8:50 ` Andrew Morton
[not found] ` <20060923015157.b4014c6a.akpm@osdl.org>
2006-09-25 1:20 ` Jesse Huang
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=1158953401.2630.0.camel@localhost.localdomain \
--to=jesse@icplus.com.tw \
--cc=akpm@osdl.org \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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).