CVS commit: src/sys/ddb

2011-11-12 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Nov 13 03:21:51 UTC 2011

Modified Files:
src/sys/ddb: db_command.c

Log Message:
set panicstr to "reboot forced via kernel debugger" when rebooting
from ddb, similar to how sync from ddb works.

this avoids various asserts and other issues during ddb reboot.


To generate a diff of this commit:
cvs rdiff -u -r1.136 -r1.137 src/sys/ddb/db_command.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/ddb/db_command.c
diff -u src/sys/ddb/db_command.c:1.136 src/sys/ddb/db_command.c:1.137
--- src/sys/ddb/db_command.c:1.136	Tue May 17 04:18:06 2011
+++ src/sys/ddb/db_command.c	Sun Nov 13 03:21:51 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_command.c,v 1.136 2011/05/17 04:18:06 mrg Exp $	*/
+/*	$NetBSD: db_command.c,v 1.137 2011/11/13 03:21:51 mrg Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2009 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.136 2011/05/17 04:18:06 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.137 2011/11/13 03:21:51 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_aio.h"
@@ -1304,6 +1304,7 @@ db_reboot_cmd(db_expr_t addr, bool have_
 	 * called from cpu_reboot.
 	 */
 	db_recover = 0;
+	panicstr = "reboot forced via kernel debugger";
 	cpu_reboot((int)bootflags, NULL);
 #else	/* _KERNEL */
 	db_printf("This command can only be used in-kernel.\n");



CVS commit: src/sys/uvm

2011-11-12 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov 13 02:10:40 UTC 2011

Modified Files:
src/sys/uvm: uvm_meter.c

Log Message:
if you are going to dereference a variable, check the variable itself, not
it cousin.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/uvm/uvm_meter.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/uvm/uvm_meter.c
diff -u src/sys/uvm/uvm_meter.c:1.56 src/sys/uvm/uvm_meter.c:1.57
--- src/sys/uvm/uvm_meter.c:1.56	Wed Feb  2 10:25:27 2011
+++ src/sys/uvm/uvm_meter.c	Sat Nov 12 21:10:40 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_meter.c,v 1.56 2011/02/02 15:25:27 chuck Exp $	*/
+/*	$NetBSD: uvm_meter.c,v 1.57 2011/11/13 02:10:40 christos Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_meter.c,v 1.56 2011/02/02 15:25:27 chuck Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_meter.c,v 1.57 2011/11/13 02:10:40 christos Exp $");
 
 #include 
 #include 
@@ -82,7 +82,7 @@ sysctl_vm_uvmexp(SYSCTLFN_ARGS)
 	struct sysctlnode node;
 
 	node = *rnode;
-	if (oldp)
+	if (oldlenp)
 		node.sysctl_size = min(*oldlenp, node.sysctl_size);
 
 	return (sysctl_lookup(SYSCTLFN_CALL(&node)));



CVS commit: [yamt-pagecache] src/sys/uvm

2011-11-12 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Sun Nov 13 01:36:25 UTC 2011

Modified Files:
src/sys/uvm [yamt-pagecache]: uvm_meter.c

Log Message:
a patch supposed to unbreak abi from christos@
PR/45598


To generate a diff of this commit:
cvs rdiff -u -r1.56.4.2 -r1.56.4.3 src/sys/uvm/uvm_meter.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/uvm/uvm_meter.c
diff -u src/sys/uvm/uvm_meter.c:1.56.4.2 src/sys/uvm/uvm_meter.c:1.56.4.3
--- src/sys/uvm/uvm_meter.c:1.56.4.2	Sat Nov 12 02:54:04 2011
+++ src/sys/uvm/uvm_meter.c	Sun Nov 13 01:36:25 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_meter.c,v 1.56.4.2 2011/11/12 02:54:04 yamt Exp $	*/
+/*	$NetBSD: uvm_meter.c,v 1.56.4.3 2011/11/13 01:36:25 yamt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_meter.c,v 1.56.4.2 2011/11/12 02:54:04 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_meter.c,v 1.56.4.3 2011/11/13 01:36:25 yamt Exp $");
 
 #include 
 #include 
@@ -191,6 +191,8 @@ sysctl_vm_uvmexp2(SYSCTLFN_ARGS)
 	node = *rnode;
 	node.sysctl_data = &u;
 	node.sysctl_size = sizeof(u);
+	if (oldp)
+		node.sysctl_size = min(*oldlenp, node.sysctl_size);
 	return (sysctl_lookup(SYSCTLFN_CALL(&node)));
 }
 



CVS commit: [yamt-pagecache] src/sys/uvm

2011-11-12 Thread YAMAMOTO Takashi
Module Name:src
Committed By:   yamt
Date:   Sun Nov 13 01:18:03 UTC 2011

Modified Files:
src/sys/uvm [yamt-pagecache]: uvm_aobj.c uvm_page.c uvm_page.h
uvm_page_status.c

Log Message:
cache UVM_OBJ_IS_VNODE in pqflags


To generate a diff of this commit:
cvs rdiff -u -r1.116.2.3 -r1.116.2.4 src/sys/uvm/uvm_aobj.c
cvs rdiff -u -r1.178.2.4 -r1.178.2.5 src/sys/uvm/uvm_page.c
cvs rdiff -u -r1.73.2.3 -r1.73.2.4 src/sys/uvm/uvm_page.h
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/uvm/uvm_page_status.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/uvm/uvm_aobj.c
diff -u src/sys/uvm/uvm_aobj.c:1.116.2.3 src/sys/uvm/uvm_aobj.c:1.116.2.4
--- src/sys/uvm/uvm_aobj.c:1.116.2.3	Sun Nov  6 22:05:00 2011
+++ src/sys/uvm/uvm_aobj.c	Sun Nov 13 01:18:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_aobj.c,v 1.116.2.3 2011/11/06 22:05:00 yamt Exp $	*/
+/*	$NetBSD: uvm_aobj.c,v 1.116.2.4 2011/11/13 01:18:02 yamt Exp $	*/
 
 /*
  * Copyright (c) 1998 Chuck Silvers, Charles D. Cranor and
@@ -38,7 +38,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.116.2.3 2011/11/06 22:05:00 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_aobj.c,v 1.116.2.4 2011/11/13 01:18:02 yamt Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -909,7 +909,6 @@ uao_get(struct uvm_object *uobj, voff_t 
 NULL, UVM_FLAG_COLORMATCH|UVM_PGA_ZERO);
 if (ptmp) {
 	/* new page */
