diff options
author | 2013-04-26 14:28:39 +0000 | |
---|---|---|
committer | 2013-04-26 14:28:39 +0000 | |
commit | 431119e51d84c9108669a61e68e57d17cb7a2d86 (patch) | |
tree | 3af8248862e9ae0faf46becbe36b5c3f8d848197 | |
parent | Remove unused and ambiguous usbd_get_interface() function. (diff) | |
download | wireguard-openbsd-431119e51d84c9108669a61e68e57d17cb7a2d86.tar.xz wireguard-openbsd-431119e51d84c9108669a61e68e57d17cb7a2d86.zip |
Don't use usbd_bulk_transfer() to submit a synchronous transfer. This
function is badly named and should be used for transfers coming from
userland which is not the case here as synchronous transfers are only
used while configuring the device.
Note that the transfer submission code can be simplified now that sync
and async transfers use the standard setup_xfer()/transfer() method.
Tested by and ok mglocker@
-rw-r--r-- | sys/dev/usb/udl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/usb/udl.c b/sys/dev/usb/udl.c index da287bafa99..8423850539b 100644 --- a/sys/dev/usb/udl.c +++ b/sys/dev/usb/udl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udl.c,v 1.74 2013/04/17 17:49:58 tedu Exp $ */ +/* $OpenBSD: udl.c,v 1.75 2013/04/26 14:28:39 mpi Exp $ */ /* * Copyright (c) 2009 Marcus Glocker <mglocker@openbsd.org> @@ -1780,9 +1780,9 @@ udl_cmd_send(struct udl_softc *sc) bcopy(cb->buf, cx->buf, cb->off); len = cb->off; - error = usbd_bulk_transfer(cx->xfer, sc->sc_tx_pipeh, - USBD_NO_COPY | USBD_SHORT_XFER_OK, 1000, cx->buf, &len, - "udl_bulk_xmit"); + usbd_setup_xfer(cx->xfer, sc->sc_tx_pipeh, 0, cx->buf, len, + USBD_NO_COPY | USBD_SHORT_XFER_OK | USBD_SYNCHRONOUS, 1000, NULL); + error = usbd_transfer(cx->xfer); if (error != USBD_NORMAL_COMPLETION) { printf("%s: %s: %s!\n", DN(sc), FUNC, usbd_errstr(error)); /* we clear our buffer now to avoid growing out of bounds */ |