CVS commit: src/sys/dev/usb

2014-08-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Aug 13 06:26:32 UTC 2014

Modified Files:
src/sys/dev/usb: uhub.c

Log Message:
SS device detection needs more work. #if 0 previous attempt for now.

PR/49106: panic: ehci_open: bad device speed 4


To generate a diff of this commit:
cvs rdiff -u -r1.125 -r1.126 src/sys/dev/usb/uhub.c

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

Modified files:

Index: src/sys/dev/usb/uhub.c
diff -u src/sys/dev/usb/uhub.c:1.125 src/sys/dev/usb/uhub.c:1.126
--- src/sys/dev/usb/uhub.c:1.125	Tue Aug 12 13:36:40 2014
+++ src/sys/dev/usb/uhub.c	Wed Aug 13 06:26:32 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhub.c,v 1.125 2014/08/12 13:36:40 skrll Exp $	*/
+/*	$NetBSD: uhub.c,v 1.126 2014/08/13 06:26:32 skrll Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $	*/
 
 /*
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.125 2014/08/12 13:36:40 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.126 2014/08/13 06:26:32 skrll Exp $");
 
 #include 
 #include 
@@ -540,9 +540,12 @@ uhub_explore(usbd_device_handle dev)
 		}
 
 		/* Figure out device speed */
+#if 0
 		if (status & UPS_SUPER_SPEED)
 			speed = USB_SPEED_SUPER;
-		else if (status & UPS_HIGH_SPEED)
+		else
+#endif
+		if (status & UPS_HIGH_SPEED)
 			speed = USB_SPEED_HIGH;
 		else if (status & UPS_LOW_SPEED)
 			speed = USB_SPEED_LOW;



CVS commit: src/sys/arch/arm/arm32

2014-08-12 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Wed Aug 13 05:56:03 UTC 2014

Modified Files:
src/sys/arch/arm/arm32: pmap.c

Log Message:
Fix for PR/49107.
Make sure pmap_copy_page_xscale clears the ptes afters its done with them.


To generate a diff of this commit:
cvs rdiff -u -r1.295 -r1.296 src/sys/arch/arm/arm32/pmap.c

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

Modified files:

Index: src/sys/arch/arm/arm32/pmap.c
diff -u src/sys/arch/arm/arm32/pmap.c:1.295 src/sys/arch/arm/arm32/pmap.c:1.296
--- src/sys/arch/arm/arm32/pmap.c:1.295	Fri Jul 25 15:09:43 2014
+++ src/sys/arch/arm/arm32/pmap.c	Wed Aug 13 05:56:03 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.295 2014/07/25 15:09:43 matt Exp $	*/
+/*	$NetBSD: pmap.c,v 1.296 2014/08/13 05:56:03 matt Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -216,7 +216,7 @@
 #include 
 //#include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.295 2014/07/25 15:09:43 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.296 2014/08/13 05:56:03 matt Exp $");
 
 //#define PMAP_DEBUG
 #ifdef PMAP_DEBUG
@@ -5518,19 +5518,27 @@ pmap_copy_page_xscale(paddr_t src, paddr
 	 * the cache for the appropriate page. Invalidate the TLB
 	 * as required.
 	 */
-	*csrc_pte = L2_S_PROTO | src |
-	L2_S_PROT(PTE_KERNEL, VM_PROT_READ) |
-	L2_C | L2_XS_T_TEX(TEX_XSCALE_X);	/* mini-data */
+	const pt_entry_t nsrc_pte = L2_S_PROTO | src
+	| L2_S_PROT(PTE_KERNEL, VM_PROT_READ)
+	| L2_C | L2_XS_T_TEX(TEX_XSCALE_X);	/* mini-data */
+	l2pte_set(csrc_pte, nsrc_pte, 0);
 	PTE_SYNC(csrc_pte);
-	*cdst_pte = L2_S_PROTO | dst |
-	L2_S_PROT(PTE_KERNEL, VM_PROT_WRITE) |
-	L2_C | L2_XS_T_TEX(TEX_XSCALE_X);	/* mini-data */
+
+	const pt_entry_t ndst_pte = L2_S_PROTO | dst
+	| L2_S_PROT(PTE_KERNEL, VM_PROT_WRITE)
+	| L2_C | L2_XS_T_TEX(TEX_XSCALE_X);	/* mini-data */
+	l2pte_set(cdst_pte, ndst_pte, 0);
 	PTE_SYNC(cdst_pte);
+
 	cpu_tlb_flushD_SE(csrcp);
 	cpu_tlb_flushD_SE(cdstp);
 	cpu_cpwait();
 	bcopy_page(csrcp, cdstp);
 	xscale_cache_clean_minidata();
+	l2pte_reset(csrc_pte);
+	l2pte_reset(cdst_pte);
+	PTE_SYNC(csrc_pte);
+	PTE_SYNC(cdst_pte);
 }
 #endif /* ARM_MMU_XSCALE == 1 */
 



CVS commit: src/tests/lib/librumpclient

2014-08-12 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Aug 13 00:03:00 UTC 2014

Modified Files:
src/tests/lib/librumpclient: h_execthr.c

