Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Add some comments.



details:   https://anonhg.NetBSD.org/src/rev/72b34851278b
branches:  trunk
changeset: 475874:72b34851278b
user:      augustss <augustss%NetBSD.org@localhost>
date:      Sat Aug 28 10:04:01 1999 +0000

description:
Add some comments.

diffstat:

 sys/dev/usb/usbdi.c |  10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diffs (39 lines):

diff -r f233bcad53f0 -r 72b34851278b sys/dev/usb/usbdi.c
--- a/sys/dev/usb/usbdi.c       Sat Aug 28 10:03:38 1999 +0000
+++ b/sys/dev/usb/usbdi.c       Sat Aug 28 10:04:01 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbdi.c,v 1.32 1999/08/23 22:55:14 augustss Exp $      */
+/*     $NetBSD: usbdi.c,v 1.33 1999/08/28 10:04:01 augustss Exp $      */
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -426,7 +426,13 @@
        usbd_status r;
 
        DPRINTFN(8, ("usbd_clear_endpoint_stall\n"));
+
+       /* 
+        * Clearing en endpoint stall resets the enpoint toggle, so
+        * do the same to the HC toggle.
+        */
        pipe->methods->cleartoggle(pipe);
+
        req.bmRequestType = UT_WRITE_ENDPOINT;
        req.bRequest = UR_CLEAR_FEATURE;
        USETW(req.wValue, UF_ENDPOINT_HALT);
@@ -452,6 +458,7 @@
        usbd_status r;
 
        pipe->methods->cleartoggle(pipe);
+
        req.bmRequestType = UT_WRITE_ENDPOINT;
        req.bRequest = UR_CLEAR_FEATURE;
        USETW(req.wValue, UF_ENDPOINT_HALT);
@@ -594,6 +601,7 @@
                            pipe, reqh, pipe->methods));
                /* Make the HC abort it (and invoke the callback). */
                pipe->methods->abort(reqh);
+               /* XXX only for non-0 usbd_clear_endpoint_stall(pipe); */
        }
        return (USBD_NORMAL_COMPLETION);
 }



Home | Main Index | Thread Index | Old Index