提交 0000754c 编写于 作者: A Andrew Morton 提交者: Linus Torvalds

[PATCH] "3c59x collision statistics fix" fix

The pre-2.6.16 patch "3c59x collision statistics fix" accidentally caused
vortex_error() to not run iowrite16(TxEnable, ioaddr + EL3_CMD) if we got a
maxCollisions interrupt but MAX_COLLISION_RESET is not set.

Thanks to Pete Clements <clem@clem.clem-digital.net> for reporting and testing.
Acked-by: NSteffen Klassert <klassert@mathematik.tu-chemnitz.de>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 88b9adb0
...@@ -2083,16 +2083,14 @@ vortex_error(struct net_device *dev, int status) ...@@ -2083,16 +2083,14 @@ vortex_error(struct net_device *dev, int status)
} }
if (tx_status & 0x14) vp->stats.tx_fifo_errors++; if (tx_status & 0x14) vp->stats.tx_fifo_errors++;
if (tx_status & 0x38) vp->stats.tx_aborted_errors++; if (tx_status & 0x38) vp->stats.tx_aborted_errors++;
if (tx_status & 0x08) vp->xstats.tx_max_collisions++;
iowrite8(0, ioaddr + TxStatus); iowrite8(0, ioaddr + TxStatus);
if (tx_status & 0x30) { /* txJabber or txUnderrun */ if (tx_status & 0x30) { /* txJabber or txUnderrun */
do_tx_reset = 1; do_tx_reset = 1;
} else if (tx_status & 0x08) { /* maxCollisions */ } else if ((tx_status & 0x08) && (vp->drv_flags & MAX_COLLISION_RESET)) { /* maxCollisions */
vp->xstats.tx_max_collisions++; do_tx_reset = 1;
if (vp->drv_flags & MAX_COLLISION_RESET) { reset_mask = 0x0108; /* Reset interface logic, but not download logic */
do_tx_reset = 1; } else { /* Merely re-enable the transmitter. */
reset_mask = 0x0108; /* Reset interface logic, but not download logic */
}
} else { /* Merely re-enable the transmitter. */
iowrite16(TxEnable, ioaddr + EL3_CMD); iowrite16(TxEnable, ioaddr + EL3_CMD);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册