Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Fix that ANNOYING transmit timeout bug, caused by...



details:   https://anonhg.NetBSD.org/src/rev/a888ec2363ed
branches:  trunk
changeset: 473767:a888ec2363ed
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Jun 18 17:44:06 1999 +0000

description:
Fix that ANNOYING transmit timeout bug, caused by an unfortunate interaction
between a bug in the receive path (buffer length used instead of actual
received frame length) and the ARP code not correctly setting the length
of the reused mbuf, which all told caused the transmit logic in the chip
to wedge.

Also, make sure to count received packets.

Found and fixed by Zdenek Salvet <salvet%ics.muni.cz@localhost>, PR #7809.

diffstat:

 sys/dev/ic/smc83c170.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 44497b066d8c -r a888ec2363ed sys/dev/ic/smc83c170.c
--- a/sys/dev/ic/smc83c170.c    Fri Jun 18 14:27:09 1999 +0000
+++ b/sys/dev/ic/smc83c170.c    Fri Jun 18 17:44:06 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: smc83c170.c,v 1.16 1999/05/18 23:52:56 thorpej Exp $   */
+/*     $NetBSD: smc83c170.c,v 1.17 1999/06/18 17:44:06 thorpej Exp $   */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -708,7 +708,7 @@
                                continue;
                        }
 
-                       len = rxd->er_buflength;
+                       len = rxd->er_rxlength;
                        if (len < sizeof(struct ether_header)) {
                                m_freem(m);
                                continue;
@@ -738,6 +738,7 @@
                        
                        /* Pass it on. */
                        (*ifp->if_input)(ifp, m);
+                       ifp->if_ipackets++;
                }
 
                /* Update the recieve pointer. */



Home | Main Index | Thread Index | Old Index