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 Don't hold any locks in tx/rx functions as...
details: https://anonhg.NetBSD.org/src-all/rev/f61d350a01c3
branches: trunk
changeset: 987682:f61d350a01c3
user: Nathanial Sloss <nat%netbsd.org@localhost>
date: Fri Aug 14 02:25:10 2020 +1000
description:
Don't hold any locks in tx/rx functions as they lock up the device and are
unnecessary as they were only a protection mechanism when allocating/freeing
usb transfer memory.
This was already guarded against by usb_pipe close functions.
diffstat:
sys/dev/usb/if_urtwn.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diffs (28 lines):
diff -r b6088244727d -r f61d350a01c3 sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c Fri Jul 03 12:05:49 2020 +1000
+++ b/sys/dev/usb/if_urtwn.c Fri Aug 14 02:25:10 2020 +1000
@@ -3020,15 +3020,11 @@
DPRINTFN(DBG_FN|DBG_RX, ("%s: %s: status=%d\n",
device_xname(sc->sc_dev), __func__, status));
- mutex_enter(&sc->sc_write_mtx);
- mutex_enter(&sc->sc_rx_mtx);
if (__predict_false(status != USBD_NORMAL_COMPLETION)) {
if (status == USBD_STALLED)
usbd_clear_endpoint_stall_async(sc->rx_pipe[pidx]);
else if (status != USBD_CANCELLED)
goto resubmit;
- mutex_exit(&sc->sc_rx_mtx);
- mutex_exit(&sc->sc_write_mtx);
return;
}
usbd_get_xfer_status(xfer, NULL, NULL, &len, NULL);
@@ -3092,8 +3088,6 @@
usbd_setup_xfer(xfer, data, data->buf, URTWN_RXBUFSZ,
USBD_SHORT_XFER_OK, USBD_NO_TIMEOUT, urtwn_rxeof);
(void)usbd_transfer(xfer);
- mutex_exit(&sc->sc_rx_mtx);
- mutex_exit(&sc->sc_write_mtx);
}
static void
Home |
Main Index |
Thread Index |
Old Index