From df320777c1c17beefa0c8c644888386fd6be1dcb Mon Sep 17 00:00:00 2001 From: tsutsui Date: Fri, 10 Nov 2006 21:49:02 +0000 Subject: [PATCH] Call re_reset() after re_stop() in re_init(). Without this, re(4) on my macppc sometimes falls into mangled state and generates many errors after ifconfig(8) or tcpdump(8) etc. --- sys/dev/ic/rtl8169.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/ic/rtl8169.c b/sys/dev/ic/rtl8169.c index 76d1e850ce00..f40be36a42e4 100644 --- a/sys/dev/ic/rtl8169.c +++ b/sys/dev/ic/rtl8169.c @@ -1,4 +1,4 @@ -/* $NetBSD: rtl8169.c,v 1.52 2006/11/05 16:52:10 tsutsui Exp $ */ +/* $NetBSD: rtl8169.c,v 1.53 2006/11/10 21:49:02 tsutsui Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -1432,7 +1432,6 @@ re_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) */ if (status & RTK_ISR_SYSTEM_ERR) { - re_reset(sc); re_init(sc); } } @@ -1489,7 +1488,6 @@ re_intr(void *arg) re_txeof(sc); if (status & RTK_ISR_SYSTEM_ERR) { - re_reset(sc); re_init(ifp); } @@ -1779,6 +1777,8 @@ re_init(struct ifnet *ifp) */ re_stop(ifp, 0); + re_reset(sc); + /* * Enable C+ RX and TX mode, as well as VLAN stripping and * RX checksum offload. We must configure the C+ register