Module Name:    src
Committed By:   skrll
Date:           Wed Dec  3 23:05:07 UTC 2014

Modified Files:
        src/sys/conf [nick-nhusb]: files
        src/sys/dev/ic [nick-nhusb]: sl811hs.c
        src/sys/dev/usb [nick-nhusb]: ehci.c motg.c ohci.c uhci.c xhci.c
        src/sys/external/bsd/dwc2 [nick-nhusb]: dwc2.c
        src/sys/rump/dev/lib/libugenhc [nick-nhusb]: ugenhc.c
        src/sys/rump/dev/lib/libusb [nick-nhusb]: Makefile
Added Files:
        src/sys/dev/usb [nick-nhusb]: usbroothub.c usbroothub.h
Removed Files:
        src/sys/dev/usb [nick-nhusb]: usbroothub_subr.c usbroothub_subr.h

Log Message:
Rename usbroothub_subr.[ch] to usbroothub.[ch]


To generate a diff of this commit:
cvs rdiff -u -r1.1121.2.1 -r1.1121.2.2 src/sys/conf/files
cvs rdiff -u -r1.47.6.8 -r1.47.6.9 src/sys/dev/ic/sl811hs.c
cvs rdiff -u -r1.234.2.11 -r1.234.2.12 src/sys/dev/usb/ehci.c
cvs rdiff -u -r1.12.2.7 -r1.12.2.8 src/sys/dev/usb/motg.c
cvs rdiff -u -r1.254.2.10 -r1.254.2.11 src/sys/dev/usb/ohci.c
cvs rdiff -u -r1.264.4.10 -r1.264.4.11 src/sys/dev/usb/uhci.c
cvs rdiff -u -r0 -r1.1.2.1 src/sys/dev/usb/usbroothub.c \
    src/sys/dev/usb/usbroothub.h
cvs rdiff -u -r1.1 -r0 src/sys/dev/usb/usbroothub_subr.c \
    src/sys/dev/usb/usbroothub_subr.h
cvs rdiff -u -r1.28.2.10 -r1.28.2.11 src/sys/dev/usb/xhci.c
cvs rdiff -u -r1.32.2.7 -r1.32.2.8 src/sys/external/bsd/dwc2/dwc2.c
cvs rdiff -u -r1.22.4.5 -r1.22.4.6 src/sys/rump/dev/lib/libugenhc/ugenhc.c
cvs rdiff -u -r1.6 -r1.6.32.1 src/sys/rump/dev/lib/libusb/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/conf/files
diff -u src/sys/conf/files:1.1121.2.1 src/sys/conf/files:1.1121.2.2
--- src/sys/conf/files:1.1121.2.1	Tue Dec  2 09:00:33 2014
+++ src/sys/conf/files	Wed Dec  3 23:05:06 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.1121.2.1 2014/12/02 09:00:33 skrll Exp $
+#	$NetBSD: files,v 1.1121.2.2 2014/12/03 23:05:06 skrll Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20141030
@@ -1207,7 +1207,7 @@ define	sdmmcbus { }			# SD/MMC attachmen
 #
 
 define	usbroothub
-file	dev/usb/usbroothub_subr.c	usbroothub
+file	dev/usb/usbroothub.c	usbroothub
 
 define	usb_dma
 

Index: src/sys/dev/ic/sl811hs.c
diff -u src/sys/dev/ic/sl811hs.c:1.47.6.8 src/sys/dev/ic/sl811hs.c:1.47.6.9
--- src/sys/dev/ic/sl811hs.c:1.47.6.8	Wed Dec  3 22:40:55 2014
+++ src/sys/dev/ic/sl811hs.c	Wed Dec  3 23:05:06 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: sl811hs.c,v 1.47.6.8 2014/12/03 22:40:55 skrll Exp $	*/
+/*	$NetBSD: sl811hs.c,v 1.47.6.9 2014/12/03 23:05:06 skrll Exp $	*/
 
 /*
  * Not (c) 2007 Matthew Orgass
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.47.6.8 2014/12/03 22:40:55 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.47.6.9 2014/12/03 23:05:06 skrll Exp $");
 
 #include "opt_slhci.h"
 
@@ -90,7 +90,7 @@ __KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 
 #include <dev/usb/usbdivar.h>
 #include <dev/usb/usb_mem.h>
 #include <dev/usb/usbdevs.h>
-#include <dev/usb/usbroothub_subr.h>
+#include <dev/usb/usbroothub.h>
 
 #include <dev/ic/sl811hsreg.h>
 #include <dev/ic/sl811hsvar.h>

Index: src/sys/dev/usb/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.234.2.11 src/sys/dev/usb/ehci.c:1.234.2.12
--- src/sys/dev/usb/ehci.c:1.234.2.11	Wed Dec  3 22:40:55 2014
+++ src/sys/dev/usb/ehci.c	Wed Dec  3 23:05:06 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.234.2.11 2014/12/03 22:40:55 skrll Exp $ */
+/*	$NetBSD: ehci.c,v 1.234.2.12 2014/12/03 23:05:06 skrll Exp $ */
 
 /*
  * Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.11 2014/12/03 22:40:55 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.234.2.12 2014/12/03 23:05:06 skrll Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -81,7 +81,7 @@ __KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.2
 #include <dev/usb/usbhist.h>
 #include <dev/usb/usb_mem.h>
 #include <dev/usb/usb_quirks.h>
-#include <dev/usb/usbroothub_subr.h>
+#include <dev/usb/usbroothub.h>
 
 #include <dev/usb/ehcireg.h>
 #include <dev/usb/ehcivar.h>

Index: src/sys/dev/usb/motg.c
diff -u src/sys/dev/usb/motg.c:1.12.2.7 src/sys/dev/usb/motg.c:1.12.2.8
--- src/sys/dev/usb/motg.c:1.12.2.7	Wed Dec  3 22:42:41 2014
+++ src/sys/dev/usb/motg.c	Wed Dec  3 23:05:06 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: motg.c,v 1.12.2.7 2014/12/03 22:42:41 skrll Exp $	*/
+/*	$NetBSD: motg.c,v 1.12.2.8 2014/12/03 23:05:06 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012, 2014 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
 #include "opt_motg.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.12.2.7 2014/12/03 22:42:41 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.12.2.8 2014/12/03 23:05:06 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -71,7 +71,7 @@ __KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.1
 #endif
 
 #include <dev/usb/motgvar.h>
-#include <dev/usb/usbroothub_subr.h>
+#include <dev/usb/usbroothub.h>
 
 #define MOTG_DEBUG
 #ifdef MOTG_DEBUG

Index: src/sys/dev/usb/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.254.2.10 src/sys/dev/usb/ohci.c:1.254.2.11
--- src/sys/dev/usb/ohci.c:1.254.2.10	Wed Dec  3 22:40:55 2014
+++ src/sys/dev/usb/ohci.c	Wed Dec  3 23:05:06 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci.c,v 1.254.2.10 2014/12/03 22:40:55 skrll Exp $	*/
+/*	$NetBSD: ohci.c,v 1.254.2.11 2014/12/03 23:05:06 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.10 2014/12/03 22:40:55 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.254.2.11 2014/12/03 23:05:06 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -63,7 +63,7 @@ __KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.2
 
 #include <dev/usb/ohcireg.h>
 #include <dev/usb/ohcivar.h>
-#include <dev/usb/usbroothub_subr.h>
+#include <dev/usb/usbroothub.h>
 
 
 

Index: src/sys/dev/usb/uhci.c
diff -u src/sys/dev/usb/uhci.c:1.264.4.10 src/sys/dev/usb/uhci.c:1.264.4.11
--- src/sys/dev/usb/uhci.c:1.264.4.10	Wed Dec  3 22:40:55 2014
+++ src/sys/dev/usb/uhci.c	Wed Dec  3 23:05:06 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhci.c,v 1.264.4.10 2014/12/03 22:40:55 skrll Exp $	*/
+/*	$NetBSD: uhci.c,v 1.264.4.11 2014/12/03 23:05:06 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.10 2014/12/03 22:40:55 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.264.4.11 2014/12/03 23:05:06 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -66,7 +66,7 @@ __KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.2
 
 #include <dev/usb/uhcireg.h>
 #include <dev/usb/uhcivar.h>
-#include <dev/usb/usbroothub_subr.h>
+#include <dev/usb/usbroothub.h>
 
 /* Use bandwidth reclamation for control transfers. Some devices choke on it. */
 /*#define UHCI_CTL_LOOP */

