diff options
author | Kenjiro Cho <kjc@cvs.openbsd.org> | 2002-03-12 09:51:21 +0000 |
---|---|---|
committer | Kenjiro Cho <kjc@cvs.openbsd.org> | 2002-03-12 09:51:21 +0000 |
commit | c0673e7470e78851e90fed12a36fc994cd4a9596 (patch) | |
tree | 493f6323005acbca62cfdc1588c1bcca53310914 /sys/dev/pci/if_txp.c | |
parent | a58c9d8493088f72eea1a7fe29bd0458cad36e81 (diff) |
sync with KAME
ALTQify more drivers.
ok millert@
Diffstat (limited to 'sys/dev/pci/if_txp.c')
-rw-r--r-- | sys/dev/pci/if_txp.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/dev/pci/if_txp.c b/sys/dev/pci/if_txp.c index fb46490d88f..64938b4300b 100644 --- a/sys/dev/pci/if_txp.c +++ b/sys/dev/pci/if_txp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_txp.c,v 1.61 2002/02/15 20:45:31 nordin Exp $ */ +/* $OpenBSD: if_txp.c,v 1.62 2002/03/12 09:51:20 kjc Exp $ */ /* * Copyright (c) 2001 @@ -1344,9 +1344,10 @@ txp_start(ifp) cnt = r->r_cnt; while (1) { - IFQ_DEQUEUE(&ifp->if_snd, m); + IFQ_POLL(&ifp->if_snd, m); if (m == NULL) break; + mnew = NULL; firstprod = prod; firstcnt = cnt; @@ -1368,6 +1369,7 @@ txp_start(ifp) } m_copydata(m, 0, m->m_pkthdr.len, mtod(mnew, caddr_t)); mnew->m_pkthdr.len = mnew->m_len = m->m_pkthdr.len; + IFQ_DEQUEUE(&ifp->if_snd, m); m_freem(m); m = mnew; if (bus_dmamap_load_mbuf(sc->sc_dmat, sd->sd_map, m, @@ -1451,6 +1453,13 @@ txp_start(ifp) } + /* + * if mnew isn't NULL, we already dequeued and copied + * the packet. + */ + if (mnew == NULL) + IFQ_DEQUEUE(&ifp->if_snd, m); + ifp->if_timer = 5; #if NBPFILTER > 0 @@ -1494,7 +1503,6 @@ oactive1: ifp->if_flags |= IFF_OACTIVE; r->r_prod = firstprod; r->r_cnt = firstcnt; - IF_PREPEND(&ifp->if_snd, m); } /* |