Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Change the way the HC done method is invoked a l...



details:   https://anonhg.NetBSD.org/src/rev/8876cb0e2b97
branches:  trunk
changeset: 481474:8876cb0e2b97
user:      augustss <augustss%NetBSD.org@localhost>
date:      Mon Jan 31 20:13:07 2000 +0000

description:
Change the way the HC done method is invoked a little.

diffstat:

 sys/dev/usb/usbdi.c |  24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)

diffs (59 lines):

diff -r 4e2f29866419 -r 8876cb0e2b97 sys/dev/usb/usbdi.c
--- a/sys/dev/usb/usbdi.c       Mon Jan 31 19:04:52 2000 +0000
+++ b/sys/dev/usb/usbdi.c       Mon Jan 31 20:13:07 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbdi.c,v 1.60 2000/01/19 00:23:58 augustss Exp $      */
+/*     $NetBSD: usbdi.c,v 1.61 2000/01/31 20:13:07 augustss Exp $      */
 /*     $FreeBSD: src/sys/dev/usb/usbdi.c,v 1.28 1999/11/17 22:33:49 n_hibma Exp $      */
 
 /*
@@ -607,6 +607,14 @@
        return (err);
 }
 
+void usbd_clear_endpoint_toggle(usbd_pipe_handle pipe); /* XXXXX */
+void
+usbd_clear_endpoint_toggle(pipe)
+       usbd_pipe_handle pipe;
+{
+       pipe->methods->cleartoggle(pipe);
+}
+
 usbd_status 
 usbd_endpoint_count(iface, count)
        usbd_interface_handle iface;
@@ -802,9 +810,6 @@
                }
        }
 
-       if (pipe->methods->done != NULL)
-               pipe->methods->done(xfer);
-
        if (!repeat) {
                /* Remove request from queue. */
 #ifdef DIAGNOSTIC
@@ -814,6 +819,8 @@
 #endif
                SIMPLEQ_REMOVE_HEAD(&pipe->queue, xfer, next);
        }
+       DPRINTFN(5,("usb_transfer_complete: repeat=%d new head=%p\n", 
+                   repeat, SIMPLEQ_FIRST(&pipe->queue)));
 
        /* Count completed transfers. */
        ++pipe->device->bus->stats.requests
@@ -830,6 +837,15 @@
        if (xfer->callback)
                xfer->callback(xfer, xfer->priv, xfer->status);
 
+#ifdef DIAGNOSTIC
+       if (pipe->methods->done != NULL)
+               pipe->methods->done(xfer);
+       else
+               printf("usb_transfer_complete: pipe->methods->done == NULL\n");
+#else
+       pipe->methods->done(xfer);
+#endif
+
        if ((xfer->flags & USBD_SYNCHRONOUS) && !polling)
                wakeup(xfer);
 



Home | Main Index | Thread Index | Old Index