Re: CVS commit: src/sys/kern

2010-10-14 Thread Takahiro Kambe
In message 20101014004717.7887917...@cvs.netbsd.org
on Thu, 14 Oct 2010 00:47:17 +,
matthew green m...@netbsd.org wrote:
 Module Name:  src
 Committed By: mrg
 Date: Thu Oct 14 00:47:17 UTC 2010
 
 Modified Files:
   src/sys/kern: subr_disk.c
 
 Log Message:
 add some (uint64_t) casts so avoid 32 bit overflows.  this fixes my
 3TB disk with 4KB sectors and disklabel (which looks like it would
 work upto 16TB.)
 
 idea from mlel...@.
I think that this small fix should be pulled up to netbsd-4/netbsd-5
branches.

-- 
Takahiro Kambe t...@back-street.net


Re: CVS commit: src/sys/kern

2010-10-14 Thread Andrew Doran
On Thu, Oct 14, 2010 at 04:59:42AM +0100, Mindaugas Rasiukevicius wrote:
 Hello,
 
 Masaru OKI o...@netbsd.org wrote:
  Module Name:src
  Committed By:   oki
  Date:   Thu Oct 14 03:07:52 UTC 2010
  
  Modified Files:
  src/sys/kern: uipc_socket.c
  
  Log Message:
  Wait for freeing mbuf cluster in sosend() causes freeze network stack.
  Don't wait for it.
  problem was found by iij seil team.
  it is similar to OpenBSD uipc_socket.c rev.1.72.
 
 Can you explain what the actual problem M_WAIT causes i.e. how would
 it freeze network stack?

I don't see what it would solve on the face of it, but regardless M_DONTWAIT
is almost certainly the wrong thing to do here.



CVS commit: src/sys/arch/bebox/stand/boot

2010-10-14 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Thu Oct 14 06:12:54 UTC 2010

Modified Files:
src/sys/arch/bebox/stand/boot: boot.c boot.h vreset.c
Added Files:
src/sys/arch/bebox/stand/boot: pci.c

Log Message:
Add pci.c.  Splitted from vreset.c
And cleanup vreset.c.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/bebox/stand/boot/boot.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/bebox/stand/boot/boot.h
cvs rdiff -u -r0 -r1.5 src/sys/arch/bebox/stand/boot/pci.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/bebox/stand/boot/vreset.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/bebox/stand/boot/boot.c
diff -u src/sys/arch/bebox/stand/boot/boot.c:1.18 src/sys/arch/bebox/stand/boot/boot.c:1.19
--- src/sys/arch/bebox/stand/boot/boot.c:1.18	Wed Mar 18 10:22:26 2009
+++ src/sys/arch/bebox/stand/boot/boot.c	Thu Oct 14 06:12:54 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.18 2009/03/18 10:22:26 cegger Exp $	*/
+/*	$NetBSD: boot.c,v 1.19 2010/10/14 06:12:54 kiyohara Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -74,6 +74,8 @@
 		cpu1();
 	resetCPU1();
 
+	scanPCI();
+
 	/*
 	 * console init
 	 */

Index: src/sys/arch/bebox/stand/boot/boot.h
diff -u src/sys/arch/bebox/stand/boot/boot.h:1.8 src/sys/arch/bebox/stand/boot/boot.h:1.9
--- src/sys/arch/bebox/stand/boot/boot.h:1.8	Thu Oct 14 05:52:01 2010
+++ src/sys/arch/bebox/stand/boot/boot.h	Thu Oct 14 06:12:54 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.h,v 1.8 2010/10/14 05:52:01 kiyohara Exp $	*/
+/*	$NetBSD: boot.h,v 1.9 2010/10/14 06:12:54 kiyohara Exp $	*/
 
 #define	TICKS_PER_SEC	(3300 / 4)		/* 33MHz */
 #define	NS_PER_TICK	(10 / TICKS_PER_SEC)
@@ -75,6 +75,19 @@
 int db_monitor(void);
 
 /*
+ * pci
+ */
+void scanPCI(void);
+int findPCIVga(void);
+void enablePCI(int, int, int, int);
+int PCISlotnum(u_int, u_int, u_int);
+int PCIVendor(int);
+u_long PCIAddress(int, u_int, int);
+#ifdef DEBUG
+void printslots(void);
+#endif
+
+/*
  * tgets
  */
 int tgets(char *);

Index: src/sys/arch/bebox/stand/boot/vreset.c
diff -u src/sys/arch/bebox/stand/boot/vreset.c:1.11 src/sys/arch/bebox/stand/boot/vreset.c:1.12
--- src/sys/arch/bebox/stand/boot/vreset.c:1.11	Mon May 26 16:28:39 2008
+++ src/sys/arch/bebox/stand/boot/vreset.c	Thu Oct 14 06:12:54 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: vreset.c,v 1.11 2008/05/26 16:28:39 kiyohara Exp $	*/
+/*	$NetBSD: vreset.c,v 1.12 2010/10/14 06:12:54 kiyohara Exp $	*/
 
 /*
  * Copyright (C) 1995-1997 Gary Thomas (g...@linuxppc.org)
@@ -42,14 +42,9 @@
 
 #ifdef CONS_VGA
 #include lib/libsa/stand.h
-#include sys/bswap.h
 #include boot.h
 #include iso_font.h
 
-#if 0
-static char rcsid[] = vreset.c 2.0 1997 kane  PEK'97 Exp $;
-#endif
-
 /*
  * VGA Register
  */
@@ -436,18 +431,14 @@
 	0x0C, 0x00, 0x0F, 0x08, 0x00
 };
 
-void enablePCIvideo(int);
-static int scanPCI(void);
-static int PCIVendor(int);
-int delayLoop(int);
-void writeAttr(u_char, u_char, u_char);
-void setTextRegs(struct VgaRegs *);
-void setTextCLUT(void);
-void loadFont(u_char *);
-void unlockS3(void);
-#ifdef DEBUG
-static void printslots(void);
-#endif
+
+static int delayLoop(int);
+static void writeAttr(u_char, u_char, u_char);
+static void setTextRegs(struct VgaRegs *);
+static void setTextCLUT(void);
+static void loadFont(u_char *);
+static void unlockS3(void);
+statuc void enablePCIvideo(int);
 
 void
 vga_reset(u_char *ISA_mem)
@@ -461,8 +452,8 @@
 		return;
 
 	/* If no VGA responding in text mode, then we have some work to do... */
