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/ab29ddc271bb
branches: trunk
changeset: 951189:ab29ddc271bb
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 d58ded2391c3 -r ab29ddc271bb 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
@@ -5506,7 +5506,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__));
@@ -5735,8 +5734,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);
@@ -5745,6 +5744,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