-	ptmp->pqflags |= PQ_AOBJ;
 	ptmp->flags &= ~PG_FAKE;
 	uvm_pagemarkdirty(ptmp,
 	UVM_PAGE_STATUS_UNKNOWN);
@@ -1018,13 +1017,6 @@ gotpage:
 }
 
 /*
- * safe with PQ's unlocked: because we just
- * alloc'd the page
- */
-
-ptmp->pqflags |= PQ_AOBJ;
-
-/*
  * got new page ready for I/O.  break pps while
  * loop.  pps[lcv] is still NULL.
  */

Index: src/sys/uvm/uvm_page.c
diff -u src/sys/uvm/uvm_page.c:1.178.2.4 src/sys/uvm/uvm_page.c:1.178.2.5
--- src/sys/uvm/uvm_page.c:1.178.2.4	Sat Nov 12 02:54:04 2011
+++ src/sys/uvm/uvm_page.c	Sun Nov 13 01:18:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_page.c,v 1.178.2.4 2011/11/12 02:54:04 yamt Exp $	*/
+/*	$NetBSD: uvm_page.c,v 1.178.2.5 2011/11/13 01:18:02 yamt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.178.2.4 2011/11/12 02:54:04 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.178.2.5 2011/11/13 01:18:02 yamt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_uvmhist.h"
@@ -169,8 +169,6 @@ static inline void
 uvm_pageinsert_list(struct uvm_object *uobj, struct vm_page *pg,
 struct vm_page *where)
 {
-	const bool isvnode = UVM_OBJ_IS_VNODE(uobj);
-	const bool isaobj = UVM_OBJ_IS_AOBJ(uobj);
 
 	KASSERT(uobj == pg->uobject);
 	KASSERT(mutex_owned(uobj->vmobjlock));
@@ -178,15 +176,17 @@ uvm_pageinsert_list(struct uvm_object *u
 	KASSERT(where == NULL || (where->flags & PG_TABLED));
 	KASSERT(where == NULL || (where->uobject == uobj));
 
-	if (isvnode || isaobj) {
+	if ((pg->pqflags & PQ_STAT) != 0) {
 		struct uvm_cpu *ucpu;
 		const unsigned int status = uvm_pagegetdirty(pg);
+		const bool isaobj = (pg->pqflags & PQ_AOBJ) != 0;
 
 		kpreempt_disable();
 		ucpu = curcpu()->ci_data.cpu_uvm;
 		ucpu->pagestate[isaobj][status]++;
 		kpreempt_enable();
-		if (isvnode) {
+		if (!isaobj) {
+			KASSERT((pg->pqflags & PQ_FILE) != 0);
 			if (uobj->uo_npages == 0) {
 struct vnode *vp = (struct vnode *)uobj;
 
@@ -248,22 +248,22 @@ uvm_pageinsert(struct uvm_object *uobj, 
 static inline void
 uvm_pageremove_list(struct uvm_object *uobj, struct vm_page *pg)
 {
-	const bool isvnode = UVM_OBJ_IS_VNODE(uobj);
-	const bool isaobj = UVM_OBJ_IS_AOBJ(uobj);
 
 	KASSERT(uobj == pg->uobject);
 	KASSERT(mutex_owned(uobj->vmobjlock));
 	KASSERT(pg->flags & PG_TABLED);
 
-	if (isvnode || isaobj) {
+	if ((pg->pqflags & PQ_STAT) != 0) {
 		struct uvm_cpu *ucpu;
 		const unsigned int status = uvm_pagegetdirty(pg);
+		const bool isaobj = (pg->pqflags & PQ_AOBJ) != 0;
 
 		kpreempt_disable();
 		ucpu = curcpu()->ci_data.cpu_uvm;
 		ucpu->pagestate[isaobj][status]--;
 		kpreempt_enable();
-		if (isvnode) {
+		if (!isaobj) {
+			KASSERT((pg->pqflags & PQ_FILE) != 0);
 			if (uobj->uo_npages == 1) {
 struct vnode *vp = (struct vnode *)uobj;
 
@@ -1324,18 +1324,27 @@ uvm_pagealloc_strat(struct uvm_object *o
 	 * otherwise we race with uvm_pglistalloc.
 	 */
 	pg->pqflags = 0;