-	slot = scanPCI();	/* find video card in use  */
-	enablePCIvideo(slot);  	/* enable I/O to card  */
+	slot = findPCIVga();		/* find video card in use */
+	enablePCIvideo(slot);		/* enable I/O to card */
 
 	/*
  * Note: the PCI scanning code does not yet work correctly
@@ -527,16 +518,33 @@
 	};
 
 #ifdef DEBUG
-	printslots();
+	printPCIslots();
 	delayLoop(5);
 #endif
 	delayLoop(2);		/* give time for the video monitor to come up */
 }
 
+static int
+delayLoop(int k)
+{
+	volatile int a, b;
+	volatile int i, j;
+	a = 0;
+	do {
+		for (i = 0; i  500; i++) {
+			b = i;
+			for (j = 0; j  200; j++) {
+a = b+j;
+			}
+		}
+	} while (k--);
+	return a;
+}
+
 /*
  * Write to VGA Attribute registers.
  */
-void
+static void
 writeAttr(u_char index, u_char data, u_char videoOn)
 {
 	u_char v;
@@ -548,7 +556,7 @@
 	outb(0x3c0, data);
 }
 
-void
+static void
 setTextRegs(struct VgaRegs *svp)
 {
 	int i;
@@ -574,7 +582,7 @@
 	writeAttr(0x14, 0x00, 1);	/* color select; video on */
 }
 
-void
+static void
 setTextCLUT(void)
 {
 	int i;
@@ -591,7 +599,7 @@
 	}
 }
 
-void
+static void
 loadFont(u_char *ISA_mem)
 {
 	int i, j;
@@ -603,7 +611,7 @@
 	 */
 	i = inb(0x3DA);		/* Reset Attr toggle */
 
-	outb(0x3C0,0x30);
+	outb(0x3C0, 0x30);
 	outb(0x3C0, 0x01);	/* graphics mode */
 
 	outw(0x3C4, 0x0001);	/* reset sequencer */
@@ -622,7 +630,7 @@

CVS commit: src/sys/arch/bebox/stand/boot

2010-10-14 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Thu Oct 14 06:17:29 UTC 2010

Modified Files:
src/sys/arch/bebox/stand/boot: Makefile

Log Message:
Add pci.c to SRCS.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/bebox/stand/boot/Makefile

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

Modified files:

Index: src/sys/arch/bebox/stand/boot/Makefile
diff -u src/sys/arch/bebox/stand/boot/Makefile:1.26 src/sys/arch/bebox/stand/boot/Makefile:1.27
--- src/sys/arch/bebox/stand/boot/Makefile:1.26	Thu Oct 14 05:40:40 2010
+++ src/sys/arch/bebox/stand/boot/Makefile	Thu Oct 14 06:17:29 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.26 2010/10/14 05:40:40 kiyohara Exp $
+#	$NetBSD: Makefile,v 1.27 2010/10/14 06:17:29 kiyohara Exp $
 
 NOMAN= # defined
 
@@ -23,7 +23,7 @@
 SRCS= srt0.s
 SRCS+= boot.c clock.c com.c conf.c cons.c cpu.c devopen.c
 SRCS+= fd.c filesystem.c inkernel.c io.c kbd.c monitor.c ns16550.c
-SRCS+= prf.c tgets.c vers.c vga.c video.c vreset.c
+SRCS+= pci.c prf.c tgets.c vers.c vga.c video.c vreset.c
 SRCS+= setjmp.S
 
 CFLAGS= -Wno-main -ffreestanding



CVS commit: src/sys/arch/bebox/stand/boot

2010-10-14 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Thu Oct 14 06:17:57 UTC 2010

Modified Files:
src/sys/arch/bebox/stand/boot: boot.c

Log Message:
Add _rtt().  But it is NULL function.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/bebox/stand/boot/boot.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/bebox/stand/boot/boot.c
diff -u src/sys/arch/bebox/stand/boot/boot.c:1.19 src/sys/arch/bebox/stand/boot/boot.c:1.20
--- src/sys/arch/bebox/stand/boot/boot.c:1.19	Thu Oct 14 06:12:54 2010
+++ src/sys/arch/bebox/stand/boot/boot.c	Thu Oct 14 06:17:57 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.19 2010/10/14 06:12:54 kiyohara Exp $	*/
+/*	$NetBSD: boot.c,v 1.20 2010/10/14 06:17:57 kiyohara Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -209,3 +209,10 @@
 		(void *)marks[MARK_ENTRY]);
 	}
 }
+
+void
+_rtt(void)
+{
+
+	/*  */
+}



CVS commit: src/sys/arch/bebox/stand/boot

2010-10-14 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Thu Oct 14 06:23:27 UTC 2010

Modified Files:
src/sys/arch/bebox/stand/boot: version

Log Message:
s/,vga}/,_vga}/.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/bebox/stand/boot/version

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/bebox/stand/boot/version
diff -u src/sys/arch/bebox/stand/boot/version:1.7 src/sys/arch/bebox/stand/boot/version:1.8
--- src/sys/arch/bebox/stand/boot/version:1.7	Mon May 26 16:28:39 2008
+++ src/sys/arch/bebox/stand/boot/version	Thu Oct 14 06:23:27 2010
@@ -1,4 +1,4 @@
-$NetBSD: version,v 1.7 2008/05/26 16:28:39 kiyohara Exp $
+$NetBSD: version,v 1.8 2010/10/14 06:23:27 kiyohara Exp $
 
 1.1:		Boot program for BeBox; initial revision
 1.2:		check BUS FREQ, add clock information
@@ -7,4 +7,4 @@
 1.5:		loadfile() update to avoid backwards seeks for ELF Program
 		Headers.
 1.6:		Support framebuffer and vga.
-		Split boot{,_com0,vga}.
+		Split boot{,_com0,_vga}.



CVS commit: src/sys/arch/bebox/stand/boot

2010-10-14 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Thu Oct 14 06:39:52 UTC 2010

Modified Files:
src/sys/arch/bebox/stand/boot: boot.c conf.c devopen.c fd.c

