summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>1999-04-05 17:01:52 +0000
committern_hibma <n_hibma@FreeBSD.org>1999-04-05 17:01:52 +0000
commit2b2b7fe409e2dcbbeef1827ba9e45dcd4b8d4510 (patch)
tree27d865ed11c94b8832618c1e0c7bc239c757e293 /sys
parent28295ed7efd3d3aea1f6922ac5349b3e0a66e498 (diff)
downloadFreeBSD-src-2b2b7fe409e2dcbbeef1827ba9e45dcd4b8d4510.zip
FreeBSD-src-2b2b7fe409e2dcbbeef1827ba9e45dcd4b8d4510.tar.gz
bugfix: initialise timeout for usbd_device_request as well.
moved statements around to reflect sequence in the struct, to make finding these discrepancies easier.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/usbdi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c
index 0e63635..7c99104 100644
--- a/sys/dev/usb/usbdi.c
+++ b/sys/dev/usb/usbdi.c
@@ -265,15 +265,16 @@ usbd_setup_request(reqh, pipe, priv, buffer, length, flags, timeout, callback)
usbd_status));
{
reqh->pipe = pipe;
- reqh->isreq = 0;
reqh->priv = priv;
reqh->buffer = buffer;
reqh->length = length;
reqh->actlen = 0;
reqh->flags = flags;
- reqh->callback = callback;
+ reqh->timeout = timeout;
reqh->status = USBD_NOT_STARTED;
+ reqh->callback = callback;
reqh->retries = 1;
+ reqh->isreq = 0;
return (USBD_NORMAL_COMPLETION);
}
@@ -312,8 +313,8 @@ usbd_setup_default_request(reqh, dev, priv, timeout, req, buffer,
reqh->status = USBD_NOT_STARTED;
reqh->callback = callback;
reqh->request = *req;
- reqh->isreq = 1;
reqh->retries = 1;
+ reqh->isreq = 1;
return (USBD_NORMAL_COMPLETION);
}
OpenPOWER on IntegriCloud