CVS commit: src/usr.bin/midirecord

2014-12-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jan  1 04:57:01 UTC 2015

Modified Files:
src/usr.bin/midirecord: midirecord.c

Log Message:
don't shadow div(3)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/midirecord/midirecord.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.bin/midirecord/midirecord.c
diff -u src/usr.bin/midirecord/midirecord.c:1.4 src/usr.bin/midirecord/midirecord.c:1.5
--- src/usr.bin/midirecord/midirecord.c:1.4	Tue Dec 30 13:52:47 2014
+++ src/usr.bin/midirecord/midirecord.c	Wed Dec 31 23:57:01 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: midirecord.c,v 1.4 2014/12/30 18:52:47 mrg Exp $	*/
+/*	$NetBSD: midirecord.c,v 1.5 2015/01/01 04:57:01 christos Exp $	*/
 
 /*
  * Copyright (c) 2014 Matthew R. Green
@@ -33,7 +33,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: midirecord.c,v 1.4 2014/12/30 18:52:47 mrg Exp $");
+__RCSID("$NetBSD: midirecord.c,v 1.5 2015/01/01 04:57:01 christos Exp $");
 #endif
 
 #include 
@@ -313,21 +313,21 @@ midi_event_timer_wait_abs_to_output(
 {
 	static unsigned prev_div;
 	unsigned cur_div;
-	unsigned val = 0, div;
+	unsigned val = 0, xdiv;
 	int vallen = 0, i;
 
 	if (prev_div == 0 && !oflag)
 		prev_div = e.t_WAIT_ABS.divisions;
 	cur_div = e.t_WAIT_ABS.divisions;
 
-	div = cur_div - prev_div;
-	if (div) {
-		while (div) {
+	xdiv = cur_div - prev_div;
+	if (xdiv) {
+		while (xdiv) {
 			uint32_t extra = val ? 0x80 : 0;
 
 			val <<= 8;
-			val |= (div & 0x7f) | extra;
-			div >>= 7;
+			val |= (xdiv & 0x7f) | extra;
+			xdiv >>= 7;
 			vallen++;
 		}
 	} else



CVS commit: src/sys/conf

2014-12-31 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Thu Jan  1 03:21:50 UTC 2015

Modified Files:
src/sys/conf: copyright

Log Message:
Welcome to 2015!


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/conf/copyright

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

Modified files:

Index: src/sys/conf/copyright
diff -u src/sys/conf/copyright:1.12 src/sys/conf/copyright:1.13
--- src/sys/conf/copyright:1.12	Wed Jan  1 00:33:34 2014
+++ src/sys/conf/copyright	Thu Jan  1 03:21:49 2015
@@ -1,5 +1,5 @@
 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
+2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015
 The NetBSD Foundation, Inc.  All rights reserved.
 Copyright (c) 1982, 1986, 1989, 1991, 1993
 The Regents of the University of California.  All rights reserved.



CVS commit: src/sys/external/bsd/drm2

2014-12-31 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Jan  1 01:15:43 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/drm: drm_drv.c
src/sys/external/bsd/drm2/include/drm: drm_irq_netbsd.h
src/sys/external/bsd/drm2/include/linux: spinlock.h ww_mutex.h
src/sys/external/bsd/drm2/linux: linux_idr.c linux_kmap.c linux_work.c
linux_writecomb.c
src/sys/external/bsd/drm2/pci: drm_pci.c

Log Message:
due to hangs seen by several folks, for now revert:
http://mail-index.netbsd.org/source-changes/2014/11/04/msg060120.html

Log Message:
This code should be MP-safe. Use IPL_SCHED in place of IPL_DRM/IPL_VM and set
D_MPSAFE flag in cdevsw.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/external/bsd/drm2/drm/drm_drv.c
cvs rdiff -u -r1.3 -r1.4 \
src/sys/external/bsd/drm2/include/drm/drm_irq_netbsd.h
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/include/linux/spinlock.h
cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/drm2/include/linux/ww_mutex.h
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/linux/linux_idr.c
cvs rdiff -u -r1.11 -r1.12 src/sys/external/bsd/drm2/linux/linux_kmap.c
cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/drm2/linux/linux_work.c
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/linux/linux_writecomb.c
cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/drm2/pci/drm_pci.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/external/bsd/drm2/drm/drm_drv.c
diff -u src/sys/external/bsd/drm2/drm/drm_drv.c:1.12 src/sys/external/bsd/drm2/drm/drm_drv.c:1.13
--- src/sys/external/bsd/drm2/drm/drm_drv.c:1.12	Sun Dec 14 23:48:58 2014
+++ src/sys/external/bsd/drm2/drm/drm_drv.c	Thu Jan  1 01:15:42 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_drv.c,v 1.12 2014/12/14 23:48:58 chs Exp $	*/
+/*	$NetBSD: drm_drv.c,v 1.13 2015/01/01 01:15:42 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.12 2014/12/14 23:48:58 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.13 2015/01/01 01:15:42 mrg Exp $");
 
 #include 
 #include 
@@ -231,7 +231,8 @@ const struct cdevsw drm_cdevsw = {
 	.d_kqfilter = nokqfilter,
 	.d_discard = nodiscard,
 	/* XXX was D_TTY | D_NEGOFFSAFE */
-	.d_flag = D_NEGOFFSAFE | D_MPSAFE,
+	/* XXX Add D_MPSAFE some day... */
+	.d_flag = D_NEGOFFSAFE,
 };
 
 static const struct fileops drm_fileops = {

Index: src/sys/external/bsd/drm2/include/drm/drm_irq_netbsd.h
diff -u src/sys/external/bsd/drm2/include/drm/drm_irq_netbsd.h:1.3 src/sys/external/bsd/drm2/include/drm/drm_irq_netbsd.h:1.4
--- src/sys/external/bsd/drm2/include/drm/drm_irq_netbsd.h:1.3	Tue Nov  4 11:27:31 2014
+++ src/sys/external/bsd/drm2/include/drm/drm_irq_netbsd.h	Thu Jan  1 01:15:42 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_irq_netbsd.h,v 1.3 2014/11/04 11:27:31 jmcneill Exp $	*/
+/*	$NetBSD: drm_irq_netbsd.h,v 1.4 2015/01/01 01:15:42 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -41,4 +41,6 @@ typedef int irqreturn_t;
 
 #define	IRQF_SHARED	0	/* XXX */
 
+#define	IPL_DRM		IPL_TTY	/* XXX */
+
 #endif  /* _DRM_DRM_IRQ_NETBSD_H_ */

Index: src/sys/external/bsd/drm2/include/linux/spinlock.h
diff -u src/sys/external/bsd/drm2/include/linux/spinlock.h:1.5 src/sys/external/bsd/drm2/include/linux/spinlock.h:1.6
--- src/sys/external/bsd/drm2/include/linux/spinlock.h:1.5	Tue Nov  4 11:27:31 2014
+++ src/sys/external/bsd/drm2/include/linux/spinlock.h	Thu Jan  1 01:15:42 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: spinlock.h,v 1.5 2014/11/04 11:27:31 jmcneill Exp $	*/
+/*	$NetBSD: spinlock.h,v 1.6 2015/01/01 01:15:42 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -88,7 +88,8 @@ spin_unlock_irqrestore(spinlock_t *spinl
 static inline void
 spin_lock_init(spinlock_t *spinlock)
 {
-	mutex_init(&spinlock->sl_lock, MUTEX_DEFAULT, IPL_SCHED);
+	/* XXX What's the right IPL?  IPL_DRM...?  */
+	mutex_init(&spinlock->sl_lock, MUTEX_DEFAULT, IPL_VM);
 }
 
 /*

Index: src/sys/external/bsd/drm2/include/linux/ww_mutex.h
diff -u src/sys/external/bsd/drm2/include/linux/ww_mutex.h:1.8 src/sys/external/bsd/drm2/include/linux/ww_mutex.h:1.9
--- src/sys/external/bsd/drm2/include/linux/ww_mutex.h:1.8	Tue Nov  4 11:27:31 2014
+++ src/sys/external/bsd/drm2/include/linux/ww_mutex.h	Thu Jan  1 01:15:42 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ww_mutex.h,v 1.8 2014/11/04 11:27:31 jmcneill Exp $	*/
+/*	$NetBSD: ww_mutex.h,v 1.9 2015/01/01 01:15:42 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -147,7 +147,7 @@ ww_mutex_init(struct ww_mutex *mutex, st
 	 * XXX Apparently Linux takes these with spin locks held.  That
 	 * strikes me as a bad idea, but so it is...
 	 */
-	mutex_init(&mutex->wwm_lock, MUTEX_DEFAULT, IPL_SCHED);
+	mutex_init(&mutex->wwm_lock, MUTEX_DEFAULT, IPL_VM);
 	mutex->wwm_state = WW_UNLOCKED;
 	mutex->wwm_class = class;

CVS commit: src/sys/arch/evbarm/conf

2014-12-31 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Dec 31 23:38:42 UTC 2014

Modified Files:
src/sys/arch/evbarm/conf: ROCKCHIP

Log Message:
fix i2c offsets


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/conf/ROCKCHIP

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/evbarm/conf/ROCKCHIP
diff -u src/sys/arch/evbarm/conf/ROCKCHIP:1.8 src/sys/arch/evbarm/conf/ROCKCHIP:1.9
--- src/sys/arch/evbarm/conf/ROCKCHIP:1.8	Tue Dec 30 21:29:43 2014
+++ src/sys/arch/evbarm/conf/ROCKCHIP	Wed Dec 31 23:38:42 2014
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: ROCKCHIP,v 1.8 2014/12/30 21:29:43 jmcneill Exp $
+#	$NetBSD: ROCKCHIP,v 1.9 2014/12/31 23:38:42 jmcneill Exp $
 #
 #	Rockchip RK3066/RK3188 based SBC (Single Board Computer)
 #
@@ -179,11 +179,11 @@ com0		at obio0 addr 0x20064000 size 0x40
 options 	CONSADDR=0x20064000, CONSPEED=115200
 
 # I2C controllers
-rkiic0		at obio0 addr 0x2002c000 size 0x2000 intr 72 port 0
-rkiic1		at obio0 addr 0x2002e000 size 0x2000 intr 73 port 1
-rkiic2		at obio0 addr 0x20054000 size 0x4000 intr 74 port 2
-rkiic3		at obio0 addr 0x20058000 size 0x4000 intr 75 port 3
-rkiic4		at obio0 addr 0x2005c000 size 0x4000 intr 84 port 4
+rkiic0		at obio0 addr 0x2002d000 size 0x1000 intr 72 port 0
+rkiic1		at obio0 addr 0x2002f000 size 0x1000 intr 73 port 1
+rkiic2		at obio0 addr 0x20056000 size 0x2000 intr 74 port 2
+rkiic3		at obio0 addr 0x2005a000 size 0x2000 intr 75 port 3
+rkiic4		at obio0 addr 0x2005e000 size 0x2000 intr 84 port 4
 iic*		at rkiic?
 
 # SD/MMC



CVS commit: src/sys/dev/acpi

2014-12-31 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Dec 31 22:01:01 UTC 2014

Modified Files:
src/sys/dev/acpi: acpi_bat.c

Log Message:
handle unknown values. Also BIF_UNIT is an enum, not a bitmask.


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/dev/acpi/acpi_bat.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/acpi/acpi_bat.c
diff -u src/sys/dev/acpi/acpi_bat.c:1.113 src/sys/dev/acpi/acpi_bat.c:1.114
--- src/sys/dev/acpi/acpi_bat.c:1.113	Thu Oct  2 12:42:12 2014
+++ src/sys/dev/acpi/acpi_bat.c	Wed Dec 31 22:01:01 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_bat.c,v 1.113 2014/10/02 12:42:12 riastradh Exp $	*/
+/*	$NetBSD: acpi_bat.c,v 1.114 2014/12/31 22:01:01 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.113 2014/10/02 12:42:12 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.114 2014/12/31 22:01:01 mlelstv Exp $");
 
 #include 
 #include 
@@ -381,18 +381,22 @@ acpibat_get_info(device_t dv)
 			goto out;
 		}
 
-		if (elm[i].Integer.Value >= INT_MAX) {
+		if (elm[i].Integer.Value != ACPIBAT_VAL_UNKNOWN &&
+		elm[i].Integer.Value >= INT_MAX) {
 			rv = AE_LIMIT;
 			goto out;
 		}
 	}
 
-	if ((elm[ACPIBAT_BIF_UNIT].Integer.Value & ACPIBAT_PWRUNIT_MA) != 0) {
+	switch (elm[ACPIBAT_BIF_UNIT].Integer.Value) {
+	case ACPIBAT_PWRUNIT_MA:
 		capunit = ENVSYS_SAMPHOUR;
 		rateunit = ENVSYS_SAMPS;
-	} else {
+		break;
+	default:
 		capunit = ENVSYS_SWATTHOUR;
 		rateunit = ENVSYS_SWATTS;
+		break;
 	}
 
 	sc->sc_sensor[ACPIBAT_DCAPACITY].units = capunit;
@@ -500,10 +504,14 @@ acpibat_print_info(device_t dv, ACPI_OBJ
 	 * Granularity 2.	"Battery capacity granularity between warning
 	 *			 and full in [mAh] or [mWh]. [...]"
 	 */
