summaryrefslogtreecommitdiff
path: root/sys/dev/sdmmc
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2018-05-16 14:10:27 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2018-05-16 14:10:27 +0000
commitd3cb355fa2aa377efebbeeeb7f9d2cd732761849 (patch)
treeb258991cebc35ada4e8fade17d2d12229555fbb8 /sys/dev/sdmmc
parent436c511a15122d09c60ca1528dc9525085a442b2 (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/dev/sdmmc')
-rw-r--r--sys/dev/sdmmc/if_bwfm_sdio.c7
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