Log Message:
Change format of path for device.  A current form strangely feels dissatisfied.
This new format looks like the format of BootROM of BeBox.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/bebox/stand/boot/boot.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/bebox/stand/boot/conf.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/bebox/stand/boot/devopen.c \
src/sys/arch/bebox/stand/boot/fd.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/bebox/stand/boot/boot.c
diff -u src/sys/arch/bebox/stand/boot/boot.c:1.20 src/sys/arch/bebox/stand/boot/boot.c:1.21
--- src/sys/arch/bebox/stand/boot/boot.c:1.20	Thu Oct 14 06:17:57 2010
+++ src/sys/arch/bebox/stand/boot/boot.c	Thu Oct 14 06:39:52 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.20 2010/10/14 06:17:57 kiyohara Exp $	*/
+/*	$NetBSD: boot.c,v 1.21 2010/10/14 06:39:52 kiyohara Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -42,10 +42,9 @@
 #include boot.h
 
 char *names[] = {
-	in(),
-	fd(0,1,0)netbsd, fd(0,1,0)netbsd.gz,
-	fd(0,1,0)netbsd.old, fd(0,1,0)netbsd.old.gz,
-	fd(0,1,0)onetbsd, fd(0,1,0)onetbsd.gz
+	/dev/disk/floppy:netbsd,	/dev/disk/floppy:netbsd.gz,
+	/dev/disk/floppy:onetbsd,	/dev/disk/floppy:onetbsd.gz
+	in,
 };
 #define	NUMNAMES (sizeof (names) / sizeof (names[0]))
 

Index: src/sys/arch/bebox/stand/boot/conf.c
diff -u src/sys/arch/bebox/stand/boot/conf.c:1.6 src/sys/arch/bebox/stand/boot/conf.c:1.7
--- src/sys/arch/bebox/stand/boot/conf.c:1.6	Sun Dec 11 12:17:04 2005
+++ src/sys/arch/bebox/stand/boot/conf.c	Thu Oct 14 06:39:52 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: conf.c,v 1.6 2005/12/11 12:17:04 christos Exp $	*/
+/*	$NetBSD: conf.c,v 1.7 2010/10/14 06:39:52 kiyohara Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -34,17 +34,19 @@
 #include sys/param.h
 #include lib/libsa/stand.h
 
-int fdstrategy(void *, int, daddr_t, size_t, void *, size_t *);
-int fdopen(struct open_file *, ...);
-int fdclose(struct open_file *);
-
-int instrategy(void *, int, daddr_t, size_t, void *, size_t *);
-int inopen(struct open_file *, ...);
-int inclose(struct open_file *);
+extern int fdstrategy(void *, int, daddr_t, size_t, void *, size_t *);
+extern int fdopen(struct open_file *, ...);
+extern int fdclose(struct open_file *);
+
+extern int instrategy(void *, int, daddr_t, size_t, void *, size_t *);
+extern int inopen(struct open_file *, ...);
+extern int inclose(struct open_file *);
 
 struct devsw devsw[] = {
 	{ fd, fdstrategy, fdopen, fdclose, noioctl },
-	{ in, instrategy, inopen, inclose, noioctl },
+
+	{ NULL, NULL,   NULL,   NULL,NULL },
 };
+struct devsw pseudo_devsw = { in, instrategy, inopen, inclose, noioctl };
 
 int ndevs = sizeof(devsw) / sizeof(devsw[0]);

Index: src/sys/arch/bebox/stand/boot/devopen.c
diff -u src/sys/arch/bebox/stand/boot/devopen.c:1.9 src/sys/arch/bebox/stand/boot/devopen.c:1.10
--- src/sys/arch/bebox/stand/boot/devopen.c:1.9	Mon May 26 16:28:39 2008
+++ src/sys/arch/bebox/stand/boot/devopen.c	Thu Oct 14 06:39:52 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: devopen.c,v 1.9 2008/05/26 16:28:39 kiyohara Exp $	*/
+/*	$NetBSD: devopen.c,v 1.10 2010/10/14 06:39:52 kiyohara Exp $	*/
 
 /*-
  *  Copyright (c) 1993 John Brezak
@@ -33,125 +33,132 @@
 #include sys/param.h
 #include sys/reboot.h
 
-#define	ispart(c)	((c) = 'a'  (c) = 'h')
-
-static int atoi(char *);
-static int devlookup(char *);
 static int devparse(const char *, int *, int *, int *, int *, int *, char **);
 
 
-static int
-atoi(char *cp)
-{
-	int val = 0;
-
-	while (isdigit(*cp))
-		val = val * 10 + (*cp++ - '0');
-	return val;
-}
-
-static int
-devlookup(char *d)
-{
-	struct devsw *dp = devsw;
-	int i;
-
-	for (i = 0; i  ndevs; i++, dp++)
-		if (dp-dv_name  strcmp(dp-dv_name, d) == 0)
-			return i;
-
-	printf(No such device - Configured devices are:\n);
-	for (dp = devsw, i = 0; i  ndevs; i++, dp++)
-		if (dp-dv_name)
-			printf( %s, dp-dv_name);
-	printf(\n);
-	return -1;
-}
-
 /*
- * Parse a device spec in one of two forms.
- *   dev(ctlr, unit, part)file
+ * Parse a device spec.
+ *   i.e.
+ * /dev/disk/floppy
+ * /dev/disk/ide/0/master/0
+ * /dev/disk/ide/0/slave/0
+ * /dev/disk/scsi/0/0/0
+ * /dev/disk/scsi/0/3/0
  */
 static int
