Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src-draft/trunk]: src/sys/dev/usb Simplify queueing of rx transfers.
details: https://anonhg.NetBSD.org/src-all/rev/f5372aafb042
branches: trunk
changeset: 361188:f5372aafb042
user: Nathanial Sloss <nat%netbsd.org@localhost>
date: Sun May 03 07:04:28 2020 +1000
description:
Simplify queueing of rx transfers.
diffstat:
sys/dev/usb/if_urtwn.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 7dfc87fcda14 -r f5372aafb042 sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c Sun May 03 06:44:30 2020 +1000
+++ b/sys/dev/usb/if_urtwn.c Sun May 03 07:04:28 2020 +1000
@@ -5512,7 +5512,6 @@
struct urtwn_softc *sc = ic->ic_softc;
struct urtwn_rx_data *data;
uint32_t reg;
- size_t i;
int error;
DPRINTFN(DBG_FN, ("%s: %s\n", device_xname(sc->sc_dev), __func__));
@@ -5741,8 +5740,8 @@
/* Queue Rx xfers. */
for (size_t j = 0; j < sc->rx_npipe; j++) {
- for (i = 0; i < URTWN_RX_LIST_COUNT/ sc->rx_npipe; i++) {
- data = &sc->rx_data[j][i];
+ mutex_enter(&sc->sc_rx_mtx);
+ TAILQ_FOREACH(data, &sc->rx_free_list[j], next) {
usbd_setup_xfer(data->xfer, data, data->buf,
URTWN_RXBUFSZ, USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT,
urtwn_rxeof);
@@ -5751,6 +5750,7 @@
error != USBD_IN_PROGRESS))
goto fail;
}
+ mutex_exit(&sc->sc_rx_mtx);
}
/* We're ready to go. */
Home |
Main Index |
Thread Index |
Old Index