diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2006-01-30 00:32:46 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2006-01-30 00:32:46 +0000 |
commit | e0f0bd7be5bb2f7473c5554b4013cb1d140e0d92 (patch) | |
tree | e70ce4df861ffc786c40352434930cef7b0f4db0 /sys/dev/ic | |
parent | b38b1db8758e54031eac4382212837fd2dfd12c5 (diff) |
only flush the TX descriptors in re_start() if there are packets
to be transmitted.
tested by jsg@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/re.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c index 21b48cda9b6..e610bcf6a27 100644 --- a/sys/dev/ic/re.c +++ b/sys/dev/ic/re.c @@ -1,4 +1,4 @@ -/* $OpenBSD: re.c,v 1.16 2006/01/28 02:15:19 brad Exp $ */ +/* $OpenBSD: re.c,v 1.17 2006/01/30 00:32:45 brad Exp $ */ /* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -1491,7 +1491,7 @@ re_start(ifp) { struct rl_softc *sc; struct mbuf *m_head = NULL; - int idx; + int idx, queued = 0; sc = ifp->if_softc; @@ -1514,8 +1514,12 @@ re_start(ifp) if (ifp->if_bpf) bpf_mtap(ifp->if_bpf, m_head); #endif + queued++; } + if (queued == 0) + return; + /* Flush the TX descriptors */ bus_dmamap_sync(sc->sc_dmat, |