Commit 763a4ff3 authored by Roger Luethi's avatar Roger Luethi Committed by Jeff Garzik

[netdrvr via-rhine] fix broken tx-underrun handling:

The Tx underrun handling in the current driver is broken. The details have
been explained in a posting "VIA Rhine 1.15exp1, patch for
testing/discussion" a couple of months ago.
parent 50e5bda8
......@@ -416,9 +416,9 @@ int mmio_verify_registers[] = {
/* Bits in the interrupt status/mask registers. */
enum intr_status_bits {
IntrRxDone=0x0001, IntrRxErr=0x0004, IntrRxEmpty=0x0020,
IntrTxDone=0x0002, IntrTxError=0x0008, IntrTxUnderrun=0x0010,
IntrTxDone=0x0002, IntrTxError=0x0008, IntrTxUnderrun=0x0210,
IntrPCIErr=0x0040,
IntrStatsMax=0x0080, IntrRxEarly=0x0100, IntrMIIChange=0x0200,
IntrStatsMax=0x0080, IntrRxEarly=0x0100,
IntrRxOverflow=0x0400, IntrRxDropped=0x0800, IntrRxNoBuf=0x1000,
IntrTxAborted=0x2000, IntrLinkChange=0x4000,
IntrRxWakeUp=0x8000,
......@@ -1005,7 +1005,7 @@ static void init_registers(struct net_device *dev)
writew(IntrRxDone | IntrRxErr | IntrRxEmpty| IntrRxOverflow |
IntrRxDropped | IntrRxNoBuf | IntrTxAborted |
IntrTxDone | IntrTxError | IntrTxUnderrun |
IntrPCIErr | IntrStatsMax | IntrLinkChange | IntrMIIChange,
IntrPCIErr | IntrStatsMax | IntrLinkChange,
ioaddr + IntrEnable);
np->chip_cmd = CmdStart|CmdTxOn|CmdRxOn|CmdNoTxPoll;
......@@ -1310,7 +1310,7 @@ static void via_rhine_interrupt(int irq, void *dev_instance, struct pt_regs *rgs
via_rhine_tx(dev);
/* Abnormal error summary/uncommon events handlers. */
if (intr_status & (IntrPCIErr | IntrLinkChange | IntrMIIChange |
if (intr_status & (IntrPCIErr | IntrLinkChange |
IntrStatsMax | IntrTxError | IntrTxAborted |
IntrTxUnderrun))
via_rhine_error(dev, intr_status);
......@@ -1534,7 +1534,7 @@ static void via_rhine_error(struct net_device *dev, int intr_status)
spin_lock (&np->lock);
if (intr_status & (IntrMIIChange | IntrLinkChange)) {
if (intr_status & (IntrLinkChange)) {
if (readb(ioaddr + MIIStatus) & 0x02) {
/* Link failed, restart autonegotiation. */
if (np->drv_flags & HasDavicomPhy)
......@@ -1552,7 +1552,7 @@ static void via_rhine_error(struct net_device *dev, int intr_status)
np->stats.rx_missed_errors += readw(ioaddr + RxMissed);
clear_tally_counters(ioaddr);
}
if (intr_status & IntrTxError) {
if (intr_status & IntrTxAborted) {
if (debug > 1)
printk(KERN_INFO "%s: Abort %4.4x, frame dropped.\n",
dev->name, intr_status);
......@@ -1567,7 +1567,7 @@ static void via_rhine_error(struct net_device *dev, int intr_status)
dev->name, np->tx_thresh);
via_rhine_restart_tx(dev);
}
if (intr_status & ~( IntrLinkChange | IntrStatsMax |
if (intr_status & ~( IntrLinkChange | IntrStatsMax | IntrTxUnderrun |
IntrTxError | IntrTxAborted | IntrNormalSummary)) {
if (debug > 1)
printk(KERN_ERR "%s: Something Wicked happened! %4.4x.\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment