diff options
| author | augustss <augustss@NetBSD.org> | 1999-05-09 14:36:42 +0000 |
|---|---|---|
| committer | augustss <augustss@NetBSD.org> | 1999-05-09 14:36:42 +0000 |
| commit | 63e051b6cf3f23cda2e5eb1a73d3ebeb25d7f0fb (patch) | |
| tree | 22322ab6006aacdf6232a4e097e77d832dc984d6 /sys/dev/usb | |
| parent | 86bb7f7d586cd740d375ebc4f50cc48c18bfe44a (diff) | |
Minor rearrengment for better readability.
Diffstat (limited to 'sys/dev/usb')
| -rw-r--r-- | sys/dev/usb/usbdi.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index 944de67ec04..34076d50eb8 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi.c,v 1.21 1999/01/10 19:13:16 augustss Exp $ */ +/* $NetBSD: usbdi.c,v 1.22 1999/05/09 14:36:42 augustss Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -264,15 +264,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); } @@ -311,8 +312,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); } @@ -484,6 +485,7 @@ usbd_clear_endpoint_stall(pipe) usb_device_request_t req; usbd_status r; + DPRINTFN(8, ("usbd_clear_endpoint_stall\n")); req.bmRequestType = UT_WRITE_ENDPOINT; req.bRequest = UR_CLEAR_FEATURE; USETW(req.wValue, UF_ENDPOINT_HALT); @@ -945,6 +947,7 @@ usbd_transfer_cb(reqh) { usbd_pipe_handle pipe = reqh->pipe; + DPRINTFN(10, ("usbd_transfer_cb: reqh=%p\n", reqh)); /* Count completed transfers. */ ++pipe->device->bus->stats.requests [pipe->endpoint->edesc->bmAttributes & UE_XFERTYPE]; @@ -966,6 +969,7 @@ static void usbd_sync_transfer_cb(reqh) usbd_request_handle reqh; { + DPRINTFN(10, ("usbd_sync_transfer_cb: reqh=%p\n", reqh)); usbd_transfer_cb(reqh); if (!reqh->pipe->device->bus->use_polling) wakeup(reqh); |
