summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>1999-08-29 10:35:36 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>1999-08-29 10:35:36 +0000
commitcd000567ec6ecb70bb54852a6d82bd419937c4ce (patch)
tree87c24e716ae251e497e4fa2ff09351f89a648c04
parent1c561541d6447c52ff3332aea30b3ed72542b6b8 (diff)
Sync with NetBSD;
Add some comments. Change a type name.
-rw-r--r--sys/dev/usb/TODO2
-rw-r--r--sys/dev/usb/devlist2h.awk8
-rw-r--r--sys/dev/usb/ugen.c6
-rw-r--r--sys/dev/usb/usbdi.c12
4 files changed, 19 insertions, 9 deletions
diff --git a/sys/dev/usb/TODO b/sys/dev/usb/TODO
index 7c5458c7eb5..45d1d002890 100644
--- a/sys/dev/usb/TODO
+++ b/sys/dev/usb/TODO
@@ -1,6 +1,8 @@
Some things that need to be done in no particular order:
--------------------------------------------------------
+Add lots of bus_dmamap_sync().
+
Implement isochronous transfer mode.
Implement audio driver.
diff --git a/sys/dev/usb/devlist2h.awk b/sys/dev/usb/devlist2h.awk
index 43e4407532d..50b8db5b2f1 100644
--- a/sys/dev/usb/devlist2h.awk
+++ b/sys/dev/usb/devlist2h.awk
@@ -1,6 +1,6 @@
#! /usr/bin/awk -f
-# $OpenBSD: devlist2h.awk,v 1.1 1999/08/13 05:28:03 fgsch Exp $
-# $NetBSD: devlist2h.awk,v 1.5 1999/04/03 18:59:51 augustss Exp $
+# $OpenBSD: devlist2h.awk,v 1.2 1999/08/29 10:35:35 fgsch Exp $
+# $NetBSD: devlist2h.awk,v 1.7 1999/08/28 10:01:42 augustss Exp $
#
# Copyright (c) 1995, 1996 Christopher G. Demetriou
# All rights reserved.
@@ -42,7 +42,7 @@ NR == 1 {
if (os == "NetBSD")
printf("/*\t\$NetBSD\$\t*/\n\n") > dfile
else if (os == "FreeBSD")
- printf("/*\tFreeBSD \$Id\$\t*/\n\n") > dfile
+ printf("/*\t\$FreeBSD\$\t*/\n\n") > dfile
else if (os == "OpenBSD")
printf("/*\t\$OpenBSD\$\t*/\n\n") > dfile
else
@@ -58,7 +58,7 @@ NR == 1 {
if (os == "NetBSD")
printf("/*\t\$NetBSD\$\t*/\n\n") > hfile
else if (os == "FreeBSD")
- printf("/*\tFreeBSD \$Id\$\t*/\n\n") > hfile
+ printf("/*\t\$FreeBSD\$\t*/\n\n") > hfile
else if (os == "OpenBSD")
printf("/*\t\$OpenBSD\$\t*/\n\n") > hfile
else
diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c
index 62e9d262951..f3ec242c4e1 100644
--- a/sys/dev/usb/ugen.c
+++ b/sys/dev/usb/ugen.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: ugen.c,v 1.3 1999/08/27 09:00:28 fgsch Exp $ */
-/* $NetBSD: ugen.c,v 1.18 1999/08/23 22:55:14 augustss Exp $ */
+/* $OpenBSD: ugen.c,v 1.4 1999/08/29 10:35:35 fgsch Exp $ */
+/* $NetBSD: ugen.c,v 1.19 1999/08/28 10:01:59 augustss Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -95,7 +95,7 @@ struct ugen_endpoint {
struct ugen_softc {
bdevice sc_dev; /* base device */
- struct usbd_device *sc_udev;
+ usbd_device_handle sc_udev;
char sc_is_open[USB_MAX_ENDPOINTS];
struct ugen_endpoint sc_endpoints[USB_MAX_ENDPOINTS][2];
diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c
index 319c555f52a..76e73d79ff7 100644
--- a/sys/dev/usb/usbdi.c
+++ b/sys/dev/usb/usbdi.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: usbdi.c,v 1.4 1999/08/27 09:00:30 fgsch Exp $ */
-/* $NetBSD: usbdi.c,v 1.32 1999/08/23 22:55:14 augustss Exp $ */
+/* $OpenBSD: usbdi.c,v 1.5 1999/08/29 10:35:35 fgsch Exp $ */
+/* $NetBSD: usbdi.c,v 1.33 1999/08/28 10:04:01 augustss Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -427,7 +427,13 @@ usbd_clear_endpoint_stall(pipe)
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);
@@ -453,6 +459,7 @@ usbd_clear_endpoint_stall_async(pipe)
usbd_status r;
pipe->methods->cleartoggle(pipe);
+
req.bmRequestType = UT_WRITE_ENDPOINT;
req.bRequest = UR_CLEAR_FEATURE;
USETW(req.wValue, UF_ENDPOINT_HALT);
@@ -595,6 +602,7 @@ usbd_ar_pipe(pipe)
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);
}