From 2d669484feff0ccd79aef9b677eb867b57b4df7e Mon Sep 17 00:00:00 2001 From: patrick Date: Mon, 16 Jul 2018 13:41:19 +0000 Subject: [PATCH] In certain modes SDIO-connected bwfm(4) chips might expect us to read another packet (even though nextlen is set to none) to issue more RX interrupts. --- sys/dev/sdmmc/if_bwfm_sdio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/sdmmc/if_bwfm_sdio.c b/sys/dev/sdmmc/if_bwfm_sdio.c index fb902815cf2..ff0026019c4 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.20 2018/06/18 15:01:22 kettenis Exp $ */ +/* $OpenBSD: if_bwfm_sdio.c,v 1.21 2018/07/16 13:41:19 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation * Copyright (c) 2016,2017 Patrick Wildt @@ -1156,7 +1156,7 @@ bwfm_sdio_rx_frames(struct bwfm_sdio_softc *sc) swhdr = (struct bwfm_sdio_swhdr *)&hwhdr[1]; data = (char *)&swhdr[1]; - do { + for (;;) { /* If we know the next size, just read ahead. */ if (nextlen) { if (bwfm_sdio_frame_read_write(sc, sc->sc_bounce_buf, @@ -1249,7 +1249,7 @@ bwfm_sdio_rx_frames(struct bwfm_sdio_softc *sc) printf("%s: unknown channel\n", DEVNAME(sc)); break; } - } while (nextlen); + } } void -- 2.20.1