-	if ((elm[ACPIBAT_BIF_UNIT].Integer.Value & ACPIBAT_PWRUNIT_MA) != 0)
+	switch (elm[ACPIBAT_BIF_UNIT].Integer.Value) {
+	case ACPIBAT_PWRUNIT_MA:
 		unit = "Ah";
-	else
+		break;
+	default:
 		unit = "Wh";
+		break;
+	}
 
 	aprint_verbose_dev(dv, "granularity: "
 	"low->warn %d.%03d %s, warn->full %d.%03d %s\n",



CVS commit: src/sys/dev/pci

2014-12-31 Thread Bernd Ernesti
Module Name:src
Committed By:   veego
Date:   Wed Dec 31 21:21:41 UTC 2014

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.1203 -r1.1204 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1202 -r1.1203 src/sys/dev/pci/pcidevs_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/pci/pcidevs.h
diff -u src/sys/dev/pci/pcidevs.h:1.1203 src/sys/dev/pci/pcidevs.h:1.1204
--- src/sys/dev/pci/pcidevs.h:1.1203	Tue Dec 23 10:55:35 2014
+++ src/sys/dev/pci/pcidevs.h	Wed Dec 31 21:21:41 2014
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.1203 2014/12/23 10:55:35 msaitoh Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.1204 2014/12/31 21:21:41 veego Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1209 2014/12/23 10:55:09 msaitoh Exp
+ *	NetBSD: pcidevs,v 1.1210 2014/12/31 21:20:23 veego Exp
  */
 
 /*
@@ -3846,6 +3846,8 @@
 #define	PCI_PRODUCT_INTEL_C224_LPC	0x8c54		/* C224 LPC */
 #define	PCI_PRODUCT_INTEL_C226_LPC	0x8c56		/* C226 LPC */
 #define	PCI_PRODUCT_INTEL_H81_LPC	0x8c5c		/* H81 LPC */
+#define	PCI_PRODUCT_INTEL_9SERIES_XHCI	0x8cb1		/* 9 Series USB xHCI */
+#define	PCI_PRODUCT_INTEL_9SERIES_MEI_1	0x8cba		/* 9 Series MEI Controller */
 #define	PCI_PRODUCT_INTEL_CORE4G_M_AHCI	0x9c03		/* Core 4G (mobile) SATA Controller (AHCI) */
 #define	PCI_PRODUCT_INTEL_CORE4G_M_RAID_1	0x9c05		/* Core 4G (mobile) SATA Controller (RAID) */
 #define	PCI_PRODUCT_INTEL_CORE4G_M_RAID_2	0x9c07		/* Core 4G (mobile) SATA Controller (RAID) Premium */

Index: src/sys/dev/pci/pcidevs_data.h
diff -u src/sys/dev/pci/pcidevs_data.h:1.1202 src/sys/dev/pci/pcidevs_data.h:1.1203
--- src/sys/dev/pci/pcidevs_data.h:1.1202	Tue Dec 23 10:55:35 2014
+++ src/sys/dev/pci/pcidevs_data.h	Wed Dec 31 21:21:41 2014
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs_data.h,v 1.1202 2014/12/23 10:55:35 msaitoh Exp $	*/
+/*	$NetBSD: pcidevs_data.h,v 1.1203 2014/12/31 21:21:41 veego Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1209 2014/12/23 10:55:09 msaitoh Exp
+ *	NetBSD: pcidevs,v 1.1210 2014/12/31 21:20:23 veego Exp
  */
 
 /*
@@ -6445,6 +6445,10 @@ static const uint16_t pci_products[] = {
 	21521, 8236, 0,
 	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_H81_LPC, 
 	21526, 8236, 0,
+	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_9SERIES_XHCI, 
+	1047, 6260, 6735, 8279, 0,
+	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_9SERIES_MEI_1, 
+	1047, 6260, 19465, 6239, 0,
 	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_CORE4G_M_AHCI, 
 	17554, 17559, 17562, 8263, 6239, 17899, 0,
 	PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_CORE4G_M_RAID_1, 
@@ -10071,7 +10075,7 @@ static const char pci_words[] = { "." 
 	"Wipro\0" /* 1 refs @ 1025 */
 	"Infotech\0" /* 1 refs @ 1031 */
 	"Number\0" /* 1 refs @ 1040 */
-	"9\0" /* 1 refs @ 1047 */
+	"9\0" /* 3 refs @ 1047 */
 	"Company\0" /* 2 refs @ 1049 */
 	"Vtech\0" /* 1 refs @ 1057 */
 	"Infotronic\0" /* 1 refs @ 1063 */
@@ -10760,9 +10764,9 @@ static const char pci_words[] = { "." 
 	"Escalade\0" /* 2 refs @ 6221 */
 	"ATA\0" /* 51 refs @ 6230 */
 	"RAID\0" /* 43 refs @ 6234 */
-	"Controller\0" /* 882 refs @ 6239 */
+	"Controller\0" /* 883 refs @ 6239 */
 	"7000/8000\0" /* 1 refs @ 6250 */
-	"Series\0" /* 116 refs @ 6260 */
+	"Series\0" /* 118 refs @ 6260 */
 	"9000\0" /* 5 refs @ 6267 */
 	"9550\0" /* 1 refs @ 6272 */
 	"9650\0" /* 1 refs @ 6277 */
@@ -10832,7 +10836,7 @@ static const char pci_words[] = { "." 
 	"M5257\0" /* 1 refs @ 6717 */
 	"M5229\0" /* 1 refs @ 6723 */
 	"M5237\0" /* 1 refs @ 6729 */
-	"USB\0" /* 184 refs @ 6735 */
+	"USB\0" /* 185 refs @ 6735 */
 	"1.1\0" /* 1 refs @ 6739 */
 	"Host\0" /* 250 refs @ 6743 */
 	"M5239\0" /* 1 refs @ 6748 */
@@ -11039,7 +11043,7 @@ static const char pci_words[] = { "." 
 	"AHCI\0" /* 76 refs @ 8268 */
 	"SD\0" /* 5 refs @ 8273 */
 	"HD\0" /* 38 refs @ 8276 */
-	"xHCI\0" /* 6 refs @ 8279 */
+	"xHCI\0" /* 7 refs @ 8279 */
 	"RS780\0" /* 7 refs @ 8284 */
 	"RS785/RS880\0" /* 1 refs @ 8290 */
 	"RS780/RS880\0" /* 5 refs @ 8302 */
@@ -12614,7 +12618,7 @@ static const char pci_words[] = { "." 
 	"82845\0" /* 2 refs @ 19443 */
 	"Thermal\0" /* 11 refs @ 19449 */
 	"DMI-PCI\0" /* 1 refs @ 19457 */
-	"MEI\0" /* 16 refs @ 19465 */
+	"MEI\0" /* 17 refs @ 19465 */
 	"KT\0" /* 18 refs @ 19469 */
 	"Z68\0" /* 1 refs @ 19472 */
 	"P67\0" /* 1 refs @ 19476 */



CVS commit: src/sys/dev/pci

2014-12-31 Thread Bernd Ernesti
Module Name:src
Committed By:   veego
Date:   Wed Dec 31 21:20:23 UTC 2014

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Add two Intel 9 Series devices


To generate a diff of this commit:
cvs rdiff -u -r1.1209 -r1.1210 src/sys/dev/pci/pcidevs

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/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1209 src/sys/dev/pci/pcidevs:1.1210
--- src/sys/dev/pci/pcidevs:1.1209	Tue Dec 23 10:55:09 2014
+++ src/sys/dev/pci/pcidevs	Wed Dec 31 21:20:23 2014
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1209 2014/12/23 10:55:09 msaitoh Exp $
+$NetBSD: pcidevs,v 1.1210 2014/12/31 21:20:23 veego Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -3839,6 +3839,8 @@ product INTEL C222_LPC		0x8c52	C222 LPC
 product INTEL C224_LPC		0x8c54	C224 LPC
 product INTEL C226_LPC		0x8c56	C226 LPC
 product INTEL H81_LPC		0x8c5c	H81 LPC
+product INTEL 9SERIES_XHCI	0x8cb1	9 Series USB xHCI
+product INTEL 9SERIES_MEI_1	0x8cba	9 Series MEI Controller
 product INTEL CORE4G_M_AHCI	0x9c03	Core 4G (mobile) SATA Controller (AHCI)
 product INTEL CORE4G_M_RAID_1	0x9c05	Core 4G (mobile) SATA Controller (RAID)
 product INTEL CORE4G_M_RAID_2	0x9c07	Core 4G (mobile) SATA Controller (RAID) Premium



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

2014-12-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec 31 20:55:53 UTC 2014

Modified Files:
src/sys/arch/amiga/dev: fd.c

Log Message:
fix typo


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/sys/arch/amiga/dev/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/amiga/dev/fd.c
diff -u src/sys/arch/amiga/dev/fd.c:1.93 src/sys/arch/amiga/dev/fd.c:1.94
--- src/sys/arch/amiga/dev/fd.c:1.93	Wed Dec 31 14:52:04 2014
+++ src/sys/arch/amiga/dev/fd.c	Wed Dec 31 15:55:53 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: fd.c,v 1.93 2014/12/31 19:52:04 christos Exp $ */
+/*	$NetBSD: fd.c,v 1.94 2014/12/31 20:55:53 christos Exp $ */
 
 /*
  * Copyright (c) 1994 Christian E. Hopps
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.93 2014/12/31 19:52:04 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.94 2014/12/31 20:55:53 christos Exp $");
 
 #include 
 #include 
@@ -573,7 +573,7 @@ fdioctl(dev_t dev, u_long cmd, void *add
 	if ((sc->flags & FDF_HAVELABEL) == 0)
 		return(EBADF);
 
-	error = disk_ioctl(&sk->dkdev, dev, cmd, addr, flag, l);
+	error = disk_ioctl(&sc->dkdev, dev, cmd, addr, flag, l);
 	if (error != EPASSTHROUGH)
 		return error;
 



CVS commit: src/sys/dev/mscp

2014-12-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec 31 20:45:44 UTC 2014

Modified Files:
src/sys/dev/mscp: mscp_disk.c

Log Message:
more unused removal


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/dev/mscp/mscp_disk.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/mscp/mscp_disk.c
diff -u src/sys/dev/mscp/mscp_disk.c:1.85 src/sys/dev/mscp/mscp_disk.c:1.86
--- src/sys/dev/mscp/mscp_disk.c:1.85	Wed Dec 31 15:44:46 2014
+++ src/sys/dev/mscp/mscp_disk.c	Wed Dec 31 15:45:44 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: mscp_disk.c,v 1.85 2014/12/31 20:44:46 christos Exp $	*/
+/*	$NetBSD: mscp_disk.c,v 1.86 2014/12/31 20:45:44 christos Exp $	*/
 /*
  * Copyright (c) 1988 Regents of the University of California.
  * All rights reserved.
@@ -82,7 +82,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.85 2014/12/31 20:44:46 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.86 2014/12/31 20:45:44 christos Exp $");
 
 #include 
 #include 
@@ -855,8 +855,6 @@ rxioctl(dev_t dev, u_long cmd, void *dat
 	struct rx_softc *rx = device_lookup_private(&rx_cd, unit);
 	int error;
 
-	lp = rx->ra_disk.dk_label;
-
 error = disk_ioctl(&rx->ra_disk, dev, cmd, data, flag, l);
 	if (error != EPASSTHROUGH)
 		return error;



CVS commit: src/sys/dev/mscp

2014-12-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec 31 20:44:46 UTC 2014

Modified Files:
src/sys/dev/mscp: mscp_disk.c

Log Message:
remove unused variable


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/dev/mscp/mscp_disk.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/mscp/mscp_disk.c
diff -u src/sys/dev/mscp/mscp_disk.c:1.84 src/sys/dev/mscp/mscp_disk.c:1.85
--- src/sys/dev/mscp/mscp_disk.c:1.84	Wed Dec 31 14:52:05 2014
+++ src/sys/dev/mscp/mscp_disk.c	Wed Dec 31 15:44:46 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: mscp_disk.c,v 1.84 2014/12/31 19:52:05 christos Exp $	*/
+/*	$NetBSD: mscp_disk.c,v 1.85 2014/12/31 20:44:46 christos Exp $	*/
 /*
  * Copyright (c) 1988 Regents of the University of California.
  * All rights reserved.
@@ -82,7 +82,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.84 2014/12/31 19:52:05 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.85 2014/12/31 20:44:46 christos Exp $");
 
 #include 
 #include 
@@ -852,7 +852,6 @@ int
 rxioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
 {
 	int unit = DISKUNIT(dev);
-	struct disklabel *lp;
 	struct rx_softc *rx = device_lookup_private(&rx_cd, unit);
 	int error;
 



CVS commit: src/sys/arch/xen/xen

2014-12-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec 31 20:39:07 UTC 2014

Modified Files:
src/sys/arch/xen/xen: xbd_xenbus.c

Log Message:
pass dev to disk_ioctl


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/xen/xen/xbd_xenbus.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/xen/xen/xbd_xenbus.c
diff -u src/sys/arch/xen/xen/xbd_xenbus.c:1.66 src/sys/arch/xen/xen/xbd_xenbus.c:1.67
--- src/sys/arch/xen/xen/xbd_xenbus.c:1.66	Sun Aug 10 12:44:35 2014
+++ src/sys/arch/xen/xen/xbd_xenbus.c	Wed Dec 31 15:39:07 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: xbd_xenbus.c,v 1.66 2014/08/10 16:44:35 tls Exp $  */
+/*  $NetBSD: xbd_xenbus.c,v 1.67 2014/12/31 20:39:07 christos Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -50,7 +50,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.66 2014/08/10 16:44:35 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.67 2014/12/31 20:39:07 christos Exp $");
 
 #include "opt_xen.h"
 
@@ -847,7 +847,7 @@ xbdioctl(dev_t dev, u_long cmd, void *da
 	dev, cmd, data, flag, l));
 	dksc = &sc->sc_dksc;
 
-	error = disk_ioctl(&sc->sc_dksc.sc_dkdev, cmd, data, flag, l);
+	error = disk_ioctl(&sc->sc_dksc.sc_dkdev, dev, cmd, data, flag, l);
 	if (error != EPASSTHROUGH)
 		return (error);
 



CVS commit: src/sys/arch/vax/mba

2014-12-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec 31 20:37:53 UTC 2014

Modified Files:
src/sys/arch/vax/mba: hp.c

Log Message:
return error


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/vax/mba/hp.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/vax/mba/hp.c
diff -u src/sys/arch/vax/mba/hp.c:1.51 src/sys/arch/vax/mba/hp.c:1.52
--- src/sys/arch/vax/mba/hp.c:1.51	Wed Dec 31 14:52:05 2014
+++ src/sys/arch/vax/mba/hp.c	Wed Dec 31 15:37:52 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: hp.c,v 1.51 2014/12/31 19:52:05 christos Exp $ */
+/*	$NetBSD: hp.c,v 1.52 2014/12/31 20:37:52 christos Exp $ */
 /*
  * Copyright (c) 1996 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hp.c,v 1.51 2014/12/31 19:52:05 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hp.c,v 1.52 2014/12/31 20:37:52 christos Exp $");
 
 #include 
 #include 
@@ -326,7 +326,7 @@ hpioctl(dev_t dev, u_long cmd, void *add
 
 	error = disk_ioctl(&sc->sc_disk, dev, cmd, addr, flag, l); 
 	if (error != EPASSTHROUGH)
-		goto out;
+		return error;
 
 	switch (cmd) {
 	case DIOCSDINFO:



CVS commit: src/sys/arch/vax/vsa

2014-12-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec 31 20:37:10 UTC 2014

Modified Files:
src/sys/arch/vax/vsa: hdc9224.c

Log Message:
declare error


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/vax/vsa/hdc9224.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/vax/vsa/hdc9224.c
diff -u src/sys/arch/vax/vsa/hdc9224.c:1.55 src/sys/arch/vax/vsa/hdc9224.c:1.56
--- src/sys/arch/vax/vsa/hdc9224.c:1.55	Wed Dec 31 14:52:05 2014
+++ src/sys/arch/vax/vsa/hdc9224.c	Wed Dec 31 15:37:10 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: hdc9224.c,v 1.55 2014/12/31 19:52:05 christos Exp $ */
+/*	$NetBSD: hdc9224.c,v 1.56 2014/12/31 20:37:10 christos Exp $ */
 /*
  * Copyright (c) 1996 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -51,7 +51,7 @@
 #undef	RDDEBUG
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hdc9224.c,v 1.55 2014/12/31 19:52:05 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdc9224.c,v 1.56 2014/12/31 20:37:10 christos Exp $");
 
 #include 
 #include 
@@ -688,6 +688,7 @@ rdioctl(dev_t dev, u_long cmd, void *add
 {
 	struct rdsoftc * const rd = device_lookup_private(&rd_cd, DISKUNIT(dev));
 	struct disklabel * const lp = rd->sc_disk.dk_label;
+	int error;
 
 	error = disk_ioctl(&rd->sc_disk, dev, cmd, addr, flag, l);
 	if (error != EPASSTHROUGH)



CVS commit: src/sys/dev/gpib

2014-12-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec 31 20:36:20 UTC 2014

Modified Files:
src/sys/dev/gpib: rd.c

Log Message:
fix typo


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/gpib/rd.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/gpib/rd.c
diff -u src/sys/dev/gpib/rd.c:1.37 src/sys/dev/gpib/rd.c:1.38
--- src/sys/dev/gpib/rd.c:1.37	Wed Dec 31 14:52:05 2014
+++ src/sys/dev/gpib/rd.c	Wed Dec 31 15:36:20 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rd.c,v 1.37 2014/12/31 19:52:05 christos Exp $ */
+/*	$NetBSD: rd.c,v 1.38 2014/12/31 20:36:20 christos Exp $ */
 
 /*-
  * Copyright (c) 1996-2003 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.37 2014/12/31 19:52:05 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rd.c,v 1.38 2014/12/31 20:36:20 christos Exp $");
 
 #include 
 #include 
@@ -972,7 +972,7 @@ rdioctl(dev_t dev, u_long cmd, void *dat
 
 	DPRINTF(RDB_FOLLOW, ("rdioctl: sc=%p\n", sc));
 
-	error = disk_ioctl(&sk->sc_dk, dev, cmd, data, flag, l);
+	error = disk_ioctl(&sc->sc_dk, dev, cmd, data, flag, l);
 	if (error != EPASSTHROUGH)
 		return error;
 



CVS commit: src

2014-12-31 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Dec 31 20:13:41 UTC 2014

Modified Files:
src/share/man/man9: disk.9
src/sys/kern: subr_disk.c
src/sys/sys: disk.h

Log Message:
Retire disk_blocksize().


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/share/man/man9/disk.9
cvs rdiff -u -r1.109 -r1.110 src/sys/kern/subr_disk.c
cvs rdiff -u -r1.62 -r1.63 src/sys/sys/disk.h

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/man9/disk.9
diff -u src/share/man/man9/disk.9:1.39 src/share/man/man9/disk.9:1.40
--- src/share/man/man9/disk.9:1.39	Mon Dec 29 19:20:22 2014
+++ src/share/man/man9/disk.9	Wed Dec 31 20:13:41 2014
@@ -1,4 +1,4 @@
-.\"	$NetBSD: disk.9,v 1.39 2014/12/29 19:20:22 wiz Exp $
+.\"	$NetBSD: disk.9,v 1.40 2014/12/31 20:13:41 mlelstv Exp $
 .\"
 .\" Copyright (c) 1995, 1996 Jason R. Thorpe.
 .\" All rights reserved.
@@ -44,7 +44,6 @@
 .Nm disk_unbusy ,
 .Nm disk_isbusy ,
 .Nm disk_find ,
-.Nm disk_blocksize ,
 .Nm disk_set_info
 .Nd generic disk framework
 .Sh SYNOPSIS
@@ -70,8 +69,6 @@
 .Ft struct disk *
 .Fn disk_find "const char *"
 .Ft void
-.Fn disk_blocksize "struct disk *" "int blocksize"
-.Ft void
 .Fn disk_set_info "device_t" "struct disk *" "const char *type"
 .Sh DESCRIPTION
 The
@@ -139,7 +136,7 @@ and
 pseudo-device drivers.
 .Pp
 The following is a brief description of each function in the framework:
-.Bl -tag -width ".Fn disk_blocksize"
+.Bl -tag -width ".Fn disk_set_info"
 .It Fn disk_init
 Initialize the disk structure.
 .It Fn disk_attach
@@ -197,20 +194,9 @@ Return a pointer to the disk structure c
 or
 .Dv NULL
 if the disk does not exist.
-.It Fn disk_blocksize
-Initialize
-.Fa dk_blkshift
-and
-.Fa dk_byteshift
-members of
-.Fa struct disk
-with suitable values derived from the supplied physical blocksize.
-It is only necessary to call this function if the device's physical blocksize
-is not
-.Dv DEV_BSIZE .
 .It Fn disk_set_info
-Setup disk-info dictionary, the driver must have initialized the
-dk_geom member of
+Setup disk-info dictionary and other dependent values of the disk structure,
+the driver must have initialized the dk_geom member of
 .Fa struct disk
 with suitable values.
 If
@@ -229,7 +215,7 @@ The functions typically called by device
 .Fn disk_busy ,
 .Fn disk_unbusy ,
 and
-.Fn disk_blocksize .
+.Fn disk_set_info .
 The function
 .Fn disk_find
 is provided as a utility function.
@@ -371,9 +357,6 @@ fooattach(device_t parent, device_t self
 	disk_attach(\*[Am]sc-\*[Gt]sc_dk);
 
 	/* Read geometry and fill in pertinent parts of disklabel. */
-	[ . . . ]
-	disk_blocksize(\*[Am]sc-\*[Gt]sc_dk, bytes_per_sector);
-
 	/* Initialize geometry values of the disk structure */
 	[ . . . ]
 	disk_set_info(\*[Am]self\*[Gt], \*[Am]sc-\*[Gt]sc_dk, type);

Index: src/sys/kern/subr_disk.c
diff -u src/sys/kern/subr_disk.c:1.109 src/sys/kern/subr_disk.c:1.110
--- src/sys/kern/subr_disk.c:1.109	Wed Dec 31 19:58:59 2014
+++ src/sys/kern/subr_disk.c	Wed Dec 31 20:13:41 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_disk.c,v 1.109 2014/12/31 19:58:59 christos Exp $	*/
+/*	$NetBSD: subr_disk.c,v 1.110 2014/12/31 20:13:41 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1999, 2000, 2009 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.109 2014/12/31 19:58:59 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.110 2014/12/31 20:13:41 mlelstv Exp $");
 
 #include 
 #include 
@@ -305,19 +305,6 @@ disk_isbusy(struct disk *diskp)
 }
 
 /*
- * Set the physical blocksize of a disk, in bytes.
- * Only necessary if blocksize != DEV_BSIZE.
- */
-void
-disk_blocksize(struct disk *diskp, int blocksize)
-{
-
-	diskp->dk_blkshift = DK_BSIZE2BLKSHIFT(blocksize);
-	diskp->dk_byteshift = DK_BSIZE2BYTESHIFT(blocksize);
-	diskp->dk_geom.dg_secsize = DEV_BSIZE << diskp->dk_blkshift;
-}
-
-/*
  * Bounds checking against the media size, used for the raw partition.
  * secsize, mediasize and b_blkno must all be the same units.
  * Possibly this has to be DEV_BSIZE (512).

Index: src/sys/sys/disk.h
diff -u src/sys/sys/disk.h:1.62 src/sys/sys/disk.h:1.63
--- src/sys/sys/disk.h:1.62	Wed Dec 31 20:04:56 2014
+++ src/sys/sys/disk.h	Wed Dec 31 20:13:41 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: disk.h,v 1.62 2014/12/31 20:04:56 christos Exp $	*/
+/*	$NetBSD: disk.h,v 1.63 2014/12/31 20:13:41 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 2004 The NetBSD Foundation, Inc.
@@ -532,7 +532,6 @@ void	disk_destroy(struct disk *);
 void	disk_busy(struct disk *);
 void	disk_unbusy(struct disk *, long, int);
 bool	disk_isbusy(struct disk *);
-void	disk_blocksize(struct disk *, int);
 struct disk *disk_find(const char *);
 int	disk_ioctl(struct disk *, dev_t, u_long, void *, int, struct lwp *);
 void	disk_set_info(device_t, struct disk *, const char *);



CVS commit: src/sys/sys

2014-12-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec 31 20:04:56 UTC 2014

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

Log Message:
prototype update.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/sys/disk.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/disk.h
diff -u src/sys/sys/disk.h:1.61 src/sys/sys/disk.h:1.62
--- src/sys/sys/disk.h:1.61	Sat Aug 30 05:23:29 2014
+++ src/sys/sys/disk.h	Wed Dec 31 15:04:56 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: disk.h,v 1.61 2014/08/30 09:23:29 apb Exp $	*/
+/*	$NetBSD: disk.h,v 1.62 2014/12/31 20:04:56 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 2004 The NetBSD Foundation, Inc.
@@ -534,7 +534,7 @@ void	disk_unbusy(struct disk *, long, in
 bool	disk_isbusy(struct disk *);
 void	disk_blocksize(struct disk *, int);
 struct disk *disk_find(const char *);
-int	disk_ioctl(struct disk *, u_long, void *, int, struct lwp *);
+int	disk_ioctl(struct disk *, dev_t, u_long, void *, int, struct lwp *);
 void	disk_set_info(device_t, struct disk *, const char *);
 
 void	dkwedge_init(void);



CVS commit: src/sys/kern

2014-12-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec 31 19:58:59 UTC 2014

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

Log Message:
Mention which ioctls need to move to dk_ioctl, and don't allow wedges on
wedges.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/kern/subr_disk.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/subr_disk.c
diff -u src/sys/kern/subr_disk.c:1.108 src/sys/kern/subr_disk.c:1.109
--- src/sys/kern/subr_disk.c:1.108	Wed Dec 31 14:52:06 2014
+++ src/sys/kern/subr_disk.c	Wed Dec 31 14:58:59 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_disk.c,v 1.108 2014/12/31 19:52:06 christos Exp $	*/
+/*	$NetBSD: subr_disk.c,v 1.109 2014/12/31 19:58:59 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1999, 2000, 2009 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.108 2014/12/31 19:52:06 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.109 2014/12/31 19:58:59 christos Exp $");
 
 #include 
 #include 
@@ -498,16 +498,34 @@ disk_ioctl(struct disk *dk, dev_t dev, u
 #endif
 
 	switch (cmd) {
+	case DIOCGDISKINFO:
+		if (dk->dk_info == NULL)
+			return ENOTSUP;
+		return prop_dictionary_copyout_ioctl(data, cmd, dk->dk_info);
+
+	case DIOCGSECTORSIZE:
+		*(u_int *)data = dk->dk_geom.dg_secsize;
+		return 0;
+
+	case DIOCGMEDIASIZE:
+		*(off_t *)data = (off_t)dk->dk_geom.dg_secsize *
+		dk->dk_geom.dg_secperunit;
+		return 0;
+	default:
+		break;
+	}
+
+	if (dev == 0)
+		return EPASSTHROUGH;
+
+	/* The following should be moved to dk_ioctl */
+	switch (cmd) {
 	case DIOCGDINFO:
-		if (dev == 0)
-			return EPASSTHROUGH;
 		memcpy(data, dk->dk_label, sizeof (*dk->dk_label));
 		return 0;
 
 #ifdef __HAVE_OLD_DISKLABEL
 	case ODIOCGDINFO:
-		if (dev == 0)
-			return EPASSTHROUGH;
 		memcpy(&newlabel, dk->dk_label, sizeof(newlabel));
 		if (newlabel.d_npartitions > OLDMAXPARTITIONS)
 			return ENOTTY;
@@ -516,8 +534,6 @@ disk_ioctl(struct disk *dk, dev_t dev, u
 #endif
 
 	case DIOCGPART:
-		if (dev == 0)
-			return EPASSTHROUGH;
 		pt = data;
 		pt->disklab = dk->dk_label;
 		pt->part = &dk->dk_label->d_partitions[DISKPART(dev)];
@@ -549,20 +565,6 @@ disk_ioctl(struct disk *dk, dev_t dev, u
 		dkwedge_discover(dk);
 		return 0;
 
-	case DIOCGDISKINFO:
-		if (dk->dk_info == NULL)
-			return ENOTSUP;
-		return prop_dictionary_copyout_ioctl(data, cmd, dk->dk_info);
-
-	case DIOCGSECTORSIZE:
-		*(u_int *)data = dk->dk_geom.dg_secsize;
-		return 0;
-
-	case DIOCGMEDIASIZE:
-		*(off_t *)data = (off_t)dk->dk_geom.dg_secsize *
-		dk->dk_geom.dg_secperunit;
-		return 0;
-
 	default:
 		return EPASSTHROUGH;
 	}



CVS commit: src/sys

2014-12-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec 31 19:52:06 UTC 2014

Modified Files:
src/sys/arch/amiga/dev: fd.c
src/sys/arch/atari/dev: fd.c hdfd.c
src/sys/arch/emips/ebus: ace_ebus.c flash_ebus.c
src/sys/arch/hp300/dev: rd.c
src/sys/arch/mac68k/obio: iwm_fd.c
src/sys/arch/sun3/dev: xd.c xy.c
src/sys/arch/vax/mba: hp.c
src/sys/arch/vax/vsa: hdc9224.c
src/sys/arch/x68k/dev: bmd.c fd.c
src/sys/dev: ccd.c cgd.c dksubr.c ld.c md.c vnd.c
src/sys/dev/ata: wd.c
src/sys/dev/dkwedge: dk.c
src/sys/dev/gpib: rd.c
src/sys/dev/isa: fd.c mcd.c
src/sys/dev/mca: ed_mca.c
src/sys/dev/mscp: mscp_disk.c
src/sys/dev/ofw: ofdisk.c
src/sys/dev/qbus: rf.c rl.c
src/sys/dev/raidframe: rf_netbsdkintf.c
src/sys/dev/scsipi: cd.c sd.c
src/sys/dev/vme: xd.c xy.c
src/sys/kern: subr_disk.c
src/sys/sys: param.h

Log Message:
make more drivers use disk_ioctl, and add a dev parameter to it so that
we can merge the "easy" disklabel ioctls to it. Ultimately all this will
go do dk_ioctl once all the drivers have been converted.


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/sys/arch/amiga/dev/fd.c
cvs rdiff -u -r1.80 -r1.81 src/sys/arch/atari/dev/fd.c
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/atari/dev/hdfd.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/emips/ebus/ace_ebus.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/emips/ebus/flash_ebus.c
cvs rdiff -u -r1.98 -r1.99 src/sys/arch/hp300/dev/rd.c
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/mac68k/obio/iwm_fd.c
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/sun3/dev/xd.c
cvs rdiff -u -r1.76 -r1.77 src/sys/arch/sun3/dev/xy.c
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/vax/mba/hp.c
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/vax/vsa/hdc9224.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/x68k/dev/bmd.c
cvs rdiff -u -r1.111 -r1.112 src/sys/arch/x68k/dev/fd.c
cvs rdiff -u -r1.160 -r1.161 src/sys/dev/ccd.c
cvs rdiff -u -r1.93 -r1.94 src/sys/dev/cgd.c
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/dksubr.c
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/ld.c
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/md.c
cvs rdiff -u -r1.237 -r1.238 src/sys/dev/vnd.c
cvs rdiff -u -r1.416 -r1.417 src/sys/dev/ata/wd.c
cvs rdiff -u -r1.77 -r1.78 src/sys/dev/dkwedge/dk.c
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/gpib/rd.c
cvs rdiff -u -r1.105 -r1.106 src/sys/dev/isa/fd.c
cvs rdiff -u -r1.113 -r1.114 src/sys/dev/isa/mcd.c
cvs rdiff -u -r1.60 -r1.61 src/sys/dev/mca/ed_mca.c
cvs rdiff -u -r1.83 -r1.84 src/sys/dev/mscp/mscp_disk.c
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/ofw/ofdisk.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/qbus/rf.c
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/qbus/rl.c
cvs rdiff -u -r1.319 -r1.320 src/sys/dev/raidframe/rf_netbsdkintf.c
cvs rdiff -u -r1.326 -r1.327 src/sys/dev/scsipi/cd.c
cvs rdiff -u -r1.312 -r1.313 src/sys/dev/scsipi/sd.c
cvs rdiff -u -r1.93 -r1.94 src/sys/dev/vme/xd.c
cvs rdiff -u -r1.97 -r1.98 src/sys/dev/vme/xy.c
cvs rdiff -u -r1.107 -r1.108 src/sys/kern/subr_disk.c
cvs rdiff -u -r1.463 -r1.464 src/sys/sys/param.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/amiga/dev/fd.c
diff -u src/sys/arch/amiga/dev/fd.c:1.92 src/sys/arch/amiga/dev/fd.c:1.93
--- src/sys/arch/amiga/dev/fd.c:1.92	Fri Aug  8 17:13:52 2014
+++ src/sys/arch/amiga/dev/fd.c	Wed Dec 31 14:52:04 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: fd.c,v 1.92 2014/08/08 21:13:52 joerg Exp $ */
+/*	$NetBSD: fd.c,v 1.93 2014/12/31 19:52:04 christos Exp $ */
 
 /*
  * Copyright (c) 1994 Christian E. Hopps
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.92 2014/08/08 21:13:52 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.93 2014/12/31 19:52:04 christos Exp $");
 
 #include 
 #include 
@@ -573,6 +573,10 @@ fdioctl(dev_t dev, u_long cmd, void *add
 	if ((sc->flags & FDF_HAVELABEL) == 0)
 		return(EBADF);
 
+	error = disk_ioctl(&sk->dkdev, dev, cmd, addr, flag, l);
+	if (error != EPASSTHROUGH)
+		return error;
+
 	switch (cmd) {
 	case DIOCSBAD:
 		return(EINVAL);
@@ -586,14 +590,6 @@ fdioctl(dev_t dev, u_long cmd, void *add
 			return(EINVAL);
 		sc->dkdev.dk_label->d_trkseek = sc->stepdelay = *(int *)addr;
 		return(0);
-	case DIOCGDINFO:
-		*(struct disklabel *)addr = *(sc->dkdev.dk_label);
-		return(0);
-	case DIOCGPART:
-		((struct partinfo *)addr)->disklab = sc->dkdev.dk_label;
-		((struct partinfo *)addr)->part =
-		&sc->dkdev.dk_label->d_partitions[FDPART(dev)];
-		return(0);
 	case DIOCSDINFO:
 		if ((flag & FWRITE) == 0)
 			return(EBADF);

Index: src/sys/arch/atari/dev/fd.c
diff -u src/sys/arch/atari/dev/fd.c:1.80 src/sys/arch/atari/dev/fd.c:1.81
--- src/sys/arch/atari/dev/fd.c:1.80	Sat Oct 18 04:33:25 2014
+++ src/sys/arch/atari/dev/fd.c	Wed Dec 31 14:52:04 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: fd.c,v 1.80 2014/10/18 08:33:25 snj Exp $	*/
+/*	$Ne

CVS commit: src/sys/kern

2014-12-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec 31 19:50:14 UTC 2014

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

Log Message:
get the wedge info first if it exists, because this will support larger sizes.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/kern/subr_disk_open.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/subr_disk_open.c
diff -u src/sys/kern/subr_disk_open.c:1.11 src/sys/kern/subr_disk_open.c:1.12
--- src/sys/kern/subr_disk_open.c:1.11	Sat Oct 27 13:18:39 2012
+++ src/sys/kern/subr_disk_open.c	Wed Dec 31 14:50:14 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_disk_open.c,v 1.11 2012/10/27 17:18:39 chs Exp $	*/
+/*	$NetBSD: subr_disk_open.c,v 1.12 2014/12/31 19:50:14 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_disk_open.c,v 1.11 2012/10/27 17:18:39 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_disk_open.c,v 1.12 2014/12/31 19:50:14 christos Exp $");
 
 #include 
 #include 
@@ -98,19 +98,25 @@ getdisksize(struct vnode *vp, uint64_t *
 	uint64_t numsec;
 	int error;
 
-	error = VOP_IOCTL(vp, DIOCGPART, &dpart, FREAD, NOCRED);
+	/*
+	 * We attempt to get the wedge information first if it exists,
+	 * because the label does not support larger size disks.
+	 */
+	error = VOP_IOCTL(vp, DIOCGWEDGEINFO, &dkw, FREAD, NOCRED);
 	if (error == 0) {
-		secsize = dpart.disklab->d_secsize;
-		numsec  = dpart.part->p_size;
-	} else {
-		error = VOP_IOCTL(vp, DIOCGWEDGEINFO, &dkw, FREAD, NOCRED);
+		pdk = disk_find(dkw.dkw_parent);
+		if (pdk != NULL) {
+			secsize = DEV_BSIZE << pdk->dk_blkshift;
+			numsec  = dkw.dkw_size;
+		} else
+			error = ENODEV;
+	}
+
+	if (error) {
+		error = VOP_IOCTL(vp, DIOCGPART, &dpart, FREAD, NOCRED);
 		if (error == 0) {
-			pdk = disk_find(dkw.dkw_parent);
-			if (pdk != NULL) {
-secsize = DEV_BSIZE << pdk->dk_blkshift;
-numsec  = dkw.dkw_size;
-			} else
-error = ENODEV;
+			secsize = dpart.disklab->d_secsize;
+			numsec  = dpart.part->p_size;
 		}
 	}
 



CVS commit: src/sys/dev/scsipi

2014-12-31 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Dec 31 19:37:35 UTC 2014

Modified Files:
src/sys/dev/scsipi: cd.c

Log Message:
forgot this one. disk_set_info includes the functionality of disk_blocksize.


To generate a diff of this commit:
cvs rdiff -u -r1.325 -r1.326 src/sys/dev/scsipi/cd.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/scsipi/cd.c
diff -u src/sys/dev/scsipi/cd.c:1.325 src/sys/dev/scsipi/cd.c:1.326
--- src/sys/dev/scsipi/cd.c:1.325	Sat Oct 18 08:33:28 2014
+++ src/sys/dev/scsipi/cd.c	Wed Dec 31 19:37:35 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: cd.c,v 1.325 2014/10/18 08:33:28 snj Exp $	*/
+/*	$NetBSD: cd.c,v 1.326 2014/12/31 19:37:35 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001, 2003, 2004, 2005, 2008 The NetBSD Foundation,
@@ -50,7 +50,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.325 2014/10/18 08:33:28 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.326 2014/12/31 19:37:35 mlelstv Exp $");
 
 #include 
 #include 
@@ -2132,7 +2132,6 @@ cd_get_parms(struct cd_softc *cd, int fl
 	 */
 	if (cd_size(cd, flags) == 0)
 		return (ENXIO);
-	disk_blocksize(&cd->sc_dk, cd->params.blksize);
 	return (0);
 }
 



CVS commit: src/sys/arch/ofppc/ofppc

2014-12-31 Thread Frank Wille
Module Name:src
Committed By:   phx
Date:   Wed Dec 31 18:43:18 UTC 2014

Modified Files:
src/sys/arch/ofppc/ofppc: mainbus.c

Log Message:
Make it compile with GCC48.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/ofppc/ofppc/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/ofppc/ofppc/mainbus.c
diff -u src/sys/arch/ofppc/ofppc/mainbus.c:1.29 src/sys/arch/ofppc/ofppc/mainbus.c:1.30
--- src/sys/arch/ofppc/ofppc/mainbus.c:1.29	Sun Apr 21 15:42:11 2013
+++ src/sys/arch/ofppc/ofppc/mainbus.c	Wed Dec 31 18:43:18 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.29 2013/04/21 15:42:11 kiyohara Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.30 2014/12/31 18:43:18 phx Exp $	*/
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.29 2013/04/21 15:42:11 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.30 2014/12/31 18:43:18 phx Exp $");
 
 #include "opt_interrupt.h"
 #include "opt_multiprocessor.h"
@@ -100,10 +100,15 @@ init_openpic(int node)
 		uint32_t pci_hi, pci_mid, pci_lo;
 		uint32_t host;
 		uint32_t size_hi, size_lo;
-	} ranges[6], *rp = ranges;
-	unsigned char *baseaddr = NULL;
+	} ranges[6];
 	uint32_t reg[12];
 	int parent, len;
+#if defined(PIC_OPENPIC) || defined(PIC_DISTOPENPIC)
+	unsigned char *baseaddr;
+#endif
+#ifdef PIC_OPENPIC
+	struct ranges *rp = ranges;
+#endif
 #ifdef PIC_DISTOPENPIC
 	unsigned char *isu[OPENPIC_MAX_ISUS];
 	int i, j;
@@ -144,7 +149,6 @@ init_openpic(int node)
 		len -= sizeof(ranges[0]);
 	}
 #endif
-	rp = 0; /* satisfy -Wall */
 	return FALSE;
  noaadr:
 	/* this isn't a PCI-attached openpic */
@@ -153,9 +157,9 @@ init_openpic(int node)
 		return FALSE;
 
 	if (len == sizeof(int)*2) {
-		baseaddr = (unsigned char *)mapiodev(reg[0], reg[1], false);
 		aprint_verbose("Found openpic at %08x\n", reg[0]);
 #ifdef PIC_OPENPIC
+		baseaddr = (unsigned char *)mapiodev(reg[0], reg[1], false);
 		(void)setup_openpic(baseaddr, 0);
 #ifdef MULTIPROCESSOR
 		setup_openpic_ipi();



CVS commit: src/share/man/man4

2014-12-31 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Dec 31 18:19:21 UTC 2014

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

Log Message:
New sentence, new line. Use more markup.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/share/man/man4/cardbus.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/cardbus.4
diff -u src/share/man/man4/cardbus.4:1.37 src/share/man/man4/cardbus.4:1.38
--- src/share/man/man4/cardbus.4:1.37	Wed Dec 31 18:16:32 2014
+++ src/share/man/man4/cardbus.4	Wed Dec 31 18:19:21 2014
@@ -1,4 +1,4 @@
-.\"	$NetBSD: cardbus.4,v 1.37 2014/12/31 18:16:32 gdt Exp $
+.\"	$NetBSD: cardbus.4,v 1.38 2014/12/31 18:19:21 wiz Exp $
 .\"
 .\" Copyright (c) 1999-2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -205,10 +205,14 @@ ARMADA M700:
 .Pp
 .Cd options RBUS_MIN_START="0x2000"
 .Ss PCMCIA addressing choice
-By default, on i386 and amd64, the kernel uses RBUS_IO_BASE as 0x4000
-and RBUS_IO_SIZE as 0x2000.  On some machines, this fails, due to a
-requirement that these addresses fit within 12 bits.  The following
-kernel options have been reported as helpful:
+By default, on i386 and amd64, the kernel uses
+.Dv RBUS_IO_BASE
+as 0x4000 and
+.Dv RBUS_IO_SIZE
+as 0x2000.
+On some machines, this fails, due to a requirement that these
+addresses fit within 12 bits.
+The following kernel options have been reported as helpful:
 .Pp
 .Cd options RBUS_IO_BASE="0xa00"
 .Pp



CVS commit: src/share/man/man4

2014-12-31 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Wed Dec 31 18:16:32 UTC 2014

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

Log Message:
note that RBUS_IO_BASE issues are common to i386 and amd64


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/share/man/man4/cardbus.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/cardbus.4
diff -u src/share/man/man4/cardbus.4:1.36 src/share/man/man4/cardbus.4:1.37
--- src/share/man/man4/cardbus.4:1.36	Wed Dec 31 18:14:55 2014
+++ src/share/man/man4/cardbus.4	Wed Dec 31 18:16:32 2014
@@ -1,4 +1,4 @@
-.\"	$NetBSD: cardbus.4,v 1.36 2014/12/31 18:14:55 gdt Exp $
+.\"	$NetBSD: cardbus.4,v 1.37 2014/12/31 18:16:32 gdt Exp $
 .\"
 .\" Copyright (c) 1999-2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -205,8 +205,8 @@ ARMADA M700:
 .Pp
 .Cd options RBUS_MIN_START="0x2000"
 .Ss PCMCIA addressing choice
-By default, on i386, the kernel uses RBUS_IO_BASE as 0x4000 and
-RBUS_IO_SIZE as 0x2000.  On some machines, this fails, due to a
+By default, on i386 and amd64, the kernel uses RBUS_IO_BASE as 0x4000
+and RBUS_IO_SIZE as 0x2000.  On some machines, this fails, due to a
 requirement that these addresses fit within 12 bits.  The following
 kernel options have been reported as helpful:
 .Pp



CVS commit: src/share/man/man4

2014-12-31 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Wed Dec 31 18:14:55 UTC 2014

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

Log Message:
Explain RBUS_IO_BASE/SIZE.

See also kern/32327.

Adapted from a patch by Bj�rn Johannesson.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/share/man/man4/cardbus.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/cardbus.4
diff -u src/share/man/man4/cardbus.4:1.35 src/share/man/man4/cardbus.4:1.36
--- src/share/man/man4/cardbus.4:1.35	Wed Apr 25 04:14:03 2012
+++ src/share/man/man4/cardbus.4	Wed Dec 31 18:14:55 2014
@@ -1,4 +1,4 @@
-.\"	$NetBSD: cardbus.4,v 1.35 2012/04/25 04:14:03 nakayama Exp $
+.\"	$NetBSD: cardbus.4,v 1.36 2014/12/31 18:14:55 gdt Exp $
 .\"
 .\" Copyright (c) 1999-2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd April 25, 2012
+.Dd December 31, 2014
 .Dt CARDBUS 4
 .Os
 .Sh NAME
@@ -183,9 +183,9 @@ driver appeared in
 .Sh BUGS
 .Ss Memory space conflicts
 .Nx
-maps memory on Cardbus and PCMCIA cards in order to access the cards
-(including reading CIS tuples on PCMCIA cards)
-and access the devices using the
+maps memory on Cardbus (and therefore PCMCIA cards behind Cardbus) in
+order to access the cards (including reading CIS tuples on PCMCIA
+cards) and access the devices using the
 .Tn RBUS
 abstraction.
 When the mapping does not work, PCMCIA cards are typically ignored on
@@ -204,3 +204,12 @@ models, including the IBM Thinkpad 600E 
 ARMADA M700:
 .Pp
 .Cd options RBUS_MIN_START="0x2000"
+.Ss PCMCIA addressing choice
+By default, on i386, the kernel uses RBUS_IO_BASE as 0x4000 and
+RBUS_IO_SIZE as 0x2000.  On some machines, this fails, due to a
+requirement that these addresses fit within 12 bits.  The following
+kernel options have been reported as helpful:
+.Pp
+.Cd options RBUS_IO_BASE="0xa00"
+.Pp
+.Cd options RBUS_IO_SIZE="0x00ff"



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

2014-12-31 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Dec 31 18:14:15 UTC 2014

Modified Files:
src/sys/arch/arm/rockchip: rockchip_board.c

Log Message:
fix typo in 1008MHz rate definition for rk3188


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/rockchip/rockchip_board.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/rockchip/rockchip_board.c
diff -u src/sys/arch/arm/rockchip/rockchip_board.c:1.9 src/sys/arch/arm/rockchip/rockchip_board.c:1.10
--- src/sys/arch/arm/rockchip/rockchip_board.c:1.9	Wed Dec 31 18:09:05 2014
+++ src/sys/arch/arm/rockchip/rockchip_board.c	Wed Dec 31 18:14:14 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: rockchip_board.c,v 1.9 2014/12/31 18:09:05 jmcneill Exp $ */
+/* $NetBSD: rockchip_board.c,v 1.10 2014/12/31 18:14:14 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill 
@@ -29,7 +29,7 @@
 #include "opt_rockchip.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rockchip_board.c,v 1.9 2014/12/31 18:09:05 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rockchip_board.c,v 1.10 2014/12/31 18:14:14 jmcneill Exp $");
 
 #include 
 #include 
@@ -151,7 +151,7 @@ static const struct rk3188_apll_rate rk3
 	RK3188_RATE(1608, 67, 1, 8, 4, 4, 2, 4, 2),
 	RK3188_RATE(1416, 59, 1, 8, 4, 4, 2, 4, 2),
 	RK3188_RATE(1200, 50, 1, 8, 4, 4, 2, 4, 2),
-	RK3188_RATE(1008, 42, 1, 8, 3, 3, 2, 4, 2),
+	RK3188_RATE(1008, 42, 1, 8, 4, 3, 2, 4, 2),
 	RK3188_RATE( 816, 68, 2, 8, 4, 3, 2, 4, 2),
 	RK3188_RATE( 600, 50, 2, 4, 4, 3, 2, 4, 2),
 };



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

2014-12-31 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Dec 31 18:09:06 UTC 2014

Modified Files:
src/sys/arch/arm/rockchip: rockchip_board.c

Log Message:
Cleanup freq setting a bit. Add a table of supported rates in ~200MHz steps
from 600MHz to 1608MHz, and let the cpu.frequency parameter match the
closest available freq (without going over +50MHz).

After updating APLL, wait for PLL lock.

Do APLL changes with PLL mode set to slow, rather than the previous
(and more complex) APLL/GPLL dance.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/rockchip/rockchip_board.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/rockchip/rockchip_board.c
diff -u src/sys/arch/arm/rockchip/rockchip_board.c:1.8 src/sys/arch/arm/rockchip/rockchip_board.c:1.9
--- src/sys/arch/arm/rockchip/rockchip_board.c:1.8	Wed Dec 31 16:16:35 2014
+++ src/sys/arch/arm/rockchip/rockchip_board.c	Wed Dec 31 18:09:05 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: rockchip_board.c,v 1.8 2014/12/31 16:16:35 jmcneill Exp $ */
+/* $NetBSD: rockchip_board.c,v 1.9 2014/12/31 18:09:05 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill 
@@ -29,7 +29,7 @@
 #include "opt_rockchip.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rockchip_board.c,v 1.8 2014/12/31 16:16:35 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rockchip_board.c,v 1.9 2014/12/31 18:09:05 jmcneill Exp $");
 
 #include 
 #include 
@@ -83,6 +83,13 @@ rockchip_get_cru_bsh(bus_space_handle_t 
 	ROCKCHIP_CRU_OFFSET, ROCKCHIP_CRU_SIZE, pbsh);
 }
 
+static void
+rockchip_get_grf_bsh(bus_space_handle_t *pbsh)
+{
+	bus_space_subregion(&rockchip_bs_tag, rockchip_core1_bsh,
+	ROCKCHIP_GRF_OFFSET, ROCKCHIP_GRF_SIZE, pbsh);
+}
+
 static u_int
 rockchip_pll_get_rate(bus_size_t con0_reg, bus_size_t con1_reg)
 {
@@ -127,80 +134,68 @@ rockchip_apll_get_rate(void)
 	return rockchip_pll_get_rate(CRU_APLL_CON0_REG, CRU_APLL_CON1_REG);
 }
 
+struct rk3188_apll_rate {
+	u_int rate;
+	u_int nr, nf, no;
+	u_int core_div, core_periph_div, core_axi_div;
+	u_int aclk_div, hclk_div, pclk_div, ahb2apb_div;
+};
+
+#define RK3188_RATE(_r, _nf, _no, _p, _a, _aclk, _hclk, _pclk, _ahb2apb) \
+	{ .rate = (_r) * 100, .nr = 1, .nf = (_nf), .no = (_no),	 \
+	  .core_div = 1, .core_periph_div = (_p), .core_axi_div = (_a),	 \
+	  .aclk_div = (_aclk), .hclk_div = (_hclk), .pclk_div = (_pclk), \
+	  .ahb2apb_div = (_ahb2apb) }
+
+static const struct rk3188_apll_rate rk3188_apll_rates[] = {
+	RK3188_RATE(1608, 67, 1, 8, 4, 4, 2, 4, 2),
+	RK3188_RATE(1416, 59, 1, 8, 4, 4, 2, 4, 2),
+	RK3188_RATE(1200, 50, 1, 8, 4, 4, 2, 4, 2),
+	RK3188_RATE(1008, 42, 1, 8, 3, 3, 2, 4, 2),
+	RK3188_RATE( 816, 68, 2, 8, 4, 3, 2, 4, 2),
+	RK3188_RATE( 600, 50, 2, 4, 4, 3, 2, 4, 2),
+};
+
+#define RK3188_GRF_STATUS0_REG		0x00ac
+#define RK3188_GRF_STATUS0_APLL_LOCK	__BIT(6)
+
 static u_int
 rk3188_apll_set_rate(u_int rate)
 {
+	const struct rk3188_apll_rate *r = NULL;
 	bus_space_tag_t bst = &rockchip_bs_tag;
-	bus_space_handle_t bsh;
+	bus_space_handle_t bsh, grf_bsh;
 	uint32_t apll_con0, apll_con1, apll_con2, clksel0_con, clksel1_con;
 	uint32_t reset_mask, reset;
-	u_int no, nr, nf, core_div, core_periph_div, core_axi_div,
-	  aclk_div, hclk_div, pclk_div, ahb2apb_div;
 	u_int cpu_aclk_div_con;
 	const bool rk3188plus_p = rockchip_is_chip(ROCKCHIP_CHIPVER_RK3188PLUS);
 
 	rockchip_get_cru_bsh(&bsh);
+	rockchip_get_grf_bsh(&grf_bsh);
 
 #ifdef ROCKCHIP_CLOCK_DEBUG
 	printf("%s: rate=%u rk3188plus_p=%d\n", __func__, rate, rk3188plus_p);
 #endif
 
-	switch (rate) {
-	case 160800:
-		nr = 1;
-		nf = 67;
-		no = 1;
-		core_div = 1;
-		core_periph_div = 8;
-		core_axi_div = 4;
-		aclk_div = 4;
-		hclk_div = 2;
-		pclk_div = 4;
-		ahb2apb_div = 2;
-		break;
-	case 141600:
-		nr = 1;
-		nf = 59;
-		no = 1;
-		core_div = 1;
-		core_periph_div = 8;
-		core_axi_div = 4;
-		aclk_div = 4;
-		hclk_div = 2;
-		pclk_div = 4;
-		ahb2apb_div = 2;
-		break;
-	case 100800:
-		nr = 1;
-		nf = 42;
-		no = 1;
-		core_div = 1;
-		core_periph_div = 8;
-		core_axi_div = 3;
-		aclk_div = 3;
-		hclk_div = 2;
-		pclk_div = 4;
-		ahb2apb_div = 2;
-		break;
-	case 6:
-		nr = 1;
-		nf = 50;
-		no = 2;
-		core_div = 1;
-		core_periph_div = 4;
-		core_axi_div = 4;
-		aclk_div = 3;
-		hclk_div = 2;
-		pclk_div = 4;
-		ahb2apb_div = 2;
-		break;
-	default:
+	/* Pick the closest rate (nearest 100MHz increment) */
+	for (int i = 0; i < __arraycount(rk3188_apll_rates); i++) {
+		u_int trate = rate / 100;
+		u_int arate = ((rk3188_apll_rates[i].rate / 100) + 50)
+		/ 100 * 100;
+		if (arate <= trate) {
+			r = &rk3188_apll_rates[i];
+			break;
+		}
+	}
+	if (r == NULL) {
 #ifdef ROCKCHIP_CLOCK_DEBUG
-		printf("%s: unsupported rate %u\n", __func__, rate);
+		printf("CPU: No matching rate found for %u MHz\n", rate);
 #endif
-		return EINVAL;
+		return ENOENT;
 	}
 
+	printf("CPU: Set frequ

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

2014-12-31 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Dec 31 18:08:58 UTC 2014

Modified Files:
src/sys/arch/arm/rockchip: rockchip_crureg.h

Log Message:
add some more bits


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/rockchip/rockchip_crureg.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/arm/rockchip/rockchip_crureg.h
diff -u src/sys/arch/arm/rockchip/rockchip_crureg.h:1.5 src/sys/arch/arm/rockchip/rockchip_crureg.h:1.6
--- src/sys/arch/arm/rockchip/rockchip_crureg.h:1.5	Tue Dec 30 03:53:52 2014
+++ src/sys/arch/arm/rockchip/rockchip_crureg.h	Wed Dec 31 18:08:58 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: rockchip_crureg.h,v 1.5 2014/12/30 03:53:52 jmcneill Exp $ */
+/* $NetBSD: rockchip_crureg.h,v 1.6 2014/12/31 18:08:58 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill 
@@ -62,7 +62,12 @@
 #define CRU_PLL_CON1_CLKF_MASK	__BITS(31,16)
 #define CRU_PLL_CON1_CLKF	__BITS(15,0)
 
+#define CRU_PLL_CON2_BWADJ_MASK	__BITS(27,16)
+#define CRU_PLL_CON2_BWADJ	__BITS(11,0)
+
+#define CRU_PLL_CON3_RESET_MASK	__BIT(21)
 #define CRU_PLL_CON3_POWER_DOWN_MASK __BIT(17)
+#define CRU_PLL_CON3_RESET	__BIT(5)
 #define CRU_PLL_CON3_POWER_DOWN	__BIT(1)
 
 #define CRU_MODE_CON_APLL_WORK_MODE_MASK	__BITS(17,16)
@@ -105,6 +110,11 @@
 #define CRU_CLKSEL_CON11_MMC0_PLL_SEL		__BIT(6)
 #define CRU_CLKSEL_CON11_MMC0_DIV_CON		__BITS(5,0)
 
+#define CRU_CLKSEL_CON13_UART0_CLK_SEL_MASK	__BITS(25,24)
+#define CRU_CLKSEL_CON13_UART0_DIV_CON_MASK	__BITS(22,16)
+#define CRU_CLKSEL_CON13_UART0_CLK_SEL		__BITS(9,8)
+#define CRU_CLKSEL_CON13_UART0_DIV_CON		__BITS(6,0)
+
 #define CRU_GLB_SRST_FST_MAGIC	0xfdb9
 
 #endif /* !_ROCKCHIP_CRUREG_H */



CVS commit: src/sys/net

2014-12-31 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Dec 31 17:36:24 UTC 2014

Modified Files:
src/sys/net: bridgestp.c if_bridge.c if_bridgevar.h

Log Message:
Use pserialize in bridge

This change enables lockless accesses to bridge member lists.
See locking notes in a comment to know how pserialize and
mutexes are used.

This change also provides support for softint-based interrupt
handling; pserialize readers can run in both HW interrupt and
softint contexts.

As usual, pserialize is used only when NET_MPSAFE on.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/net/bridgestp.c
cvs rdiff -u -r1.94 -r1.95 src/sys/net/if_bridge.c
cvs rdiff -u -r1.20 -r1.21 src/sys/net/if_bridgevar.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/net/bridgestp.c
diff -u src/sys/net/bridgestp.c:1.17 src/sys/net/bridgestp.c:1.18
--- src/sys/net/bridgestp.c:1.17	Mon Jul 14 02:34:36 2014
+++ src/sys/net/bridgestp.c	Wed Dec 31 17:36:24 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bridgestp.c,v 1.17 2014/07/14 02:34:36 ozaki-r Exp $	*/
+/*	$NetBSD: bridgestp.c,v 1.18 2014/12/31 17:36:24 ozaki-r Exp $	*/
 
 /*
  * Copyright (c) 2000 Jason L. Wright (ja...@thought.net)
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bridgestp.c,v 1.17 2014/07/14 02:34:36 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bridgestp.c,v 1.18 2014/12/31 17:36:24 ozaki-r Exp $");
 
 #include 
 #include 
@@ -221,7 +221,7 @@ bstp_send_config_bpdu(struct bridge_soft
 	struct bstp_cbpdu bpdu;
 	int s;
 
-	KASSERT(BRIDGE_LOCKED(sc));
+	KASSERT(BRIDGE_INTR_LOCKED(sc));
 
 	ifp = bif->bif_ifp;
 
@@ -276,11 +276,11 @@ bstp_send_config_bpdu(struct bridge_soft
 
 	memcpy(mtod(m, char *) + sizeof(*eh), &bpdu, sizeof(bpdu));
 
-	BRIDGE_UNLOCK(sc);
+	BRIDGE_INTR_UNLOCK(sc);
 	s = splnet();
 	bridge_enqueue(sc, ifp, m, 0);
 	splx(s);
-	BRIDGE_LOCK(sc);
+	BRIDGE_INTR_LOCK(sc);
 }
 
 static int
@@ -367,7 +367,7 @@ bstp_transmit_tcn(struct bridge_softc *s
 	struct mbuf *m;
 	int s;
 
-	KASSERT(BRIDGE_LOCKED(sc));
+	KASSERT(BRIDGE_INTR_LOCKED(sc));
 
 	KASSERT(bif != NULL);
 	ifp = bif->bif_ifp;
@@ -396,11 +396,11 @@ bstp_transmit_tcn(struct bridge_softc *s
 
 	memcpy(mtod(m, char *) + sizeof(*eh), &bpdu, sizeof(bpdu));
 
-	BRIDGE_UNLOCK(sc);
+	BRIDGE_INTR_UNLOCK(sc);
 	s = splnet();
 	bridge_enqueue(sc, ifp, m, 0);
 	splx(s);
-	BRIDGE_LOCK(sc);
+	BRIDGE_INTR_LOCK(sc);
 }
 
 static void
@@ -634,9 +634,9 @@ bstp_input(struct bridge_softc *sc, stru
 	case BSTP_MSGTYPE_TCN:
 		tu.tu_message_type = tpdu.tbu_bpdutype;
 
-		BRIDGE_LOCK(sc);
+		BRIDGE_INTR_LOCK(sc);
 		bstp_received_tcn_bpdu(sc, bif, &tu);
-		BRIDGE_UNLOCK(sc);
+		BRIDGE_INTR_UNLOCK(sc);
 
 		break;
 	case BSTP_MSGTYPE_CFG:
@@ -675,9 +675,9 @@ bstp_input(struct bridge_softc *sc, stru
 		cu.cu_topology_change =
 		(cpdu.cbu_flags & BSTP_FLAG_TC) ? 1 : 0;
 
-		BRIDGE_LOCK(sc);
+		BRIDGE_INTR_LOCK(sc);
 		bstp_received_config_bpdu(sc, bif, &cu);
-		BRIDGE_UNLOCK(sc);
+		BRIDGE_INTR_UNLOCK(sc);
 
 		break;
 	default:
@@ -826,7 +826,7 @@ bstp_initialization(struct bridge_softc 
 
 	mif = NULL;
 
-	BRIDGE_LOCK(sc);
+	BRIDGE_INTR_LOCK(sc);
 
 	LIST_FOREACH(bif, &sc->sc_iflist, bif_next) {
 		if ((bif->bif_flags & IFBIF_STP) == 0)
@@ -848,7 +848,7 @@ bstp_initialization(struct bridge_softc 
 	}
 
 	if (mif == NULL) {
-		BRIDGE_UNLOCK(sc);
+		BRIDGE_INTR_UNLOCK(sc);
 		bstp_stop(sc);
 		return;
 	}
@@ -862,7 +862,7 @@ bstp_initialization(struct bridge_softc 
 	(((uint64_t)(uint8_t)CLLADDR(mif->bif_ifp->if_sadl)[4]) << 8) |
 	(((uint64_t)(uint8_t)CLLADDR(mif->bif_ifp->if_sadl)[5]) << 0);
 
-	BRIDGE_UNLOCK(sc);
+	BRIDGE_INTR_UNLOCK(sc);
 
 	sc->sc_designated_root = sc->sc_bridge_id;
 	sc->sc_root_path_cost = 0;
@@ -880,7 +880,7 @@ bstp_initialization(struct bridge_softc 
 		callout_reset(&sc->sc_bstpcallout, hz,
 		bstp_tick, sc);
 
-	BRIDGE_LOCK(sc);
+	BRIDGE_INTR_LOCK(sc);
 
 	LIST_FOREACH(bif, &sc->sc_iflist, bif_next) {
 		if (bif->bif_flags & IFBIF_STP)
@@ -893,7 +893,7 @@ bstp_initialization(struct bridge_softc 
 	bstp_config_bpdu_generation(sc);
 	bstp_timer_start(&sc->sc_hello_timer, 0);
 
-	BRIDGE_UNLOCK(sc);
+	BRIDGE_INTR_UNLOCK(sc);
 }
 
 void
@@ -901,14 +901,14 @@ bstp_stop(struct bridge_softc *sc)
 {
 	struct bridge_iflist *bif;
 
-	BRIDGE_LOCK(sc);
+	BRIDGE_INTR_LOCK(sc);
 	LIST_FOREACH(bif, &sc->sc_iflist, bif_next) {
 		bstp_set_port_state(bif, BSTP_IFSTATE_DISABLED);
 		bstp_timer_stop(&bif->bif_hold_timer);
 		bstp_timer_stop(&bif->bif_message_age_timer);
 		bstp_timer_stop(&bif->bif_forward_delay_timer);
 	}
-	BRIDGE_UNLOCK(sc);
+	BRIDGE_INTR_UNLOCK(sc);
 
 	callout_stop(&sc->sc_bstpcallout);
 
@@ -1065,7 +1065,7 @@ bstp_tick(void *arg)
 	int s;
 
 	s = splnet();
-	BRIDGE_LOCK(sc);
+	BRIDGE_INTR_LOCK(sc);
 
 	LIST_FOREACH(bif, &sc->sc_iflist, bif_next) {
 		if ((bif->bif_flags & IFBIF_STP) == 0)
@@ -1113,7 +1113,7 @@ bstp_tick(void *arg)
 	if (sc-

CVS commit: src/sys/dev/ic

2014-12-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec 31 17:10:45 UTC 2014

Modified Files:
src/sys/dev/ic: isp_netbsd.c

Log Message:
We can't sleep if we are called from the watchdog timeout.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/dev/ic/isp_netbsd.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/ic/isp_netbsd.c
diff -u src/sys/dev/ic/isp_netbsd.c:1.87 src/sys/dev/ic/isp_netbsd.c:1.88
--- src/sys/dev/ic/isp_netbsd.c:1.87	Sat Oct 18 04:33:27 2014
+++ src/sys/dev/ic/isp_netbsd.c	Wed Dec 31 12:10:45 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: isp_netbsd.c,v 1.87 2014/10/18 08:33:27 snj Exp $ */
+/* $NetBSD: isp_netbsd.c,v 1.88 2014/12/31 17:10:45 christos Exp $ */
 /*
  * Platform (NetBSD) dependent common attachment code for Qlogic adapters.
  */
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: isp_netbsd.c,v 1.87 2014/10/18 08:33:27 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isp_netbsd.c,v 1.88 2014/12/31 17:10:45 christos Exp $");
 
 #include 
 #include 
@@ -819,9 +819,12 @@ isp_dog(void *arg)
 	XS_T *xs = arg;
 	struct ispsoftc *isp = XS_ISP(xs);
 	uint32_t handle;
+	int sok;
 
 
 	ISP_ILOCK(isp);
+	sok = isp->isp_osinfo.mbox_sleep_ok;
+	isp->isp_osinfo.mbox_sleep_ok = 0;
 	/*
 	 * We've decided this command is dead. Make sure we're not trying
 	 * to kill a command that's already dead by getting its handle and
@@ -835,15 +838,13 @@ isp_dog(void *arg)
 		if (XS_CMD_DONE_P(xs)) {
 			isp_prt(isp, ISP_LOGDEBUG1,
 			"watchdog found done cmd (handle 0x%x)", handle);
-			ISP_IUNLOCK(isp);
-			return;
+			goto out;
 		}
 
 		if (XS_CMD_WDOG_P(xs)) {
 			isp_prt(isp, ISP_LOGDEBUG1,
 			"recursive watchdog (handle 0x%x)", handle);
-			ISP_IUNLOCK(isp);
-			return;
+			goto out;
 		}
 
 		XS_CMD_S_WDOG(xs);
@@ -884,10 +885,8 @@ isp_dog(void *arg)
 			XS_CMD_C_WDOG(xs);
 			callout_reset(&xs->xs_callout, hz, isp_dog, xs);
 			qe = isp_getrqentry(isp);
-			if (qe == NULL) {
-ISP_UNLOCK(isp);
-return;
-			}
+			if (qe == NULL)
+goto out;
 			XS_CMD_S_GRACE(xs);
 			ISP_MEMZERO((void *) mp, sizeof (*mp));
 			mp->mrk_header.rqs_entry_count = 1;
@@ -900,6 +899,8 @@ isp_dog(void *arg)
 	} else {
 		isp_prt(isp, ISP_LOGDEBUG0, "watchdog with no command");
 	}
+out:
+	isp->isp_osinfo.mbox_sleep_ok = sok;
 	ISP_IUNLOCK(isp);
 }
 



CVS commit: src/sys

2014-12-31 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Dec 31 17:06:49 UTC 2014

Modified Files:
src/sys/arch/emips/ebus: ace_ebus.c flash_ebus.c
src/sys/dev: ccd.c dksubr.c ld.c vnd.c
src/sys/dev/ata: wd.c
src/sys/dev/mca: ed_mca.c
src/sys/dev/mscp: mscp_disk.c
src/sys/dev/ofw: ofdisk.c
src/sys/dev/qbus: rl.c
src/sys/dev/raidframe: rf_netbsdkintf.c
src/sys/dev/scsipi: sd.c
src/sys/kern: subr_disk.c

Log Message:
Centralize wedge ioctls in disk_ioctl.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/emips/ebus/ace_ebus.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/emips/ebus/flash_ebus.c
cvs rdiff -u -r1.159 -r1.160 src/sys/dev/ccd.c
cvs rdiff -u -r1.56 -r1.57 src/sys/dev/dksubr.c
cvs rdiff -u -r1.78 -r1.79 src/sys/dev/ld.c
cvs rdiff -u -r1.236 -r1.237 src/sys/dev/vnd.c
cvs rdiff -u -r1.415 -r1.416 src/sys/dev/ata/wd.c
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/mca/ed_mca.c
cvs rdiff -u -r1.82 -r1.83 src/sys/dev/mscp/mscp_disk.c
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/ofw/ofdisk.c
cvs rdiff -u -r1.46 -r1.47 src/sys/dev/qbus/rl.c
cvs rdiff -u -r1.318 -r1.319 src/sys/dev/raidframe/rf_netbsdkintf.c
cvs rdiff -u -r1.311 -r1.312 src/sys/dev/scsipi/sd.c
cvs rdiff -u -r1.106 -r1.107 src/sys/kern/subr_disk.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/emips/ebus/ace_ebus.c
diff -u src/sys/arch/emips/ebus/ace_ebus.c:1.14 src/sys/arch/emips/ebus/ace_ebus.c:1.15
--- src/sys/arch/emips/ebus/ace_ebus.c:1.14	Sun Nov  9 05:10:08 2014
+++ src/sys/arch/emips/ebus/ace_ebus.c	Wed Dec 31 12:06:48 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ace_ebus.c,v 1.14 2014/11/09 10:10:08 mlelstv Exp $	*/
+/*	$NetBSD: ace_ebus.c,v 1.15 2014/12/31 17:06:48 christos Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ace_ebus.c,v 1.14 2014/11/09 10:10:08 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ace_ebus.c,v 1.15 2014/12/31 17:06:48 christos Exp $");
 
 #include 
 #include 
@@ -2247,46 +2247,6 @@ aceioctl(dev_t dev, u_long xfer, void *a
 	case DIOCCACHESYNC:
 		return 0;
 
-	case DIOCAWEDGE:
-	{
-		struct dkwedge_info *dkw = (void *) addr;
-
-		if ((flag & FWRITE) == 0)
-			return EBADF;
-
-		/* If the ioctl happens here, the parent is us. */
-		strcpy(dkw->dkw_parent, device_xname(ace->sc_dev));
-		return dkwedge_add(dkw);
-	}
-
-	case DIOCDWEDGE:
-	{
-		struct dkwedge_info *dkw = (void *) addr;
-
-		if ((flag & FWRITE) == 0)
-			return EBADF;
-
-		/* If the ioctl happens here, the parent is us. */
-		strcpy(dkw->dkw_parent, device_xname(ace->sc_dev));
-		return dkwedge_del(dkw);
-	}
-
-	case DIOCLWEDGES:
-	{
-		struct dkwedge_list *dkwl = (void *) addr;
-
-		return dkwedge_list(&ace->sc_dk, dkwl, l);
-	}
-
-	case DIOCMWEDGES:
-	{
-		if ((flag & FWRITE) == 0)
-			return EBADF;
-
-		dkwedge_discover(&ace->sc_dk);
-		return 0;
-	}
-
 	case DIOCGSTRATEGY:
 	{
 		struct disk_strategy *dks = (void *)addr;

Index: src/sys/arch/emips/ebus/flash_ebus.c
diff -u src/sys/arch/emips/ebus/flash_ebus.c:1.12 src/sys/arch/emips/ebus/flash_ebus.c:1.13
--- src/sys/arch/emips/ebus/flash_ebus.c:1.12	Sun Nov  9 05:10:08 2014
+++ src/sys/arch/emips/ebus/flash_ebus.c	Wed Dec 31 12:06:48 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: flash_ebus.c,v 1.12 2014/11/09 10:10:08 mlelstv Exp $	*/
+/*	$NetBSD: flash_ebus.c,v 1.13 2014/12/31 17:06:48 christos Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 			/* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: flash_ebus.c,v 1.12 2014/11/09 10:10:08 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: flash_ebus.c,v 1.13 2014/12/31 17:06:48 christos Exp $");
 
 /* Driver for the Intel 28F320/640/128 (J3A150) StrataFlash memory device
  * Extended to include the Intel JS28F256P30T95.
@@ -2164,46 +2164,6 @@ eflashioctl(dev_t dev, u_long xfer, void
 	case DIOCCACHESYNC:
 		return 0;
 
-	case DIOCAWEDGE:
-	{
-		struct dkwedge_info *dkw = (void *) addr;
-
-		if ((flag & FWRITE) == 0)
-			return (EBADF);
-
-		/* If the ioctl happens here, the parent is us. */
-		strcpy(dkw->dkw_parent, device_xname(sc->sc_dev));
-		return (dkwedge_add(dkw));
-	}
-
-	case DIOCDWEDGE:
-	{
-		struct dkwedge_info *dkw = (void *) addr;
-
-		if ((flag & FWRITE) == 0)
-			return (EBADF);
-
-		/* If the ioctl happens here, the parent is us. */
-		strcpy(dkw->dkw_parent, device_xname(sc->sc_dev));
-		return (dkwedge_del(dkw));
-	}
-
-	case DIOCLWEDGES:
-	{
-		struct dkwedge_list *dkwl = (void *) addr;
-
-		return (dkwedge_list(&sc->sc_dk, dkwl, l));
-	}
-
-	case DIOCMWEDGES:
-	{
-		if ((flag & FWRITE) == 0)
-			return (EBADF);
-
-		dkwedge_discover(&sc->sc_dk);
-		return 0;
-	}
-
 	case DIOCGSTRATEGY:
 	{
 		struct disk_strategy *dks =

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

2014-12-31 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Dec 31 16:16:35 UTC 2014

Modified Files:
src/sys/arch/arm/rockchip: rockchip_board.c

Log Message:
add RK3188plus freq scaling, and a 1.4GHz mode. anything above 1GHz with all 4 
cores enabled seems to have trouble locking apll, needs more work


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/rockchip/rockchip_board.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/rockchip/rockchip_board.c
diff -u src/sys/arch/arm/rockchip/rockchip_board.c:1.7 src/sys/arch/arm/rockchip/rockchip_board.c:1.8
--- src/sys/arch/arm/rockchip/rockchip_board.c:1.7	Tue Dec 30 17:15:31 2014
+++ src/sys/arch/arm/rockchip/rockchip_board.c	Wed Dec 31 16:16:35 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: rockchip_board.c,v 1.7 2014/12/30 17:15:31 jmcneill Exp $ */
+/* $NetBSD: rockchip_board.c,v 1.8 2014/12/31 16:16:35 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill 
@@ -29,7 +29,7 @@
 #include "opt_rockchip.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rockchip_board.c,v 1.7 2014/12/30 17:15:31 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rockchip_board.c,v 1.8 2014/12/31 16:16:35 jmcneill Exp $");
 
 #include 
 #include 
@@ -37,6 +37,7 @@ __KERNEL_RCSID(0, "$NetBSD: rockchip_boa
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -131,15 +132,17 @@ rk3188_apll_set_rate(u_int rate)
 {
 	bus_space_tag_t bst = &rockchip_bs_tag;
 	bus_space_handle_t bsh;
-	uint32_t apll_con0, apll_con1, clksel0_con, clksel1_con;
+	uint32_t apll_con0, apll_con1, apll_con2, clksel0_con, clksel1_con;
+	uint32_t reset_mask, reset;
 	u_int no, nr, nf, core_div, core_periph_div, core_axi_div,
 	  aclk_div, hclk_div, pclk_div, ahb2apb_div;
 	u_int cpu_aclk_div_con;
+	const bool rk3188plus_p = rockchip_is_chip(ROCKCHIP_CHIPVER_RK3188PLUS);
 
 	rockchip_get_cru_bsh(&bsh);
 
 #ifdef ROCKCHIP_CLOCK_DEBUG
-	printf("%s: rate=%u\n", __func__, rate);
+	printf("%s: rate=%u rk3188plus_p=%d\n", __func__, rate, rk3188plus_p);
 #endif
 
 	switch (rate) {
@@ -155,6 +158,18 @@ rk3188_apll_set_rate(u_int rate)
 		pclk_div = 4;
 		ahb2apb_div = 2;
 		break;
+	case 141600:
+		nr = 1;
+		nf = 59;
+		no = 1;
+		core_div = 1;
+		core_periph_div = 8;
+		core_axi_div = 4;
+		aclk_div = 4;
+		hclk_div = 2;
+		pclk_div = 4;
+		ahb2apb_div = 2;
+		break;
 	case 100800:
 		nr = 1;
 		nf = 42;
@@ -186,6 +201,14 @@ rk3188_apll_set_rate(u_int rate)
 		return EINVAL;
 	}
 
+	if (rk3188plus_p) {
+		reset_mask = CRU_PLL_CON3_RESET_MASK;
+		reset = CRU_PLL_CON3_RESET;
+	} else {
+		reset_mask = CRU_PLL_CON3_POWER_DOWN_MASK;
+		reset = CRU_PLL_CON3_POWER_DOWN;
+	}
+
 	apll_con0 = CRU_PLL_CON0_CLKR_MASK | CRU_PLL_CON0_CLKOD_MASK;
 	apll_con0 |= __SHIFTIN(no - 1, CRU_PLL_CON0_CLKOD);
 	apll_con0 |= __SHIFTIN(nr - 1, CRU_PLL_CON0_CLKR);
@@ -193,10 +216,16 @@ rk3188_apll_set_rate(u_int rate)
 	apll_con1 = CRU_PLL_CON1_CLKF_MASK;
 	apll_con1 |= __SHIFTIN(nf - 1, CRU_PLL_CON1_CLKF);
 
+	if (rk3188plus_p) {
+		apll_con2 = CRU_PLL_CON2_BWADJ_MASK;
+		apll_con2 |= __SHIFTIN(nf >> 1, CRU_PLL_CON2_BWADJ);
+	} else {
+		apll_con2 = 0;
+	}
+
 	clksel0_con = RK3188_CRU_CLKSEL_CON0_A9_CORE_DIV_CON_MASK |
 		  CRU_CLKSEL_CON0_CORE_PERI_DIV_CON_MASK |
-		  CRU_CLKSEL_CON0_A9_CORE_DIV_CON_MASK |
-		  CRU_CLKSEL_CON0_CPU_CLK_PLL_SEL;
+		  CRU_CLKSEL_CON0_A9_CORE_DIV_CON_MASK;
 	clksel0_con |= __SHIFTIN(core_div - 1,
  RK3188_CRU_CLKSEL_CON0_A9_CORE_DIV_CON);
 	clksel0_con |= __SHIFTIN(ffs(core_periph_div) - 2,
@@ -204,11 +233,10 @@ rk3188_apll_set_rate(u_int rate)
 	clksel0_con |= __SHIFTIN(aclk_div - 1,
  CRU_CLKSEL_CON0_A9_CORE_DIV_CON);
 
-	clksel1_con = RK3188_CRU_CLKSEL_CON1_CPU_ACLK_DIV_CON_MASK |
-		  CRU_CLKSEL_CON1_AHB2APB_PCLKEN_DIV_CON_MASK |
+	clksel1_con = CRU_CLKSEL_CON1_AHB2APB_PCLKEN_DIV_CON_MASK |
 		  CRU_CLKSEL_CON1_CPU_PCLK_DIV_CON_MASK |
 		  CRU_CLKSEL_CON1_CPU_HCLK_DIV_CON_MASK;
-	
+
 	switch (core_axi_div) {
 	case 1:	cpu_aclk_div_con = 0; break;
 	case 2: cpu_aclk_div_con = 1; break;
@@ -217,8 +245,6 @@ rk3188_apll_set_rate(u_int rate)
 	case 8: cpu_aclk_div_con = 4; break;
 	default: panic("bad core_axi_div");
 	}
-	clksel1_con |= __SHIFTIN(cpu_aclk_div_con,
- RK3188_CRU_CLKSEL_CON1_CPU_ACLK_DIV_CON);
 	clksel1_con |= __SHIFTIN(ffs(ahb2apb_div) - 1,
  CRU_CLKSEL_CON1_AHB2APB_PCLKEN_DIV_CON);
 	clksel1_con |= __SHIFTIN(ffs(hclk_div) - 1,
@@ -237,40 +263,48 @@ rk3188_apll_set_rate(u_int rate)
 	bus_space_read_4(bst, bsh, CRU_CLKSEL_CON_REG(1)));
 #endif
 
-	/* Change from normal to slow mode */
-	bus_space_write_4(bst, bsh, CRU_MODE_CON_REG,
-	CRU_MODE_CON_APLL_WORK_MODE_MASK |
-	__SHIFTIN(CRU_MODE_CON_APLL_WORK_MODE_SLOW,
-		  CRU_MODE_CON_APLL_WORK_MODE));
+	/* Set CPU clk src to GPLL */
+	const u_int curcpufreq = rockchip_cpu_get_rate();
+	const u_int gpllfreq = rockchip_gpll_get_rate();
+

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

2014-12-31 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Dec 31 15:25:08 UTC 2014

Modified Files:
src/sys/arch/evbmips/ingenic: clock.c

Log Message:
Move struct clockframe cf as extern declaration into ingenic_clockintr(),
to avoid a duplicate common.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbmips/ingenic/clock.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/ingenic/clock.c
diff -u src/sys/arch/evbmips/ingenic/clock.c:1.4 src/sys/arch/evbmips/ingenic/clock.c:1.5
--- src/sys/arch/evbmips/ingenic/clock.c:1.4	Fri Dec 26 17:43:32 2014
+++ src/sys/arch/evbmips/ingenic/clock.c	Wed Dec 31 15:25:08 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.c,v 1.4 2014/12/26 17:43:32 macallan Exp $ */
+/*	$NetBSD: clock.c,v 1.5 2014/12/31 15:25:08 martin Exp $ */
 
 /*-
  * Copyright (c) 2014 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.4 2014/12/26 17:43:32 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.5 2014/12/31 15:25:08 martin Exp $");
 
 #include 
 #include 
@@ -44,8 +44,6 @@ extern void ingenic_puts(const char *);
 
 void ingenic_clockintr(uint32_t);
 
-struct clockframe cf;
-
 static u_int
 ingenic_count_read(struct timecounter *tc)
 {
@@ -191,6 +189,7 @@ int cnt = 99;
 void
 ingenic_clockintr(uint32_t id)
 {
+	extern struct clockframe cf;
 	struct cpu_info * const ci = curcpu();
 #ifdef USE_OST
 	uint32_t new_cnt;



CVS commit: [netbsd-6-0] src/doc

2014-12-31 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Dec 31 12:01:40 UTC 2014

Modified Files:
src/doc [netbsd-6-0]: CHANGES-6.0.7

Log Message:
Ticket 1217.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.21 -r1.1.2.22 src/doc/CHANGES-6.0.7

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

Modified files:

Index: src/doc/CHANGES-6.0.7
diff -u src/doc/CHANGES-6.0.7:1.1.2.21 src/doc/CHANGES-6.0.7:1.1.2.22
--- src/doc/CHANGES-6.0.7:1.1.2.21	Sun Dec 28 17:07:43 2014
+++ src/doc/CHANGES-6.0.7	Wed Dec 31 12:01:40 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.7,v 1.1.2.21 2014/12/28 17:07:43 he Exp $
+# $NetBSD: CHANGES-6.0.7,v 1.1.2.22 2014/12/31 12:01:40 msaitoh Exp $
 
 A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7
 release:
@@ -1960,3 +1960,1864 @@ etc/rc.d/ntpd   
 	The new ntpd wants to translate ntp into a port number after chroot,
 	so give it its own small copy of /etc/services in the chroot.
 	[mlelstv, ticket 1223]
+
+distrib/sets/lists/base/ad.mips64ebpatch
+distrib/sets/lists/base/ad.mips64elpatch
+distrib/sets/lists/base/md.amd64patch
+distrib/sets/lists/base/md.sparc64patch
+distrib/sets/lists/base/mi	patch
+distrib/sets/lists/base/shl.mi	patch
+distrib/sets/lists/comp/ad.mips64ebpatch
+distrib/sets/lists/comp/ad.mips64elpatch
+distrib/sets/lists/comp/md.amd64patch
+distrib/sets/lists/comp/md.sparc64patch
+distrib/sets/lists/comp/mi	patch
+distrib/sets/lists/comp/shl.mi	patch
+distrib/sets/lists/man/mi	patch
+doc/3RDPARTY			patch
+external/bsd/bind/Makefile.inc	patch
+external/bsd/bind/bin/dnssec/Makefilepatch
+external/bsd/bind/bin/dnssec/dnssec-verify/Makefile		new
+external/bsd/bind/dist/CHANGES	patch
+external/bsd/bind/dist/COPYRIGHTpatch
+external/bsd/bind/dist/FAQ	patch
+external/bsd/bind/dist/FAQ.xml	patch
+external/bsd/bind/dist/HISTORY	patch
+external/bsd/bind/dist/Makefile.inpatch
+external/bsd/bind/dist/README	patch
+external/bsd/bind/dist/REDIRECT-NOTESdelete
+external/bsd/bind/dist/acconfig.hpatch
+external/bsd/bind/dist/aclocal.m4patch
+external/bsd/bind/dist/config.guesspatch
+external/bsd/bind/dist/config.h.inpatch
+external/bsd/bind/dist/config.h.win32patch
+external/bsd/bind/dist/config.subpatch
+external/bsd/bind/dist/configurepatch
+external/bsd/bind/dist/configure.inpatch
+external/bsd/bind/dist/isc-config.sh.1patch
+external/bsd/bind/dist/isc-config.sh.docbook			patch
+external/bsd/bind/dist/isc-config.sh.html			patch
+external/bsd/bind/dist/isc-config.sh.inpatch
+external/bsd/bind/dist/ltmain.shpatch
+external/bsd/bind/dist/srcid	new
+external/bsd/bind/dist/version	patch
+external/bsd/bind/dist/bin/Makefile.inpatch
+external/bsd/bind/dist/bin/check/Makefile.in			patch
+external/bsd/bind/dist/bin/check/check-tool.c			patch
+external/bsd/bind/dist/bin/check/named-checkconf.8		patch
+external/bsd/bind/dist/bin/check/named-checkconf.c		patch
+external/bsd/bind/dist/bin/check/named-checkconf.docbook	patch
+external/bsd/bind/dist/bin/check/named-checkconf.html		patch
+external/bsd/bind/dist/bin/check/named-checkzone.8		patch
+external/bsd/bind/dist/bin/check/named-checkzone.c		patch
+external/bsd/bind/dist/bin/check/named-checkzone.docbook	patch
+external/bsd/bind/dist/bin/check/named-checkzone.html		patch
+external/bsd/bind/dist/bin/check/win32/checktool.dsp		delete
+external/bsd/bind/dist/bin/check/win32/namedcheckconf.dsp	delete
+external/bsd/bind/dist/bin/check/win32/namedcheckconf.dsw	delete
+external/bsd/bind/dist/bin/check/win32/namedcheckconf.mak	delete
+external/bsd/bind/dist/bin/check/win32/namedcheckzone.dsp	delete
+external/bsd/bind/dist/bin/check/win32/namedcheckzone.dsw	delete
+external/bsd/bind/dist/bin/check/win32/namedcheckzone.mak	delete
+external/bsd/bind/dist/bin/confgen/Makefile.in			patch
+external/bsd/bind/dist/bin/confgen/ddns-confgen.8		patch
+external/bsd/bind/dist/bin/confgen/ddns-confgen.c		patch
+external/bsd/bind/dist/bin/confgen/ddns-confgen.docbook		patch
+external/bsd/bind/dist/bin/confgen/ddns-confgen.html		patch
+external/bsd/bind/dist/bin/confgen/keygen.c			patch
+external/bsd/bind/dist/bin/confgen/rndc-confgen.8		patch
+external/bsd/bind/dist/bin/confgen/rndc-confgen.c		patch
+external/bsd/bind/dist/bin/confgen/rndc-confgen.docbook		patch
+external/bsd/bind/dist/bin/confgen/rndc-confgen.html		patch
+external/bsd/bind/dist/bin/confgen/unix/Makefile.in		patch
+external/bsd/bind/dist/bin/confgen/win32/confgentool.dsp	delete
+external/bsd/bind/dist/bin/confgen/win32/ddnsconfgen.dsp	delete
+external/bsd/bind/dist/bin/confgen/win32/ddnsconfgen.mak	delete
+external/bsd/bind/dist/bin/confgen/win32/rndcconfgen.dsp	delete
+external/bsd/bind/dist/bin/confgen/win32/rndcconfgen.mak	delete
+external/bsd/bind/dist/bin/dig/Makefile.in			patch
+external/bsd/bind/dist/b

CVS commit: src/sys/external/bsd/drm2/drm

2014-12-31 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Dec 31 08:55:18 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/drm: drm_vm.c

Log Message:
fix a confusion between dev_t and devmajor_t, and include the primary
minor when calling makedev().


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/drm/drm_vm.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/external/bsd/drm2/drm/drm_vm.c
diff -u src/sys/external/bsd/drm2/drm/drm_vm.c:1.6 src/sys/external/bsd/drm2/drm/drm_vm.c:1.7
--- src/sys/external/bsd/drm2/drm/drm_vm.c:1.6	Sun Dec 14 23:48:58 2014
+++ src/sys/external/bsd/drm2/drm/drm_vm.c	Wed Dec 31 08:55:18 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_vm.c,v 1.6 2014/12/14 23:48:58 chs Exp $	*/
+/*	$NetBSD: drm_vm.c,v 1.7 2014/12/31 08:55:18 mrg Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: drm_vm.c,v 1.6 2014/12/14 23:48:58 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_vm.c,v 1.7 2014/12/31 08:55:18 mrg Exp $");
 
 #include 
 #include 
@@ -49,7 +49,8 @@ int
 drm_mmap_object(struct drm_device *dev, off_t offset, size_t size, int prot,
 struct uvm_object **uobjp, voff_t *uoffsetp, struct file *file __unused)
 {
-	dev_t devno = cdevsw_lookup_major(&drm_cdevsw);
+	devmajor_t maj = cdevsw_lookup_major(&drm_cdevsw);
+	dev_t devno = makedev(maj, dev->primary->index);
 	struct uvm_object *uobj;
 
 	KASSERT(offset == (offset & ~(PAGE_SIZE-1)));



CVS commit: src/sys

2014-12-31 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Dec 31 08:24:51 UTC 2014

Modified Files:
src/sys/dev: vnd.c
src/sys/dev/dkwedge: dk.c
src/sys/dev/dm: device-mapper.c
src/sys/dev/raidframe: rf_netbsdkintf.c
src/sys/dev/scsipi: sd.c
src/sys/kern: subr_disk.c

Log Message:
disk_blocksize and disk_set_info relay the same information
to the disk subsystem.

Make disk_set_info also set blocksize shift values.
Remove every call to disk_blocksize.

Keep disk_blocksize for ABI compatibility, make it also set dg_secsize.


To generate a diff of this commit:
cvs rdiff -u -r1.235 -r1.236 src/sys/dev/vnd.c
cvs rdiff -u -r1.76 -r1.77 src/sys/dev/dkwedge/dk.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/dm/device-mapper.c
cvs rdiff -u -r1.317 -r1.318 src/sys/dev/raidframe/rf_netbsdkintf.c
cvs rdiff -u -r1.310 -r1.311 src/sys/dev/scsipi/sd.c
cvs rdiff -u -r1.105 -r1.106 src/sys/kern/subr_disk.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/vnd.c
diff -u src/sys/dev/vnd.c:1.235 src/sys/dev/vnd.c:1.236
--- src/sys/dev/vnd.c:1.235	Mon Dec 29 13:13:20 2014
+++ src/sys/dev/vnd.c	Wed Dec 31 08:24:50 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnd.c,v 1.235 2014/12/29 13:13:20 mlelstv Exp $	*/
+/*	$NetBSD: vnd.c,v 1.236 2014/12/31 08:24:50 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.235 2014/12/29 13:13:20 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.236 2014/12/31 08:24:50 mlelstv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_vnd.h"
@@ -1350,7 +1350,6 @@ vndioctl(dev_t dev, u_long cmd, void *da
 
 		/* Attach the disk. */
 		disk_attach(&vnd->sc_dkdev);
-		disk_blocksize(&vnd->sc_dkdev, vnd->sc_geom.vng_secsize);
 
 		/* Initialize the xfer and buffer pools. */
 		pool_init(&vnd->sc_vxpool, sizeof(struct vndxfer), 0,

Index: src/sys/dev/dkwedge/dk.c
diff -u src/sys/dev/dkwedge/dk.c:1.76 src/sys/dev/dkwedge/dk.c:1.77
--- src/sys/dev/dkwedge/dk.c:1.76	Mon Dec  8 17:45:12 2014
+++ src/sys/dev/dkwedge/dk.c	Wed Dec 31 08:24:50 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: dk.c,v 1.76 2014/12/08 17:45:12 mlelstv Exp $	*/
+/*	$NetBSD: dk.c,v 1.77 2014/12/31 08:24:50 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.76 2014/12/08 17:45:12 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.77 2014/12/31 08:24:50 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_dkwedge.h"
@@ -258,22 +258,22 @@ dkwedge_array_expand(void)
 }
 
 static void
-dk_set_geometry(struct dkwedge_softc *sc)
+dk_set_geometry(struct dkwedge_softc *sc, struct disk *pdk)
 {
-	struct disk *disk = &sc->sc_dk;
-	struct disk_geom *dg = &disk->dk_geom;
+	struct disk *dk = &sc->sc_dk;
+	struct disk_geom *dg = &dk->dk_geom;
 
 	memset(dg, 0, sizeof(*dg));
 
-	dg->dg_secperunit = sc->sc_size >> disk->dk_blkshift;
-	dg->dg_secsize = DEV_BSIZE << disk->dk_blkshift;
+	dg->dg_secperunit = sc->sc_size >> pdk->dk_blkshift;
+	dg->dg_secsize = DEV_BSIZE << pdk->dk_blkshift;
 
 	/* fake numbers, 1 cylinder is 1 MB with default sector size */
 	dg->dg_nsectors = 32;
 	dg->dg_ntracks = 64;
 	dg->dg_ncylinders = dg->dg_secperunit / (dg->dg_nsectors * dg->dg_ntracks);
 
-	disk_set_info(sc->sc_dev, disk, NULL);
+	disk_set_info(sc->sc_dev, dk, NULL);
 }
 
 /*
@@ -455,8 +455,7 @@ dkwedge_add(struct dkwedge_info *dkw)
 	 */
 
 	disk_init(&sc->sc_dk, device_xname(sc->sc_dev), NULL);
-	disk_blocksize(&sc->sc_dk, DEV_BSIZE << pdk->dk_blkshift);
-	dk_set_geometry(sc);
+	dk_set_geometry(sc, pdk);
 	disk_attach(&sc->sc_dk);
 
 	/* Disk wedge is ready for use! */

Index: src/sys/dev/dm/device-mapper.c
diff -u src/sys/dev/dm/device-mapper.c:1.35 src/sys/dev/dm/device-mapper.c:1.36
--- src/sys/dev/dm/device-mapper.c:1.35	Thu Oct  2 21:01:38 2014
+++ src/sys/dev/dm/device-mapper.c	Wed Dec 31 08:24:50 2014
@@ -1,4 +1,4 @@
-/*$NetBSD: device-mapper.c,v 1.35 2014/10/02 21:01:38 justin Exp $ */
+/*$NetBSD: device-mapper.c,v 1.36 2014/12/31 08:24:50 mlelstv Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -686,6 +686,4 @@ dmgetproperties(struct disk *disk, dm_ta
 	dg->dg_ntracks = 64;
 
 	disk_set_info(NULL, disk, "ESDI");
-
-	disk_blocksize(disk, secsize);
 }

Index: src/sys/dev/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.317 src/sys/dev/raidframe/rf_netbsdkintf.c:1.318
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.317	Sun Dec 21 17:04:12 2014
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Wed Dec 31 08:24:50 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.317 2014/12/21 17:04:12 taca Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.318 2014/12/31 08:24:50 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundatio