diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-02-08 22:50:09 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2007-02-08 22:50:09 +0000 |
commit | c6c7555a81465ba9b9d782d016e72c1af2f31f36 (patch) | |
tree | 74c6353aef29da25311b3d7c3283ee73652bbcf9 /sys/dev | |
parent | a5b2f2b43b5ea91788a3c31285c22d6860a70558 (diff) |
Don't clear IFF_OACTIVE in re_txeof() unless there are at least 4 free
TX descriptors. Further down the road re_encap() will bail if there
aren't at least 4 free TX descriptors, causing re_start() to abort
and set IFF_OACTIVE again.
From marius@FreeBSD
Tested by me, brad@, otto@ and Emilio Parea.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/re.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c index 5782b996b32..0d12ec0fa83 100644 --- a/sys/dev/ic/re.c +++ b/sys/dev/ic/re.c @@ -1,4 +1,4 @@ -/* $OpenBSD: re.c,v 1.65 2007/02/03 01:55:00 krw Exp $ */ +/* $OpenBSD: re.c,v 1.66 2007/02/08 22:50:08 kettenis Exp $ */ /* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -1391,10 +1391,10 @@ re_txeof(struct rl_softc *sc) ifp->if_opackets++; } - if (sc->rl_ldata.rl_tx_free) { - sc->rl_ldata.rl_txq_considx = idx; + sc->rl_ldata.rl_txq_considx = idx; + + if (sc->rl_ldata.rl_tx_free > RL_NTXDESC_RSVD) ifp->if_flags &= ~IFF_OACTIVE; - } if (sc->rl_ldata.rl_tx_free < RL_TX_DESC_CNT(sc)) { /* |