CVS commit: src/sys/arch/evbmips/evbmips

2013-05-14 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue May 14 09:16:59 UTC 2013

Modified Files:
src/sys/arch/evbmips/evbmips: interrupt.c

Log Message:
always set up a clockframe and make it available to other drivers, so clocks
other than the MIPS cycle counter can be used ( for example pwmclock )


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/evbmips/evbmips/interrupt.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/evbmips/evbmips/interrupt.c
diff -u src/sys/arch/evbmips/evbmips/interrupt.c:1.18 src/sys/arch/evbmips/evbmips/interrupt.c:1.19
--- src/sys/arch/evbmips/evbmips/interrupt.c:1.18	Tue Sep 27 01:02:33 2011
+++ src/sys/arch/evbmips/evbmips/interrupt.c	Tue May 14 09:16:59 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: interrupt.c,v 1.18 2011/09/27 01:02:33 jym Exp $	*/
+/*	$NetBSD: interrupt.c,v 1.19 2013/05/14 09:16:59 macallan Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: interrupt.c,v 1.18 2011/09/27 01:02:33 jym Exp $);
+__KERNEL_RCSID(0, $NetBSD: interrupt.c,v 1.19 2013/05/14 09:16:59 macallan Exp $);
 
 #include sys/param.h
 #include sys/cpu.h
@@ -40,6 +40,8 @@ __KERNEL_RCSID(0, $NetBSD: interrupt.c,
 #include mips/locore.h
 #include mips/mips3_clock.h
 
+struct clockframe cf;
+
 void
 intr_init(void)
 {
@@ -69,15 +71,15 @@ cpu_intr(int ppl, vaddr_t pc, uint32_t s
 		%s: cpl (%d) != ipl (%d), __func__, ci-ci_cpl, ipl);
 		KASSERT(pending != 0);
 
+		cf.pc = pc;
+		cf.sr = status;
+		cf.intr = (ci-ci_idepth  1);
+
 		if (pending  MIPS_INT_MASK_5) {
-			struct clockframe cf;
 			KASSERTMSG(ipl == IPL_SCHED,
 			%s: ipl (%d) != IPL_SCHED (%d),
 			 __func__, ipl, IPL_SCHED);
 			/* call the common MIPS3 clock interrupt handler */ 
-			cf.pc = pc;
-			cf.sr = status;
-			cf.intr = (ci-ci_idepth  1);
 			mips3_clockintr(cf);
 			pending ^= MIPS_INT_MASK_5;
 		}



CVS commit: src/sys/dev/pci/voyager

2013-05-14 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Tue May 14 09:19:37 UTC 2013

Modified Files:
src/sys/dev/pci/voyager: pwmclock.c

Log Message:
found the missing commit so put this back
am I the only one here with a Gdium?


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/pci/voyager/pwmclock.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/pci/voyager/pwmclock.c
diff -u src/sys/dev/pci/voyager/pwmclock.c:1.9 src/sys/dev/pci/voyager/pwmclock.c:1.10
--- src/sys/dev/pci/voyager/pwmclock.c:1.9	Mon May 13 16:01:31 2013
+++ src/sys/dev/pci/voyager/pwmclock.c	Tue May 14 09:19:36 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: pwmclock.c,v 1.9 2013/05/13 16:01:31 christos Exp $	*/
+/*	$NetBSD: pwmclock.c,v 1.10 2013/05/14 09:19:36 macallan Exp $	*/
 
 /*
  * Copyright (c) 2011 Michael Lorenz
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pwmclock.c,v 1.9 2013/05/13 16:01:31 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: pwmclock.c,v 1.10 2013/05/14 09:19:36 macallan Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -77,6 +77,7 @@ static u_int get_pwmclock_timecount(stru
 
 struct pwmclock_softc *pwmclock;
 extern void (*initclocks_ptr)(void);
+extern struct clockframe cf;
 
 /* 0, 1/4, 3/8, 1/2, 5/8, 3/4, 7/8, 1 */
 static int scale_m[] = {1, 1, 3, 1, 5, 3, 7, 1};
@@ -305,14 +306,8 @@ pwmclock_intr(void *cookie)
 	if (sc-sc_step_wanted != sc-sc_step) {
 		sc-sc_step = sc-sc_step_wanted;
 	}
-#ifdef notyet
-	struct clockframe cf;
 		 
-	cf.pc = pc;
-	cf.sr = status;
-	cf.intr = (curcpu()-ci_idepth  1);
 	hardclock(cf);
-#endif
 
 	return 1;
 }



CVS commit: src/distrib/utils/sysinst/arch/luna68k

2013-05-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue May 14 13:08:57 UTC 2013

Modified Files:
src/distrib/utils/sysinst/arch/luna68k: md.h

Log Message:
Use the default MD_SETS_SELECTED in util.c which includes an Xserver set.
luna68k has working Xserver so no need to specify md MD_SETS_SELECTED
with SET_X11_NOSERVERS.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/distrib/utils/sysinst/arch/luna68k/md.h

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

Modified files:

