diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2018-05-16 14:10:27 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2018-05-16 14:10:27 +0000 |
commit | d3cb355fa2aa377efebbeeeb7f9d2cd732761849 (patch) | |
tree | b258991cebc35ada4e8fade17d2d12229555fbb8 /sys | |
parent | 436c511a15122d09c60ca1528dc9525085a442b2 (diff) |
After having finished transmitting the last mbuf, don't just return to
the caller. Otherwise we skip restarting the ifq which means that if
we ever have a full queue and go oactive, there is no coming back. So
break out from the loop and call ifq restart if the queue is not full.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/sdmmc/if_bwfm_sdio.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/sdmmc/if_bwfm_sdio.c b/sys/dev/sdmmc/if_bwfm_sdio.c index 732b0098d93..10c402544e2 100644 --- a/sys/dev/sdmmc/if_bwfm_sdio.c +++ b/sys/dev/sdmmc/if_bwfm_sdio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bwfm_sdio.c,v 1.8 2018/05/16 08:20:00 patrick Exp $ */ +/* $OpenBSD: if_bwfm_sdio.c,v 1.9 2018/05/16 14:10:26 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation * Copyright (c) 2016,2017 Patrick Wildt <patrick@blueri.se> @@ -962,7 +962,7 @@ bwfm_sdio_tx_dataframe(struct bwfm_sdio_softc *sc) for (;;) { m = mq_dequeue(&sc->sc_txdata_queue); if (m == NULL) - return; + break; len = sizeof(*hwhdr) + sizeof(*swhdr) + sizeof(*bcdc) + m->m_pkthdr.len; @@ -993,7 +993,8 @@ bwfm_sdio_tx_dataframe(struct bwfm_sdio_softc *sc) m_freem(m); } - ifq_restart(&ifp->if_snd); + if (!mq_full(&sc->sc_txdata_queue)) + ifq_restart(&ifp->if_snd); } void |