-	if (anon) {
-		ucpu->pagestate[1][UVM_PAGE_STATUS_CLEAN]++;
-	}
 	mutex_spin_exit(&uvm_fpageqlock);
 	if (anon) {
 		anon->an_page = pg;
 		pg->pqflags = PQ_ANON;
 		atomic_inc_uint(&uvmexp.anonpages);
+		kpreempt_disable();
+		ucpu = curcpu()->ci_data.cpu_uvm;
+		ucpu->pagestate[1][UVM_PAGE_STATUS_CLEAN]++;
+		kpreempt_enable();
 	} else {
 		if (obj) {
 			int error;
 
+			/*
+			 * set PQ_FILE|PQ_AOBJ before the first uvm_pageinsert.
+			 */
+			if (UVM_OBJ_IS_VNODE(ob

CVS commit: src/sys/arch/sandpoint/stand/altboot

2011-11-12 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Sun Nov 13 00:06:54 UTC 2011

Modified Files:
src/sys/arch/sandpoint/stand/altboot: pciide.c

Log Message:
Make the chipfix() functions return void instead of int, as the return
value is useless. Suggested by nisimura.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sandpoint/stand/altboot/pciide.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/sandpoint/stand/altboot/pciide.c
diff -u src/sys/arch/sandpoint/stand/altboot/pciide.c:1.10 src/sys/arch/sandpoint/stand/altboot/pciide.c:1.11
--- src/sys/arch/sandpoint/stand/altboot/pciide.c:1.10	Sat Nov 12 16:56:12 2011
+++ src/sys/arch/sandpoint/stand/altboot/pciide.c	Sun Nov 13 00:06:54 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pciide.c,v 1.10 2011/11/12 16:56:12 phx Exp $ */
+/* $NetBSD: pciide.c,v 1.11 2011/11/13 00:06:54 phx Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -35,14 +35,14 @@
 
 #include "globals.h"
 
-static int cmdidefix(struct dkdev_ata *);
-static int apoidefix(struct dkdev_ata *);
-static int iteidefix(struct dkdev_ata *);
+static void cmdidefix(struct dkdev_ata *);
+static void apoidefix(struct dkdev_ata *);
+static void iteidefix(struct dkdev_ata *);
 
 static uint32_t pciiobase = PCI_XIOBASE;
 
 struct myops {
-	int (*chipfix)(struct dkdev_ata *);
+	void (*chipfix)(struct dkdev_ata *);
 	int (*presense)(struct dkdev_ata *, int);
 };
 static struct myops defaultops = { NULL, NULL };
@@ -93,8 +93,7 @@ pciide_init(unsigned tag, void *data)
 
 	/* chipset specific fixes */
 	if (myops->chipfix)
-		if (!(*myops->chipfix)(l))
-			return NULL;
+		(*myops->chipfix)(l);
 
 	val = pcicfgread(tag, PCI_CLASS_REG);
 	native = PCI_CLASS(val) != PCI_CLASS_IDE ||
@@ -142,7 +141,7 @@ pciide_init(unsigned tag, void *data)
 	return l;
 }
 
-static int
+static void
 cmdidefix(struct dkdev_ata *l)
 {
 	unsigned v;
@@ -155,11 +154,9 @@ cmdidefix(struct dkdev_ata *l)
 	pcicfgwrite(l->tag, 0xa4, (v & ~0x) | 0x328a);
 	v = pcicfgread(l->tag, 0xb4);
 	pcicfgwrite(l->tag, 0xb4, (v & ~0x) | 0x328a);
-
-	return 1;
 }
 
-static int
+static void
 apoidefix(struct dkdev_ata *l)
 {
 	unsigned v;
@@ -167,11 +164,9 @@ apoidefix(struct dkdev_ata *l)
 	/* enable primary and secondary channel */
 	v = pcicfgread(l->tag, 0x40) & ~0x03;
 	pcicfgwrite(l->tag, 0x40, v | 0x03);
-
-	return 1;
 }
 
-static int
+static void
 iteidefix(struct dkdev_ata *l)
 {
 	unsigned v;
@@ -183,6 +178,4 @@ iteidefix(struct dkdev_ata *l)
 	/* i/o configuration, enable channels, cables, IORDY */
 	v = pcicfgread(l->tag, 0x40);
 	pcicfgwrite(l->tag, 0x40, (v & ~0xff) | 0x36a0f3);
-
-	return 1;
 }



CVS commit: src/sys/arch/sandpoint/sandpoint

2011-11-12 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Sat Nov 12 23:57:55 UTC 2011

Modified Files:
src/sys/arch/sandpoint/sandpoint: satmgr.c

Log Message:
Add Iomega support (init, reboot, poweroff).
Make new sysctl-nodes for Iomega fan control in machdep.satmgr.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/sandpoint/sandpoint/satmgr.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/sandpoint/sandpoint/satmgr.c
diff -u src/sys/arch/sandpoint/sandpoint/satmgr.c:1.12 src/sys/arch/sandpoint/sandpoint/satmgr.c:1.13
--- src/sys/arch/sandpoint/sandpoint/satmgr.c:1.12	Fri Jul  1 19:16:06 2011
+++ src/sys/arch/sandpoint/sandpoint/satmgr.c	Sat Nov 12 23:57:55 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: satmgr.c,v 1.12 2011/07/01 19:16:06 dyoung Exp $ */
+/* $NetBSD: satmgr.c,v 1.13 2011/11/12 23:57:55 phx Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -65,6 +65,7 @@ struct satmgr_softc {
 	struct selinfo		sc_rsel;
 	callout_t		sc_ch_wdog;
 	callout_t		sc_ch_pbutton;
+	callout_t		sc_ch_sync;
 	struct sysmon_pswitch	sc_sm_pbutton;
 	int			sc_open;
 	void			*sc_si;
@@ -79,6 +80,10 @@ struct satmgr_softc {
 	struct satops		*sc_ops;
 	char			sc_btn_buf[8];
 	int			sc_btn_cnt;
+	char			sc_cmd_buf[8];
+	int			sc_sysctl_wdog;
+	int			sc_sysctl_fanlow;
+	int			sc_sysctl_fanhigh;
 };
 
 static int  satmgr_match(device_t, cfdata_t, void *);
@@ -105,8 +110,11 @@ const struct cdevsw satmgr_cdevsw = {
 
 static void satmgr_reboot(int);
 static int satmgr_sysctl_wdogenable(SYSCTLFN_PROTO);
+static int satmgr_sysctl_fanlow(SYSCTLFN_PROTO);
+static int satmgr_sysctl_fanhigh(SYSCTLFN_PROTO);
 static void wdog_tickle(void *);
 static void send_sat(struct satmgr_softc *, const char *);
+static void send_sat_len(struct satmgr_softc *, const char *, int);
 static int hwintr(void *);
 static void rxintr(struct satmgr_softc *);
 static void txintr(struct satmgr_softc *);
@@ -114,17 +122,23 @@ static void startoutput(struct satmgr_so
 static void swintr(void *);
 static void sinit(struct satmgr_softc *);
 static void qinit(struct satmgr_softc *);
+static void iinit(struct satmgr_softc *);
 static void kreboot(struct satmgr_softc *);
 static void sreboot(struct satmgr_softc *);
 static void qreboot(struct satmgr_softc *);
+static void ireboot(struct satmgr_softc *);
 static void kpwroff(struct satmgr_softc *);
 static void spwroff(struct satmgr_softc *);
 static void qpwroff(struct satmgr_softc *);
 static void dpwroff(struct satmgr_softc *);
+static void ipwroff(struct satmgr_softc *);
 static void kbutton(struct satmgr_softc *, int);
 static void sbutton(struct satmgr_softc *, int);
 static void qbutton(struct satmgr_softc *, int);
 static void dbutton(struct satmgr_softc *, int);
+static void ibutton(struct satmgr_softc *, int);
+static void idosync(void *);
+static void iprepcmd(struct satmgr_softc *, int, int, int, int, int, int);
 static void guarded_pbutton(void *);
 static void sched_sysmon_pbutton(void *);
 
@@ -137,8 +151,9 @@ struct satops {
 };
 
 static struct satops satmodel[] = {
-{ "dlink",NULL, NULL, dpwroff, dbutton },
-{ "kurobox",  NULL, kreboot, kpwroff, kbutton },
+{ "dlink",NULL,  NULL,dpwroff, dbutton },
+{ "iomega",   iinit, ireboot, ipwroff, ibutton },
+{ "kurobox",  NULL,  kreboot, kpwroff, kbutton },
 { "qnap", qinit, qreboot, qpwroff, qbutton },
 { "synology", sinit, sreboot, spwroff, sbutton }
 };
@@ -155,8 +170,6 @@ static struct satops satmodel[] = {
 #define CSR_READ(t,r)	bus_space_read_1((t)->sc_iot, (t)->sc_ioh, (r))
 #define CSR_WRITE(t,r,v) bus_space_write_1((t)->sc_iot, (t)->sc_ioh, (r), (v))
 
-static int satmgr_wdog;
-
 static int
 satmgr_match(device_t parent, cfdata_t match, void *aux)
 {
@@ -210,6 +223,7 @@ satmgr_attach(device_t parent, device_t 
 	selinit(&sc->sc_rsel);
 	callout_init(&sc->sc_ch_wdog, 0);
 	callout_init(&sc->sc_ch_pbutton, 0);
+	callout_init(&sc->sc_ch_sync, 0);
 	mutex_init(&sc->sc_lock, MUTEX_DEFAULT, IPL_HIGH);
 	cv_init(&sc->sc_rdcv, "satrd");
 	cv_init(&sc->sc_wrcv, "satwr");
@@ -233,11 +247,11 @@ satmgr_attach(device_t parent, device_t 
 		aprint_error_dev(sc->sc_dev,
 		"unable to register power button with sysmon\n");
 
+	/* create machdep.satmgr subtree for those models which support it */
 	if (strcmp(ops->family, "kurobox") == 0) {
 		const struct sysctlnode *rnode;
 		struct sysctllog *clog;
 
-		/* create machdep.satmgr.* subtree */
 		clog = NULL;
 		sysctl_createv(&clog, 0, NULL, &rnode,
 			CTLFLAG_PERMANENT,
@@ -256,6 +270,34 @@ satmgr_attach(device_t parent, device_t 
 			satmgr_sysctl_wdogenable, 0, NULL, 0,
 			CTL_CREATE, CTL_EOL);
 	}
+	else if (strcmp(ops->family, "iomega") == 0) {
+		const struct sysctlnode *rnode;
+		struct sysctllog *clog;
+
+		clog = NULL;
+		sysctl_createv(&clog, 0, NULL, &rnode,
+			CTLFLAG_PERMANENT,
+			CTLTYPE_NODE, "machdep", N

CVS commit: src/sys/arch/sandpoint/stand/altboot

2011-11-12 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Sat Nov 12 23:52:54 UTC 2011

Modified Files:
src/sys/arch/sandpoint/stand/altboot: brdsetup.c version

Log Message:
Improved Iomega microcontroller support. Bumped version to 1.8.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/sandpoint/stand/altboot/brdsetup.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sandpoint/stand/altboot/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/sandpoint/stand/altboot/brdsetup.c
diff -u src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.22 src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.23
--- src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.22	Mon Nov  7 21:11:55 2011
+++ src/sys/arch/sandpoint/stand/altboot/brdsetup.c	Sat Nov 12 23:52:54 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: brdsetup.c,v 1.22 2011/11/07 21:11:55 phx Exp $ */
+/* $NetBSD: brdsetup.c,v 1.23 2011/11/12 23:52:54 phx Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -141,7 +141,7 @@ static uint32_t ticks_per_sec, ns_per_ti
 
 static void brdfixup(void);
 static void setup(void);
-static int send_iomega(int, int, int, int, int, int);
+static void send_iomega(int, int, int, int, int, int);
 static inline uint32_t mfmsr(void);
 static inline void mtmsr(uint32_t);
 static inline uint32_t cputype(void);
@@ -694,15 +694,15 @@ iomegabrdfix(struct brdprop *brd)
 {
 
 	init_uart(uart2base, 9600, LCR_8BITS | LCR_PNONE);
-	/* LED flashing blue, fan auto, turn on at 60C, turn off at 50C */
-	(void)send_iomega('b', 'd', 2, 'a', 60, 50);
+	/* LED flashing blue, fan auto, turn on at 50C, turn off at 45C */
+	send_iomega('b', 'd', 2, 'a', 50, 45);
 }
 
 void
 iomegareset()
 {
 
-	(void)send_iomega('g', 0, 0, 0, 0, 0);
+	send_iomega('g', 0, 0, 0, 0, 0);
 	/*NOTREACHED*/
 }
 
@@ -901,7 +901,7 @@ iomega_debug(const char *txt, uint8_t bu
 }
 #endif /* DEBUG */
 
-static int
+static void
 send_iomega(int power, int led, int rate, int fan, int high, int low)
 {
 	uint8_t buf[IOMEGA_PACKETSIZE];
@@ -923,7 +923,7 @@ send_iomega(int power, int led, int rate
 	 */
 	do {
 		putchar(0);
-		delay(25000);
+		delay(5);
 	} while (!tstchar());
 
 	for (i = 0; i < IOMEGA_PACKETSIZE; i++)
@@ -935,18 +935,12 @@ send_iomega(int power, int led, int rate
 #endif
 
 	/* send command */
-	if (power >= 0)
-		buf[IOMEGA_POWER] = power;
-	if (led >= 0)
-		buf[IOMEGA_LED] = led;
-	if (rate >= 0)
-		buf[IOMEGA_FLASH_RATE] = rate;
-	if (fan >= 0)
-		buf[IOMEGA_FAN] = fan;
-	if (high >= 0)
-		buf[IOMEGA_HIGH_TEMP] = high;
-	if (low >= 0)
-		buf[IOMEGA_LOW_TEMP] = low;
+	buf[IOMEGA_POWER] = power;
+	buf[IOMEGA_LED] = led;
+	buf[IOMEGA_FLASH_RATE] = rate;
+	buf[IOMEGA_FAN] = fan;
+	buf[IOMEGA_HIGH_TEMP] = high;
+	buf[IOMEGA_LOW_TEMP] = low;
 	buf[IOMEGA_ID] = 7;	/* host id */
 	buf[IOMEGA_CHECKSUM] = (buf[IOMEGA_POWER] + buf[IOMEGA_LED] +
 	buf[IOMEGA_FLASH_RATE] + buf[IOMEGA_FAN] +
@@ -963,12 +957,15 @@ send_iomega(int power, int led, int rate
 	/* receive the reply */
 	for (i = 0; i < IOMEGA_PACKETSIZE; i++)
 		buf[i] = getchar();
-
-	uart1base = savedbase;
 #ifdef DEBUG
+	uart1base = savedbase;
 	iomega_debug("68HC908 reply", buf);
+	uart1base = uart2base;
 #endif
-	return buf[0] != '#';  /* error? */
+
+	if (buf[0] == '#')
+		goto again;  /* try again on error */
+	uart1base = savedbase;
 }
 
 void

Index: src/sys/arch/sandpoint/stand/altboot/version
diff -u src/sys/arch/sandpoint/stand/altboot/version:1.4 src/sys/arch/sandpoint/stand/altboot/version:1.5
--- src/sys/arch/sandpoint/stand/altboot/version:1.4	Sun Mar 13 15:23:43 2011
+++ src/sys/arch/sandpoint/stand/altboot/version	Sat Nov 12 23:52:54 2011
@@ -9,3 +9,5 @@
 1.7:	ST1023/IP1000A driver, load kernels from memory (mem:), possibility
 	to replace altboot with a new version while running, interactive
 	mode, default boot path is now wd0:netbsd in multiuser mode
+1.8:	Iomega support, IT821x & VT6410 IDE support, fixed interrupt
+	issue, exception handler and sat-controller test mode (DEBUG)



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

2011-11-12 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Sat Nov 12 19:39:01 UTC 2011

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
Add  /usr/tests/examples/Atffile to fix the build.


To generate a diff of this commit:
cvs rdiff -u -r1.421 -r1.422 src/distrib/sets/lists/tests/mi

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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.421 src/distrib/sets/lists/tests/mi:1.422
--- src/distrib/sets/lists/tests/mi:1.421	Sat Nov 12 01:20:05 2011
+++ src/distrib/sets/lists/tests/mi	Sat Nov 12 19:39:01 2011
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.421 2011/11/12 01:20:05 jmmv Exp $
+# $NetBSD: mi,v 1.422 2011/11/12 19:39:01 riz Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1391,6 +1391,7 @@
 ./usr/tests/dev/sysmon/t_swsensor		tests-fs-tests		atf
 ./usr/tests/dev/sysmon/t_swwdog			tests-fs-tests		atf
 ./usr/tests/examplestests-asm-tests
+./usr/tests/examples/Atffile			tests-asm-tests		atf
 ./usr/tests/examples/t_asm			tests-asm-tests		atf
 ./usr/tests/fs	tests-fs-tests
 ./usr/tests/fs/Atffiletests-fs-tests		atf



CVS commit: src/sys/arch/sandpoint/stand/altboot

2011-11-12 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Sat Nov 12 16:56:12 UTC 2011

Modified Files:
src/sys/arch/sandpoint/stand/altboot: dsk.c pciide.c

Log Message:
Add support for IT821x IDE.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/sandpoint/stand/altboot/dsk.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sandpoint/stand/altboot/pciide.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/sandpoint/stand/altboot/dsk.c
diff -u src/sys/arch/sandpoint/stand/altboot/dsk.c:1.10 src/sys/arch/sandpoint/stand/altboot/dsk.c:1.11
--- src/sys/arch/sandpoint/stand/altboot/dsk.c:1.10	Tue Nov  1 16:32:57 2011
+++ src/sys/arch/sandpoint/stand/altboot/dsk.c	Sat Nov 12 16:56:12 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: dsk.c,v 1.10 2011/11/01 16:32:57 phx Exp $ */
+/* $NetBSD: dsk.c,v 1.11 2011/11/12 16:56:12 phx Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -186,7 +186,7 @@ perform_atareset(struct dkdev_ata *l, in
 	delay(10);
 	CSR_WRITE_1(chan->ctl, ATA_DREQ);
 
-	return spinwait_unbusy(l, n, 150, NULL);
+	return spinwait_unbusy(l, n, 250, NULL);
 }
 
 int

Index: src/sys/arch/sandpoint/stand/altboot/pciide.c
diff -u src/sys/arch/sandpoint/stand/altboot/pciide.c:1.9 src/sys/arch/sandpoint/stand/altboot/pciide.c:1.10
--- src/sys/arch/sandpoint/stand/altboot/pciide.c:1.9	Wed Nov  2 04:10:33 2011
+++ src/sys/arch/sandpoint/stand/altboot/pciide.c	Sat Nov 12 16:56:12 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pciide.c,v 1.9 2011/11/02 04:10:33 nisimura Exp $ */
+/* $NetBSD: pciide.c,v 1.10 2011/11/12 16:56:12 phx Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -37,6 +37,7 @@
 
 static int cmdidefix(struct dkdev_ata *);
 static int apoidefix(struct dkdev_ata *);
+static int iteidefix(struct dkdev_ata *);
 
 static uint32_t pciiobase = PCI_XIOBASE;
 
@@ -47,6 +48,7 @@ struct myops {
 static struct myops defaultops = { NULL, NULL };
 static struct myops cmdideops = { cmdidefix, NULL };
 static struct myops apoideops = { apoidefix, NULL };
+static struct myops iteideops = { iteidefix, NULL };
 static struct myops *myops;
 
 int
@@ -65,6 +67,8 @@ pciide_match(unsigned tag, void *data)
 		myops = &apoideops;
 		return 1;
 	case PCI_DEVICE(0x1283, 0x8211): /* ITE 8211 IDE */
+		myops = &iteideops;
+		return 1;
 	case PCI_DEVICE(0x10ad, 0x0105): /* Symphony Labs 82C105 IDE */
 	case PCI_DEVICE(0x10b8, 0x5229): /* ALi IDE */
 	case PCI_DEVICE(0x1191, 0x0008): /* ACARD ATP865 */
@@ -127,10 +131,10 @@ pciide_init(unsigned tag, void *data)
 	for (n = 0; n < 2; n++) {
 		if (myops->presense && (*myops->presense)(l, n) == 0)
 			l->presense[n] = 0; /* found not exist */
-		else {
+		else
 			/* check to see whether soft reset works */
 			l->presense[n] = perform_atareset(l, n);
-		}
+
 		if (l->presense[n])
 			printf("channel %d present\n", n);
 	}
@@ -166,3 +170,19 @@ apoidefix(struct dkdev_ata *l)
 
 	return 1;
 }
+
+static int
+iteidefix(struct dkdev_ata *l)
+{
+	unsigned v;
+
+	/* set PCI mode and 66Mhz reference clock, disable IT8212 RAID */
+	v = pcicfgread(l->tag, 0x50);
+	pcicfgwrite(l->tag, 0x50, v & ~0x83);
+
+	/* i/o configuration, enable channels, cables, IORDY */
+	v = pcicfgread(l->tag, 0x40);
+	pcicfgwrite(l->tag, 0x40, (v & ~0xff) | 0x36a0f3);
+
+	return 1;
+}



CVS commit: src/usr.sbin/gpioctl

2011-11-12 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Sat Nov 12 16:34:03 UTC 2011

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

Log Message:
Second part of typo fixing cycle...


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.sbin/gpioctl/gpioctl.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/gpioctl/gpioctl.c
diff -u src/usr.sbin/gpioctl/gpioctl.c:1.17 src/usr.sbin/gpioctl/gpioctl.c:1.18
--- src/usr.sbin/gpioctl/gpioctl.c:1.17	Sat Nov 12 15:44:36 2011
+++ src/usr.sbin/gpioctl/gpioctl.c	Sat Nov 12 16:34:03 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: gpioctl.c,v 1.17 2011/11/12 15:44:36 mbalmer Exp $ */
+/* $NetBSD: gpioctl.c,v 1.18 2011/11/12 16:34:03 mbalmer Exp $ */
 
 /*
  * Copyright (c) 2008, 2010, 2011 Marc Balmer 
@@ -330,10 +330,10 @@ gpiopulse(int pin, char *gp_name, double
 		return;
 
 	if (gp_name)
-		printf("pin %s: pulse at %.f Hz with a %.f%% duty cyclce\n",
+		printf("pin %s: pulse at %.f Hz with a %.f%% duty cycle\n",
 		gp_name, freq, dc);
 	else
-		printf("pin %d: pulse at %.f Hz with a %.f%% duty cyclce\n",
+		printf("pin %d: pulse at %.f Hz with a %.f%% duty cycle\n",
 		pin, freq, dc);
 }
 



CVS commit: src/usr.sbin/gpioctl

2011-11-12 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Sat Nov 12 15:44:36 UTC 2011

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

Log Message:
Fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/gpioctl/gpioctl.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/gpioctl/gpioctl.c
diff -u src/usr.sbin/gpioctl/gpioctl.c:1.16 src/usr.sbin/gpioctl/gpioctl.c:1.17
--- src/usr.sbin/gpioctl/gpioctl.c:1.16	Mon Oct  3 11:16:48 2011
+++ src/usr.sbin/gpioctl/gpioctl.c	Sat Nov 12 15:44:36 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: gpioctl.c,v 1.16 2011/10/03 11:16:48 mbalmer Exp $ */
+/* $NetBSD: gpioctl.c,v 1.17 2011/11/12 15:44:36 mbalmer Exp $ */
 
 /*
  * Copyright (c) 2008, 2010, 2011 Marc Balmer 
@@ -330,10 +330,10 @@ gpiopulse(int pin, char *gp_name, double
 		return;
 
 	if (gp_name)
-		printf("pin %s: pulse at %.f Hz with a %.f%% duty cylce\n",
+		printf("pin %s: pulse at %.f Hz with a %.f%% duty cyclce\n",
 		gp_name, freq, dc);
 	else
-		printf("pin %d: pulse at %.f Hz with a %.f%% duty cylce\n",
+		printf("pin %d: pulse at %.f Hz with a %.f%% duty cyclce\n",
 		pin, freq, dc);
 }
 



CVS commit: src/sys/net/npf

2011-11-12 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Nov 12 14:51:41 UTC 2011

Modified Files:
src/sys/net/npf: npf_inet.c

Log Message:
Make a comment consistent with the code.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/net/npf/npf_inet.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/net/npf/npf_inet.c
diff -u src/sys/net/npf/npf_inet.c:1.8 src/sys/net/npf/npf_inet.c:1.9
--- src/sys/net/npf/npf_inet.c:1.8	Sun Nov  6 02:49:03 2011
+++ src/sys/net/npf/npf_inet.c	Sat Nov 12 14:51:41 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_inet.c,v 1.8 2011/11/06 02:49:03 rmind Exp $	*/
+/*	$NetBSD: npf_inet.c,v 1.9 2011/11/12 14:51:41 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 2009-2011 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: npf_inet.c,v 1.8 2011/11/06 02:49:03 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_inet.c,v 1.9 2011/11/12 14:51:41 jakllsch Exp $");
 
 #include 
 #include 
@@ -374,7 +374,7 @@ npf_fetch_udp(npf_cache_t *npc, nbuf_t *
 		return false;
 	}
 
-	/* Cache: layer 4 - ICMP. */
+	/* Cache: layer 4 - UDP. */
 	npc->npc_info |= (NPC_LAYER4 | NPC_UDP);
 	return true;
 }



CVS commit: src/sys/arch/luna68k

2011-11-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Nov 12 13:44:27 UTC 2011

Modified Files:
src/sys/arch/luna68k/conf: GENERIC INSTALL Makefile.luna68k
src/sys/arch/luna68k/dev: lcd.c
src/sys/arch/luna68k/luna68k: locore.s machdep.c mainbus.c

Log Message:
Finally complete LUNA-II support, after almost 12 years since
initial import of NetBSD/luna68k.

Note a working LUNA-II machine was found and provided by OMRON guys
after LUNA demonstration at Open Source Conference 2011 Kansai @ Kyoto:
http://mail-index.NetBSD.org/source-changes/2011/07/16/msg024675.html
and this resurrected LUNA-II which runs NetBSD/luna68k -current with Xserver
was also demonstrated on the NetBSD booth at Kansai Open Source 2011:
http://www.NetBSD.org/gallery/events.html#kansai-os-jp-2011

It's really pleasure to meet many OMRON LUNA developers and LUNA users
at the NetBSD booth.  Thank you everyone!

Changes details:

luna68k/luna68k/locore.s
 - don't use 68030 specific pflusha instruction in 68040 initialization path
 - use TBIA() to invalidate TLB instead of 68030's pflusha
   after MMU is turned on (as hp300 does)
   (these two bugs are fatal at early bootstrap)
 - pull loadustp() fixes from hp300/locore.s rev 1.82
   (more flush ops are required in it otherwise causes random coredumps)
 - specify correct %tt1 mask value
   (the mask value means actually bit mask, not transparent range)

luna68k/luna68k/machdep.c
 - use proper delay_divisor for 68040 25MHz LUNA-II

luna68k/luna68k/mainbus.c
 - prepare and use per-model mainbus device lists for mainbus_attach_args

luna68k/conf/GENERIC
luna68k/conf/INSTALL
 - enable options M68040 and FPSP
 - enable secondary spc(4) on LUNA-II

luna68k/conf/Makefile.luna68k
 - include arch/m68k/fpsp/Makefile.inc for FPSP

luna68k/dev/lcd.c
 - promote LUNA-II model on LCD

XXX: old and slow SCSI-1 drives like Hitachi DK312 seems to have
XXX: some problem with spc(4) driver, even on the original LUNA


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/arch/luna68k/conf/GENERIC
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/luna68k/conf/INSTALL
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/luna68k/conf/Makefile.luna68k
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/luna68k/dev/lcd.c
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/luna68k/luna68k/locore.s
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/luna68k/luna68k/machdep.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/luna68k/luna68k/mainbus.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/conf/GENERIC
diff -u src/sys/arch/luna68k/conf/GENERIC:1.93 src/sys/arch/luna68k/conf/GENERIC:1.94
--- src/sys/arch/luna68k/conf/GENERIC:1.93	Sat Jul 16 15:52:21 2011
+++ src/sys/arch/luna68k/conf/GENERIC	Sat Nov 12 13:44:26 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.93 2011/07/16 15:52:21 tsutsui Exp $
+# $NetBSD: GENERIC,v 1.94 2011/11/12 13:44:26 tsutsui Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,13 +22,13 @@ include		"arch/luna68k/conf/std.luna68k"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.93 $"
+#ident 		"GENERIC-$Revision: 1.94 $"
 
 maxusers	8
 
 options 	M68030
-#options 	M68040
-#options 	FPSP	# on m68040 to emulate some missing FP instructions
+options 	M68040
+options 	FPSP	# on m68040 to emulate some missing FP instructions
 
 # Needs to be set per system.  i.e change these as you see fit
 
@@ -153,7 +153,7 @@ ws0	at sio0			# port for keyboard and mo
 le0	at mainbus0
 # MB89532 SPC
 spc0	at mainbus0
-#spc1	at mainbus0		# 2nd SCSI on LUNA-II
+spc1	at mainbus0		# 2nd SCSI on LUNA-II
 # framebuffer
 fb0	at mainbus0		# 16 or 256 pseudo color
 

Index: src/sys/arch/luna68k/conf/INSTALL
diff -u src/sys/arch/luna68k/conf/INSTALL:1.1 src/sys/arch/luna68k/conf/INSTALL:1.2
--- src/sys/arch/luna68k/conf/INSTALL:1.1	Sat Jul 16 15:52:21 2011
+++ src/sys/arch/luna68k/conf/INSTALL	Sat Nov 12 13:44:26 2011
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.1 2011/07/16 15:52:21 tsutsui Exp $
+# $NetBSD: INSTALL,v 1.2 2011/11/12 13:44:26 tsutsui Exp $
 #
 # config for installation ramdisk kernel
 # 
@@ -9,8 +9,8 @@ makeoptions	COPTS="-Os"		# Optimise for 
 maxusers	4
 
 options 	M68030
-#options 	M68040
-#options 	FPSP	# on m68040 to emulate some missing FP instructions
+options 	M68040
+options 	FPSP	# on m68040 to emulate some missing FP instructions
 
 options 	MEMORY_DISK_HOOKS
 options 	MEMORY_DISK_IS_ROOT		# Force root on ram-disk
@@ -139,7 +139,7 @@ ws0	at sio0			# port for keyboard and mo
 le0	at mainbus0
 # MB89532 SPC
 spc0	at mainbus0
-#spc1	at mainbus0		# 2nd SCSI on LUNA-II
+spc1	at mainbus0		# 2nd SCSI on LUNA-II
 # framebuffer
 fb0	at mainbus0		# 16 or 256 pseudo color
 

Index: src/sys/arch/luna68k/conf/Makefile.luna68k
diff -u src/sys/arch/luna68k/conf/Makefile.luna68k:1.22 src/sys/arch/luna68k/conf/Makefile.luna68k:1.23
--- src/sys/arch/luna68k/conf/Makefile.luna68k

CVS commit: src/sys/dev/mii

2011-11-12 Thread Christopher KOBAYASHI
Module Name:src
Committed By:   sekiya
Date:   Sat Nov 12 11:11:08 UTC 2011

Modified Files:
src/sys/dev/mii: miidevs.h miidevs_data.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.94 -r1.95 src/sys/dev/mii/miidevs_data.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/mii/miidevs.h
diff -u src/sys/dev/mii/miidevs.h:1.106 src/sys/dev/mii/miidevs.h:1.107
--- src/sys/dev/mii/miidevs.h:1.106	Wed Nov  2 19:56:40 2011
+++ src/sys/dev/mii/miidevs.h	Sat Nov 12 11:11:07 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: miidevs.h,v 1.106 2011/11/02 19:56:40 jakllsch Exp $	*/
+/*	$NetBSD: miidevs.h,v 1.107 2011/11/12 11:11:07 sekiya Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
@@ -346,6 +346,8 @@
 #define	MII_STR_xxMARVELL_E1116	"Marvell 88E1116 Gigabit PHY"
 #define	MII_MODEL_xxMARVELL_E1116R	0x0024
 #define	MII_STR_xxMARVELL_E1116R	"Marvell 88E1116R Gigabit PHY"
+#define	MII_MODEL_xxMARVELL_E1116R_29	0x0029
+#define	MII_STR_xxMARVELL_E1116R_29	"Marvell 88E1116R Gigabit PHY"
 
 /* Myson Technology PHYs */
 #define	MII_MODEL_xxMYSON_MTD972	0x

Index: src/sys/dev/mii/miidevs_data.h
diff -u src/sys/dev/mii/miidevs_data.h:1.94 src/sys/dev/mii/miidevs_data.h:1.95
--- src/sys/dev/mii/miidevs_data.h:1.94	Wed Nov  2 19:56:40 2011
+++ src/sys/dev/mii/miidevs_data.h	Sat Nov 12 11:11:07 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: miidevs_data.h,v 1.94 2011/11/02 19:56:40 jakllsch Exp $	*/
+/*	$NetBSD: miidevs_data.h,v 1.95 2011/11/12 11:11:07 sekiya Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
@@ -135,6 +135,7 @@ struct mii_knowndev mii_knowndevs[] = {
  { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1145, MII_STR_xxMARVELL_E1145 },
  { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1116, MII_STR_xxMARVELL_E1116 },
  { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1116R, MII_STR_xxMARVELL_E1116R },
+ { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1116R_29, MII_STR_xxMARVELL_E1116R_29 },
  { MII_OUI_xxMYSON, MII_MODEL_xxMYSON_MTD972, MII_STR_xxMYSON_MTD972 },
  { MII_OUI_MYSON, MII_MODEL_MYSON_MTD803, MII_STR_MYSON_MTD803 },
  { MII_OUI_xxNATSEMI, MII_MODEL_xxNATSEMI_DP83840, MII_STR_xxNATSEMI_DP83840 },



CVS commit: src/sys/dev/mii

2011-11-12 Thread Christopher KOBAYASHI
Module Name:src
Committed By:   sekiya
Date:   Sat Nov 12 11:10:49 UTC 2011

Modified Files:
src/sys/dev/mii: makphy.c miidevs

Log Message:
Add support for makphy 0x0029 variation found on most recent Globalscale 
Dreamplug.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/mii/makphy.c
cvs rdiff -u -r1.103 -r1.104 src/sys/dev/mii/miidevs

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/mii/makphy.c
diff -u src/sys/dev/mii/makphy.c:1.35 src/sys/dev/mii/makphy.c:1.36
--- src/sys/dev/mii/makphy.c:1.35	Sat Dec 11 18:10:42 2010
+++ src/sys/dev/mii/makphy.c	Sat Nov 12 11:10:49 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: makphy.c,v 1.35 2010/12/11 18:10:42 matt Exp $	*/
+/*	$NetBSD: makphy.c,v 1.36 2011/11/12 11:10:49 sekiya Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: makphy.c,v 1.35 2010/12/11 18:10:42 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: makphy.c,v 1.36 2011/11/12 11:10:49 sekiya Exp $");
 
 #include 
 #include 
@@ -116,6 +116,9 @@ static const struct mii_phydesc makphys[
 	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1116R,
 	  MII_STR_xxMARVELL_E1116R },
 
+	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1116R_29,
+	  MII_STR_xxMARVELL_E1116R_29 },
+
 	{ 0,0,
 	  NULL },
 };

Index: src/sys/dev/mii/miidevs
diff -u src/sys/dev/mii/miidevs:1.103 src/sys/dev/mii/miidevs:1.104
--- src/sys/dev/mii/miidevs:1.103	Wed Nov  2 19:55:57 2011
+++ src/sys/dev/mii/miidevs	Sat Nov 12 11:10:49 2011
@@ -1,4 +1,4 @@
-$NetBSD: miidevs,v 1.103 2011/11/02 19:55:57 jakllsch Exp $
+$NetBSD: miidevs,v 1.104 2011/11/12 11:10:49 sekiya Exp $
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -241,6 +241,7 @@ model xxMARVELL E		0x000c Marvell 88
 model xxMARVELL E1145		0x000d Marvell 88E1145 Quad Gigabit PHY
 model xxMARVELL E1116		0x0021 Marvell 88E1116 Gigabit PHY
 model xxMARVELL E1116R		0x0024 Marvell 88E1116R Gigabit PHY
+model xxMARVELL E1116R_29	0x0029 Marvell 88E1116R Gigabit PHY
 
 /* Myson Technology PHYs */
 model xxMYSON MTD972		0x MTD972 10/100 media interface