Index: src/distrib/utils/sysinst/arch/luna68k/md.h
diff -u src/distrib/utils/sysinst/arch/luna68k/md.h:1.1 src/distrib/utils/sysinst/arch/luna68k/md.h:1.2
--- src/distrib/utils/sysinst/arch/luna68k/md.h:1.1	Sat Jul 16 15:52:21 2011
+++ src/distrib/utils/sysinst/arch/luna68k/md.h	Tue May 14 13:08:57 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.h,v 1.1 2011/07/16 15:52:21 tsutsui Exp $	*/
+/*	$NetBSD: md.h,v 1.2 2013/05/14 13:08:57 tsutsui Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -58,8 +58,6 @@
  */
 #define SET_KERNEL_1_NAME	kern-GENERIC
 
-#define MD_SETS_SELECTED SET_KERNEL_1, SET_SYSTEM, SET_X11_NOSERVERS
-
 /*
  * Machine-specific command to write a new label to a disk.
  * If not defined, we assume the port does not support disklabels and



CVS commit: src/distrib/utils/sysinst/arch

2013-05-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue May 14 13:14:28 UTC 2013

Modified Files:
src/distrib/utils/sysinst/arch/hp300: md.h
src/distrib/utils/sysinst/arch/newsmips: md.h
src/distrib/utils/sysinst/arch/prep: md.h

Log Message:
Use the default MD_SETS_SELECTED for ports which have Xservers.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/distrib/utils/sysinst/arch/hp300/md.h
cvs rdiff -u -r1.13 -r1.14 src/distrib/utils/sysinst/arch/newsmips/md.h
cvs rdiff -u -r1.17 -r1.18 src/distrib/utils/sysinst/arch/prep/md.h

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

Modified files:

Index: src/distrib/utils/sysinst/arch/hp300/md.h
diff -u src/distrib/utils/sysinst/arch/hp300/md.h:1.17 src/distrib/utils/sysinst/arch/hp300/md.h:1.18
--- src/distrib/utils/sysinst/arch/hp300/md.h:1.17	Mon Apr  4 08:30:28 2011
+++ src/distrib/utils/sysinst/arch/hp300/md.h	Tue May 14 13:14:27 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.h,v 1.17 2011/04/04 08:30:28 mbalmer Exp $	*/
+/*	$NetBSD: md.h,v 1.18 2013/05/14 13:14:27 tsutsui Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -69,8 +69,6 @@
  */
 #define SET_KERNEL_1_NAME	kern-GENERIC
 
-#define MD_SETS_VALID SET_KERNEL, SET_SYSTEM, SET_X11_NOSERVERS
-
 /*
  * Disk names accepted as valid targets for a from-scratch installation.
  *

Index: src/distrib/utils/sysinst/arch/newsmips/md.h
diff -u src/distrib/utils/sysinst/arch/newsmips/md.h:1.13 src/distrib/utils/sysinst/arch/newsmips/md.h:1.14
--- src/distrib/utils/sysinst/arch/newsmips/md.h:1.13	Mon Apr  4 08:30:38 2011
+++ src/distrib/utils/sysinst/arch/newsmips/md.h	Tue May 14 13:14:28 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.h,v 1.13 2011/04/04 08:30:38 mbalmer Exp $	*/
+/*	$NetBSD: md.h,v 1.14 2013/05/14 13:14:28 tsutsui Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -57,7 +57,6 @@
  * or upgrade.
  */
 #define SET_KERNEL_1_NAME	kern-GENERIC
-#define MD_SETS_SELECTED SET_KERNEL_1, SET_SYSTEM, SET_X11_NOSERVERS
 
 /*
  * Machine-specific command to write a new label to a disk.

Index: src/distrib/utils/sysinst/arch/prep/md.h
diff -u src/distrib/utils/sysinst/arch/prep/md.h:1.17 src/distrib/utils/sysinst/arch/prep/md.h:1.18
--- src/distrib/utils/sysinst/arch/prep/md.h:1.17	Mon Apr  4 08:30:40 2011
+++ src/distrib/utils/sysinst/arch/prep/md.h	Tue May 14 13:14:28 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.h,v 1.17 2011/04/04 08:30:40 mbalmer Exp $	*/
+/*	$NetBSD: md.h,v 1.18 2013/05/14 13:14:28 tsutsui Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -74,7 +74,6 @@
  * from floppy.
  */
 #define SET_KERNEL_1_NAME	kern-GENERIC
