diff options
author | 2002-07-09 17:41:02 +0000 | |
---|---|---|
committer | 2002-07-09 17:41:02 +0000 | |
commit | 3991d1e84c6be7d293601050f4fdf85478ca5c98 (patch) | |
tree | 0d3580b29dd390f520833a00490befd0235d6546 /sys/dev/usb/usbdi.c | |
parent | I am getting sick of telling people to use the style of the code they change (diff) | |
download | wireguard-openbsd-3991d1e84c6be7d293601050f4fdf85478ca5c98.tar.xz wireguard-openbsd-3991d1e84c6be7d293601050f4fdf85478ca5c98.zip |
make the timeout a function parameter
From NetBSD
Diffstat (limited to 'sys/dev/usb/usbdi.c')
-rw-r--r-- | sys/dev/usb/usbdi.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index 012409d05d3..069457a94a6 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usbdi.c,v 1.18 2002/05/07 18:29:19 nate Exp $ */ +/* $OpenBSD: usbdi.c,v 1.19 2002/07/09 17:41:02 nate Exp $ */ /* $NetBSD: usbdi.c,v 1.81 2001/04/17 00:05:33 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usbdi.c,v 1.28 1999/11/17 22:33:49 n_hibma Exp $ */ @@ -861,20 +861,22 @@ usbd_start_next(usbd_pipe_handle pipe) usbd_status usbd_do_request(usbd_device_handle dev, usb_device_request_t *req, void *data) { - return (usbd_do_request_flags(dev, req, data, 0, 0)); + return (usbd_do_request_flags(dev, req, data, 0, 0, + USBD_DEFAULT_TIMEOUT)); } usbd_status usbd_do_request_flags(usbd_device_handle dev, usb_device_request_t *req, - void *data, u_int16_t flags, int *actlen) + void *data, u_int16_t flags, int *actlen, u_int32_t timo) { return (usbd_do_request_flags_pipe(dev, dev->default_pipe, req, - data, flags, actlen)); + data, flags, actlen, timo)); } usbd_status usbd_do_request_flags_pipe(usbd_device_handle dev, usbd_pipe_handle pipe, - usb_device_request_t *req, void *data, u_int16_t flags, int *actlen) + usb_device_request_t *req, void *data, u_int16_t flags, int *actlen, + u_int32_t timeout) { usbd_xfer_handle xfer; usbd_status err; @@ -893,7 +895,7 @@ usbd_do_request_flags_pipe(usbd_device_handle dev, usbd_pipe_handle pipe, xfer = usbd_alloc_xfer(dev); if (xfer == NULL) return (USBD_NOMEM); - usbd_setup_default_xfer(xfer, dev, 0, USBD_DEFAULT_TIMEOUT, req, + usbd_setup_default_xfer(xfer, dev, 0, timeout, req, data, UGETW(req->wLength), flags, 0); xfer->pipe = pipe; err = usbd_sync_transfer(xfer); |