Index: src/sys/dev/usb/xhci.c
diff -u src/sys/dev/usb/xhci.c:1.28.2.10 src/sys/dev/usb/xhci.c:1.28.2.11
--- src/sys/dev/usb/xhci.c:1.28.2.10	Wed Dec  3 22:40:55 2014
+++ src/sys/dev/usb/xhci.c	Wed Dec  3 23:05:06 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci.c,v 1.28.2.10 2014/12/03 22:40:55 skrll Exp $	*/
+/*	$NetBSD: xhci.c,v 1.28.2.11 2014/12/03 23:05:06 skrll Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.28.2.10 2014/12/03 22:40:55 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.28.2.11 2014/12/03 23:05:06 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -56,7 +56,7 @@ __KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.2
 
 #include <dev/usb/xhcireg.h>
 #include <dev/usb/xhcivar.h>
-#include <dev/usb/usbroothub_subr.h>
+#include <dev/usb/usbroothub.h>
 
 
 #ifdef USB_DEBUG

Index: src/sys/external/bsd/dwc2/dwc2.c
diff -u src/sys/external/bsd/dwc2/dwc2.c:1.32.2.7 src/sys/external/bsd/dwc2/dwc2.c:1.32.2.8
--- src/sys/external/bsd/dwc2/dwc2.c:1.32.2.7	Wed Dec  3 22:40:55 2014
+++ src/sys/external/bsd/dwc2/dwc2.c	Wed Dec  3 23:05:06 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: dwc2.c,v 1.32.2.7 2014/12/03 22:40:55 skrll Exp $	*/
+/*	$NetBSD: dwc2.c,v 1.32.2.8 2014/12/03 23:05:06 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.32.2.7 2014/12/03 22:40:55 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.32.2.8 2014/12/03 23:05:06 skrll Exp $");
 
 #include "opt_usb.h"
 
@@ -51,7 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.3
 #include <dev/usb/usbdivar.h>
 #include <dev/usb/usb_mem.h>
 
-#include <dev/usb/usbroothub_subr.h>
+#include <dev/usb/usbroothub.h>
 
 #include <dwc2/dwc2.h>
 #include <dwc2/dwc2var.h>

Index: src/sys/rump/dev/lib/libugenhc/ugenhc.c
diff -u src/sys/rump/dev/lib/libugenhc/ugenhc.c:1.22.4.5 src/sys/rump/dev/lib/libugenhc/ugenhc.c:1.22.4.6
--- src/sys/rump/dev/lib/libugenhc/ugenhc.c:1.22.4.5	Wed Dec  3 22:40:55 2014
+++ src/sys/rump/dev/lib/libugenhc/ugenhc.c	Wed Dec  3 23:05:07 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ugenhc.c,v 1.22.4.5 2014/12/03 22:40:55 skrll Exp $	*/
+/*	$NetBSD: ugenhc.c,v 1.22.4.6 2014/12/03 23:05:07 skrll Exp $	*/
 
 /*
  * Copyright (c) 2009, 2010 Antti Kantee.  All Rights Reserved.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ugenhc.c,v 1.22.4.5 2014/12/03 22:40:55 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ugenhc.c,v 1.22.4.6 2014/12/03 23:05:07 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -78,7 +78,7 @@ __KERNEL_RCSID(0, "$NetBSD: ugenhc.c,v 1
 #include <dev/usb/usbhid.h>
 #include <dev/usb/usbdivar.h>
 #include <dev/usb/usb_mem.h>
-#include <dev/usb/usbroothub_subr.h>
+#include <dev/usb/usbroothub.h>
 
 #include <rump/rumpuser.h>
 

Index: src/sys/rump/dev/lib/libusb/Makefile
diff -u src/sys/rump/dev/lib/libusb/Makefile:1.6 src/sys/rump/dev/lib/libusb/Makefile:1.6.32.1
--- src/sys/rump/dev/lib/libusb/Makefile:1.6	Mon Jan 31 00:10:06 2011
+++ src/sys/rump/dev/lib/libusb/Makefile	Wed Dec  3 23:05:07 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2011/01/31 00:10:06 christos Exp $
+#	$NetBSD: Makefile,v 1.6.32.1 2014/12/03 23:05:07 skrll Exp $
 #
 
 .PATH:	${.CURDIR}/../../../../dev/usb
@@ -9,7 +9,7 @@ LIB=	rumpdev_usb
 IOCONF= USB.ioconf
 
 SRCS=	usb.c usbdi.c usbdi_util.c usb_mem.c usb_subr.c usb_quirks.c	\
-	uhub.c usbroothub_subr.c usb_verbose.c
+	uhub.c usbroothub.c usb_verbose.c
 SRCS+=	usb_at_ugenhc.c
 .else
 SRCS=	dummy.c

Added files:

Index: src/sys/dev/usb/usbroothub.c
diff -u /dev/null src/sys/dev/usb/usbroothub.c:1.1.2.1
--- /dev/null	Wed Dec  3 23:05:07 2014
+++ src/sys/dev/usb/usbroothub.c	Wed Dec  3 23:05:06 2014
@@ -0,0 +1,66 @@
+/* $NetBSD: usbroothub.c,v 1.1.2.1 2014/12/03 23:05:06 skrll Exp $ */
+
+/*
+ * Copyright (c) 2008
+ *	Matthias Drochner.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include <dev/usb/usb.h>
+#include <dev/usb/usbroothub.h>
+
+/* helper functions for USB root hub emulation */
+
+int
+usb_makestrdesc(usb_string_descriptor_t *p, int l, const char *s)
+{
+	int i;
+
+	if (l == 0)
+		return (0);
+	p->bLength = 2 * strlen(s) + 2;
+	if (l == 1)
+		return (1);
+	p->bDescriptorType = UDESC_STRING;
+	l -= 2;
+	/* poor man's utf-16le conversion */
+	for (i = 0; s[i] && l > 1; i++, l -= 2)
+		USETW2(p->bString[i], 0, s[i]);
+	return (2 * i + 2);
+}
+
+int
+usb_makelangtbl(usb_string_descriptor_t *p, int l)
+{
+
+	if (l == 0)
+		return (0);
+	p->bLength = 4;
+	if (l == 1)
+		return (1);
+	p->bDescriptorType = UDESC_STRING;
+	if (l <  4)
+		return (2);
+	USETW(p->bString[0], 0x0409); /* english/US */
+	return (4);
+}
Index: src/sys/dev/usb/usbroothub.h
diff -u /dev/null src/sys/dev/usb/usbroothub.h:1.1.2.1
--- /dev/null	Wed Dec  3 23:05:07 2014
+++ src/sys/dev/usb/usbroothub.h	Wed Dec  3 23:05:06 2014
@@ -0,0 +1,4 @@
+/* $NetBSD: usbroothub.h,v 1.1.2.1 2014/12/03 23:05:06 skrll Exp $ */
+
+int usb_makestrdesc(usb_string_descriptor_t *, int, const char *);
+int usb_makelangtbl(usb_string_descriptor_t *, int);

Reply via email to