diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2017-02-11 10:34:24 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2017-02-11 10:34:24 +0000 |
commit | 4a448c36838fabcbf367a81c10f233c790a0e343 (patch) | |
tree | b1f59b4b395799225b13f9d4e78e4f1a8921b103 /sys/arch/sgi | |
parent | e6852f521ce86c34e228901e29c3426f2829a851 (diff) |
Simplify ifq_deq_{begin,rollback,commit} sequence to ifq_dequeue.
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r-- | sys/arch/sgi/dev/if_iec.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sys/arch/sgi/dev/if_iec.c b/sys/arch/sgi/dev/if_iec.c index d0083e465b1..752691eafe5 100644 --- a/sys/arch/sgi/dev/if_iec.c +++ b/sys/arch/sgi/dev/if_iec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iec.c,v 1.23 2017/01/22 10:17:37 dlg Exp $ */ +/* $OpenBSD: if_iec.c,v 1.24 2017/02/11 10:34:23 visa Exp $ */ /* * Copyright (c) 2009 Miodrag Vallat. @@ -755,17 +755,12 @@ iec_start(struct ifnet *ifp) DPRINTF(IEC_DEBUG_START, ("iec_start: opending = %d, firstdirty = %d\n", opending, firstdirty)); - for (;;) { + while (sc->sc_txpending < IEC_NTXDESC) { /* Grab a packet off the queue. */ - m0 = ifq_deq_begin(&ifp->if_snd); + m0 = ifq_dequeue(&ifp->if_snd); if (m0 == NULL) break; - if (sc->sc_txpending == IEC_NTXDESC) { - ifq_deq_rollback(&ifp->if_snd, m0); - break; - } - /* * Get the next available transmit descriptor. */ @@ -778,7 +773,6 @@ iec_start(struct ifnet *ifp) DPRINTF(IEC_DEBUG_START, ("iec_start: len = %d, nexttx = %d\n", len, nexttx)); - ifq_deq_commit(&ifp->if_snd, m0); if (len <= IEC_TXD_BUFSIZE) { /* * If the packet is small enough, |