-#define MD_SETS_SELECTED SET_KERNEL_1, SET_SYSTEM, SET_X11_NOSERVERS
 
 /*
  * Machine-specific command to write a new label to a disk.



CVS commit: src/distrib/utils/sysinst/arch/prep

2013-05-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue May 14 13:15:55 UTC 2013

Modified Files:
src/distrib/utils/sysinst/arch/prep: md.h

Log Message:
Remove pasted but obsolete comments.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/distrib/utils/sysinst/arch/prep/md.h

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

Modified files:

Index: src/distrib/utils/sysinst/arch/prep/md.h
diff -u src/distrib/utils/sysinst/arch/prep/md.h:1.18 src/distrib/utils/sysinst/arch/prep/md.h:1.19
--- src/distrib/utils/sysinst/arch/prep/md.h:1.18	Tue May 14 13:14:28 2013
+++ src/distrib/utils/sysinst/arch/prep/md.h	Tue May 14 13:15:55 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.h,v 1.18 2013/05/14 13:14:28 tsutsui Exp $	*/
+/*	$NetBSD: md.h,v 1.19 2013/05/14 13:15:55 tsutsui Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -66,12 +66,6 @@
  *  Default filesets to fetch and install during installation
  *  or upgrade. The standard sets are:
  *  base etc comp games man misc tests text xbase xcomp xetc xfont xserver
- *
- * i386 has the  MD set kern first, because generic kernels are  too
- * big to fit on install floppies. i386 does not yet include the x sets.
- *
- * Third entry is the last extension name in the split sets for loading
- * from floppy.
  */
 #define SET_KERNEL_1_NAME	kern-GENERIC
 



CVS commit: src/sys/arch/luna68k/dev

2013-05-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue May 14 13:28:01 UTC 2013

Modified Files:
src/sys/arch/luna68k/dev: lunaws.c

Log Message:
Use softint(9) to pass received data into wskbd(9) and wsmouse(9) layers.
It might be problematic to call them from an interrupt handler at IPL_SERIAL.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/luna68k/dev/lunaws.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/luna68k/dev/lunaws.c
diff -u src/sys/arch/luna68k/dev/lunaws.c:1.25 src/sys/arch/luna68k/dev/lunaws.c:1.26
--- src/sys/arch/luna68k/dev/lunaws.c:1.25	Sat Oct 13 06:16:18 2012
+++ src/sys/arch/luna68k/dev/lunaws.c	Tue May 14 13:28:01 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: lunaws.c,v 1.25 2012/10/13 06:16:18 tsutsui Exp $ */
+/* $NetBSD: lunaws.c,v 1.26 2013/05/14 13:28:01 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include sys/cdefs.h			/* RCS ID  Copyright macro defns */
 
-__KERNEL_RCSID(0, $NetBSD: lunaws.c,v 1.25 2012/10/13 06:16:18 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: lunaws.c,v 1.26 2013/05/14 13:28:01 tsutsui Exp $);
 
 #include wsmouse.h
 
@@ -51,6 +51,10 @@ __KERNEL_RCSID(0, $NetBSD: lunaws.c,v 1
 
 #include ioconf.h
 
+#define OMKBD_RXQ_LEN		64
+#define OMKBD_RXQ_LEN_MASK	(OMKBD_RXQ_LEN - 1)
+#define OMKBD_NEXTRXQ(x)	(((x) + 1)  OMKBD_RXQ_LEN_MASK)
+
 static const uint8_t ch1_regs[6] = {
 	WR0_RSTINT,/* Reset E/S Interrupt */
 	WR1_RXALLS,/* Rx per char, No Tx */
@@ -65,11 +69,15 @@ struct ws_softc {
 	struct sioreg	*sc_ctl;
 	uint8_t		sc_wr[6];
 	device_t	sc_wskbddev;
+	uint8_t		sc_rxq[OMKBD_RXQ_LEN];
+	u_int		sc_rxqhead;
+	u_int		sc_rxqtail;
 #if NWSMOUSE  0
 	device_t	sc_wsmousedev;
 	int		sc_msreport;
-	int		buttons, dx, dy;
+	int		sc_msbuttons, sc_msdx, sc_msdy;
 #endif
+	void		*sc_si;
 };
 
 static void omkbd_input(void *, int);
@@ -111,6 +119,7 @@ static const struct wsmouse_accessops om
 #endif
 
 static void wsintr(int);
+static void wssoftintr(void *);
 
 static int  wsmatch(device_t, cfdata_t, void *);
 static void wsattach(device_t, device_t, void *);
@@ -153,6 +162,11 @@ wsattach(device_t parent, device_t self,
 
 	syscnputc((dev_t)1, 0x20); /* keep quiet mouse */
 
+	sc-sc_rxqhead = 0;
+	sc-sc_rxqtail = 0;
+
+	sc-sc_si = softint_establish(SOFTINT_SERIAL, wssoftintr, sc);
+
 	aprint_normal(\n);
 
 	a.console = (args-hwflags == 1);
@@ -179,7 +193,7 @@ wsintr(int chan)
 {
 	struct ws_softc *sc = device_lookup_private(ws_cd, 0);
 	struct sioreg *sio = sc-sc_ctl;
-	u_int code;
+	uint8_t code;
 	int rr;
 
 	rr = getsiocsr(sio);
@@ -190,43 +204,10 @@ wsintr(int chan)
 sio-sio_cmd = WR0_ERRRST;
 continue;
 			}
-#if NWSMOUSE  0
-			/*
-			 * if (code = 0x80  code = 0x87), then
-			 * it's the first byte of 3 byte long mouse report
-			 * 	code[0]  07 - LMR button condition
-			 *	code[1], [2] - x,y delta
-			 * otherwise, key press or release event.
-			 */
-			if (sc-sc_msreport == 0) {
-if (code  0x80 || code  0x87) {
-	omkbd_input(sc, code);
-	continue;
-}
-code = (code  07) ^ 07;
-/* LMR-RML: wsevent counts 0 for leftmost */
-sc-buttons = (code  02);
-if (code  01)
-	sc-buttons |= 04;
-if (code  04)
-	sc-buttons |= 01;
-sc-sc_msreport = 1;
-			} else if (sc-sc_msreport == 1) {
-sc-dx = (signed char)code;
-sc-sc_msreport = 2;
-			} else if (sc-sc_msreport == 2) {
-sc-dy = (signed char)code;
-wsmouse_input(sc-sc_wsmousedev,
-		sc-buttons,
-		sc-dx, sc-dy, 0, 0,
-		WSMOUSE_INPUT_DELTA);
-
-sc-sc_msreport = 0;
-			}
-#else
-			omkbd_input(sc, code);
-#endif
+			sc-sc_rxq[sc-sc_rxqtail] = code;
+			sc-sc_rxqtail = OMKBD_NEXTRXQ(sc-sc_rxqtail);
 		} while ((rr = getsiocsr(sio))  RR_RXRDY);
+		softint_schedule(sc-sc_si);
 	}
 	if (rr  RR_TXRDY)
 		sio-sio_cmd = WR0_RSTPEND;
@@ -234,6 +215,53 @@ wsintr(int chan)
 }
 
 static void