Log Message:
Update hardcoded fd expectations now that rump kernels open 0/1/2.
(since we exec, it's convenient to just assume the values of first 4 fds)


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/librumpclient/h_execthr.c

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

Modified files:

Index: src/tests/lib/librumpclient/h_execthr.c
diff -u src/tests/lib/librumpclient/h_execthr.c:1.2 src/tests/lib/librumpclient/h_execthr.c:1.3
--- src/tests/lib/librumpclient/h_execthr.c:1.2	Tue Mar  8 15:35:28 2011
+++ src/tests/lib/librumpclient/h_execthr.c	Wed Aug 13 00:03:00 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_execthr.c,v 1.2 2011/03/08 15:35:28 pooka Exp $	*/
+/*	$NetBSD: h_execthr.c,v 1.3 2014/08/13 00:03:00 pooka Exp $	*/
 
 /*
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -51,6 +51,11 @@ static int canreturn = 0;
  */
 #define NTHR 63
 
+#define P1_0 3
+#define P1_1 4
+#define P2_0 5
+#define P2_1 6
+
 static void *
 wrk(void *arg)
 {
@@ -110,14 +115,14 @@ main(int argc, char *argv[], char *envp[
 	if (execd) {
 		canreturn = 1;
 		if (pthread_create(&pt, NULL,
-		wrk, (void *)(uintptr_t)2) != 0)
+		wrk, (void *)(uintptr_t)P2_0) != 0)
 			errx(1, "exec pthread_create");
 
 		i = 37;
-		rump_sys_write(3, &i, sizeof(i));
+		rump_sys_write(P2_1, &i, sizeof(i));
 		pthread_join(pt, NULL);
 
-		n = rump_sys_read(0, &i, sizeof(i));
+		n = rump_sys_read(P1_0, &i, sizeof(i));
 		if (n != -1 || errno != EBADF)
 			errx(1, "post-exec cloexec works");
 
@@ -129,17 +134,17 @@ main(int argc, char *argv[], char *envp[
 		if (execd > 10)
 			exit(0);
 
-		rump_sys_close(2);
-		rump_sys_close(3);
+		rump_sys_close(P2_0);
+		rump_sys_close(P2_1);
 	}
 
 	if (rump_sys_pipe(p1) == -1)
 		err(1, "pipe1");
-	if (p1[0] != 0 || p1[1] != 1)
+	if (p1[0] != P1_0 || p1[1] != P1_1)
 		errx(1, "p1 assumptions failed %d %d", p1[0], p1[1]);
 	if (rump_sys_pipe(p2) == -1)
 		err(1, "pipe1");
-	if (p2[0] != 2 || p2[1] != 3)
+	if (p2[0] != P2_0 || p2[1] != P2_1)
 		errx(1, "p2 assumptions failed");
 	if (rump_sys_fcntl(p1[0], F_SETFD, FD_CLOEXEC) == -1)
 		err(1, "cloexec");



CVS commit: src/lib/librumphijack

2014-08-12 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Aug 12 23:47:09 UTC 2014

Modified Files:
src/lib/librumphijack: hijack.c

Log Message:
In case of no dup2'd fd's, make sure that F_CLOSEM for the
rump kernel starts from 0.

Fixes rumphijack fdoff test (notably, this bug had nothing to do with
fdoff, and was exposed >3 years after writing the test when rump kernels
started providing fd's 0/1/2)


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/lib/librumphijack/hijack.c

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

Modified files:

Index: src/lib/librumphijack/hijack.c
diff -u src/lib/librumphijack/hijack.c:1.109 src/lib/librumphijack/hijack.c:1.110
--- src/lib/librumphijack/hijack.c:1.109	Mon Jul 21 14:23:43 2014
+++ src/lib/librumphijack/hijack.c	Tue Aug 12 23:47:09 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: hijack.c,v 1.109 2014/07/21 14:23:43 gson Exp $	*/
+/*  $NetBSD: hijack.c,v 1.110 2014/08/12 23:47:09 pooka Exp $	*/
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
 #include 
 
 #if !defined(lint)
-__RCSID("$NetBSD: hijack.c,v 1.109 2014/07/21 14:23:43 gson Exp $");
+__RCSID("$NetBSD: hijack.c,v 1.110 2014/08/12 23:47:09 pooka Exp $");
 #endif
 
 #include 
@@ -1380,7 +1380,7 @@ fcntl(int fd, int cmd, ...)
 		 * for the file descriptors not dup2'd.
 		 */
 
-		for (i = 0, maxdup2 = 0; i <= DUP2HIGH; i++) {
+		for (i = 0, maxdup2 = -1; i <= DUP2HIGH; i++) {
 			if (dup2vec[i] & DUP2BIT) {
 int val;
 



CVS commit: src/distrib/sets/lists/comp

2014-08-12 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Tue Aug 12 20:57:59 UTC 2014

Modified Files:
src/distrib/sets/lists/comp: ad.aarch64

Log Message:
Fix c&p error: libisc.a->libirs.a


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/distrib/sets/lists/comp/ad.aarch64

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

Modified files:

Index: src/distrib/sets/lists/comp/ad.aarch64
diff -u src/distrib/sets/lists/comp/ad.aarch64:1.2 src/distrib/sets/lists/comp/ad.aarch64:1.3
--- src/distrib/sets/lists/comp/ad.aarch64:1.2	Sun Aug 10 23:26:48 2014
+++ src/distrib/sets/lists/comp/ad.aarch64	Tue Aug 12 20:57:59 2014
@@ -1,4 +1,4 @@
-# $NetBSD: ad.aarch64,v 1.2 2014/08/10 23:26:48 matt Exp $
+# $NetBSD: ad.aarch64,v 1.3 2014/08/12 20:57:59 matt Exp $
 ./usr/include/aarch64comp-c-include
 ./usr/include/aarch64/ansi.h			comp-c-include
 ./usr/include/aarch64/aout_machdep.h		comp-c-include
@@ -1379,7 +1379,7 @@
 ./usr/lib/oabi/libipsec.so			base-sys-shlib		compat,pic
 ./usr/lib/oabi/libipsec_p.a			comp-c-proflib		compat,profile
 ./usr/lib/oabi/libipsec_pic.a			comp-c-piclib		compat,pic,picinstall
-./usr/lib/oabi/libisc.acomp-c-lib		compat
+./usr/lib/oabi/libirs.acomp-c-lib		compat
 ./usr/lib/oabi/libirs.so			base-sys-shlib		compat,pic
 ./usr/lib/oabi/libirs_p.a			comp-c-proflib		compat,profile
 ./usr/lib/oabi/libirs_pic.a			comp-c-piclib		compat,pic,picinstall



CVS commit: src/sys/arch/powerpc

2014-08-12 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Aug 12 20:27:10 UTC 2014

Modified Files:
src/sys/arch/powerpc/fpu: fpu_emu.c
src/sys/arch/powerpc/include: mcontext.h reg.h
src/sys/arch/powerpc/powerpc: trap.c

Log Message:
Avoid unncessary use of double in the kernel. With this change,
a LLVM build kernel fully works on TWRP1025.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/powerpc/fpu/fpu_emu.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/powerpc/include/mcontext.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/powerpc/include/reg.h
cvs rdiff -u -r1.149 -r1.150 src/sys/arch/powerpc/powerpc/trap.c

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

Modified files:

Index: src/sys/arch/powerpc/fpu/fpu_emu.c
diff -u src/sys/arch/powerpc/fpu/fpu_emu.c:1.16 src/sys/arch/powerpc/fpu/fpu_emu.c:1.17
--- src/sys/arch/powerpc/fpu/fpu_emu.c:1.16	Mon Jul 23 04:13:06 2012
+++ src/sys/arch/powerpc/fpu/fpu_emu.c	Tue Aug 12 20:27:10 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpu_emu.c,v 1.16 2012/07/23 04:13:06 matt Exp $ */
+/*	$NetBSD: fpu_emu.c,v 1.17 2014/08/12 20:27:10 joerg Exp $ */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fpu_emu.c,v 1.16 2012/07/23 04:13:06 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_emu.c,v 1.17 2014/08/12 20:27:10 joerg Exp $");
 
 #include "opt_ddb.h"
 
@@ -324,7 +324,7 @@ fpu_execute(struct trapframe *tf, struct
 		 * Convert to/from single if needed, calculate addr,
 		 * and update index reg if needed.
 		 */
-		double buf;
+		uint64_t buf;
 		size_t size = sizeof(float);
 		int store, update;
 

Index: src/sys/arch/powerpc/include/mcontext.h
diff -u src/sys/arch/powerpc/include/mcontext.h:1.16 src/sys/arch/powerpc/include/mcontext.h:1.17
--- src/sys/arch/powerpc/include/mcontext.h:1.16	Thu Jul 24 18:19:13 2014
+++ src/sys/arch/powerpc/include/mcontext.h	Tue Aug 12 20:27:10 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: mcontext.h,v 1.16 2014/07/24 18:19:13 joerg Exp $	*/
+/*	$NetBSD: mcontext.h,v 1.17 2014/08/12 20:27:10 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -86,7 +86,11 @@ typedef	__greg_t	__gregset_t[_NGREG];
 #define	_REG_MQ		38		/* MQ Register (POWER only) */
 
 typedef struct {
+#ifdef _KERNEL
+	unsigned long long	__fpu_regs[32];	/* FP0-31 */
+#else
 	double		__fpu_regs[32];	/* FP0-31 */
+#endif
 	unsigned int	__fpu_fpscr;	/* FP Status and Control Register */
 	unsigned int	__fpu_valid;	/* Set together with _UC_FPU */
 } __fpregset_t;

Index: src/sys/arch/powerpc/include/reg.h
diff -u src/sys/arch/powerpc/include/reg.h:1.10 src/sys/arch/powerpc/include/reg.h:1.11
--- src/sys/arch/powerpc/include/reg.h:1.10	Tue Jan 18 01:02:54 2011
+++ src/sys/arch/powerpc/include/reg.h	Tue Aug 12 20:27:10 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: reg.h,v 1.10 2011/01/18 01:02:54 matt Exp $	*/
+/*	$NetBSD: reg.h,v 1.11 2014/08/12 20:27:10 joerg Exp $	*/
 
 #ifndef _POWERPC_REG_H_
 #define _POWERPC_REG_H_
@@ -58,8 +58,13 @@ struct reg {/* base registers */
 };
 
 struct fpreg {/* Floating Point registers */
+#ifdef _KERNEL
+	uint64_t fpreg[32];
+	uint64_t fpscr;			/* Status and Control Register */
+#else
 	double fpreg[32];
 	double fpscr;			/* Status and Control Register */
+#endif
 };
 
 struct vreg {/* Vector registers */

Index: src/sys/arch/powerpc/powerpc/trap.c
diff -u src/sys/arch/powerpc/powerpc/trap.c:1.149 src/sys/arch/powerpc/powerpc/trap.c:1.150
--- src/sys/arch/powerpc/powerpc/trap.c:1.149	Mon Mar  3 15:36:36 2014
+++ src/sys/arch/powerpc/powerpc/trap.c	Tue Aug 12 20:27:10 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.149 2014/03/03 15:36:36 macallan Exp $	*/
+/*	$NetBSD: trap.c,v 1.150 2014/08/12 20:27:10 joerg Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.149 2014/03/03 15:36:36 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.150 2014/08/12 20:27:10 joerg Exp $");
 
 #include "opt_altivec.h"
 #include "opt_ddb.h"
@@ -736,7 +736,7 @@ fix_unaligned(struct lwp *l, struct trap
 			struct pcb * const pcb = lwp_getpcb(l);
 			const int reg = EXC_ALI_RST(tf->tf_dsisr);
 			const int a_reg = EXC_ALI_RA(tf->tf_dsisr);
-			double * const fpreg = &pcb->pcb_fpu.fpreg[reg];
+			uint64_t * const fpreg = &pcb->pcb_fpu.fpreg[reg];
 			register_t* a_reg_addr = &tf->tf_fixreg[a_reg];
 
 			/*
@@ -782,7 +782,7 @@ fix_unaligned(struct lwp *l, struct trap
 			struct pcb * const pcb = lwp_getpcb(l);
 			const int reg = EXC_ALI_RST(tf->tf_dsisr);
 			const int a_reg = EXC_ALI_RA(tf->tf_dsisr);
-			double * const fpreg = &pcb->pcb_fpu.fpreg[reg];
+			uint64_t * const fpreg = &pcb->pcb_fpu.fpreg[reg];
 			register_t* a_reg_addr = &tf->tf_fixreg[a_reg];
 
 			/*



CVS commit: [netbsd-7] src/doc

2014-08-12 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Aug 12 19:02:55 UTC 2014

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Tickets 2, 7


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/doc/CHANGES-7.0

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

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.6 src/doc/CHANGES-7.0:1.1.2.7
--- src/doc/CHANGES-7.0:1.1.2.6	Tue Aug 12 15:16:06 2014
+++ src/doc/CHANGES-7.0	Tue Aug 12 19:02:55 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.6 2014/08/12 15:16:06 martin Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.7 2014/08/12 19:02:55 riz Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -70,3 +70,15 @@ usr.sbin/postinstall/postinstall		1.176
 
 	FONTCONFIG_DIR not existing does not need to be fixed.
 	[apb, ticket #9]
+
+sys/arch/sparc64/sparc64/autoconf.c		1.199
+
+	Match firmware paths for the boot device in Mac style, as used by
+	QEMU/OpenBIOS.
+	[martin, ticket #2]
+
+sys/arch/sparc/sparc/autoconf.c			1.258
+
+	Add device name mapping for "qfe" (quad hme) cards. PR#49103.
+	[martin, ticket #7]
+



CVS commit: [netbsd-7] src/sys/arch/sparc/sparc

2014-08-12 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Aug 12 18:59:48 UTC 2014

Modified Files:
src/sys/arch/sparc/sparc [netbsd-7]: autoconf.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #7):
sys/arch/sparc/sparc/autoconf.c: revision 1.258
PR port-sparc/49103: add device name mapping for "qfe" (quad hme) cards.
>From MOCHIDA Shuji.


To generate a diff of this commit:
cvs rdiff -u -r1.257 -r1.257.2.1 src/sys/arch/sparc/sparc/autoconf.c

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

Modified files:

Index: src/sys/arch/sparc/sparc/autoconf.c
diff -u src/sys/arch/sparc/sparc/autoconf.c:1.257 src/sys/arch/sparc/sparc/autoconf.c:1.257.2.1
--- src/sys/arch/sparc/sparc/autoconf.c:1.257	Fri Jul 25 17:21:32 2014
+++ src/sys/arch/sparc/sparc/autoconf.c	Tue Aug 12 18:59:48 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.257 2014/07/25 17:21:32 nakayama Exp $ */
+/*	$NetBSD: autoconf.c,v 1.257.2.1 2014/08/12 18:59:48 riz Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -48,7 +48,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.257 2014/07/25 17:21:32 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.257.2.1 2014/08/12 18:59:48 riz Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -1563,6 +1563,7 @@ static struct {
 	{ "SUNW,fdtwo",	"fdc" },
 	{ "network",	"hme" }, /* Krups */
 	{ "SUNW,hme",   "hme" },
+	{ "SUNW,qfe",   "hme" },
 };
 
 static const char *



CVS commit: [netbsd-7] src/sys/arch/sparc64/sparc64

2014-08-12 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Aug 12 18:56:51 UTC 2014

Modified Files:
src/sys/arch/sparc64/sparc64 [netbsd-7]: autoconf.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #2):
sys/arch/sparc64/sparc64/autoconf.c: revision 1.199
Match firmware paths for the boot device in Mac style, as used by
QEMU/OpenBIOS.


To generate a diff of this commit:
cvs rdiff -u -r1.198 -r1.198.2.1 src/sys/arch/sparc64/sparc64/autoconf.c

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

Modified files:

Index: src/sys/arch/sparc64/sparc64/autoconf.c
diff -u src/sys/arch/sparc64/sparc64/autoconf.c:1.198 src/sys/arch/sparc64/sparc64/autoconf.c:1.198.2.1
--- src/sys/arch/sparc64/sparc64/autoconf.c:1.198	Fri Jul 25 17:21:32 2014
+++ src/sys/arch/sparc64/sparc64/autoconf.c	Tue Aug 12 18:56:51 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.198 2014/07/25 17:21:32 nakayama Exp $ */
+/*	$NetBSD: autoconf.c,v 1.198.2.1 2014/08/12 18:56:51 riz Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -48,7 +48,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.198 2014/07/25 17:21:32 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.198.2.1 2014/08/12 18:56:51 riz Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -775,7 +775,7 @@ static void
 dev_path_drive_match(device_t dev, int ctrlnode, int target,
 uint64_t wwn, int lun)
 {
-	int child = 0;
+	int child = 0, ide_node = 0;
 	char buf[OFPATHLEN];
 
 	DPRINTF(ACDB_BOOTDEV, ("dev_path_drive_match: %s, controller %x, "
@@ -791,6 +791,27 @@ dev_path_drive_match(device_t dev, int c
 		if (child == ofbootpackage)
 			break;
 
+	if (child != ofbootpackage) {
+		/*
+		 * Try Mac firmware style (also used by QEMU/OpenBIOS):
+		 * below the controller there is an intermediate node
+		 * for each IDE channel, and individual targets always
+		 * are "@0"
+		 */
+		for (ide_node = prom_firstchild(ctrlnode); ide_node != 0;
+		ide_node = prom_nextsibling(ide_node)) {
+			const char * name = prom_getpropstring(ide_node,
+			"device_type");
+			if (strcmp(name, "ide") != 0) continue;
+			for (child = prom_firstchild(ide_node); child != 0;
+			child = prom_nextsibling(child))
+if (child == ofbootpackage)
+	break;
+			if (child == ofbootpackage)
+break;
+		}
+	}
+
 	if (child == ofbootpackage) {
 		const char * name = prom_getpropstring(child, "name");
 
@@ -805,6 +826,8 @@ dev_path_drive_match(device_t dev, int c
 		if (wwn)
 			snprintf(buf, sizeof(buf), "%s@w%016" PRIx64 ",%d",
 			name, wwn, lun);
+		else if (ide_node)
+			snprintf(buf, sizeof(buf), "%s@0", name);
 		else
 			snprintf(buf, sizeof(buf), "%s@%d,%d",
 			name, target, lun);



CVS commit: [netbsd-7] src/doc

2014-08-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 12 15:16:06 UTC 2014

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Ticket 9


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/doc/CHANGES-7.0

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

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.5 src/doc/CHANGES-7.0:1.1.2.6
--- src/doc/CHANGES-7.0:1.1.2.5	Tue Aug 12 14:39:49 2014
+++ src/doc/CHANGES-7.0	Tue Aug 12 15:16:06 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.5 2014/08/12 14:39:49 martin Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.6 2014/08/12 15:16:06 martin Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -64,3 +64,9 @@ usr.sbin/postinstall/postinstall		1.179
 	not just print the unexpanded value.  This is done by
 	using make -V '${VAR}' instead of make -V 'VAR'.
 	[apb, ticket #8]
+
+
+usr.sbin/postinstall/postinstall		1.176
+
+	FONTCONFIG_DIR not existing does not need to be fixed.
+	[apb, ticket #9]



CVS commit: [netbsd-7] src/usr.sbin/postinstall

2014-08-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 12 15:14:55 UTC 2014

Modified Files:
src/usr.sbin/postinstall [netbsd-7]: postinstall

Log Message:
Pull up following revision(s) (requested by apb in ticket #9):
usr.sbin/postinstall/postinstall: revision 1.176
FONTCONFIG_DIR not existing does not need to be fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.175.2.1 -r1.175.2.2 src/usr.sbin/postinstall/postinstall

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

Modified files:

Index: src/usr.sbin/postinstall/postinstall
diff -u src/usr.sbin/postinstall/postinstall:1.175.2.1 src/usr.sbin/postinstall/postinstall:1.175.2.2
--- src/usr.sbin/postinstall/postinstall:1.175.2.1	Tue Aug 12 14:38:29 2014
+++ src/usr.sbin/postinstall/postinstall	Tue Aug 12 15:14:55 2014
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall,v 1.175.2.1 2014/08/12 14:38:29 martin Exp $
+# $NetBSD: postinstall,v 1.175.2.2 2014/08/12 15:14:55 martin Exp $
 #
 # Copyright (c) 2002-2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -941,6 +941,11 @@ do_fontconfig()
 		FONTCONFIG_DIR="${XSRC_DIR}/external/mit/fontconfig/dist/conf.d"
 	fi
 
+	if [ ! -d "${FONTCONFIG_DIR}" ]; then
+		msg "${FONTCONFIG_DIR} is not a directory; skipping check"
+		return 0
+	fi
+
 	populate_dir "$op" false "${FONTCONFIG_DIR}" "${DEST_DIR}/etc/fonts/conf.avail" 444 \
 		10-autohint.conf \
 		10-no-sub-pixel.conf \



CVS commit: [netbsd-7] src/doc

2014-08-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 12 14:39:49 UTC 2014

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Ticket 8


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/doc/CHANGES-7.0

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

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.4 src/doc/CHANGES-7.0:1.1.2.5
--- src/doc/CHANGES-7.0:1.1.2.4	Tue Aug 12 10:24:13 2014
+++ src/doc/CHANGES-7.0	Tue Aug 12 14:39:49 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.4 2014/08/12 10:24:13 martin Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.5 2014/08/12 14:39:49 martin Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -50,3 +50,17 @@ sys/dev/usb/motg.c1.8
 	Make this compile when DIAGNOSTIC isn't defined.
 	[skrll, ticket #6]
 
+usr.sbin/postinstall/postinstall		1.177
+usr.sbin/postinstall/postinstall		1.178
+usr.sbin/postinstall/postinstall		1.179
+
+	Check for and delete ${DEST_DIR}/@RUNDIR@, not /@RUNDIR@.
+	Also remove an unnecessary eval in do_dhcpcdrundir and
+	fix a typo in the description.
+
+	Quoting fixes in several eval commands.
+
+	In get_makevar, ask make to recursively expand the variable,
+	not just print the unexpanded value.  This is done by
+	using make -V '${VAR}' instead of make -V 'VAR'.
+	[apb, ticket #8]



CVS commit: [netbsd-7] src/usr.sbin/postinstall

2014-08-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 12 14:38:29 UTC 2014

Modified Files:
src/usr.sbin/postinstall [netbsd-7]: postinstall

Log Message:
Pull up following revision(s) (requested by apb in ticket #8):
usr.sbin/postinstall/postinstall: revision 1.177
usr.sbin/postinstall/postinstall: revision 1.178
usr.sbin/postinstall/postinstall: revision 1.179
Check for and delete ${DEST_DIR}/@RUNDIR@, not /@RUNDIR@.
Also remove an unnecessary eval in do_dhcpcdrundir and
fix a typo in the description.
Quoting fixes in several eval commands.
In get_makevar, ask make to recursively expand the variable,
not just print the unexpanded value.  This is done by
using make -V '${VAR}' instead of make -V 'VAR'.


To generate a diff of this commit:
cvs rdiff -u -r1.175 -r1.175.2.1 src/usr.sbin/postinstall/postinstall

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

Modified files:

Index: src/usr.sbin/postinstall/postinstall
diff -u src/usr.sbin/postinstall/postinstall:1.175 src/usr.sbin/postinstall/postinstall:1.175.2.1
--- src/usr.sbin/postinstall/postinstall:1.175	Mon Aug  4 21:56:30 2014
+++ src/usr.sbin/postinstall/postinstall	Tue Aug 12 14:38:29 2014
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall,v 1.175 2014/08/04 21:56:30 apb Exp $
+# $NetBSD: postinstall,v 1.175.2.1 2014/08/12 14:38:29 martin Exp $
 #
 # Copyright (c) 2002-2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -186,7 +186,7 @@ additem()
 {
 	[ $# -eq 2 ] || err 3 "USAGE: additem item description"
 	defaultitems="${defaultitems}${defaultitems:+ }$1"
-	eval desc_$1=\"$2\"
+	eval desc_$1=\"\$2\"
 }
 
 # adddisableditem item description
@@ -197,7 +197,7 @@ adddisableditem()
 {
 	[ $# -eq 2 ] || err 3 "USAGE: adddisableditem item description"
 	otheritems="${otheritems}${otheritems:+ }$1"
-	eval desc_$1=\"$2\"
+	eval desc_$1=\"\$2\"
 }
 
 # checkdir op dir mode
@@ -430,7 +430,7 @@ rcvar_is_enabled()
 	_rcie_var="$1"
 	(
 		[ -f "${DEST_DIR}/etc/rc.conf" ] && . "${DEST_DIR}/etc/rc.conf"
-		eval _rcie_val="\${${_rcie_var}}"
+		eval _rcie_val=\"\${${_rcie_var}}\"
 		case $_rcie_val in
 		#	"yes", "true", "on", or "1"
 		[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
@@ -524,7 +524,7 @@ obsolete_paths()
 		if [ "${op}" = "check" ]; then
 			msg "Remove obsolete ${ftype} ${ofile}"
 			failed=1
-		elif ! eval "${cmd} \${ofile}"; then
+		elif ! eval "${cmd} \"\${ofile}\""; then
 			msg "Can't remove obsolete ${ftype} ${ofile}"
 			failed=1
 		else
@@ -716,9 +716,9 @@ get_makevar()
 
 	for _var in "$@"; do
 		_value="$(echo '.include ' | \
-		${MAKE} -f - -V "${_var}")"
+		${MAKE} -f - -V "\${${_var}}")"
 
-		eval ${_var}=\"${_value}\"
+		eval ${_var}=\"\${_value}\"
 	done
 }
 
@@ -880,22 +880,22 @@ do_dhcpcd()
 #
 #	dhcpcdrundir
 #
-additem dhcpcdrundir "accientaly created /@RUNDIR@ does not exist"
+additem dhcpcdrundir "accidentaly created /@RUNDIR@ does not exist"
 do_dhcpcdrundir()
 {
 	[ -n "$1" ] || err 3 "USAGE: do_dhcpcdrundir fix|check"
 	op="$1"
 	failed=0
 
-	if [ -d /@RUNDIR@ ]; then
+	if [ -d "${DEST_DIR}/@RUNDIR@" ]; then
 		if [ "${op}" = "check" ]; then
 			msg "Remove eroneously created /@RUNDIR@"
 			failed=1
-		elif ! eval "rm -r /@RUNDIR@"; then
-			msg "Failed to remove /@RUNDIR@"
+		elif ! rm -r "${DEST_DIR}/@RUNDIR@"; then
+			msg "Failed to remove ${DEST_DIR}/@RUNDIR@"
 			failed=1
 		else
-			msg "Removed eroneously created /@RUNDIR@"
+			msg "Removed eroneously created ${DEST_DIR}/@RUNDIR@"
 		fi
 	fi
 	return ${failed}



CVS commit: src/sys/dev/usb

2014-08-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Aug 12 14:22:51 UTC 2014

Modified Files:
src/sys/dev/usb: usb.h

Log Message:
Add a UPS_SUPER_SPEED.  From Takahiro HAYASHI.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/dev/usb/usb.h

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

Modified files:

Index: src/sys/dev/usb/usb.h
diff -u src/sys/dev/usb/usb.h:1.108 src/sys/dev/usb/usb.h:1.109
--- src/sys/dev/usb/usb.h:1.108	Tue Aug 12 13:28:44 2014
+++ src/sys/dev/usb/usb.h	Tue Aug 12 14:22:51 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb.h,v 1.108 2014/08/12 13:28:44 skrll Exp $	*/
+/*	$NetBSD: usb.h,v 1.109 2014/08/12 14:22:51 skrll Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/usb.h,v 1.14 1999/11/17 22:33:46 n_hibma Exp $	*/
 
 /*
@@ -499,6 +499,7 @@ typedef struct {
 #define UPS_FULL_SPEED			0x	/* for completeness */
 #define UPS_LOW_SPEED			0x0200
 #define UPS_HIGH_SPEED			0x0400
+#define UPS_SUPER_SPEED			0x0600
 #define UPS_PORT_TEST			0x0800
 #define UPS_PORT_INDICATOR		0x1000
 	uWord		wPortChange;



CVS commit: src/sys/arch/sparc/sparc

2014-08-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 12 13:53:49 UTC 2014

Modified Files:
src/sys/arch/sparc/sparc: autoconf.c

Log Message:
PR port-sparc/49103: add device name mapping for "qfe" (quad hme) cards.
>From MOCHIDA Shuji.


To generate a diff of this commit:
cvs rdiff -u -r1.257 -r1.258 src/sys/arch/sparc/sparc/autoconf.c

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

Modified files:

Index: src/sys/arch/sparc/sparc/autoconf.c
diff -u src/sys/arch/sparc/sparc/autoconf.c:1.257 src/sys/arch/sparc/sparc/autoconf.c:1.258
--- src/sys/arch/sparc/sparc/autoconf.c:1.257	Fri Jul 25 17:21:32 2014
+++ src/sys/arch/sparc/sparc/autoconf.c	Tue Aug 12 13:53:49 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.257 2014/07/25 17:21:32 nakayama Exp $ */
+/*	$NetBSD: autoconf.c,v 1.258 2014/08/12 13:53:49 martin Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -48,7 +48,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.257 2014/07/25 17:21:32 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.258 2014/08/12 13:53:49 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -1563,6 +1563,7 @@ static struct {
 	{ "SUNW,fdtwo",	"fdc" },
 	{ "network",	"hme" }, /* Krups */
 	{ "SUNW,hme",   "hme" },
+	{ "SUNW,qfe",   "hme" },
 };
 
 static const char *



CVS commit: src/sys/dev/usb

2014-08-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Aug 12 13:50:42 UTC 2014

Modified Files:
src/sys/dev/usb: xhci.c

Log Message:
Set the correct MPS for LS devices.  From Takahiro HAYASHI.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/usb/xhci.c

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

Modified files:

Index: src/sys/dev/usb/xhci.c
diff -u src/sys/dev/usb/xhci.c:1.25 src/sys/dev/usb/xhci.c:1.26
--- src/sys/dev/usb/xhci.c:1.25	Tue Aug 12 13:48:29 2014
+++ src/sys/dev/usb/xhci.c	Tue Aug 12 13:50:42 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci.c,v 1.25 2014/08/12 13:48:29 skrll Exp $	*/
+/*	$NetBSD: xhci.c,v 1.26 2014/08/12 13:50:42 skrll Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.25 2014/08/12 13:48:29 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.26 2014/08/12 13:50:42 skrll Exp $");
 
 #include 
 #include 
@@ -1445,7 +1445,10 @@ xhci_new_device(device_t parent, usbd_bu
 	dev->def_ep_desc.bEndpointAddress = USB_CONTROL_ENDPOINT;
 	dev->def_ep_desc.bmAttributes = UE_CONTROL;
 	/* XXX */
-	USETW(dev->def_ep_desc.wMaxPacketSize, 64);
+	if (speed == USB_SPEED_LOW)
+		USETW(dev->def_ep_desc.wMaxPacketSize, USB_MAX_IPACKET);
+	else
+		USETW(dev->def_ep_desc.wMaxPacketSize, 64);
 	dev->def_ep_desc.bInterval = 0;
 
 	/* doesn't matter, just don't let it uninitialized */



CVS commit: src/sys/dev/usb

2014-08-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Aug 12 13:48:29 UTC 2014

Modified Files:
src/sys/dev/usb: xhci.c

Log Message:
Serialise xhci_intr1 calls with sc_intr_lock.  From Takahiro HAYASHI.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/usb/xhci.c

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

Modified files:

Index: src/sys/dev/usb/xhci.c
diff -u src/sys/dev/usb/xhci.c:1.24 src/sys/dev/usb/xhci.c:1.25
--- src/sys/dev/usb/xhci.c:1.24	Mon Aug 11 10:37:59 2014
+++ src/sys/dev/usb/xhci.c	Tue Aug 12 13:48:29 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci.c,v 1.24 2014/08/11 10:37:59 skrll Exp $	*/
+/*	$NetBSD: xhci.c,v 1.25 2014/08/12 13:48:29 skrll Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.24 2014/08/11 10:37:59 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.25 2014/08/12 13:48:29 skrll Exp $");
 
 #include 
 #include 
@@ -853,10 +853,16 @@ int
 xhci_intr(void *v)
 {
 	struct xhci_softc * const sc = v;
+	int ret = 0;
 
-	if (sc == NULL || sc->sc_dying || !device_has_power(sc->sc_dev))
+	if (sc == NULL)
 		return 0;
 
+	mutex_spin_enter(&sc->sc_intr_lock);
+
+	if (sc->sc_dying || !device_has_power(sc->sc_dev))
+		goto done;
+
 	DPRINTF(("%s: %s\n", __func__, device_xname(sc->sc_dev)));
 
 	/* If we get an interrupt while polling, then just ignore it. */
@@ -864,10 +870,13 @@ xhci_intr(void *v)
 #ifdef DIAGNOSTIC
 		DPRINTFN(16, ("xhci_intr: ignored interrupt while polling\n"));
 #endif
-		return 0;
+		goto done;
 	}
 
-	return xhci_intr1(sc);
+	ret = xhci_intr1(sc);
+done:
+	mutex_spin_exit(&sc->sc_intr_lock);
+	return ret;
 }
 
 int
@@ -1314,7 +1323,9 @@ xhci_poll(struct usbd_bus *bus)
 
 	DPRINTF(("%s: %s\n", __func__, device_xname(sc->sc_dev)));
 
+	mutex_spin_enter(&sc->sc_intr_lock);
 	xhci_intr1(sc);
+	mutex_spin_exit(&sc->sc_intr_lock);
 
 	return;
 }



CVS commit: src/usr.sbin/usbdevs

2014-08-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Aug 12 13:40:07 UTC 2014

Modified Files:
src/usr.sbin/usbdevs: usbdevs.c

Log Message:
Report super speed devices.  From Takahiro HAYASHI.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/usr.sbin/usbdevs/usbdevs.c

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

Modified files:

Index: src/usr.sbin/usbdevs/usbdevs.c
diff -u src/usr.sbin/usbdevs/usbdevs.c:1.30 src/usr.sbin/usbdevs/usbdevs.c:1.31
--- src/usr.sbin/usbdevs/usbdevs.c:1.30	Sat Sep 14 14:07:56 2013
+++ src/usr.sbin/usbdevs/usbdevs.c	Tue Aug 12 13:40:07 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbdevs.c,v 1.30 2013/09/14 14:07:56 jakllsch Exp $	*/
+/*	$NetBSD: usbdevs.c,v 1.31 2014/08/12 13:40:07 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -112,6 +112,7 @@ usbdev(int f, int a, int rec)
 		case USB_SPEED_LOW:  printf("low speed, "); break;
 		case USB_SPEED_FULL: printf("full speed, "); break;
 		case USB_SPEED_HIGH: printf("high speed, "); break;
+		case USB_SPEED_SUPER: printf("super speed, "); break;
 		default: break;
 		}
 		if (di.udi_power)



CVS commit: src/sys/dev/usb

2014-08-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Aug 12 13:36:40 UTC 2014

Modified Files:
src/sys/dev/usb: uhub.c usb.c usbdivar.h

Log Message:
Some USB3 / SS support - baby steps.  From Takahiro HAYASHI.


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/sys/dev/usb/uhub.c
cvs rdiff -u -r1.154 -r1.155 src/sys/dev/usb/usb.c
cvs rdiff -u -r1.107 -r1.108 src/sys/dev/usb/usbdivar.h

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

Modified files:

Index: src/sys/dev/usb/uhub.c
diff -u src/sys/dev/usb/uhub.c:1.124 src/sys/dev/usb/uhub.c:1.125
--- src/sys/dev/usb/uhub.c:1.124	Sun Sep 15 15:33:47 2013
+++ src/sys/dev/usb/uhub.c	Tue Aug 12 13:36:40 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhub.c,v 1.124 2013/09/15 15:33:47 martin Exp $	*/
+/*	$NetBSD: uhub.c,v 1.125 2014/08/12 13:36:40 skrll Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $	*/
 
 /*
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.124 2013/09/15 15:33:47 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.125 2014/08/12 13:36:40 skrll Exp $");
 
 #include 
 #include 
@@ -540,7 +540,9 @@ uhub_explore(usbd_device_handle dev)
 		}
 
 		/* Figure out device speed */
-		if (status & UPS_HIGH_SPEED)
+		if (status & UPS_SUPER_SPEED)
+			speed = USB_SPEED_SUPER;
+		else if (status & UPS_HIGH_SPEED)
 			speed = USB_SPEED_HIGH;
 		else if (status & UPS_LOW_SPEED)
 			speed = USB_SPEED_LOW;

Index: src/sys/dev/usb/usb.c
diff -u src/sys/dev/usb/usb.c:1.154 src/sys/dev/usb/usb.c:1.155
--- src/sys/dev/usb/usb.c:1.154	Fri Jul 25 08:10:39 2014
+++ src/sys/dev/usb/usb.c	Tue Aug 12 13:36:40 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb.c,v 1.154 2014/07/25 08:10:39 dholland Exp $	*/
+/*	$NetBSD: usb.c,v 1.155 2014/08/12 13:36:40 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2002, 2008, 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.154 2014/07/25 08:10:39 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.155 2014/08/12 13:36:40 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -203,6 +203,7 @@ usb_attach(device_t parent, device_t sel
 	case USBREV_1_0:
 	case USBREV_1_1:
 	case USBREV_2_0:
+	case USBREV_3_0:
 		break;
 	default:
 		aprint_error(", not supported\n");
@@ -285,6 +286,9 @@ usb_doattach(device_t self)
 	case USBREV_2_0:
 		speed = USB_SPEED_HIGH;
 		break;
+	case USBREV_3_0:
+		speed = USB_SPEED_SUPER;
+		break;
 	default:
 		panic("usb_doattach");
 	}

Index: src/sys/dev/usb/usbdivar.h
diff -u src/sys/dev/usb/usbdivar.h:1.107 src/sys/dev/usb/usbdivar.h:1.108
--- src/sys/dev/usb/usbdivar.h:1.107	Thu Oct  3 19:04:00 2013
+++ src/sys/dev/usb/usbdivar.h	Tue Aug 12 13:36:40 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbdivar.h,v 1.107 2013/10/03 19:04:00 skrll Exp $	*/
+/*	$NetBSD: usbdivar.h,v 1.108 2014/08/12 13:36:40 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2012 The NetBSD Foundation, Inc.
@@ -164,7 +164,8 @@ struct usbd_bus {
 #define USBREV_1_0	2
 #define USBREV_1_1	3
 #define USBREV_2_0	4
-#define USBREV_STR { "unknown", "pre 1.0", "1.0", "1.1", "2.0" }
+#define USBREV_3_0	5
+#define USBREV_STR { "unknown", "pre 1.0", "1.0", "1.1", "2.0", "3.0" }
 
 	void		   *soft; /* soft interrupt cookie */
 	bus_dma_tag_t		dmatag;	/* DMA tag */



CVS commit: src/sys/dev/usb

2014-08-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Aug 12 13:28:44 UTC 2014

Modified Files:
src/sys/dev/usb: files.usb usb.h

Log Message:
Add XHCI_DEBUG.  From Takahiro HAYASHI with tweaks from me.

One day someone(tm) will tidyup USB debug stuff.


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/sys/dev/usb/files.usb
cvs rdiff -u -r1.107 -r1.108 src/sys/dev/usb/usb.h

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

Modified files:

Index: src/sys/dev/usb/files.usb
diff -u src/sys/dev/usb/files.usb:1.132 src/sys/dev/usb/files.usb:1.133
--- src/sys/dev/usb/files.usb:1.132	Sat Apr  5 23:47:26 2014
+++ src/sys/dev/usb/files.usb	Tue Aug 12 13:28:44 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files.usb,v 1.132 2014/04/05 23:47:26 khorben Exp $
+#	$NetBSD: files.usb,v 1.133 2014/08/12 13:28:44 skrll Exp $
 #
 # Config file and device description for machine-independent USB code.
 # Included by ports that need it.  Ports that use it must provide
@@ -6,7 +6,8 @@
 
 defflag	USBVERBOSE
 defflag	opt_usb.h	USB_FRAG_DMA_WORKAROUND
-defflag	opt_usb.h	EHCI_DEBUG OHCI_DEBUG UHCI_DEBUG UHUB_DEBUG USB_DEBUG
+defflag	opt_usb.h	UHUB_DEBUG USB_DEBUG
+defflag	opt_usb.h	EHCI_DEBUG OHCI_DEBUG UHCI_DEBUG XHCI_DEBUG
 
 defflag	opt_umodem.h	UMODEM_DEBUG
 defflag	opt_uvideo.h	UVIDEO_DEBUG

Index: src/sys/dev/usb/usb.h
diff -u src/sys/dev/usb/usb.h:1.107 src/sys/dev/usb/usb.h:1.108
--- src/sys/dev/usb/usb.h:1.107	Tue Aug 12 13:24:40 2014
+++ src/sys/dev/usb/usb.h	Tue Aug 12 13:28:44 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb.h,v 1.107 2014/08/12 13:24:40 skrll Exp $	*/
+/*	$NetBSD: usb.h,v 1.108 2014/08/12 13:28:44 skrll Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/usb.h,v 1.14 1999/11/17 22:33:46 n_hibma Exp $	*/
 
 /*
@@ -126,6 +126,7 @@ MALLOC_DECLARE(M_USBHC);
 #define UVSCOM_DEBUG 1
 #define UYUREX_DEBUG 1
 #define UZCOM_DEBUG 1
+#define XHCI_DEBUG 1
 #define ZYD_DEBUG 1
 #define Static
 #else



CVS commit: src/sys/dev/usb

2014-08-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Aug 12 13:24:40 UTC 2014

Modified Files:
src/sys/dev/usb: usb.h

Log Message:
Define AXEN_DEBUG.  From Takahiro HAYASHI.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/dev/usb/usb.h

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

Modified files:

Index: src/sys/dev/usb/usb.h
diff -u src/sys/dev/usb/usb.h:1.106 src/sys/dev/usb/usb.h:1.107
--- src/sys/dev/usb/usb.h:1.106	Fri Nov  1 14:32:54 2013
+++ src/sys/dev/usb/usb.h	Tue Aug 12 13:24:40 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: usb.h,v 1.106 2013/11/01 14:32:54 skrll Exp $	*/
+/*	$NetBSD: usb.h,v 1.107 2014/08/12 13:24:40 skrll Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/usb.h,v 1.14 1999/11/17 22:33:46 n_hibma Exp $	*/
 
 /*
@@ -60,6 +60,7 @@ MALLOC_DECLARE(M_USBHC);
 #define AUE_DEBUG 1
 #define AUVITEK_I2C_DEBUG 1
 #define AXE_DEBUG 1
+#define AXEN_DEBUG 1
 #define CUE_DEBUG 1
 #define DWC2_DEBUG 1
 #define EHCI_DEBUG 1



CVS commit: src/tests/fs/vfs

2014-08-12 Thread Andreas Gustafsson
Module Name:src
Committed By:   gson
Date:   Tue Aug 12 12:13:09 UTC 2014

Modified Files:
src/tests/fs/vfs: t_vnops.c

Log Message:
Mark udf_lookup_complex as an expected failure, referencing PR kern/49033.
Since it does not fail reliably, force it to fail to avoid spurious failure
reports due to unexpected success.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/tests/fs/vfs/t_vnops.c

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

Modified files:

Index: src/tests/fs/vfs/t_vnops.c
diff -u src/tests/fs/vfs/t_vnops.c:1.40 src/tests/fs/vfs/t_vnops.c:1.41
--- src/tests/fs/vfs/t_vnops.c:1.40	Fri Jul 25 12:16:22 2014
+++ src/tests/fs/vfs/t_vnops.c	Tue Aug 12 12:13:09 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_vnops.c,v 1.40 2014/07/25 12:16:22 martin Exp $	*/
+/*	$NetBSD: t_vnops.c,v 1.41 2014/08/12 12:13:09 gson Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -87,6 +87,9 @@ lookup_complex(const atf_tc_t *tc, const
 
 	USES_DIRS;
 
+	if (FSTYPE_UDF(tc))
+		atf_tc_expect_fail("PR kern/49033");
+
 	sprintf(pb, "%s/dir", mountpath);
 	if (rump_sys_mkdir(pb, 0777) == -1)
 		atf_tc_fail_errno("mkdir");
@@ -129,6 +132,9 @@ lookup_complex(const atf_tc_t *tc, const
 
 		atf_tc_fail("stat results differ, see ouput for more details");
 	}
+	if (FSTYPE_UDF(tc))
+		atf_tc_fail("random failure of PR kern/49033 "
+			"did not happen this time");
 }
 
 static void



CVS commit: src/distrib/evbarm/instkernel/sshramdisk

2014-08-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 12 11:49:04 UTC 2014

Modified Files:
src/distrib/evbarm/instkernel/sshramdisk: Makefile

Log Message:
Add firmware images to this image, as discussed on port-arm.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/distrib/evbarm/instkernel/sshramdisk/Makefile

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

Modified files:

Index: src/distrib/evbarm/instkernel/sshramdisk/Makefile
diff -u src/distrib/evbarm/instkernel/sshramdisk/Makefile:1.3 src/distrib/evbarm/instkernel/sshramdisk/Makefile:1.4
--- src/distrib/evbarm/instkernel/sshramdisk/Makefile:1.3	Sun Mar  2 13:25:43 2014
+++ src/distrib/evbarm/instkernel/sshramdisk/Makefile	Tue Aug 12 11:49:04 2014
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.3 2014/03/02 13:25:43 joerg Exp $
+#	$NetBSD: Makefile,v 1.4 2014/08/12 11:49:04 martin Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
 
 IMAGE=		sshramdisk.fs
-IMAGESIZE=	3800k
+IMAGESIZE=	8600k
 MAKEFS_FLAGS=	-f 15
 
 WARNS=		1
@@ -20,6 +20,7 @@ IMAGEDEPENDS=	${CRUNCHBIN} \
 		${NETBSDSRCDIR}/etc/group \
 		${NETBSDSRCDIR}/etc/netconfig ${DISTRIBDIR}/common/protocols \
 		${DISTRIBDIR}/common/services
+IMAGEPREBUILD=	${TOOL_PAX} -rw -pp ${DESTDIR}/libdata/firmware ${WORKDIR}
 
 # Use stubs to eliminate some large stuff from libc
 HACKSRC=	${DISTRIBDIR}/utils/libhack



CVS commit: src/distrib/common

2014-08-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 12 11:48:22 UTC 2014

Modified Files:
src/distrib/common: Makefile.image

Log Message:
Add a IMAGEPREBUILD option for makefiles to ovveride (e.g. to additionally
add files to the staging directory)


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/distrib/common/Makefile.image

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

Modified files:

Index: src/distrib/common/Makefile.image
diff -u src/distrib/common/Makefile.image:1.37 src/distrib/common/Makefile.image:1.38
--- src/distrib/common/Makefile.image:1.37	Wed Aug  6 11:41:18 2014
+++ src/distrib/common/Makefile.image	Tue Aug 12 11:48:22 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.image,v 1.37 2014/08/06 11:41:18 apb Exp $
+#	$NetBSD: Makefile.image,v 1.38 2014/08/12 11:48:22 martin Exp $
 #
 # Makefile snippet to build a tree from the provided lists,
 # and make an ffs file system image from that tree
@@ -13,6 +13,7 @@
 #
 # Optional variables:
 #	IMAGE		name of target image
+#	IMAGEPREBUILD	additional operations to run pre image creation
 #	IMAGEPOSTBUILD	operation to run on ${IMAGE} ${.TARGET} after its built
 #			(if this returns non zero, ${.TARGET} is removed)
 #	CRUNCHBIN	name of crunchgen(1)ed binary
@@ -85,6 +86,9 @@ CLEANFILES+=	${WORKSPEC} ${WORKSPEC}.tmp
 .if defined(IMAGE)		# {
 IMGMAKEFSOPTIONS?= -o bsize=4096,fsize=512
 ${IMAGE}: ${WORKBUILT}
+.if defined(IMAGEPREBUILD)
+	${IMAGEPREBUILD}
+.endif
 	[ "${.OODATE}" = ${WORKBUILT} -a -f ${IMAGE} -a ! ${IMAGE} -ot ${WORKBUILT} ]  || { \
 	${_MKSHMSG_CREATE} ${.CURDIR:T}/${.TARGET}; \
 	rm -f ${.TARGET} ${.TARGET}.tmp; \



CVS commit: [netbsd-7] src/doc

2014-08-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 12 10:24:14 UTC 2014

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Ticket 6


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/doc/CHANGES-7.0

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

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.3 src/doc/CHANGES-7.0:1.1.2.4
--- src/doc/CHANGES-7.0:1.1.2.3	Tue Aug 12 09:37:13 2014
+++ src/doc/CHANGES-7.0	Tue Aug 12 10:24:13 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.3 2014/08/12 09:37:13 martin Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.4 2014/08/12 10:24:13 martin Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -40,3 +40,13 @@ external/gpl3/binutils/dist/bfd/elflink.
 	* elflink.c (_bfd_elf_merge_symbol): If merging a new weak
 	symbol that will be skipped, we don't have a new definition.
 	[skrll, ticket #5]
+
+
+sys/dev/usb/motg.c1.7
+sys/dev/usb/motg.c1.8
+
+	Trailing whitespace.
+
+	Make this compile when DIAGNOSTIC isn't defined.
+	[skrll, ticket #6]
+



CVS commit: [netbsd-7] src/sys/dev/usb

2014-08-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 12 10:22:54 UTC 2014

Modified Files:
src/sys/dev/usb [netbsd-7]: motg.c

Log Message:
Pull up following revision(s) (requested by skrll in ticket #6):
sys/dev/usb/motg.c: revision 1.7
sys/dev/usb/motg.c: revision 1.8
Trailing whitespace.
Make this compile when DIAGNOSTIC isn't defined.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.4.1 src/sys/dev/usb/motg.c

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

Modified files:

Index: src/sys/dev/usb/motg.c
diff -u src/sys/dev/usb/motg.c:1.6 src/sys/dev/usb/motg.c:1.6.4.1
--- src/sys/dev/usb/motg.c:1.6	Tue Aug  5 06:35:55 2014
+++ src/sys/dev/usb/motg.c	Tue Aug 12 10:22:54 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: motg.c,v 1.6 2014/08/05 06:35:55 skrll Exp $	*/
+/*	$NetBSD: motg.c,v 1.6.4.1 2014/08/12 10:22:54 martin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012, 2014 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.6 2014/08/05 06:35:55 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.6.4.1 2014/08/12 10:22:54 martin Exp $");
 
 #include 
 #include 
@@ -182,7 +182,7 @@ UREAD4(struct motg_softc *sc, bus_size_t
 #endif
 
 static void
-musbotg_pull_common(struct motg_softc *sc, uint8_t on)  
+musbotg_pull_common(struct motg_softc *sc, uint8_t on)
 {
 uint8_t val;
 
@@ -259,7 +259,7 @@ motg_init(struct motg_softc *sc)
 	UWRITE2(sc, MUSB2_REG_INTRXE, 0);
 	/* disable pullup */
 
-	musbotg_pull_common(sc, 0);   
+	musbotg_pull_common(sc, 0);
 
 	/* disable double packet buffering XXX what's this ? */
 	UWRITE2(sc, MUSB2_REG_RXDBDIS, 0x);
@@ -288,11 +288,11 @@ motg_init(struct motg_softc *sc)
 
 	UWRITE1(sc, MUSB2_REG_TESTMODE, 0);
 
-	/* set default value */   
+	/* set default value */
 
 	UWRITE1(sc, MUSB2_REG_MISC, 0);
 
-	/* select endpoint index 0 */ 
+	/* select endpoint index 0 */
 
 	UWRITE1(sc, MUSB2_REG_EPINDEX, 0);
 
@@ -318,11 +318,11 @@ motg_init(struct motg_softc *sc)
 
 	dynfifo = (val & MUSB2_MASK_CD_DYNFIFOSZ) ? 1 : 0;
 
-	if (dynfifo) { 
+	if (dynfifo) {
 		aprint_normal_dev(sc->sc_dev, "Dynamic FIFO sizing detected, "
 		"assuming 16Kbytes of FIFO RAM\n");
-	} 
-  
+	}
+
 	DPRINTF(("HW version: 0x%04x\n", UREAD1(sc, MUSB2_REG_HWVERS)));
 
 	/* initialise endpoint profiles */
@@ -335,7 +335,7 @@ motg_init(struct motg_softc *sc)
 	for (i = 1; i <= sc->sc_ep_max; i++) {
 		int fiforx_size, fifotx_size, fifo_size;
 
-		/* select endpoint */ 
+		/* select endpoint */
 		UWRITE1(sc, MUSB2_REG_EPINDEX, i);
 
 		val = UREAD1(sc, MUSB2_REG_FSIZE);
@@ -351,24 +351,24 @@ motg_init(struct motg_softc *sc)
 			} else if (i < 10) {
 fifo_size = 10;   /* 1K */
 			} else {
-fifo_size = 7;/* 128 bytes */ 
-			}
+fifo_size = 7;/* 128 bytes */
+			}
 			if (fiforx_size && (i <= nrx)) {
 fiforx_size = fifo_size;
 if (fifo_size > 7) {
 #if 0
-	UWRITE1(sc, MUSB2_REG_RXFIFOSZ,  
+	UWRITE1(sc, MUSB2_REG_RXFIFOSZ,
 	MUSB2_VAL_FIFOSZ(fifo_size) |
 	MUSB2_MASK_FIFODB);
 #else
-	UWRITE1(sc, MUSB2_REG_RXFIFOSZ,  
+	UWRITE1(sc, MUSB2_REG_RXFIFOSZ,
 	MUSB2_VAL_FIFOSZ(fifo_size));
 #endif
 } else {
-	UWRITE1(sc, MUSB2_REG_RXFIFOSZ,  
+	UWRITE1(sc, MUSB2_REG_RXFIFOSZ,
 	MUSB2_VAL_FIFOSZ(fifo_size));
 }
-UWRITE2(sc, MUSB2_REG_RXFIFOADD,  
+UWRITE2(sc, MUSB2_REG_RXFIFOADD,
 offset >> 3);
 offset += (1 << fiforx_size);
 			}
@@ -376,21 +376,21 @@ motg_init(struct motg_softc *sc)
 fifotx_size = fifo_size;
 if (fifo_size > 7) {
 #if 0
-	UWRITE1(sc, MUSB2_REG_TXFIFOSZ,  
-	MUSB2_VAL_FIFOSZ(fifo_size) | 
+	UWRITE1(sc, MUSB2_REG_TXFIFOSZ,
+	MUSB2_VAL_FIFOSZ(fifo_size) |
 	MUSB2_MASK_FIFODB);
 #else
-	UWRITE1(sc, MUSB2_REG_TXFIFOSZ,  
-	MUSB2_VAL_FIFOSZ(fifo_size));  
+	UWRITE1(sc, MUSB2_REG_TXFIFOSZ,
+	MUSB2_VAL_FIFOSZ(fifo_size));
 #endif
 } else {
-	UWRITE1(sc, MUSB2_REG_TXFIFOSZ,  
-	MUSB2_VAL_FIFOSZ(fifo_size));  
-}
- 
-UWRITE2(sc, MUSB2_REG_TXFIFOADD,  
+	UWRITE1(sc, MUSB2_REG_TXFIFOSZ,
+	MUSB2_VAL_FIFOSZ(fifo_size));
+}
+
+UWRITE2(sc, MUSB2_REG_TXFIFOADD,
 offset >> 3);
- 
+
 offset += (1 << fifotx_size);
 			}
 		}
@@ -405,7 +405,7 @@ motg_init(struct motg_softc *sc)
 		sc->sc_out_ep[i].ep_number = sc->sc_in_ep[i].ep_number = i;
 	}
 
-  
+
 	DPRINTF(("Dynamic FIFO size = %d bytes\n", offset));
 
 	/* turn on default interrupts */
@@ -513,7 +513,7 @@ motg_open(usbd_pipe_handle pipe)
 			break;
 		case UE_BULK:
 		case UE_INTERRUPT:
-			DPRINTFN(MD_BULK, 
+			DPRINTFN(MD_BULK,
 			("new %s %s pipe wMaxPacketSize %d\n",
 			(ed->bmAttributes & UE_XFERTYPE) == UE_BULK ?
 			"bulk" : "interrupt",
@@ -1503,7 +1503,7 @@ motg_devic

CVS commit: [netbsd-7] src/doc

2014-08-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 12 09:37:13 UTC 2014

Modified Files:
src/doc [netbsd-7]: CHANGES-7.0

Log Message:
Ticket 5


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/doc/CHANGES-7.0

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

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.2 src/doc/CHANGES-7.0:1.1.2.3
--- src/doc/CHANGES-7.0:1.1.2.2	Mon Aug 11 15:40:08 2014
+++ src/doc/CHANGES-7.0	Tue Aug 12 09:37:13 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.2 2014/08/11 15:40:08 martin Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.3 2014/08/12 09:37:13 martin Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -28,3 +28,15 @@ sys/kern/kern_rndq.c1.27
 	Fixes PR kern/49098.
 	[riastradh, ticket #4]
 
+external/gpl3/binutils/dist/bfd/ChangeLog	1.6
+external/gpl3/binutils/dist/bfd/elflink.c	1.8
+
+	Apply change from upstream to fix PR/48709 - port-alpha/48709: static
+	threaded programs crash.
+
+	With this fix the new weak symbol's st_other is not merged in, i.e. NOPV
+	is not copied from the libc __libc_thr_init.
+
+	* elflink.c (_bfd_elf_merge_symbol): If merging a new weak
+	symbol that will be skipped, we don't have a new definition.
+	[skrll, ticket #5]



CVS commit: [netbsd-7] src/external/gpl3/binutils/dist/bfd

2014-08-12 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Aug 12 09:36:03 UTC 2014

Modified Files:
src/external/gpl3/binutils/dist/bfd [netbsd-7]: ChangeLog elflink.c

Log Message:
Pull up following revision(s) (requested by skrll in ticket #5):
external/gpl3/binutils/dist/bfd/ChangeLog: revision 1.6
external/gpl3/binutils/dist/bfd/elflink.c: revision 1.8
Apply change from upstream to fix PR/48709 - port-alpha/48709: static
threaded programs crash.
With this fix the new weak symbol's st_other is not merged in, i.e. NOPV
is not copied from the libc __libc_thr_init.
* elflink.c (_bfd_elf_merge_symbol): If merging a new weak
symbol that will be skipped, we don't have a new definition.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.4.1 src/external/gpl3/binutils/dist/bfd/ChangeLog
cvs rdiff -u -r1.7 -r1.7.4.1 src/external/gpl3/binutils/dist/bfd/elflink.c

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

Modified files:

Index: src/external/gpl3/binutils/dist/bfd/ChangeLog
diff -u src/external/gpl3/binutils/dist/bfd/ChangeLog:1.5 src/external/gpl3/binutils/dist/bfd/ChangeLog:1.5.4.1
--- src/external/gpl3/binutils/dist/bfd/ChangeLog:1.5	Sun Sep 29 14:03:29 2013
+++ src/external/gpl3/binutils/dist/bfd/ChangeLog	Tue Aug 12 09:36:03 2014
@@ -1,3 +1,8 @@
+2013-12-14  Alan Modra  
+
+	* elflink.c (_bfd_elf_merge_symbol): If merging a new weak
+	symbol that will be skipped, we don't have a new definition.
+
 2013-03-25  Tristan Gingold  
 
 	* configure.in: Bump version to 2.23.2

Index: src/external/gpl3/binutils/dist/bfd/elflink.c
diff -u src/external/gpl3/binutils/dist/bfd/elflink.c:1.7 src/external/gpl3/binutils/dist/bfd/elflink.c:1.7.4.1
--- src/external/gpl3/binutils/dist/bfd/elflink.c:1.7	Sun Sep 29 14:03:29 2013
+++ src/external/gpl3/binutils/dist/bfd/elflink.c	Tue Aug 12 09:36:03 2014
@@ -1442,7 +1442,10 @@ _bfd_elf_merge_symbol (bfd *abfd,
   if (!(oldbfd != NULL
 	&& (oldbfd->flags & BFD_PLUGIN) != 0
 	&& (abfd->flags & BFD_PLUGIN) == 0))
-	*skip = TRUE;
+	{
+	  newdef = FALSE;
+	  *skip = TRUE;
+	}
 
   /* Merge st_other.  If the symbol already has a dynamic index,
 	 but visibility says it should not be visible, turn it into a



CVS commit: src/usr.sbin/postinstall

2014-08-12 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Tue Aug 12 09:12:18 UTC 2014

Modified Files:
src/usr.sbin/postinstall: postinstall

Log Message:
In get_makevar, ask make to recursively expand the variable,
not just print the unexpanded value.  This is done by
using make -V '${VAR}' instead of make -V 'VAR'.


To generate a diff of this commit:
cvs rdiff -u -r1.178 -r1.179 src/usr.sbin/postinstall/postinstall

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

Modified files:

Index: src/usr.sbin/postinstall/postinstall
diff -u src/usr.sbin/postinstall/postinstall:1.178 src/usr.sbin/postinstall/postinstall:1.179
--- src/usr.sbin/postinstall/postinstall:1.178	Tue Aug 12 08:32:43 2014
+++ src/usr.sbin/postinstall/postinstall	Tue Aug 12 09:12:18 2014
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall,v 1.178 2014/08/12 08:32:43 apb Exp $
+# $NetBSD: postinstall,v 1.179 2014/08/12 09:12:18 apb Exp $
 #
 # Copyright (c) 2002-2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -716,7 +716,7 @@ get_makevar()
 
 	for _var in "$@"; do
 		_value="$(echo '.include ' | \
-		${MAKE} -f - -V "${_var}")"
+		${MAKE} -f - -V "\${${_var}}")"
 
 		eval ${_var}=\"\${_value}\"
 	done



CVS commit: src/usr.sbin/postinstall

2014-08-12 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Tue Aug 12 08:32:43 UTC 2014

Modified Files:
src/usr.sbin/postinstall: postinstall

Log Message:
Quoting fixes in several eval commands.


To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 src/usr.sbin/postinstall/postinstall

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

Modified files:

Index: src/usr.sbin/postinstall/postinstall
diff -u src/usr.sbin/postinstall/postinstall:1.177 src/usr.sbin/postinstall/postinstall:1.178
--- src/usr.sbin/postinstall/postinstall:1.177	Tue Aug 12 08:28:04 2014
+++ src/usr.sbin/postinstall/postinstall	Tue Aug 12 08:32:43 2014
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall,v 1.177 2014/08/12 08:28:04 apb Exp $
+# $NetBSD: postinstall,v 1.178 2014/08/12 08:32:43 apb Exp $
 #
 # Copyright (c) 2002-2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -186,7 +186,7 @@ additem()
 {
 	[ $# -eq 2 ] || err 3 "USAGE: additem item description"
 	defaultitems="${defaultitems}${defaultitems:+ }$1"
-	eval desc_$1=\"$2\"
+	eval desc_$1=\"\$2\"
 }
 
 # adddisableditem item description
@@ -197,7 +197,7 @@ adddisableditem()
 {
 	[ $# -eq 2 ] || err 3 "USAGE: adddisableditem item description"
 	otheritems="${otheritems}${otheritems:+ }$1"
-	eval desc_$1=\"$2\"
+	eval desc_$1=\"\$2\"
 }
 
 # checkdir op dir mode
@@ -430,7 +430,7 @@ rcvar_is_enabled()
 	_rcie_var="$1"
 	(
 		[ -f "${DEST_DIR}/etc/rc.conf" ] && . "${DEST_DIR}/etc/rc.conf"
-		eval _rcie_val="\${${_rcie_var}}"
+		eval _rcie_val=\"\${${_rcie_var}}\"
 		case $_rcie_val in
 		#	"yes", "true", "on", or "1"
 		[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
@@ -524,7 +524,7 @@ obsolete_paths()
 		if [ "${op}" = "check" ]; then
 			msg "Remove obsolete ${ftype} ${ofile}"
 			failed=1
-		elif ! eval "${cmd} \${ofile}"; then
+		elif ! eval "${cmd} \"\${ofile}\""; then
 			msg "Can't remove obsolete ${ftype} ${ofile}"
 			failed=1
 		else
@@ -718,7 +718,7 @@ get_makevar()
 		_value="$(echo '.include ' | \
 		${MAKE} -f - -V "${_var}")"
 
-		eval ${_var}=\"${_value}\"
+		eval ${_var}=\"\${_value}\"
 	done
 }
 



CVS commit: src/usr.sbin/postinstall

2014-08-12 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Tue Aug 12 08:28:04 UTC 2014

Modified Files:
src/usr.sbin/postinstall: postinstall

Log Message:
Check for and delete ${DEST_DIR}/@RUNDIR@, not /@RUNDIR@.
Also remove an unnecessary eval in do_dhcpcdrundir and
fix a typo in the description.


To generate a diff of this commit:
cvs rdiff -u -r1.176 -r1.177 src/usr.sbin/postinstall/postinstall

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

Modified files:

Index: src/usr.sbin/postinstall/postinstall
diff -u src/usr.sbin/postinstall/postinstall:1.176 src/usr.sbin/postinstall/postinstall:1.177
--- src/usr.sbin/postinstall/postinstall:1.176	Mon Aug 11 12:49:01 2014
+++ src/usr.sbin/postinstall/postinstall	Tue Aug 12 08:28:04 2014
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall,v 1.176 2014/08/11 12:49:01 roy Exp $
+# $NetBSD: postinstall,v 1.177 2014/08/12 08:28:04 apb Exp $
 #
 # Copyright (c) 2002-2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -880,22 +880,22 @@ do_dhcpcd()
 #
 #	dhcpcdrundir
 #
-additem dhcpcdrundir "accientaly created /@RUNDIR@ does not exist"
+additem dhcpcdrundir "accidentaly created /@RUNDIR@ does not exist"
 do_dhcpcdrundir()
 {
 	[ -n "$1" ] || err 3 "USAGE: do_dhcpcdrundir fix|check"
 	op="$1"
 	failed=0
 
-	if [ -d /@RUNDIR@ ]; then
+	if [ -d "${DEST_DIR}/@RUNDIR@" ]; then
 		if [ "${op}" = "check" ]; then
 			msg "Remove eroneously created /@RUNDIR@"
 			failed=1
-		elif ! eval "rm -r /@RUNDIR@"; then
-			msg "Failed to remove /@RUNDIR@"
+		elif ! rm -r "${DEST_DIR}/@RUNDIR@"; then
+			msg "Failed to remove ${DEST_DIR}/@RUNDIR@"
 			failed=1
 		else
-			msg "Removed eroneously created /@RUNDIR@"
+			msg "Removed eroneously created ${DEST_DIR}/@RUNDIR@"
 		fi
 	fi
 	return ${failed}



CVS commit: src/sys/dev/usb

2014-08-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Aug 12 08:06:46 UTC 2014

Modified Files:
src/sys/dev/usb: motg.c

Log Message:
Make this compile when DIAGNOSTIC isn't defined.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/usb/motg.c

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

Modified files:

Index: src/sys/dev/usb/motg.c
diff -u src/sys/dev/usb/motg.c:1.7 src/sys/dev/usb/motg.c:1.8
--- src/sys/dev/usb/motg.c:1.7	Tue Aug 12 08:06:07 2014
+++ src/sys/dev/usb/motg.c	Tue Aug 12 08:06:46 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: motg.c,v 1.7 2014/08/12 08:06:07 skrll Exp $	*/
+/*	$NetBSD: motg.c,v 1.8 2014/08/12 08:06:46 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012, 2014 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.7 2014/08/12 08:06:07 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.8 2014/08/12 08:06:46 skrll Exp $");
 
 #include 
 #include 
@@ -1854,7 +1854,7 @@ motg_device_ctrl_abort(usbd_xfer_handle 
 void
 motg_device_ctrl_close(usbd_pipe_handle pipe)
 {
-	struct motg_softc *sc = pipe->device->bus->hci_private;
+	struct motg_softc *sc __diagused = pipe->device->bus->hci_private;
 	struct motg_pipe *otgpipe = (struct motg_pipe *)pipe;
 	struct motg_pipe *otgpipeiter;
 
@@ -1879,7 +1879,7 @@ motg_device_ctrl_close(usbd_pipe_handle 
 void
 motg_device_ctrl_done(usbd_xfer_handle xfer)
 {
-	struct motg_pipe *otgpipe = (struct motg_pipe *)xfer->pipe;
+	struct motg_pipe *otgpipe __diagused = (struct motg_pipe *)xfer->pipe;
 	DPRINTFN(MD_CTRL, ("motg_device_ctrl_done:\n"));
 	KASSERT(otgpipe->hw_ep->xfer != xfer);
 }
@@ -1931,7 +1931,7 @@ motg_device_data_start1(struct motg_soft
 	usbd_xfer_handle xfer = NULL;
 	struct motg_pipe *otgpipe;
 	usbd_status err = 0;
-	uint32_t val;
+	uint32_t val __diagused;
 
 	KASSERT(mutex_owned(&sc->sc_lock));
 	if (sc->sc_dying)
@@ -2330,7 +2330,7 @@ motg_device_data_abort(usbd_xfer_handle 
 void
 motg_device_data_close(usbd_pipe_handle pipe)
 {
-	struct motg_softc *sc = pipe->device->bus->hci_private;
+	struct motg_softc *sc __diagused = pipe->device->bus->hci_private;
 	struct motg_pipe *otgpipe = (struct motg_pipe *)pipe;
 	struct motg_pipe *otgpipeiter;
 
@@ -2356,7 +2356,7 @@ motg_device_data_close(usbd_pipe_handle 
 void
 motg_device_data_done(usbd_xfer_handle xfer)
 {
-	struct motg_pipe *otgpipe = (struct motg_pipe *)xfer->pipe;
+	struct motg_pipe *otgpipe __diagused = (struct motg_pipe *)xfer->pipe;
 	DPRINTFN(MD_CTRL, ("motg_device_data_done:\n"));
 	KASSERT(otgpipe->hw_ep->xfer != xfer);
 }
@@ -2409,9 +2409,7 @@ motg_device_xfer_abort(usbd_xfer_handle 
 {
 	int wake;
 	uint8_t csr;
-#ifdef DIAGNOSTIC
 	struct motg_softc *sc = xfer->pipe->device->bus->hci_private;
-#endif
 	struct motg_pipe *otgpipe = (struct motg_pipe *)xfer->pipe;
 	KASSERT(mutex_owned(&sc->sc_lock));
 



CVS commit: src/sys/dev/usb

2014-08-12 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue Aug 12 08:06:07 UTC 2014

Modified Files:
src/sys/dev/usb: motg.c

Log Message:
Trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/usb/motg.c

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

Modified files:

Index: src/sys/dev/usb/motg.c
diff -u src/sys/dev/usb/motg.c:1.6 src/sys/dev/usb/motg.c:1.7
--- src/sys/dev/usb/motg.c:1.6	Tue Aug  5 06:35:55 2014
+++ src/sys/dev/usb/motg.c	Tue Aug 12 08:06:07 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: motg.c,v 1.6 2014/08/05 06:35:55 skrll Exp $	*/
+/*	$NetBSD: motg.c,v 1.7 2014/08/12 08:06:07 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012, 2014 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.6 2014/08/05 06:35:55 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: motg.c,v 1.7 2014/08/12 08:06:07 skrll Exp $");
 
 #include 
 #include 
@@ -182,7 +182,7 @@ UREAD4(struct motg_softc *sc, bus_size_t
 #endif
 
 static void
-musbotg_pull_common(struct motg_softc *sc, uint8_t on)  
+musbotg_pull_common(struct motg_softc *sc, uint8_t on)
 {
 uint8_t val;
 
@@ -259,7 +259,7 @@ motg_init(struct motg_softc *sc)
 	UWRITE2(sc, MUSB2_REG_INTRXE, 0);
 	/* disable pullup */
 
-	musbotg_pull_common(sc, 0);   
+	musbotg_pull_common(sc, 0);
 
 	/* disable double packet buffering XXX what's this ? */
 	UWRITE2(sc, MUSB2_REG_RXDBDIS, 0x);
@@ -288,11 +288,11 @@ motg_init(struct motg_softc *sc)
 
 	UWRITE1(sc, MUSB2_REG_TESTMODE, 0);
 
-	/* set default value */   
+	/* set default value */
 
 	UWRITE1(sc, MUSB2_REG_MISC, 0);
 
-	/* select endpoint index 0 */ 
+	/* select endpoint index 0 */
 
 	UWRITE1(sc, MUSB2_REG_EPINDEX, 0);
 
@@ -318,11 +318,11 @@ motg_init(struct motg_softc *sc)
 
 	dynfifo = (val & MUSB2_MASK_CD_DYNFIFOSZ) ? 1 : 0;
 
-	if (dynfifo) { 
+	if (dynfifo) {
 		aprint_normal_dev(sc->sc_dev, "Dynamic FIFO sizing detected, "
 		"assuming 16Kbytes of FIFO RAM\n");
-	} 
-  
+	}
+
 	DPRINTF(("HW version: 0x%04x\n", UREAD1(sc, MUSB2_REG_HWVERS)));
 
 	/* initialise endpoint profiles */
@@ -335,7 +335,7 @@ motg_init(struct motg_softc *sc)
 	for (i = 1; i <= sc->sc_ep_max; i++) {
 		int fiforx_size, fifotx_size, fifo_size;
 
-		/* select endpoint */ 
+		/* select endpoint */
 		UWRITE1(sc, MUSB2_REG_EPINDEX, i);
 
 		val = UREAD1(sc, MUSB2_REG_FSIZE);
@@ -351,24 +351,24 @@ motg_init(struct motg_softc *sc)
 			} else if (i < 10) {
 fifo_size = 10;   /* 1K */
 			} else {
-fifo_size = 7;/* 128 bytes */ 
-			}
+fifo_size = 7;/* 128 bytes */
+			}
 			if (fiforx_size && (i <= nrx)) {
 fiforx_size = fifo_size;
 if (fifo_size > 7) {
 #if 0
-	UWRITE1(sc, MUSB2_REG_RXFIFOSZ,  
+	UWRITE1(sc, MUSB2_REG_RXFIFOSZ,
 	MUSB2_VAL_FIFOSZ(fifo_size) |
 	MUSB2_MASK_FIFODB);
 #else
-	UWRITE1(sc, MUSB2_REG_RXFIFOSZ,  
+	UWRITE1(sc, MUSB2_REG_RXFIFOSZ,
 	MUSB2_VAL_FIFOSZ(fifo_size));
 #endif
 } else {
-	UWRITE1(sc, MUSB2_REG_RXFIFOSZ,  
+	UWRITE1(sc, MUSB2_REG_RXFIFOSZ,
 	MUSB2_VAL_FIFOSZ(fifo_size));
 }
-UWRITE2(sc, MUSB2_REG_RXFIFOADD,  
+UWRITE2(sc, MUSB2_REG_RXFIFOADD,
 offset >> 3);
 offset += (1 << fiforx_size);
 			}
@@ -376,21 +376,21 @@ motg_init(struct motg_softc *sc)
 fifotx_size = fifo_size;
 if (fifo_size > 7) {
 #if 0
-	UWRITE1(sc, MUSB2_REG_TXFIFOSZ,  
-	MUSB2_VAL_FIFOSZ(fifo_size) | 
+	UWRITE1(sc, MUSB2_REG_TXFIFOSZ,
+	MUSB2_VAL_FIFOSZ(fifo_size) |
 	MUSB2_MASK_FIFODB);
 #else
-	UWRITE1(sc, MUSB2_REG_TXFIFOSZ,  
-	MUSB2_VAL_FIFOSZ(fifo_size));  
+	UWRITE1(sc, MUSB2_REG_TXFIFOSZ,
+	MUSB2_VAL_FIFOSZ(fifo_size));
 #endif
 } else {
-	UWRITE1(sc, MUSB2_REG_TXFIFOSZ,  
-	MUSB2_VAL_FIFOSZ(fifo_size));  
-}
- 
-UWRITE2(sc, MUSB2_REG_TXFIFOADD,  
+	UWRITE1(sc, MUSB2_REG_TXFIFOSZ,
+	MUSB2_VAL_FIFOSZ(fifo_size));
+}
+
+UWRITE2(sc, MUSB2_REG_TXFIFOADD,
 offset >> 3);
- 
+
 offset += (1 << fifotx_size);
 			}
 		}
@@ -405,7 +405,7 @@ motg_init(struct motg_softc *sc)
 		sc->sc_out_ep[i].ep_number = sc->sc_in_ep[i].ep_number = i;
 	}
 
-  
+
 	DPRINTF(("Dynamic FIFO size = %d bytes\n", offset));
 
 	/* turn on default interrupts */
@@ -513,7 +513,7 @@ motg_open(usbd_pipe_handle pipe)
 			break;
 		case UE_BULK:
 		case UE_INTERRUPT:
-			DPRINTFN(MD_BULK, 
+			DPRINTFN(MD_BULK,
 			("new %s %s pipe wMaxPacketSize %d\n",
 			(ed->bmAttributes & UE_XFERTYPE) == UE_BULK ?
 			"bulk" : "interrupt",
@@ -1503,7 +1503,7 @@ motg_device_ctrl_start1(struct motg_soft
 		DPRINTFN(MD_CTRL,
 		("motg_device_ctrl_start1 pipe %p xfer %p status %d\n",
 		otgpipe, xfer, (xfer != NULL) ? xfer->status : 0));
-		
+
 		if (xfer != NULL) {
 			/* move this pi