diff options
| author | thorpej <thorpej@NetBSD.org> | 2022-08-20 19:04:07 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 2022-08-20 19:04:07 +0000 |
| commit | 8e38b97b4c812d7442ae25db10d0ed8e682cf1a0 (patch) | |
| tree | e02faa45229b57d72a9bccfa00ee6621d356661a /sys/dev | |
| parent | 25c2bfd5fb2b74256f5b13210434b06086ea436f (diff) | |
gfe_ifstart(): Replace "IF_DEQUEUE() -> IF_PREPEND() on failure" with
"IF_POLL() -> IF_DEQUEUE() on success".
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/marvell/if_gfe.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/marvell/if_gfe.c b/sys/dev/marvell/if_gfe.c index bcf32ef1add..66f107d7b95 100644 --- a/sys/dev/marvell/if_gfe.c +++ b/sys/dev/marvell/if_gfe.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_gfe.c,v 1.59 2021/08/07 16:19:13 thorpej Exp $ */ +/* $NetBSD: if_gfe.c,v 1.60 2022/08/20 19:04:07 thorpej Exp $ */ /* * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.59 2021/08/07 16:19:13 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_gfe.c,v 1.60 2022/08/20 19:04:07 thorpej Exp $"); #include "opt_inet.h" @@ -691,7 +691,7 @@ gfe_ifstart(struct ifnet *ifp) } for (;;) { - IF_DEQUEUE(&ifp->if_snd, m); + IF_POLL(&ifp->if_snd, m); if (m == NULL) { ifp->if_flags &= ~IFF_OACTIVE; GE_FUNC_EXIT(sc, ""); @@ -704,6 +704,8 @@ gfe_ifstart(struct ifnet *ifp) if (IF_QFULL(&sc->sc_txq[GE_TXPRIO_HI].txq_pendq)) break; + IF_DEQUEUE(&ifp->if_snd, m); + /* * Try to enqueue a mbuf to the device. If that fails, we * can always try to map the next mbuf. @@ -718,7 +720,6 @@ gfe_ifstart(struct ifnet *ifp) /* * Attempt to queue the mbuf for send failed. */ - IF_PREPEND(&ifp->if_snd, m); ifp->if_flags |= IFF_OACTIVE; GE_FUNC_EXIT(sc, "%%"); } |