+wssoftintr(void *arg)
+{
+	struct ws_softc *sc = arg;
+	uint8_t code;
+
+	while (sc-sc_rxqhead != sc-sc_rxqtail) {
+		code = sc-sc_rxq[sc-sc_rxqhead];
+		sc-sc_rxqhead = OMKBD_NEXTRXQ(sc-sc_rxqhead);
+#if NWSMOUSE  0
+		/*
+		 * if (code = 0x80  code = 0x87), then
+		 * it's the first byte of 3 byte long mouse report
+		 * 	code[0]  07 - LMR button condition
+		 *	code[1], [2] - x,y delta
+		 * otherwise, key press or release event.
+		 */
+		if (sc-sc_msreport == 0) {
+			if (code  0x80 || code  0x87) {
+omkbd_input(sc, code);
+continue;
+			}
+			code = (code  07) ^ 07;
+			/* LMR-RML: wsevent counts 0 for leftmost */
+			sc-sc_msbuttons = (code  02);
+			if (code  01)
+sc-sc_msbuttons |= 04;
+			if (code  04)
+sc-sc_msbuttons |= 01;
+			sc-sc_msreport = 1;
+		} else if (sc-sc_msreport == 1) {
+			sc-sc_msdx = (int8_t)code;
+			sc-sc_msreport = 2;
+		} else if (sc-sc_msreport == 2) {
+			sc-sc_msdy = (int8_t)code;
+			wsmouse_input(sc-sc_wsmousedev,

CVS commit: src/distrib/utils/sysinst/arch/landisk

2013-05-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue May 14 13:41:48 UTC 2013

Modified Files:
src/distrib/utils/sysinst/arch/landisk: md.h

Log Message:
Add SET_X11_NOSERVERS for default installation sets.
Althrough landisk doesn't have any screen console (except possible udl(4)
and ukbd(4)), it's a good environment to build packages binaries for sh3el,
including dreamcast.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/distrib/utils/sysinst/arch/landisk/md.h

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

Modified files:

Index: src/distrib/utils/sysinst/arch/landisk/md.h
diff -u src/distrib/utils/sysinst/arch/landisk/md.h:1.5 src/distrib/utils/sysinst/arch/landisk/md.h:1.6
--- src/distrib/utils/sysinst/arch/landisk/md.h:1.5	Mon Apr  4 08:30:33 2011
+++ src/distrib/utils/sysinst/arch/landisk/md.h	Tue May 14 13:41:48 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.h,v 1.5 2011/04/04 08:30:33 mbalmer Exp $	*/
+/*	$NetBSD: md.h,v 1.6 2013/05/14 13:41:48 tsutsui Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -57,7 +57,7 @@
  */
 #define SET_KERNEL_1_NAME	kern-GENERIC
 
-#define MD_SETS_SELECTED	SET_KERNEL_1, SET_SYSTEM
+#define MD_SETS_SELECTED	SET_KERNEL_1, SET_SYSTEM, SET_X11_NOSERVERS
 
 /*
  * Machine-specific command to write a new label to a disk.



CVS commit: src/sys/arch/sh3/include

2013-05-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue May 14 13:53:47 UTC 2013

Modified Files:
src/sys/arch/sh3/include: scireg.h

Log Message:
Add a definition of SCSCMR1, smart card mode register available on 7750 etc.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sh3/include/scireg.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/arch/sh3/include/scireg.h
diff -u src/sys/arch/sh3/include/scireg.h:1.9 src/sys/arch/sh3/include/scireg.h:1.10
--- src/sys/arch/sh3/include/scireg.h:1.9	Thu Apr 30 05:19:38 2009
+++ src/sys/arch/sh3/include/scireg.h	Tue May 14 13:53:47 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: scireg.h,v 1.9 2009/04/30 05:19:38 nonaka Exp $ */
+/* $NetBSD: scireg.h,v 1.10 2013/05/14 13:53:47 tsutsui Exp $ */
 
 /*-
  * Copyright (C) 1999 SAITOH Masanobu.  All rights reserved.
@@ -56,6 +56,7 @@
 #define	SHREG_SCTDR	(*(volatile unsigned char *)	0xffec)
 #define	SHREG_SCSSR	(*(volatile unsigned char *)	0xffe00010)
 #define	SHREG_SCRDR	(*(volatile unsigned char *)	0xffe00014)
+#define	SHREG_SCSCMR	(*(volatile unsigned char *)	0xffe00018)
 #define	SHREG_SCSPTR	(*(volatile unsigned char *)	0xffe0001c)
 
 #endif



CVS commit: src/sys/dev/usb

2013-05-14 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Tue May 14 14:03:53 UTC 2013

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

Log Message:
Add quirk for IODATA2 USB2SC.
This works target 0 only.  However supports 4 targets in spec.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/sys/dev/usb/umass_quirks.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/umass_quirks.c
diff -u src/sys/dev/usb/umass_quirks.c:1.94 src/sys/dev/usb/umass_quirks.c:1.95
--- src/sys/dev/usb/umass_quirks.c:1.94	Fri Aug 24 12:20:02 2012
+++ src/sys/dev/usb/umass_quirks.c	Tue May 14 14:03:53 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: umass_quirks.c,v 1.94 2012/08/24 12:20:02 drochner Exp $	*/
+/*	$NetBSD: umass_quirks.c,v 1.95 2013/05/14 14:03:53 kiyohara Exp $	*/
 
 /*
  * Copyright (c) 2001, 2004 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: umass_quirks.c,v 1.94 2012/08/24 12:20:02 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: umass_quirks.c,v 1.95 2013/05/14 14:03:53 kiyohara Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_umass.h
@@ -336,6 +336,14 @@ Static const struct umass_quirk umass_qu
 	  UMATCH_VENDOR_PRODUCT,
 	  NULL, NULL
 	},
+
+	{ { USB_VENDOR_IODATA2, USB_PRODUCT_IODATA2_USB2SC },
+	  UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC,
+	  0,
+	  0,
+	  UMATCH_VENDOR_PRODUCT,
+	  NULL, NULL
+	},
 };
 
 const struct umass_quirk *



CVS commit: src/sys/arch/sh3/sh3

2013-05-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue May 14 14:11:43 UTC 2013

Modified Files:
src/sys/arch/sh3/sh3: cache_sh4.c

Log Message:
Don't call sh4_icache_sync_all() before sh_cache_ops is initialized.
Instead, use SH4_EMODE_CACHE_FLUSH() or SH4_CACHE_FLUSH() macro to
invalidate cache before initializing CCR.
This seems to suppress random file system corruption on wd(4) at acardide(4)
(which uses bus-master DMA and calls many cache flush ops) during pkgsrc
packages builds on landisk.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/sh3/sh3/cache_sh4.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/sh3/sh3/cache_sh4.c
diff -u src/sys/arch/sh3/sh3/cache_sh4.c:1.23 src/sys/arch/sh3/sh3/cache_sh4.c:1.24
--- src/sys/arch/sh3/sh3/cache_sh4.c:1.23	Wed Dec 12 16:24:49 2012
+++ src/sys/arch/sh3/sh3/cache_sh4.c	Tue May 14 14:11:43 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: cache_sh4.c,v 1.23 2012/12/12 16:24:49 tsutsui Exp $	*/
+/*	$NetBSD: cache_sh4.c,v 1.24 2013/05/14 14:11:43 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cache_sh4.c,v 1.23 2012/12/12 16:24:49 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: cache_sh4.c,v 1.24 2013/05/14 14:11:43 tsutsui Exp $);
 
 #include opt_cache.h
 
@@ -118,8 +118,11 @@ sh4_cache_config(void)
 	r |= SH4_CCR_CB;
 #endif
 
-	sh4_icache_sync_all();
 	RUN_P2;
+	if (r  SH4_CCR_EMODE)
+		SH4_EMODE_CACHE_FLUSH();
+	else
+		SH4_CACHE_FLUSH();
 	_reg_write_4(SH4_CCR, SH4_CCR_ICI|SH4_CCR_OCI);
 	_reg_write_4(SH4_CCR, r);
 	RUN_P1;



CVS commit: src/crypto/external/bsd/libsaslc/dist/man

2013-05-14 Thread Roland Dowdeswell
Module Name:src
Committed By:   elric
Date:   Tue May 14 15:33:21 UTC 2013

Modified Files:
src/crypto/external/bsd/libsaslc/dist/man: libsaslc.3

Log Message:
principals have principles.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 \
src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3

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

Modified files:

Index: src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3
diff -u src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.14 src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.15
--- src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.14	Fri Sep 23 16:22:00 2011
+++ src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3	Tue May 14 15:33:21 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: libsaslc.3,v 1.14 2011/09/23 16:22:00 wiz Exp $
+.\	$NetBSD: libsaslc.3,v 1.15 2013/05/14 15:33:21 elric Exp $
 .\
 .\ Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -682,7 +682,7 @@ to the file
 .Pa /etc/saslc.d/postfix/mech/GSSAPI.conf
 so that the
 .Em postfix
-principle will be used for authentication.
+principal will be used for authentication.
 Enable
 .Em SASL
 in the smtp client.



CVS commit: src/usr.sbin/makemandb

2013-05-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May 15 00:35:02 UTC 2013

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

Log Message:
avoid stdio assertion, failing later


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/usr.sbin/makemandb/makemandb.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/makemandb/makemandb.c
diff -u src/usr.sbin/makemandb/makemandb.c:1.18 src/usr.sbin/makemandb/makemandb.c:1.19
--- src/usr.sbin/makemandb/makemandb.c:1.18	Sun Feb 10 18:24:18 2013
+++ src/usr.sbin/makemandb/makemandb.c	Tue May 14 20:35:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: makemandb.c,v 1.18 2013/02/10 23:24:18 christos Exp $	*/
+/*	$NetBSD: makemandb.c,v 1.19 2013/05/15 00:35:02 christos Exp $	*/
 /*
  * Copyright (c) 2011 Abhinav Upadhyay er.abhinav.upadh...@gmail.com
  * Copyright (c) 2011 Kristaps Dzonsons krist...@bsd.lv
@@ -17,7 +17,7 @@
  */
 
 #include sys/cdefs.h
-__RCSID($NetBSD: makemandb.c,v 1.18 2013/02/10 23:24:18 christos Exp $);
+__RCSID($NetBSD: makemandb.c,v 1.19 2013/05/15 00:35:02 christos Exp $);
 
 #include sys/stat.h
 #include sys/types.h
@@ -349,8 +349,12 @@ main(int argc, char *argv[])
 		manconf = MANCONF;
 	}
 
-	if (mflags.recreate)
-		remove(get_dbpath(manconf));
+	if (mflags.recreate) {
+		char *dbp = get_dbpath(manconf);
+		/* No error here, it will fail in init_db in the same call */
+		if (dbp != NULL)
+			remove(dbp);
+	}
 
 	if ((db = init_db(MANDB_CREATE, manconf)) == NULL)
 		exit(EXIT_FAILURE);



CVS commit: src/sbin/disklabel

2013-05-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed May 15 00:47:43 UTC 2013

Modified Files:
src/sbin/disklabel: main.c

Log Message:
%td is for ptrdiff_t not for off_t


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sbin/disklabel/main.c

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

Modified files:

Index: src/sbin/disklabel/main.c
diff -u src/sbin/disklabel/main.c:1.34 src/sbin/disklabel/main.c:1.35
--- src/sbin/disklabel/main.c:1.34	Mon May 13 14:01:08 2013
+++ src/sbin/disklabel/main.c	Tue May 14 20:47:43 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.34 2013/05/13 18:01:08 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.35 2013/05/15 00:47:43 christos Exp $	*/
 
 /*
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@ __COPYRIGHT(@(#) Copyright (c) 1987, 19
 static char sccsid[] = @(#)disklabel.c	8.4 (Berkeley) 5/4/95;
 /* from static char sccsid[] = @(#)disklabel.c	1.2 (Symmetric) 11/28/85; */
 #else
-__RCSID($NetBSD: main.c,v 1.34 2013/05/13 18:01:08 christos Exp $);
+__RCSID($NetBSD: main.c,v 1.35 2013/05/15 00:47:43 christos Exp $);
 #endif
 #endif	/* not lint */
 
@@ -1172,28 +1172,28 @@ find_label(int f, u_int sector)
 			if (target32toh(disk_lp-d_magic) == DISKMAGIC_REV 
 			target32toh(disk_lp-d_magic2) == DISKMAGIC_REV)
 warnx(ignoring %sbyteswapped label
- at offset %td from sector %u,
-is_deleted, offset, sector);
+ at offset %jd from sector %u,
+is_deleted, (intmax_t)offset, sector);
 			continue;
 		}
 		if (target16toh(disk_lp-d_npartitions)  maxpartitions ||
 		dkcksum_target(disk_lp) != 0) {
 			if (verbose  0)
-warnx(corrupt label found at offset %td in 
-sector %u, offset, sector);
+warnx(corrupt label found at offset %jd in 
+sector %u, (intmax_t)offset, sector);
 			continue;
 		}
 		if (verbose  1)
