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/9f37834a98e0
branches: trunk
changeset: 986675:9f37834a98e0
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 f1d8d13c0d10 -r 9f37834a98e0 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
@@ -5511,7 +5511,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__));
@@ -5740,8 +5739,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);
@@ -5750,6 +5749,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