-devparse(const char *fname, int *dev, int *adapt, int *ctlr, int *unit,
+devparse(const char *fname, int *dev, int *ctlr, int *unit, int *lunit,
 	 int *part, char **file)
 {
-	int argc, flag;
-	char *s, *args[3];
-	extern char nametmp[];
-
-	/* get device name and make lower case */
-	strcpy(nametmp, (char *)fname);
-	for (s = nametmp; *s  *s != '('; s++)
-		if (isupper(*s)) *s = tolower(*s);
-
-	if (*s == '(') {
-		/* lookup device and get index */
-		*s = NULL;
-		if ((*dev = devlookup(nametmp)) 

CVS commit: src/sys/arch/bebox/stand/boot

2010-10-14 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Thu Oct 14 06:50:44 UTC 2010

Modified Files:
src/sys/arch/bebox/stand/boot: Makefile boot.c conf.c filesystem.c
version
Added Files:
src/sys/arch/bebox/stand/boot: wd.c wdc.c wdvar.h

Log Message:
Support kernel load from IDE HDD with onboard wdc.  like cobalt, sandpoint.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/bebox/stand/boot/Makefile
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/bebox/stand/boot/boot.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/bebox/stand/boot/conf.c \
src/sys/arch/bebox/stand/boot/filesystem.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/bebox/stand/boot/version
cvs rdiff -u -r0 -r1.1 src/sys/arch/bebox/stand/boot/wd.c \
src/sys/arch/bebox/stand/boot/wdc.c src/sys/arch/bebox/stand/boot/wdvar.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/bebox/stand/boot/Makefile
diff -u src/sys/arch/bebox/stand/boot/Makefile:1.27 src/sys/arch/bebox/stand/boot/Makefile:1.28
--- src/sys/arch/bebox/stand/boot/Makefile:1.27	Thu Oct 14 06:17:29 2010
+++ src/sys/arch/bebox/stand/boot/Makefile	Thu Oct 14 06:50:43 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.27 2010/10/14 06:17:29 kiyohara Exp $
+#	$NetBSD: Makefile,v 1.28 2010/10/14 06:50:43 kiyohara Exp $
 
 NOMAN= # defined
 
@@ -23,7 +23,7 @@
 SRCS= srt0.s
 SRCS+= boot.c clock.c com.c conf.c cons.c cpu.c devopen.c
 SRCS+= fd.c filesystem.c inkernel.c io.c kbd.c monitor.c ns16550.c
-SRCS+= pci.c prf.c tgets.c vers.c vga.c video.c vreset.c
+SRCS+= pci.c prf.c tgets.c vers.c vga.c video.c vreset.c wdc.c wd.c
 SRCS+= setjmp.S
 
 CFLAGS= -Wno-main -ffreestanding

Index: src/sys/arch/bebox/stand/boot/boot.c
diff -u src/sys/arch/bebox/stand/boot/boot.c:1.21 src/sys/arch/bebox/stand/boot/boot.c:1.22
--- src/sys/arch/bebox/stand/boot/boot.c:1.21	Thu Oct 14 06:39:52 2010
+++ src/sys/arch/bebox/stand/boot/boot.c	Thu Oct 14 06:50:44 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.21 2010/10/14 06:39:52 kiyohara Exp $	*/
+/*	$NetBSD: boot.c,v 1.22 2010/10/14 06:50:44 kiyohara Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -40,9 +40,12 @@
 #include machine/cpu.h
 
 #include boot.h
+#include wdvar.h
 
 char *names[] = {
+	/dev/disk/ide/0/master/0_0:/netbsd,
 	/dev/disk/floppy:netbsd,	/dev/disk/floppy:netbsd.gz,
+	/dev/disk/ide/0/master/0_0:/onetbsd,
 	/dev/disk/floppy:onetbsd,	/dev/disk/floppy:onetbsd.gz
 	in,
 };
@@ -115,11 +118,6 @@
 	p += sizeof (btinfo_console);
 	memcpy(p, (void *)btinfo_clock, sizeof (btinfo_clock));
 
-	/*
-	 * attached kernel check
-	 */
-	init_in();
-
 	runCPU1((void *)start_CPU1);
 	wait_for(CPU1_alive);
 
@@ -127,6 +125,16 @@
 	printf( (%s, %s)\n, bootprog_maker, bootprog_date);
 	printf( Memory: %d k\n, btinfo_memory.memsize / 1024);
 
+	/*
+	 * attached kernel check and copy.
+	 */
+	init_in();
+
+	printf(\n);
+
+	/* Initialize w...@isa port 0x1f0 */
+	wdc_init(0x1f0);
+
 	for (;;) {
 		name = names[n++];
 		if (n = NUMNAMES)

Index: src/sys/arch/bebox/stand/boot/conf.c
diff -u src/sys/arch/bebox/stand/boot/conf.c:1.7 src/sys/arch/bebox/stand/boot/conf.c:1.8
--- src/sys/arch/bebox/stand/boot/conf.c:1.7	Thu Oct 14 06:39:52 2010
+++ src/sys/arch/bebox/stand/boot/conf.c	Thu Oct 14 06:50:44 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: conf.c,v 1.7 2010/10/14 06:39:52 kiyohara Exp $	*/
+/*	$NetBSD: conf.c,v 1.8 2010/10/14 06:50:44 kiyohara Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -42,8 +42,13 @@
 extern int inopen(struct open_file *, ...);
 extern int inclose(struct open_file *);
 
+extern int wdstrategy(void *, int, daddr_t, size_t, void *, size_t *);
+extern int wdopen(struct open_file *, ...);
+extern int wdclose(struct open_file *);
+
 struct devsw devsw[] = {
 	{ fd, fdstrategy, fdopen, fdclose, noioctl },
+	{ wd, wdstrategy, wdopen, wdclose, noioctl },
 
 	{ NULL, NULL,   NULL,   NULL,NULL },
 };
Index: src/sys/arch/bebox/stand/boot/filesystem.c
diff -u src/sys/arch/bebox/stand/boot/filesystem.c:1.7 src/sys/arch/bebox/stand/boot/filesystem.c:1.8
--- src/sys/arch/bebox/stand/boot/filesystem.c:1.7	Mon May 26 16:28:39 2008
+++ src/sys/arch/bebox/stand/boot/filesystem.c	Thu Oct 14 06:50:44 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: filesystem.c,v 1.7 2008/05/26 16:28:39 kiyohara Exp $	*/
+/*	$NetBSD: filesystem.c,v 1.8 2010/10/14 06:50:44 kiyohara Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -30,8 +30,11 @@
  */
 
 #include lib/libsa/stand.h
+#include ufs.h
 
 struct fs_ops file_system[] = {
+	FS_OPS(ffsv1),
+	FS_OPS(ffsv2),
 	FS_OPS(null),
 };
 

Index: src/sys/arch/bebox/stand/boot/version
diff -u src/sys/arch/bebox/stand/boot/version:1.8 src/sys/arch/bebox/stand/boot/version:1.9
--- src/sys/arch/bebox/stand/boot/version:1.8	Thu Oct 14 06:23:27 2010
+++ src/sys/arch/bebox/stand/boot/version	Thu Oct 14 06:50:44 2010
@@ -1,4 +1,4 @@
-$NetBSD: version,v 1.8 2010/10/14 

CVS commit: src/sys/netbt

2010-10-14 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Thu Oct 14 07:05:03 UTC 2010

Modified Files:
src/sys/netbt: hci_link.c

Log Message:
Some Broadcom controllers emit empty ACL packets during connection
setup, using the handle that they have not yet told us for the
connection-to-be. Disconnecting can cause problems so just ignore
zero length ACL packets on unknown connection handles.

fixes a problem reported by Nick Hudson


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/netbt/hci_link.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/netbt/hci_link.c
diff -u src/sys/netbt/hci_link.c:1.21 src/sys/netbt/hci_link.c:1.22
--- src/sys/netbt/hci_link.c:1.21	Thu Sep 24 19:35:09 2009
+++ src/sys/netbt/hci_link.c	Thu Oct 14 07:05:03 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: hci_link.c,v 1.21 2009/09/24 19:35:09 plunky Exp $	*/
+/*	$NetBSD: hci_link.c,v 1.22 2010/10/14 07:05:03 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2005 Iain Hibbert.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hci_link.c,v 1.21 2009/09/24 19:35:09 plunky Exp $);
+__KERNEL_RCSID(0, $NetBSD: hci_link.c,v 1.22 2010/10/14 07:05:03 plunky Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -467,10 +467,16 @@
 		 * for, just get rid of it. This may happen, if a USB dongle
 		 * is plugged into a self powered hub and does not reset when
 		 * the system is shut down.
+		 *
+		 * This can cause a problem with some Broadcom controllers
+		 * which emit empty ACL packets during connection setup, so
+		 * only disconnect where data is present.
 		 */
-		cp.con_handle = htole16(handle);
-		cp.reason = 0x13; /* Remote User Terminated Connection */
-		hci_send_cmd(unit, HCI_CMD_DISCONNECT, cp, sizeof(cp));
+		if (hdr.length  0) {
+			cp.con_handle = htole16(handle);
+			cp.reason = 0x13;/*Remote User Terminated Connection*/
+			hci_send_cmd(unit, HCI_CMD_DISCONNECT, cp, sizeof(cp));
+		}
 		goto bad;
 	}
 



CVS commit: src/include

2010-10-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 14 07:51:21 UTC 2010

Modified Files:
src/include: link_elf.h

Log Message:
Move a comment so that it is correct.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/include/link_elf.h

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

Modified files:

Index: src/include/link_elf.h
diff -u src/include/link_elf.h:1.8 src/include/link_elf.h:1.9
--- src/include/link_elf.h:1.8	Wed Nov  4 19:28:03 2009
+++ src/include/link_elf.h	Thu Oct 14 07:51:21 2010
@@ -1,8 +1,4 @@
-/*	$NetBSD: link_elf.h,v 1.8 2009/11/04 19:28:03 pooka Exp $	*/
-
-/*
- * This only exists for GDB.
- */
+/*	$NetBSD: link_elf.h,v 1.9 2010/10/14 07:51:21 skrll Exp $	*/
 
 #ifndef _LINK_ELF_H_
 #define	_LINK_ELF_H_
@@ -22,6 +18,9 @@
 	struct link_map *l_prev;
 } Link_map;
 
+/*
+ * This only exists for GDB.
+ */
 struct r_debug {
 	int r_version;			/* not used */
 	struct link_map *r_map;		/* list of loaded images */



CVS commit: src/sys/sys

2010-10-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 14 07:57:34 UTC 2010

Modified Files:
src/sys/sys: exec_elf.h

Log Message:
Define PT_TLS.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/sys/exec_elf.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/sys/exec_elf.h
diff -u src/sys/sys/exec_elf.h:1.104 src/sys/sys/exec_elf.h:1.105
--- src/sys/sys/exec_elf.h:1.104	Thu Sep 30 09:11:19 2010
+++ src/sys/sys/exec_elf.h	Thu Oct 14 07:57:34 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.h,v 1.104 2010/09/30 09:11:19 skrll Exp $	*/
+/*	$NetBSD: exec_elf.h,v 1.105 2010/10/14 07:57:34 skrll Exp $	*/
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -348,7 +348,8 @@
 #define	PT_NOTE		4		/* Auxiliary information */
 #define	PT_SHLIB	5		/* Reserved, unspecified semantics */
 #define	PT_PHDR		6		/* Entry for header table itself */
-#define	PT_NUM		7
+#define	PT_TLS		7		/* TLS initialisation image */
+#define	PT_NUM		8
 
 #define	PT_LOOS 0x6000	/* OS-specific range */
 #define	PT_HIOS 0x6fff



CVS commit: src/sys/arch/news68k/news68k

2010-10-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Oct 14 16:31:16 UTC 2010

Modified Files:
src/sys/arch/news68k/news68k: machdep.c

Log Message:
Prepare empty module_init_md() for options MODULAR.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/arch/news68k/news68k/machdep.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/news68k/news68k/machdep.c
diff -u src/sys/arch/news68k/news68k/machdep.c:1.85 src/sys/arch/news68k/news68k/machdep.c:1.86
--- src/sys/arch/news68k/news68k/machdep.c:1.85	Mon Feb  8 19:02:30 2010
+++ src/sys/arch/news68k/news68k/machdep.c	Thu Oct 14 16:31:16 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.85 2010/02/08 19:02:30 joerg Exp $	*/
+/*	$NetBSD: machdep.c,v 1.86 2010/10/14 16:31:16 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -77,7 +77,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.85 2010/02/08 19:02:30 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.86 2010/10/14 16:31:16 tsutsui Exp $);
 
 #include opt_ddb.h
 #include opt_compat_netbsd.h
@@ -101,6 +101,7 @@
 #include sys/core.h
 #include sys/kcore.h
 #include sys/ksyms.h
+#include sys/module.h
 
 #ifdef DDB
 #include machine/db_machdep.h
@@ -1081,3 +1082,13 @@
 		Debugger();
 #endif
 }
+
+#ifdef MODULAR
+/*
+ * Push any modules loaded by the bootloader etc.
+ */
+void
+module_init_md(void)
+{
+}
+#endif



CVS commit: src/sys/arch/m68k/m68k

2010-10-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Oct 14 16:33:50 UTC 2010

Modified Files:
src/sys/arch/m68k/m68k: kobj_machdep.c

Log Message:
Fix reloc calcurations (mechanically pulled from working i386 and sh3).
Now options MODULAR works at least on news68k:

# uname -mrs
NetBSD 5.99.39 news68k
# modstat|grep filesys
coredump misc   filesys2 2790 -
exec_aoutmisc   filesys0 1866 coredump
exec_elf32   misc   filesys0 6072 coredump
exec_script  misc   filesys0 972  -
kernfs   vfsfilesys0 9734 -
mfs  vfsfilesys0 3656 ffs
procfs   vfsfilesys0 23924-
#


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/m68k/m68k/kobj_machdep.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/m68k/m68k/kobj_machdep.c
diff -u src/sys/arch/m68k/m68k/kobj_machdep.c:1.2 src/sys/arch/m68k/m68k/kobj_machdep.c:1.3
--- src/sys/arch/m68k/m68k/kobj_machdep.c:1.2	Mon Apr 28 20:23:27 2008
+++ src/sys/arch/m68k/m68k/kobj_machdep.c	Thu Oct 14 16:33:50 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: kobj_machdep.c,v 1.2 2008/04/28 20:23:27 martin Exp $	*/
+/*	$NetBSD: kobj_machdep.c,v 1.3 2010/10/14 16:33:50 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kobj_machdep.c,v 1.2 2008/04/28 20:23:27 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: kobj_machdep.c,v 1.3 2010/10/14 16:33:50 tsutsui Exp $);
 
 #define	ELFSIZE		ARCH_ELFSIZE
 
@@ -64,8 +64,7 @@
 		addr = kobj_sym_lookup(ko, symnum);
 		if (addr == 0)
 			return -1;
-		tmp = (Elf_Addr)(relocbase + addr +
-		rela-r_addend) - (Elf_Addr)where;
+		tmp = (Elf_Addr)(addr + rela-r_addend) - (Elf_Addr)where;
 		if (*where != tmp)
 			*where = tmp;
 		break;
@@ -75,14 +74,12 @@
 		addr = kobj_sym_lookup(ko, symnum);
 		if (addr == 0)
 			return -1;
-		tmp = (Elf_Addr)(relocbase + addr +
-		rela-r_addend);
-		if (*where != tmp)
-			*where = tmp;
+		tmp = (Elf_Addr)(addr + *where + rela-r_addend);
+		*where = tmp;
 		break;
 
 	case R_TYPE(RELATIVE):
-		*where += (Elf_Addr)relocbase;
+		*where += (Elf_Addr)(relocbase + rela-r_addend);
 		break;
 
 	default:



CVS commit: src/sys/arch/m68k/m68k

2010-10-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Oct 14 16:34:29 UTC 2010

Modified Files:
src/sys/arch/m68k/m68k: m68k_syscall.c

Log Message:
Un-ifdef COMPAT_AOUT_M68K for MODULAR kernel.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/m68k/m68k/m68k_syscall.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/m68k/m68k/m68k_syscall.c
diff -u src/sys/arch/m68k/m68k/m68k_syscall.c:1.41 src/sys/arch/m68k/m68k/m68k_syscall.c:1.42
--- src/sys/arch/m68k/m68k/m68k_syscall.c:1.41	Mon Apr 26 15:07:01 2010
+++ src/sys/arch/m68k/m68k/m68k_syscall.c	Thu Oct 14 16:34:29 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: m68k_syscall.c,v 1.41 2010/04/26 15:07:01 tsutsui Exp $	*/
+/*	$NetBSD: m68k_syscall.c,v 1.42 2010/10/14 16:34:29 tsutsui Exp $	*/
 
 /*-
  * Portions Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -110,7 +110,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: m68k_syscall.c,v 1.41 2010/04/26 15:07:01 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: m68k_syscall.c,v 1.42 2010/10/14 16:34:29 tsutsui Exp $);
 
 #include opt_execfmt.h
 #include opt_compat_netbsd.h
@@ -144,9 +144,7 @@
 
 void syscall(register_t, struct frame);
 
-#ifdef COMPAT_AOUT_M68K
 void	aoutm68k_syscall_intern(struct proc *);
-#endif
 static void syscall_plain(register_t, struct lwp *, struct frame *);
 static void syscall_fancy(register_t, struct lwp *, struct frame *);
 
@@ -192,7 +190,6 @@
 		p-p_md.md_syscall = syscall_plain;
 }
 
-#ifdef COMPAT_AOUT_M68K
 /*
  * Not worth the effort of a whole new set of syscall_{plain,fancy} functions
  */
@@ -205,7 +202,6 @@
 	else
 		p-p_md.md_syscall = syscall_plain;
 }
-#endif
 
 static void
 syscall_plain(register_t code, struct lwp *l, struct frame *frame)



CVS commit: src/share/man/man3

2010-10-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 14 20:14:51 UTC 2010

Modified Files:
src/share/man/man3: dirent.3

Log Message:
Fix RCSID


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man3/dirent.3

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/man3/dirent.3
diff -u src/share/man/man3/dirent.3:1.2 src/share/man/man3/dirent.3:1.3
--- src/share/man/man3/dirent.3:1.2	Sun May 16 15:56:39 2010
+++ src/share/man/man3/dirent.3	Thu Oct 14 20:14:50 2010
@@ -1,4 +1,4 @@
-.\ $NetBSD $
+.\ $NetBSD: dirent.3,v 1.3 2010/10/14 20:14:50 skrll Exp $
 .\
 .\ Copyright (c) 1983, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.



CVS commit: src/sys/rump/dev/lib/libnpf

2010-10-14 Thread Adam Hamsik
Module Name:src
Committed By:   haad
Date:   Thu Oct 14 22:39:30 UTC 2010

Added Files:
src/sys/rump/dev/lib/libnpf: Makefile component.c shlib_version

Log Message:
Add files needed to build npf as a RUMP library, original code bu rmind
some modifications done by me.

Oked by @rmind.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libnpf/Makefile \
src/sys/rump/dev/lib/libnpf/component.c \
src/sys/rump/dev/lib/libnpf/shlib_version

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

Added files:

Index: src/sys/rump/dev/lib/libnpf/Makefile
diff -u /dev/null src/sys/rump/dev/lib/libnpf/Makefile:1.1
--- /dev/null	Thu Oct 14 22:39:30 2010
+++ src/sys/rump/dev/lib/libnpf/Makefile	Thu Oct 14 22:39:30 2010
@@ -0,0 +1,17 @@
+#	$NetBSD: Makefile,v 1.1 2010/10/14 22:39:30 haad Exp $
+#
+
+.PATH:	${.CURDIR}/../../../../net/npf
+
+LIB=	rumpdev_npf
+
+SRCS=	npf.c npf_ctl.c npf_handler.c npf_instr.c npf_mbuf.c
+SRCS+=	npf_processor.c npf_ruleset.c npf_tableset.c npf_inet.c
+SRCS+=	npf_session.c npf_nat.c npf_alg.c
+
+SRCS+=	component.c
+
+CPPFLAGS+=	-I${.CURDIR}/../../../librump/rumpvfs
+
+.include bsd.lib.mk
+.include bsd.klinks.mk
Index: src/sys/rump/dev/lib/libnpf/component.c
diff -u /dev/null src/sys/rump/dev/lib/libnpf/component.c:1.1
--- /dev/null	Thu Oct 14 22:39:30 2010
+++ src/sys/rump/dev/lib/libnpf/component.c	Thu Oct 14 22:39:30 2010
@@ -0,0 +1,35 @@
+/*	$NetBSD: component.c,v 1.1 2010/10/14 22:39:30 haad Exp $	*/
+
+/*
+ * Public Domain.
+ */
+
+#include sys/cdefs.h
+__KERNEL_RCSID(0, $NetBSD: component.c,v 1.1 2010/10/14 22:39:30 haad Exp $);
+
+#include sys/param.h
+#include sys/conf.h
+#include sys/device.h
+#include sys/stat.h
+
+#include rump_private.h
+#include rump_dev_private.h
+#include rump_vfs_private.h
+
+extern const struct cdevsw npf_cdevsw;
+
+RUMP_COMPONENT(RUMP_COMPONENT_DEV)
+{
+	devmajor_t bmajor = NODEVMAJOR, cmajor = NODEVMAJOR;
+	int error;
+
+	error = devsw_attach(npf, NULL, bmajor, npf_cdevsw, cmajor);
+	if (error) {
+		panic(npf attaching failed: %d, error);
+	}
+
+	error = rump_vfs_makeonedevnode(S_IFCHR, /dev/npf, cmajor, 0);
+	if (error) {
+		panic(npf device node creation failed: %d, error);
+	}
+}
Index: src/sys/rump/dev/lib/libnpf/shlib_version
diff -u /dev/null src/sys/rump/dev/lib/libnpf/shlib_version:1.1
--- /dev/null	Thu Oct 14 22:39:30 2010
+++ src/sys/rump/dev/lib/libnpf/shlib_version	Thu Oct 14 22:39:30 2010
@@ -0,0 +1,4 @@
+#	$NetBSD: shlib_version,v 1.1 2010/10/14 22:39:30 haad Exp $
+#
+major=0
+minor=0



CVS commit: src/sys/dev/usb

2010-10-14 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Fri Oct 15 05:26:09 UTC 2010

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

Log Message:
Fix cutpaste code, from Henning Petersen in PR 43544.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/usb/umidi.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/umidi.c
diff -u src/sys/dev/usb/umidi.c:1.40 src/sys/dev/usb/umidi.c:1.41
--- src/sys/dev/usb/umidi.c:1.40	Thu Nov 12 19:58:27 2009
+++ src/sys/dev/usb/umidi.c	Fri Oct 15 05:26:09 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: umidi.c,v 1.40 2009/11/12 19:58:27 dyoung Exp $	*/
+/*	$NetBSD: umidi.c,v 1.41 2010/10/15 05:26:09 dholland Exp $	*/
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: umidi.c,v 1.40 2009/11/12 19:58:27 dyoung Exp $);
+__KERNEL_RCSID(0, $NetBSD: umidi.c,v 1.41 2010/10/15 05:26:09 dholland Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -1301,7 +1301,7 @@
 		md-out_jack-cable_number,
 		md-out_jack-endpoint-addr);
 	else
-		in_label[0] = '\0';
+		out_label[0] = '\0';
 
 	unit_label = USBDEVNAME(sc-sc_dev);
 	



CVS commit: src/sys/kern

2010-10-14 Thread Mindaugas Rasiukevicius
Module Name:src
Committed By:   rmind
Date:   Fri Oct 15 05:39:19 UTC 2010

Modified Files:
src/sys/kern: sys_select.c

Log Message:
Re-enable direct select.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/kern/sys_select.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/kern/sys_select.c
diff -u src/sys/kern/sys_select.c:1.27 src/sys/kern/sys_select.c:1.28
--- src/sys/kern/sys_select.c:1.27	Mon Jul 12 11:04:25 2010
+++ src/sys/kern/sys_select.c	Fri Oct 15 05:39:19 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_select.c,v 1.27 2010/07/12 11:04:25 rmind Exp $	*/
+/*	$NetBSD: sys_select.c,v 1.28 2010/10/15 05:39:19 rmind Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
@@ -84,7 +84,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sys_select.c,v 1.27 2010/07/12 11:04:25 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: sys_select.c,v 1.28 2010/10/15 05:39:19 rmind Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -689,7 +689,7 @@
 			 */
 			l = sip-sel_lwp;
 			oflag = l-l_selflag;
-#ifdef DIRECT_SELECT
+#ifndef NO_DIRECT_SELECT
 			sel_setevents(l, sip, events);
 #else
 			l-l_selflag = SEL_RESET;



CVS commit: src/usr.bin/mkdep

2010-10-14 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Fri Oct 15 05:46:48 UTC 2010

Modified Files:
src/usr.bin/mkdep: mkdep.1

Log Message:
Per PR 19359 note that mkdep doesn't handle all make metacharacters
correctly; in particular, filenames containing '#' cause trouble,
although '$' seems to be ok. Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/mkdep/mkdep.1

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

Modified files:

Index: src/usr.bin/mkdep/mkdep.1
diff -u src/usr.bin/mkdep/mkdep.1:1.14 src/usr.bin/mkdep/mkdep.1:1.15
--- src/usr.bin/mkdep/mkdep.1:1.14	Mon Dec 12 22:49:37 2005
+++ src/usr.bin/mkdep/mkdep.1	Fri Oct 15 05:46:48 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: mkdep.1,v 1.14 2005/12/12 22:49:37 wiz Exp $
+.\	$NetBSD: mkdep.1,v 1.15 2010/10/15 05:46:48 dholland Exp $
 .\
 .\ Copyright (c) 1987, 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\ @(#)mkdep.1	8.1 (Berkeley) 6/6/93
 .\
-.Dd December 12, 2005
+.Dd October 15, 2010
 .Dt MKDEP 1
 .Os
 .Sh NAME
@@ -124,3 +124,11 @@
 .Nm
 command appeared in
 .Bx 4.3 Tahoe .
+.Sh BUGS
+Some characters special to
+.Xr make 1 ,
+most notably the comment character, are not escaped correctly if they
+appear in file names.
+This can lead to unparseable output or silently cause dependencies to
+be lost.
+.\ (This problem is actually in gcc -M.)



CVS commit: src/sys/arch/bebox/stand/boot

2010-10-14 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Thu Oct 14 06:12:54 UTC 2010

Modified Files:
src/sys/arch/bebox/stand/boot: boot.c boot.h vreset.c
Added Files:
src/sys/arch/bebox/stand/boot: pci.c

Log Message:
Add pci.c.  Splitted from vreset.c
And cleanup vreset.c.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/bebox/stand/boot/boot.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/bebox/stand/boot/boot.h
cvs rdiff -u -r0 -r1.5 src/sys/arch/bebox/stand/boot/pci.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/bebox/stand/boot/vreset.c

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



CVS commit: src/sys/arch/bebox/stand/boot

2010-10-14 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Thu Oct 14 06:17:29 UTC 2010

Modified Files:
src/sys/arch/bebox/stand/boot: Makefile

Log Message:
Add pci.c to SRCS.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/bebox/stand/boot/Makefile

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



CVS commit: src/sys/arch/bebox/stand/boot

2010-10-14 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Thu Oct 14 06:17:57 UTC 2010

Modified Files:
src/sys/arch/bebox/stand/boot: boot.c

Log Message:
Add _rtt().  But it is NULL function.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/bebox/stand/boot/boot.c

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



CVS commit: src/sys/arch/bebox/stand/boot

2010-10-14 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Thu Oct 14 06:23:27 UTC 2010

Modified Files:
src/sys/arch/bebox/stand/boot: version

Log Message:
s/,vga}/,_vga}/.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/bebox/stand/boot/version

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



CVS commit: src/sys/arch/bebox/stand/boot

2010-10-14 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Thu Oct 14 06:39:52 UTC 2010

Modified Files:
src/sys/arch/bebox/stand/boot: boot.c conf.c devopen.c fd.c

Log Message:
Change format of path for device.  A current form strangely feels dissatisfied.
This new format looks like the format of BootROM of BeBox.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/bebox/stand/boot/boot.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/bebox/stand/boot/conf.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/bebox/stand/boot/devopen.c \
src/sys/arch/bebox/stand/boot/fd.c

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



CVS commit: src/sys/arch/bebox/stand/boot

2010-10-14 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Thu Oct 14 06:50:44 UTC 2010

Modified Files:
src/sys/arch/bebox/stand/boot: Makefile boot.c conf.c filesystem.c
version
Added Files:
src/sys/arch/bebox/stand/boot: wd.c wdc.c wdvar.h

Log Message:
Support kernel load from IDE HDD with onboard wdc.  like cobalt, sandpoint.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/bebox/stand/boot/Makefile
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/bebox/stand/boot/boot.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/bebox/stand/boot/conf.c \
src/sys/arch/bebox/stand/boot/filesystem.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/bebox/stand/boot/version
cvs rdiff -u -r0 -r1.1 src/sys/arch/bebox/stand/boot/wd.c \
src/sys/arch/bebox/stand/boot/wdc.c src/sys/arch/bebox/stand/boot/wdvar.h

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



CVS commit: src/sys/arch/bebox/stand/boot

2010-10-14 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Thu Oct 14 06:58:23 UTC 2010

Modified Files:
src/sys/arch/bebox/stand/boot: Makefile boot.c conf.c version
Added Files:
src/sys/arch/bebox/stand/boot: sd.c sdvar.h siop.c

Log Message:
Support kernel load from SCSI HDD with onboard siop.  It is very EXPERIMENTAL!!


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/bebox/stand/boot/Makefile
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/bebox/stand/boot/boot.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/bebox/stand/boot/conf.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/bebox/stand/boot/sd.c \
src/sys/arch/bebox/stand/boot/sdvar.h \
src/sys/arch/bebox/stand/boot/siop.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/bebox/stand/boot/version

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



CVS commit: src/sys/netbt

2010-10-14 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Thu Oct 14 07:05:03 UTC 2010

Modified Files:
src/sys/netbt: hci_link.c

Log Message:
Some Broadcom controllers emit empty ACL packets during connection
setup, using the handle that they have not yet told us for the
connection-to-be. Disconnecting can cause problems so just ignore
zero length ACL packets on unknown connection handles.

fixes a problem reported by Nick Hudson


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/netbt/hci_link.c

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



CVS commit: src/include

2010-10-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 14 07:51:21 UTC 2010

Modified Files:
src/include: link_elf.h

Log Message:
Move a comment so that it is correct.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/include/link_elf.h

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



CVS commit: src/sys/sys

2010-10-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 14 07:57:34 UTC 2010

Modified Files:
src/sys/sys: exec_elf.h

Log Message:
Define PT_TLS.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/sys/exec_elf.h

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



CVS commit: src/sys/arch/news68k/news68k

2010-10-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Oct 14 16:31:16 UTC 2010

Modified Files:
src/sys/arch/news68k/news68k: machdep.c

Log Message:
Prepare empty module_init_md() for options MODULAR.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/arch/news68k/news68k/machdep.c

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



CVS commit: src/sys/arch/m68k/m68k

2010-10-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Oct 14 16:33:50 UTC 2010

Modified Files:
src/sys/arch/m68k/m68k: kobj_machdep.c

Log Message:
Fix reloc calcurations (mechanically pulled from working i386 and sh3).
Now options MODULAR works at least on news68k:

# uname -mrs
NetBSD 5.99.39 news68k
# modstat|grep filesys
coredump misc   filesys2 2790 -
exec_aoutmisc   filesys0 1866 coredump
exec_elf32   misc   filesys0 6072 coredump
exec_script  misc   filesys0 972  -
kernfs   vfsfilesys0 9734 -
mfs  vfsfilesys0 3656 ffs
procfs   vfsfilesys0 23924-
#


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/m68k/m68k/kobj_machdep.c

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



CVS commit: src/sys/arch/m68k/m68k

2010-10-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Oct 14 16:34:29 UTC 2010

Modified Files:
src/sys/arch/m68k/m68k: m68k_syscall.c

Log Message:
Un-ifdef COMPAT_AOUT_M68K for MODULAR kernel.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/m68k/m68k/m68k_syscall.c

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



CVS commit: src/share/man/man3

2010-10-14 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 14 20:14:51 UTC 2010

Modified Files:
src/share/man/man3: dirent.3

Log Message:
Fix RCSID


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man3/dirent.3

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



CVS commit: src/sys/rump/dev/lib/libnpf

2010-10-14 Thread Adam Hamsik
Module Name:src
Committed By:   haad
Date:   Thu Oct 14 22:39:30 UTC 2010

Added Files:
src/sys/rump/dev/lib/libnpf: Makefile component.c shlib_version

Log Message:
Add files needed to build npf as a RUMP library, original code bu rmind
some modifications done by me.

Oked by @rmind.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/rump/dev/lib/libnpf/Makefile \
src/sys/rump/dev/lib/libnpf/component.c \
src/sys/rump/dev/lib/libnpf/shlib_version

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



CVS commit: src/sys/dev/usb

2010-10-14 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Fri Oct 15 05:26:09 UTC 2010

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

Log Message:
Fix cutpaste code, from Henning Petersen in PR 43544.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/usb/umidi.c

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