-			warnx(%slabel found at offset %td from sector %u,
-			is_deleted, offset, sector);
+			warnx(%slabel found at offset %jd from sector %u,
+			is_deleted, (intmax_t)offset, sector);
 		if (!read_all)
 			return disk_lp;
 
 		/* To print all the labels we have to do it here */
 		/* XXX: maybe we should compare them? */
 		targettohlabel(hlp, disk_lp);
-		printf(# %ssector %u offset %td bytes\n,
-		is_deleted, sector, offset);
+		printf(# %ssector %u offset %jd bytes\n,
+		is_deleted, sector, (intmax_t)offset);
 		if (tflag)
 			makedisktab(stdout, hlp);
 		else {



CVS commit: [khorben-n900] src/sys/arch/arm/omap

2013-05-14 Thread Pierre Pronchery
Module Name:src
Committed By:   khorben
Date:   Wed May 15 02:44:48 UTC 2013

Modified Files:
src/sys/arch/arm/omap [khorben-n900]: omap2_spi.c

Log Message:
Make sure interrupts are cleared on the current channel when initiating a
transfer. Also force the current transfer to be terminated upon end of
transmission.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/arch/arm/omap/omap2_spi.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/omap/omap2_spi.c
diff -u src/sys/arch/arm/omap/omap2_spi.c:1.1.2.3 src/sys/arch/arm/omap/omap2_spi.c:1.1.2.4
--- src/sys/arch/arm/omap/omap2_spi.c:1.1.2.3	Sun May 12 20:11:39 2013
+++ src/sys/arch/arm/omap/omap2_spi.c	Wed May 15 02:44:48 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: omap2_spi.c,v 1.1.2.3 2013/05/12 20:11:39 khorben Exp $ */
+/* $NetBSD: omap2_spi.c,v 1.1.2.4 2013/05/15 02:44:48 khorben Exp $ */
 
 /*
  * Texas Instruments OMAP2/3 Multichannel SPI driver.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: omap2_spi.c,v 1.1.2.3 2013/05/12 20:11:39 khorben Exp $);
+__KERNEL_RCSID(0, $NetBSD: omap2_spi.c,v 1.1.2.4 2013/05/15 02:44:48 khorben Exp $);
 
 #include opt_omap.h
 
@@ -266,6 +266,7 @@ omap2_spi_start(struct omap2_spi_softc *
 {
 	struct omap2_spi_channel *chan;
 	struct spi_transfer *st;
+	uint32_t statusval = 0;
 	uint32_t enableval = 0;
 	uint32_t ctrlreg;
 	uint32_t ctrlval;
@@ -287,27 +288,45 @@ omap2_spi_start(struct omap2_spi_softc *
 
 	switch (channel) {
 		case 0:
+			statusval = OMAP2_MCSPI_IRQSTATUS_RX0_OVERFLOW
+| OMAP2_MCSPI_IRQSTATUS_RX0_FULL
+| OMAP2_MCSPI_IRQSTATUS_TX0_UNDERFLOW
+| OMAP2_MCSPI_IRQSTATUS_TX0_EMPTY;
 			enableval = OMAP2_MCSPI_IRQENABLE_RX0_FULL
 | OMAP2_MCSPI_IRQENABLE_TX0_UNDERFLOW
 | OMAP2_MCSPI_IRQENABLE_TX0_EMPTY;
 			break;
 		case 1:
+			statusval = OMAP2_MCSPI_IRQSTATUS_RX1_FULL
+| OMAP2_MCSPI_IRQSTATUS_TX1_UNDERFLOW
+| OMAP2_MCSPI_IRQSTATUS_TX1_EMPTY;
 			enableval = OMAP2_MCSPI_IRQENABLE_RX1_FULL
 | OMAP2_MCSPI_IRQENABLE_TX1_UNDERFLOW
 | OMAP2_MCSPI_IRQENABLE_TX1_EMPTY;
 			break;
 		case 2:
+			statusval = OMAP2_MCSPI_IRQSTATUS_RX2_FULL
+| OMAP2_MCSPI_IRQSTATUS_TX2_UNDERFLOW
+| OMAP2_MCSPI_IRQSTATUS_TX2_EMPTY;
 			enableval = OMAP2_MCSPI_IRQENABLE_RX2_FULL
 | OMAP2_MCSPI_IRQENABLE_TX2_UNDERFLOW
 | OMAP2_MCSPI_IRQENABLE_TX2_EMPTY;
 			break;
 		case 3:
+			statusval = OMAP2_MCSPI_IRQSTATUS_RX3_FULL
+| OMAP2_MCSPI_IRQSTATUS_TX3_UNDERFLOW
+| OMAP2_MCSPI_IRQSTATUS_TX3_EMPTY;
 			enableval = OMAP2_MCSPI_IRQENABLE_RX3_FULL
 | OMAP2_MCSPI_IRQENABLE_TX3_UNDERFLOW
 | OMAP2_MCSPI_IRQENABLE_TX3_EMPTY;
 			break;
 	}
 
+	/* clear the interrupts for this channel */
+	u32 = SPI_READ_REG(sc, OMAP2_MCSPI_IRQSTATUS);
+	u32 |= statusval;
+	SPI_WRITE_REG(sc, OMAP2_MCSPI_IRQSTATUS, u32);
+
 	/* enable interrupts */
 	u32 = SPI_READ_REG(sc, OMAP2_MCSPI_IRQENABLE);
 	SPI_WRITE_REG(sc, OMAP2_MCSPI_IRQENABLE, u32 | enableval);
@@ -357,6 +376,9 @@ omap2_spi_intr(void *v)
 	for (i = 0; i  sc-sc_spi.sct_nslaves; i++) {
 		chan = sc-sc_channels[i];
 
+		if (!chan-running)
+			continue;
+
 		switch (i) {
 			case 0:
 u32 |= OMAP2_MCSPI_IRQSTATUS_RX0_OVERFLOW
@@ -408,17 +430,15 @@ omap2_spi_intr(void *v)
 			omap2_spi_recv(sc, i);
 		}
 
-		if (chan-wchunk == NULL  chan-rchunk == NULL
- chan-transfer != NULL) {
+		if (chan-wchunk == NULL  chan-rchunk == NULL)
+		{
 			st = chan-transfer;
 			chan-transfer = NULL;
+			KASSERT(st != NULL);
 			spi_done(st, 0);
 
-			spi_transq_dequeue(chan-queue);
-			if ((st = spi_transq_first(chan-queue)) == NULL)
-omap2_spi_stop(sc, i);
-			else
-chan-transfer = st;
+			omap2_spi_stop(sc, i);
+			omap2_spi_start(sc, i);
 
 		}
 	}



CVS commit: src/share/man/man4

2013-05-14 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed May 15 05:30:33 UTC 2013

Modified Files:
src/share/man/man4: options.4

Log Message:
s/can be displayed be calling/can be displayed by calling/

XXX pullup-5


To generate a diff of this commit:
cvs rdiff -u -r1.419 -r1.420 src/share/man/man4/options.4

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

Modified files:

Index: src/share/man/man4/options.4
diff -u src/share/man/man4/options.4:1.419 src/share/man/man4/options.4:1.420
--- src/share/man/man4/options.4:1.419	Wed Dec 19 15:00:34 2012
+++ src/share/man/man4/options.4	Wed May 15 05:30:33 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: options.4,v 1.419 2012/12/19 15:00:34 wiz Exp $
+.\	$NetBSD: options.4,v 1.420 2013/05/15 05:30:33 msaitoh Exp $
 .\
 .\ Copyright (c) 1996
 .\ 	Perry E. Metzger.  All rights reserved.
@@ -30,7 +30,7 @@
 .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\
 .\
-.Dd December 19, 2012
+.Dd May 15, 2013
 .Dt OPTIONS 4
 .Os
 .Sh NAME
@@ -644,7 +644,7 @@ Default is 10 entries.
 .It Cd options UVMHIST
 Enables the UVM history logs, which create in-memory traces of
 various UVM activities.
-These logs can be displayed be calling
+These logs can be displayed by calling
 .Fn uvmhist_dump
 or
 .Fn uvm_hist



CVS commit: src/share/man/man4

2013-05-14 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed May 15 05:47:10 UTC 2013

Modified Files:
src/share/man/man4: options.4

Log Message:
- Add KERNHIST and KERNHIST_PRINT.
- Update UVMHIST and UVMHIST_PRINT.


To generate a diff of this commit:
cvs rdiff -u -r1.420 -r1.421 src/share/man/man4/options.4

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

Modified files:

Index: src/share/man/man4/options.4
diff -u src/share/man/man4/options.4:1.420 src/share/man/man4/options.4:1.421
--- src/share/man/man4/options.4:1.420	Wed May 15 05:30:33 2013
+++ src/share/man/man4/options.4	Wed May 15 05:47:10 2013
@@ -1,4 +1,4 @@
-.\	$NetBSD: options.4,v 1.420 2013/05/15 05:30:33 msaitoh Exp $
+.\	$NetBSD: options.4,v 1.421 2013/05/15 05:47:10 msaitoh Exp $
 .\
 .\ Copyright (c) 1996
 .\ 	Perry E. Metzger.  All rights reserved.
@@ -641,17 +641,31 @@ problems.
 .It Cd options MALLOCLOGSIZE=integer
 Defines the number of entries in the malloc log.
 Default is 10 entries.
+.It Cd options KERNHIST
+Enables the kernel history logs, which create in-memory traces of
+various kernel activities.
+These logs can be displayed by using
+.Cm show kernhist
+from DDB.
+See the kernel source file sys/kern/kern_history.c for details.
+.It Cd options KERNHIST_PRINT
+Prints the kernel history logs on the system console as entries are added.
+Note that the output is
+.Em extremely
+voluminous, so this option is really only useful for debugging
+the very earliest parts of kernel initialization.
 .It Cd options UVMHIST
-Enables the UVM history logs, which create in-memory traces of
-various UVM activities.
-These logs can be displayed by calling
-.Fn uvmhist_dump
-or
-.Fn uvm_hist
-with appropriate arguments from DDB.
+Like
+.Em KERNHIST ,
+it enables the UVM history logs.
+These logs can be displayed by using
+.Cm show kernhist
+from DDB.
 See the kernel source file sys/uvm/uvm_stat.c for details.
 .It Cd options UVMHIST_PRINT
-Prints the UVM history logs on the system console as entries are added.
+Like
+.Em UVMHIST ,
+it prints the UVM history logs on the system console as entries are added.
 Note that the output is
 .Em extremely
 voluminous, so this option is really only useful for debugging