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/4e22297a8014
branches: trunk
changeset: 371291:4e22297a8014
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 c1f678ae365a -r 4e22297a8014 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
@@ -5514,7 +5514,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__));
@@ -5743,8 +5742,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);
@@ -5753,6 +5752,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