CVS commit: src/share/misc

2014-09-21 Thread Marc Balmer
Module Name:src
Committed By:   mbalmer
Date:   Sun Sep 21 08:38:03 UTC 2014

Modified Files:
src/share/misc: airport

Log Message:
add Kukes


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/share/misc/airport

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

Modified files:

Index: src/share/misc/airport
diff -u src/share/misc/airport:1.57 src/share/misc/airport:1.58
--- src/share/misc/airport:1.57	Sun Jul 20 19:19:49 2014
+++ src/share/misc/airport	Sun Sep 21 08:38:03 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: airport,v 1.57 2014/07/20 19:19:49 mbalmer Exp $
+#	$NetBSD: airport,v 1.58 2014/09/21 08:38:03 mbalmer Exp $
 #	@(#)airport	8.1 (Berkeley) 6/8/93
 #
 # Some of this information is from http://www.mapping.com/airportcodes.html.
@@ -4081,6 +4081,7 @@ LAH:Labuha, Indonesia
 LAI:Lannion, France
 LAJ:Lages, SC, Brazil
 LAK:Aklavik Airport, NT, Canada
+LAKU:Shaikh Zayed International Airport, Kukes, Albania
 LAL:Lakeland Regional Airport, FL, USA
 LAM:Los Alamos Airport, NM, USA
 LAN:Lansing Capital City, Michigan, USA



CVS commit: src/etc

2014-09-21 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Sep 21 09:47:24 UTC 2014

Modified Files:
src/etc: rc.subr

Log Message:
Add checkyesnox function so we can test a configurable without
being warned of its non-existance.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/etc/rc.subr

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

Modified files:

Index: src/etc/rc.subr
diff -u src/etc/rc.subr:1.94 src/etc/rc.subr:1.95
--- src/etc/rc.subr:1.94	Sun Jul 27 07:46:46 2014
+++ src/etc/rc.subr	Sun Sep 21 09:47:24 2014
@@ -1,4 +1,4 @@
-# $NetBSD: rc.subr,v 1.94 2014/07/27 07:46:46 apb Exp $
+# $NetBSD: rc.subr,v 1.95 2014/09/21 09:47:24 roy Exp $
 #
 # Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -42,10 +42,10 @@ nl='
 
 #
 # checkyesno var
-#	Test $1 variable, and warn if not set to YES or NO.
-#	Return 0 if it's yes (et al), nonzero otherwise.
+#	Test $1 variable.
+#	Return 0 if it's yes (et al), 1 if it's no (et al), 2 otherwise.
 #
-checkyesno()
+checkyesnox()
 {
 	eval _value=\$${1}
 	case $_value in
@@ -60,13 +60,28 @@ checkyesno()
 		return 1
 		;;
 	*)
-		warn \$${1} is not set properly - see ${rcvar_manpage}.
-		return 1
+		return 2
 		;;
 	esac
 }
 
 #
+# checkyesno var
+#	Test $1 variable, and warn if not set to YES or NO.
+#	Return 0 if it's yes (et al), nonzero otherwise.
+#
+checkyesno()
+{
+	local var
+
+	checkyesnox $1
+	var=$?
+	[ $var = 0 -o $var = 1 ]  return $var
+	warn \$${1} is not set properly - see ${rcvar_manpage}.
+	return 1
+}
+
+#
 # yesno_to_truefalse var
 #	Convert the value of a variable from any of the values
 #	understood by checkyesno() to true or false.



CVS commit: src/etc/rc.d

2014-09-21 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Sep 21 09:48:32 UTC 2014

Modified Files:
src/etc/rc.d: network

Log Message:
Use checkyesnox to test rtsol as it has been removed including its
default configuration which we should not warn about.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/etc/rc.d/network

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

Modified files:

Index: src/etc/rc.d/network
diff -u src/etc/rc.d/network:1.67 src/etc/rc.d/network:1.68
--- src/etc/rc.d/network:1.67	Thu Sep 11 13:10:03 2014
+++ src/etc/rc.d/network	Sun Sep 21 09:48:32 2014
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: network,v 1.67 2014/09/11 13:10:03 roy Exp $
+# $NetBSD: network,v 1.68 2014/09/21 09:48:32 roy Exp $
 #
 
 # PROVIDE: network
@@ -446,7 +446,7 @@ network_start_ipv6_autoconf()
 	fi
 
 	# dhcpcd will ensure DAD completes before forking
-	if checkyesno rtsol  !checkyesno dhcpcd; then
+	if checkyesnox rtsol  !checkyesno dhcpcd; then
 		if [ $ip6mode = autohost ]; then
 			echo
 			warn rtsol has been removed,  \



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

2014-09-21 Thread Nathanial Sloss
Module Name:src
Committed By:   nat
Date:   Sun Sep 21 10:41:23 UTC 2014

Modified Files:
src/sys/dev/pci/hdaudio: hdafg.c

Log Message:
Enable sysbeep(4) to be heard on speakers on Toughbook mk1 and mk5
computers.  Also on computers with SigmaTel STAC 9200(D), 9202(D)
9404(D), 9205(D) hdaudio controllers as well as Realtek ALC 231
hdaudio controllers reporting as ALC 269.

Addresses PR 45778.
Addresses PR 48495.

This commit was approved by christos@


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/pci/hdaudio/hdafg.c

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

Modified files:

Index: src/sys/dev/pci/hdaudio/hdafg.c
diff -u src/sys/dev/pci/hdaudio/hdafg.c:1.22 src/sys/dev/pci/hdaudio/hdafg.c:1.23
--- src/sys/dev/pci/hdaudio/hdafg.c:1.22	Fri Sep 19 17:23:35 2014
+++ src/sys/dev/pci/hdaudio/hdafg.c	Sun Sep 21 10:41:22 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: hdafg.c,v 1.22 2014/09/19 17:23:35 christos Exp $ */
+/* $NetBSD: hdafg.c,v 1.23 2014/09/21 10:41:22 nat Exp $ */
 
 /*
  * Copyright (c) 2009 Precedence Technologies Ltd supp...@precedence.co.uk
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hdafg.c,v 1.22 2014/09/19 17:23:35 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: hdafg.c,v 1.23 2014/09/21 10:41:22 nat Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -339,6 +339,7 @@ static int	hdafg_widget_info(void *, pro
 	prop_dictionary_t);
 static int	hdafg_codec_info(void *, prop_dictionary_t,
    prop_dictionary_t);
+static void	hdafg_enable_analog_beep(struct hdafg_softc *);
 
 CFATTACH_DECL2_NEW(
 hdafg,
@@ -3688,6 +3689,9 @@ hdafg_attach(device_t parent, device_t s
 	if (1) hdafg_widget_pin_dump(sc);
 	hdafg_assoc_dump(sc);
 
+	hda_debug(sc, enabling analog beep\n);
+	hdafg_enable_analog_beep(sc);
+
 	hda_debug(sc, configuring encodings\n);
 	sc-sc_audiodev.ad_sc = sc;
 	hdafg_configure_encodings(sc);
@@ -4361,3 +4365,61 @@ hdafg_modcmd(modcmd_t cmd, void *opaque)
 		return ENOTTY;
 	}
 }
+
+#define HDAFG_GET_ANACTRL 		0xfe0
+#define HDAFG_SET_ANACTRL 		0x7e0
+#define HDAFG_ANALOG_BEEP_EN		__BIT(5)
+
+static void
+hdafg_enable_analog_beep(struct hdafg_softc *sc)
+{
+	int nid;
+	uint32_t response;
+	
+	switch (sc-sc_vendor) {
+	case HDAUDIO_VENDOR_SIGMATEL:
+		switch (sc-sc_product) {
+		case HDAUDIO_PRODUCT_SIGMATEL_STAC9200:
+		case HDAUDIO_PRODUCT_SIGMATEL_STAC9200D:
+		case HDAUDIO_PRODUCT_SIGMATEL_STAC9202:
+		case HDAUDIO_PRODUCT_SIGMATEL_STAC9202D:
+		case HDAUDIO_PRODUCT_SIGMATEL_STAC9204:
+		case HDAUDIO_PRODUCT_SIGMATEL_STAC9204D:
+		case HDAUDIO_PRODUCT_SIGMATEL_STAC9205:
+		case HDAUDIO_PRODUCT_SIGMATEL_STAC9205_1:
+		case HDAUDIO_PRODUCT_SIGMATEL_STAC9205D:
+			nid = 0x01;
+
+			response = hdaudio_command(sc-sc_codec, nid,
+			HDAFG_GET_ANACTRL, 0x00);
+			hda_delay(100);
+
+			response |= HDAFG_ANALOG_BEEP_EN;
+
+			hdaudio_command(sc-sc_codec, nid, HDAFG_SET_ANACTRL,
+			response);
+			hda_delay(100);
+			break;
+		default:
+			break;
+		}
+		break;
+	case HDAUDIO_VENDOR_REALTEK:
+		switch (sc-sc_product) {
+		case HDAUDIO_PRODUCT_REALTEK_ALC269:
+			/* The Panasonic Toughbook CF19 - Mk 5 uses a Realtek
+			 * ALC231 that identifies as an ALC269.
+			 * This unmutes the PCBEEP on the speaker.
+			 */
+ 			nid = 0xf;
+			response = hdaudio_command(sc-sc_codec, nid,
+			CORB_SET_AMPLIFIER_GAIN_MUTE, 0x7100);
+			hda_delay(100);
+			break;
+		default:
+			break;
+		}
+	default:
+		break;
+	}
+}



CVS commit: src/sys/arch/xen

2014-09-21 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Sep 21 12:46:15 UTC 2014

Modified Files:
src/sys/arch/xen/x86: hypervisor_machdep.c
src/sys/arch/xen/xen: clock.c xbdback_xenbus.c
src/sys/arch/xen/xenbus: xenbus_client.c

Log Message:
Make Xen kernels compile without DIAGNOSTIC


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/xen/x86/hypervisor_machdep.c
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/xen/xen/clock.c
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/xen/xen/xbdback_xenbus.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/xen/xenbus/xenbus_client.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/x86/hypervisor_machdep.c
diff -u src/sys/arch/xen/x86/hypervisor_machdep.c:1.27 src/sys/arch/xen/x86/hypervisor_machdep.c:1.28
--- src/sys/arch/xen/x86/hypervisor_machdep.c:1.27	Sun Jan 13 21:01:05 2013
+++ src/sys/arch/xen/x86/hypervisor_machdep.c	Sun Sep 21 12:46:15 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: hypervisor_machdep.c,v 1.27 2013/01/13 21:01:05 bouyer Exp $	*/
+/*	$NetBSD: hypervisor_machdep.c,v 1.28 2014/09/21 12:46:15 bouyer Exp $	*/
 
 /*
  *
@@ -54,7 +54,7 @@
 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: hypervisor_machdep.c,v 1.27 2013/01/13 21:01:05 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: hypervisor_machdep.c,v 1.28 2014/09/21 12:46:15 bouyer Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -253,7 +253,7 @@ do_hypervisor_callback(struct intrframe 
 	volatile shared_info_t *s = HYPERVISOR_shared_info;
 	struct cpu_info *ci;
 	volatile struct vcpu_info *vci;
-	int level;
+	int level __diagused;
 
 	ci = curcpu();
 	vci = ci-ci_vcpu;

Index: src/sys/arch/xen/xen/clock.c
diff -u src/sys/arch/xen/xen/clock.c:1.62 src/sys/arch/xen/xen/clock.c:1.63
--- src/sys/arch/xen/xen/clock.c:1.62	Fri Feb 17 19:00:45 2012
+++ src/sys/arch/xen/xen/clock.c	Sun Sep 21 12:46:15 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.c,v 1.62 2012/02/17 19:00:45 bouyer Exp $	*/
+/*	$NetBSD: clock.c,v 1.63 2014/09/21 12:46:15 bouyer Exp $	*/
 
 /*
  *
@@ -29,7 +29,7 @@
 #include opt_xen.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.62 2012/02/17 19:00:45 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.63 2014/09/21 12:46:15 bouyer Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -419,7 +419,7 @@ static struct evcnt hardclock_called[MAX
 void
 xen_initclocks(void)
 {
-	int err;
+	int err __diagused;
 	static bool tcdone = false;
 
 	struct cpu_info *ci = curcpu();

Index: src/sys/arch/xen/xen/xbdback_xenbus.c
diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.59 src/sys/arch/xen/xen/xbdback_xenbus.c:1.60
--- src/sys/arch/xen/xen/xbdback_xenbus.c:1.59	Wed Nov  6 06:23:15 2013
+++ src/sys/arch/xen/xen/xbdback_xenbus.c	Sun Sep 21 12:46:15 2014
@@ -1,4 +1,4 @@
-/*  $NetBSD: xbdback_xenbus.c,v 1.59 2013/11/06 06:23:15 mrg Exp $  */
+/*  $NetBSD: xbdback_xenbus.c,v 1.60 2014/09/21 12:46:15 bouyer Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xbdback_xenbus.c,v 1.59 2013/11/06 06:23:15 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: xbdback_xenbus.c,v 1.60 2014/09/21 12:46:15 bouyer Exp $);
 
 #include sys/atomic.h
 #include sys/buf.h
@@ -1623,7 +1623,7 @@ xbdback_iodone(struct buf *bp)
 	while(!SLIST_EMPTY(xbd_io-xio_rq)) {
 		struct xbdback_fragment *xbd_fr;
 		struct xbdback_request *xbd_req;
-		struct xbdback_instance *rxbdi;
+		struct xbdback_instance *rxbdi __diagused;
 		int error;
 		
 		xbd_fr = SLIST_FIRST(xbd_io-xio_rq);

Index: src/sys/arch/xen/xenbus/xenbus_client.c
diff -u src/sys/arch/xen/xenbus/xenbus_client.c:1.12 src/sys/arch/xen/xenbus/xenbus_client.c:1.13
--- src/sys/arch/xen/xenbus/xenbus_client.c:1.12	Thu Mar 27 18:22:56 2014
+++ src/sys/arch/xen/xenbus/xenbus_client.c	Sun Sep 21 12:46:15 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: xenbus_client.c,v 1.12 2014/03/27 18:22:56 christos Exp $ */
+/* $NetBSD: xenbus_client.c,v 1.13 2014/09/21 12:46:15 bouyer Exp $ */
 /**
  * Client-facing interface for the Xenbus driver.  In other words, the
  * interface between the Xenbus and the device-specific code, be it the
@@ -29,7 +29,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xenbus_client.c,v 1.12 2014/03/27 18:22:56 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: xenbus_client.c,v 1.13 2014/09/21 12:46:15 bouyer Exp $);
 
 #if 0
 #define DPRINTK(fmt, args...) \
@@ -159,7 +159,7 @@ static void
 _dev_error(struct xenbus_device *dev, int err, const char *fmt,
 		va_list ap)
 {
-	int ret;
+	int ret __diagused;
 	unsigned int len;
 	char *printf_buffer = NULL, *path_buffer = NULL;
 



CVS commit: src/sys/dev

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 14:30:22 UTC 2014

Modified Files:
src/sys/dev/pci: Makefile.pcidevs azalia.c cs4280.c ehci_pci.c
ohci_pci.c pci_subr.c pci_verbose.c pci_verbose.h uhci_pci.c
xhci_pci.c
src/sys/dev/pci/hdaudio: Makefile.hdaudiodevs hdafg.c hdaudio.c
hdaudio_verbose.c hdaudio_verbose.h
src/sys/dev/usb: Makefile.usbdevs usb_subr.c usb_verbose.c
usb_verbose.h
Added Files:
src/sys/dev: dev_verbose.c dev_verbose.h devlist2h.awk
Removed Files:
src/sys/dev/pci: devlist2h.awk
src/sys/dev/pci/hdaudio: devlist2h.awk
src/sys/dev/usb: devlist2h.awk

Log Message:
Merge the 3 copies of devlist2h.awk that deal with 16 bit key and value
pairs to the compressed one that matt wrote.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/dev/dev_verbose.c src/sys/dev/dev_verbose.h \
src/sys/dev/devlist2h.awk
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/Makefile.pcidevs
cvs rdiff -u -r1.81 -r1.82 src/sys/dev/pci/azalia.c
cvs rdiff -u -r1.66 -r1.67 src/sys/dev/pci/cs4280.c
cvs rdiff -u -r1.13 -r0 src/sys/dev/pci/devlist2h.awk
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/pci/ehci_pci.c
cvs rdiff -u -r1.52 -r1.53 src/sys/dev/pci/ohci_pci.c
cvs rdiff -u -r1.125 -r1.126 src/sys/dev/pci/pci_subr.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/pci_verbose.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/pci_verbose.h \
src/sys/dev/pci/xhci_pci.c
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/pci/uhci_pci.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/hdaudio/Makefile.hdaudiodevs \
src/sys/dev/pci/hdaudio/hdaudio_verbose.c \
src/sys/dev/pci/hdaudio/hdaudio_verbose.h
cvs rdiff -u -r1.1 -r0 src/sys/dev/pci/hdaudio/devlist2h.awk
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/hdaudio/hdafg.c \
src/sys/dev/pci/hdaudio/hdaudio.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/usb/Makefile.usbdevs \
src/sys/dev/usb/usb_verbose.c
cvs rdiff -u -r1.14 -r0 src/sys/dev/usb/devlist2h.awk
cvs rdiff -u -r1.197 -r1.198 src/sys/dev/usb/usb_subr.c
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/usb/usb_verbose.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/Makefile.pcidevs
diff -u src/sys/dev/pci/Makefile.pcidevs:1.5 src/sys/dev/pci/Makefile.pcidevs:1.6
--- src/sys/dev/pci/Makefile.pcidevs:1.5	Sun Oct 19 18:05:23 2008
+++ src/sys/dev/pci/Makefile.pcidevs	Sun Sep 21 10:30:22 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.pcidevs,v 1.5 2008/10/19 22:05:23 apb Exp $
+#	$NetBSD: Makefile.pcidevs,v 1.6 2014/09/21 14:30:22 christos Exp $
 #
 # As per t...@netbsd.org, the proper procedure is
 #
@@ -9,6 +9,6 @@
 
 .include bsd.own.mk
 
-pcidevs.h pcidevs_data.h: pcidevs devlist2h.awk
+pcidevs.h pcidevs_data.h: ${.CURDIR}/../devlist2h.awk pcidevs
 	/bin/rm -f pcidevs.h pcidevs_data.h
-	${TOOL_AWK} -f devlist2h.awk pcidevs
+	${TOOL_AWK} -f ${.ALLSRC}

Index: src/sys/dev/pci/azalia.c
diff -u src/sys/dev/pci/azalia.c:1.81 src/sys/dev/pci/azalia.c:1.82
--- src/sys/dev/pci/azalia.c:1.81	Sat Mar 29 15:28:24 2014
+++ src/sys/dev/pci/azalia.c	Sun Sep 21 10:30:22 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: azalia.c,v 1.81 2014/03/29 19:28:24 christos Exp $	*/
+/*	$NetBSD: azalia.c,v 1.82 2014/09/21 14:30:22 christos Exp $	*/
 
 /*-
  * Copyright (c) 2005, 2008 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: azalia.c,v 1.81 2014/03/29 19:28:24 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: azalia.c,v 1.82 2014/09/21 14:30:22 christos Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -303,8 +303,8 @@ azalia_pci_attach(device_t parent, devic
 	pcireg_t v;
 	pci_intr_handle_t ih;
 	const char *intrrupt_str;
-	const char *name;
-	const char *vendor;
+	char vendor[PCI_VENDORSTR_LEN];
+	char product[PCI_PRODUCTSTR_LEN];
 	char intrbuf[PCI_INTRSTR_LEN];
 
 	sc-dev = self;
@@ -353,16 +353,11 @@ azalia_pci_attach(device_t parent, devic
 		aprint_error_dev(self, couldn't establish power handler\n);
 
 	sc-pciid = pa-pa_id;
-	vendor = pci_findvendor(pa-pa_id);
-	name = pci_findproduct(pa-pa_id);
-	if (vendor != NULL  name != NULL) {
-		aprint_normal_dev(self, host: %s %s (rev. %d),
-		vendor, name, PCI_REVISION(pa-pa_class));
-	} else {
-		aprint_normal_dev(self, host: 0x%4.4x/0x%4.4x (rev. %d),
-		PCI_VENDOR(pa-pa_id), PCI_PRODUCT(pa-pa_id),
-		PCI_REVISION(pa-pa_class));
-	}
+	pci_findvendor(vendor, sizeof(vendor), PCI_VENDOR(pa-pa_id));
+	pci_findproduct(product, sizeof(product), PCI_VENDOR(pa-pa_id),
+	PCI_PRODUCT(pa-pa_id));
+	aprint_normal_dev(self, host: %s %s (rev. %d),
+	vendor, product, PCI_REVISION(pa-pa_class));
 
 	if (azalia_attach(sc)) {
 		aprint_error_dev(self, initialization failure\n);

Index: src/sys/dev/pci/cs4280.c
diff -u src/sys/dev/pci/cs4280.c:1.66 src/sys/dev/pci/cs4280.c:1.67
--- src/sys/dev/pci/cs4280.c:1.66	Sat Mar 29 15:28:24 2014
+++ 

CVS commit: src/sys/conf

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 14:31:38 UTC 2014

Modified Files:
src/sys/conf: files

Log Message:
add the common code for verbose printing of devices.


To generate a diff of this commit:
cvs rdiff -u -r1.1104 -r1.1105 src/sys/conf/files

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/files
diff -u src/sys/conf/files:1.1104 src/sys/conf/files:1.1105
--- src/sys/conf/files:1.1104	Sat Sep 13 10:47:35 2014
+++ src/sys/conf/files	Sun Sep 21 10:31:38 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.1104 2014/09/13 14:47:35 jmcneill Exp $
+#	$NetBSD: files,v 1.1105 2014/09/21 14:31:38 christos Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20140824
@@ -331,6 +331,9 @@ attach	midi at midibus
 #
 define	audiobell
 
+# Base verbose vendor/product printing support
+file	dev/dev_verbose.c
+
 # video devices, attaches to video hardware driver
 #
 device	video



CVS commit: src/lib/libpci

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 14:32:37 UTC 2014

Modified Files:
src/lib/libpci: Makefile pci.h

Log Message:
Adjust to kernel changes


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libpci/Makefile
cvs rdiff -u -r1.5 -r1.6 src/lib/libpci/pci.h

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

Modified files:

Index: src/lib/libpci/Makefile
diff -u src/lib/libpci/Makefile:1.4 src/lib/libpci/Makefile:1.5
--- src/lib/libpci/Makefile:1.4	Thu Jul 24 21:38:26 2014
+++ src/lib/libpci/Makefile	Sun Sep 21 10:32:37 2014
@@ -1,12 +1,14 @@
-#	$NetBSD: Makefile,v 1.4 2014/07/25 01:38:26 mrg Exp $
+#	$NetBSD: Makefile,v 1.5 2014/09/21 14:32:37 christos Exp $
 
 .include bsd.own.mk
 
 LIB=	pci
 
-SRCS=	pci_bus.c pci_device.c pci_drvname.c pci_subr.c pci_verbose.c
+SRCS=	pci_bus.c pci_device.c pci_drvname.c pci_subr.c dev_verbose.c
+SYSDIR= ${NETBSDSRCDIR}/sys/
 
-.PATH.c: ${NETBSDSRCDIR}/sys/dev/pci
+.PATH.c: ${SYSDIR}/dev/pci ${SYSDIR}/dev
+CPPFLAGS+= -I${SYSDIR}
 
 MAN=	pci.3
 

Index: src/lib/libpci/pci.h
diff -u src/lib/libpci/pci.h:1.5 src/lib/libpci/pci.h:1.6
--- src/lib/libpci/pci.h:1.5	Thu Jul 24 21:38:26 2014
+++ src/lib/libpci/pci.h	Sun Sep 21 10:32:37 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci.h,v 1.5 2014/07/25 01:38:26 mrg Exp $	*/
+/*	$NetBSD: pci.h,v 1.6 2014/09/21 14:32:37 christos Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -56,8 +56,6 @@ int	pcidev_conf_write(int, u_int, pcireg
 int	pci_drvname(int, u_int, u_int, char *, size_t);
 
 /* pci_subr.c */
-const char *pci_findvendor_real(pcireg_t);
-const char *pci_findproduct_real(pcireg_t);
 void	pci_devinfo(pcireg_t, pcireg_t, int, char *, size_t);
 void	pci_conf_print(int, u_int, u_int, u_int);
 



CVS commit: src/sys/dev

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 15:07:19 UTC 2014

Modified Files:
src/sys/dev/cardbus: ehci_cardbus.c ohci_cardbus.c uhci_cardbus.c
src/sys/dev/pci: cs4280.c

Log Message:
remove more old pci_findvendor code


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/cardbus/ehci_cardbus.c
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/cardbus/ohci_cardbus.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/cardbus/uhci_cardbus.c
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/pci/cs4280.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/cardbus/ehci_cardbus.c
diff -u src/sys/dev/cardbus/ehci_cardbus.c:1.31 src/sys/dev/cardbus/ehci_cardbus.c:1.32
--- src/sys/dev/cardbus/ehci_cardbus.c:1.31	Mon Aug  1 07:20:27 2011
+++ src/sys/dev/cardbus/ehci_cardbus.c	Sun Sep 21 11:07:19 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci_cardbus.c,v 1.31 2011/08/01 11:20:27 drochner Exp $	*/
+/*	$NetBSD: ehci_cardbus.c,v 1.32 2014/09/21 15:07:19 christos Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ehci_cardbus.c,v 1.31 2011/08/01 11:20:27 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: ehci_cardbus.c,v 1.32 2014/09/21 15:07:19 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -129,7 +129,6 @@ ehci_cardbus_attach(device_t parent, dev
 	pcireg_t csr;
 	char devinfo[256];
 	usbd_status r;
-	const char *vendor;
 	u_int ncomp;
 	const char *devname = device_xname(self);
 	struct usb_cardbus *up;
@@ -171,13 +170,9 @@ ehci_cardbus_attach(device_t parent, dev
 	}
 
 	/* Figure out vendor for root hub descriptor. */
-	vendor = pci_findvendor(ca-ca_id);
 	sc-sc.sc_id_vendor = PCI_VENDOR(ca-ca_id);
-	if (vendor)
-		strlcpy(sc-sc.sc_vendor, vendor, sizeof(sc-sc.sc_vendor));
-	else
-		snprintf(sc-sc.sc_vendor, sizeof(sc-sc.sc_vendor),
-		vendor 0x%04x, PCI_VENDOR(ca-ca_id));
+	pci_findvendor(sc-sc.sc_vendor, sizeof(sc-sc.sc_vendor),
+	sc-sc.sc_id_vendor);
 
 	/*
 	 * Find companion controllers.  According to the spec they always

Index: src/sys/dev/cardbus/ohci_cardbus.c
diff -u src/sys/dev/cardbus/ohci_cardbus.c:1.39 src/sys/dev/cardbus/ohci_cardbus.c:1.40
--- src/sys/dev/cardbus/ohci_cardbus.c:1.39	Mon Aug  1 07:20:28 2011
+++ src/sys/dev/cardbus/ohci_cardbus.c	Sun Sep 21 11:07:19 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci_cardbus.c,v 1.39 2011/08/01 11:20:28 drochner Exp $	*/
+/*	$NetBSD: ohci_cardbus.c,v 1.40 2014/09/21 15:07:19 christos Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ohci_cardbus.c,v 1.39 2011/08/01 11:20:28 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: ohci_cardbus.c,v 1.40 2014/09/21 15:07:19 christos Exp $);
 
 #include ehci_cardbus.h
 
@@ -109,7 +109,6 @@ ohci_cardbus_attach(device_t parent, dev
 	pcireg_t csr;
 	char devinfo[256];
 	usbd_status r;
-	const char *vendor;
 	const char *devname = device_xname(self);
 
 	sc-sc.sc_dev = self;
@@ -149,13 +148,9 @@ ohci_cardbus_attach(device_t parent, dev
 	}
 
 	/* Figure out vendor for root hub descriptor. */
-	vendor = pci_findvendor(ca-ca_id);
 	sc-sc.sc_id_vendor = PCI_VENDOR(ca-ca_id);
-	if (vendor)
-		strlcpy(sc-sc.sc_vendor, vendor, sizeof(sc-sc.sc_vendor));
-	else
-		snprintf(sc-sc.sc_vendor, sizeof(sc-sc.sc_vendor),
-		vendor 0x%04x, PCI_VENDOR(ca-ca_id));
+	pci_findvendor(sc-sc.sc_vendor, sizeof(sc-sc.sc_vendor),
+	sc-sc.sc_id_vendor);
 
 	r = ohci_init(sc-sc);
 	if (r != USBD_NORMAL_COMPLETION) {

Index: src/sys/dev/cardbus/uhci_cardbus.c
diff -u src/sys/dev/cardbus/uhci_cardbus.c:1.20 src/sys/dev/cardbus/uhci_cardbus.c:1.21
--- src/sys/dev/cardbus/uhci_cardbus.c:1.20	Mon Aug  1 07:20:28 2011
+++ src/sys/dev/cardbus/uhci_cardbus.c	Sun Sep 21 11:07:19 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhci_cardbus.c,v 1.20 2011/08/01 11:20:28 drochner Exp $	*/
+/*	$NetBSD: uhci_cardbus.c,v 1.21 2014/09/21 15:07:19 christos Exp $	*/
 
 /*
  * Copyright (c) 1998-2005 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uhci_cardbus.c,v 1.20 2011/08/01 11:20:28 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: uhci_cardbus.c,v 1.21 2014/09/21 15:07:19 christos Exp $);
 
 #include ehci_cardbus.h
 
@@ -98,7 +98,6 @@ uhci_cardbus_attach(device_t parent, dev
 	cardbus_function_tag_t cf = ct-ct_cf;
 	pcitag_t tag = ca-ca_tag;
 	pcireg_t csr;
-	const char *vendor;
 	const char *devname = device_xname(self);
 	char devinfo[256];
 	usbd_status r;
@@ -156,13 +155,9 @@ uhci_cardbus_attach(device_t parent, dev
 	}
 
 	/* Figure out vendor for root hub descriptor. */
-	vendor = pci_findvendor(ca-ca_id);
 	sc-sc.sc_id_vendor = PCI_VENDOR(ca-ca_id);
-	if (vendor)
-		strlcpy(sc-sc.sc_vendor, vendor, sizeof(sc-sc.sc_vendor));
-	else
-		snprintf(sc-sc.sc_vendor, sizeof(sc-sc.sc_vendor),
-		vendor 

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

2014-09-21 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Sun Sep 21 15:22:40 UTC 2014

Modified Files:
src/sys/arch/arm/samsung: exynos_usb.c

Log Message:
Fix Exynos5 SoC OHCI hang

Redo the Exynos 5410 USB phy initialisation following uboot


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arm/samsung/exynos_usb.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/samsung/exynos_usb.c
diff -u src/sys/arch/arm/samsung/exynos_usb.c:1.9 src/sys/arch/arm/samsung/exynos_usb.c:1.10
--- src/sys/arch/arm/samsung/exynos_usb.c:1.9	Tue Sep  9 21:26:47 2014
+++ src/sys/arch/arm/samsung/exynos_usb.c	Sun Sep 21 15:22:40 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: exynos_usb.c,v 1.9 2014/09/09 21:26:47 reinoud Exp $	*/
+/*	$NetBSD: exynos_usb.c,v 1.10 2014/09/21 15:22:40 reinoud Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: exynos_usb.c,v 1.9 2014/09/09 21:26:47 reinoud Exp $);
+__KERNEL_RCSID(1, $NetBSD: exynos_usb.c,v 1.10 2014/09/21 15:22:40 reinoud Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -223,11 +223,20 @@ exynos_usb_attach(device_t parent, devic
 
 	/*
 	 * Disable interrupts
+	 *
+	 * To prevent OHCI lockups on Exynos5 SoCs, we first have to read the
+	 * address before we set it; this is most likely a bug in the SoC
 	 */
 #if NOHCI  0
+	int regval;
+
+	regval = bus_space_read_1(sc-sc_bst, sc-sc_ohci_bsh,
+		OHCI_INTERRUPT_DISABLE);
+	regval = OHCI_ALL_INTRS;
 	bus_space_write_4(sc-sc_bst, sc-sc_ohci_bsh,
-	OHCI_INTERRUPT_DISABLE, OHCI_ALL_INTRS);
+	OHCI_INTERRUPT_DISABLE, regval);
 #endif
+
 #if NEHCI  0
 	bus_size_t caplength = bus_space_read_1(sc-sc_bst,
 	sc-sc_ehci_bsh, EHCI_CAPLENGTH);
@@ -504,7 +513,9 @@ exynos4_usb2phy_enable(struct exynos_usb
 static void
 exynos5410_usb2phy_enable(struct exynos_usb_softc *sc)
 {
-	uint32_t phyhost, phyotg, phyhsic, ehcictrl, ohcictrl;
+	uint32_t phyhost; //, phyotg;
+	uint32_t phyhsic1, phyhsic2, hsic_ctrl;
+	uint32_t ehcictrl; //, ohcictrl;
 
 	/* host configuration: */
 	phyhost = bus_space_read_4(sc-sc_bst, sc-sc_usb2phy_bsh,
@@ -518,11 +529,11 @@ exynos5410_usb2phy_enable(struct exynos_
 	phyhost = ~(HOST_CTRL0_FORCESUSPEND | HOST_CTRL0_FORCESLEEP);
 
 	/* host phy reset */
-	phyhost = ~(HOST_CTRL0_PHY_SWRST | HOST_CTRL0_SIDDQ);
+	phyhost = ~(HOST_CTRL0_PHY_SWRST | HOST_CTRL0_PHY_SWRST_ALL |
+		HOST_CTRL0_SIDDQ | HOST_CTRL0_COMMONON_N);
 			
 	/* host link reset */
-	phyhost |= HOST_CTRL0_LINK_SWRST | HOST_CTRL0_UTMI_SWRST |
-		HOST_CTRL0_COMMONON_N;
+	phyhost |= HOST_CTRL0_LINK_SWRST | HOST_CTRL0_UTMI_SWRST;
 
 	/* do the reset */
 	bus_space_write_4(sc-sc_bst, sc-sc_usb2phy_bsh,
@@ -532,6 +543,7 @@ exynos5410_usb2phy_enable(struct exynos_
 	bus_space_write_4(sc-sc_bst, sc-sc_usb2phy_bsh,
 		USB_PHY_HOST_CTRL0, phyhost);
 
+#if 0
 	/* otg configuration: */
 	phyotg = bus_space_read_4(sc-sc_bst, sc-sc_usb2phy_bsh,
 		USB_PHY_OTG_SYS);
@@ -557,23 +569,49 @@ exynos5410_usb2phy_enable(struct exynos_
 		OTG_SYS_PHYLINK_SWRST);
 	bus_space_write_4(sc-sc_bst, sc-sc_usb2phy_bsh,
 		USB_PHY_OTG_SYS, phyotg);
+#endif
 
 	/* HSIC phy configuration: */
-	phyhsic = REFCLKDIV_12 | REFCLKSEL_HSIC_DEFAULT |
-		HSIC_CTRL_PHY_SWRST;
+	hsic_ctrl = HSIC_CTRL_FORCESUSPEND | HSIC_CTRL_FORCESLEEP |
+		HSIC_CTRL_SIDDQ;
+
+	phyhsic1 = bus_space_read_4(sc-sc_bst, sc-sc_usb2phy_bsh,
+		USB_PHY_HSIC_CTRL1);
+	phyhsic2 = bus_space_read_4(sc-sc_bst, sc-sc_usb2phy_bsh,
+		USB_PHY_HSIC_CTRL1);
+
+	phyhsic1 = ~hsic_ctrl;
+	phyhsic2 = ~hsic_ctrl;
 
 	bus_space_write_4(sc-sc_bst, sc-sc_usb2phy_bsh,
-		USB_PHY_HSIC_CTRL1, phyhsic);
+		USB_PHY_HSIC_CTRL1, phyhsic1);
 	bus_space_write_4(sc-sc_bst, sc-sc_usb2phy_bsh,
-		USB_PHY_HSIC_CTRL2, phyhsic);
+		USB_PHY_HSIC_CTRL2, phyhsic2);
 	DELAY(1);
-	phyhsic = ~HSIC_CTRL_PHY_SWRST;
+
+	hsic_ctrl = REFCLKDIV_12 | REFCLKSEL_HSIC_DEFAULT |
+		HSIC_CTRL_UTMI_SWRST;
+
+	phyhsic1 |= hsic_ctrl;
+	phyhsic2 |= hsic_ctrl;
+
 	bus_space_write_4(sc-sc_bst, sc-sc_usb2phy_bsh,
-		USB_PHY_HSIC_CTRL1, phyhsic);
+		USB_PHY_HSIC_CTRL1, phyhsic1);
 	bus_space_write_4(sc-sc_bst, sc-sc_usb2phy_bsh,
-		USB_PHY_HSIC_CTRL2, phyhsic);
+		USB_PHY_HSIC_CTRL2, phyhsic2);
 
-	DELAY(8);
+	DELAY(1);
+
+	hsic_ctrl = HSIC_CTRL_PHY_SWRST | HSIC_CTRL_UTMI_SWRST;
+
+	phyhsic1 = ~hsic_ctrl;
+	phyhsic2 = ~hsic_ctrl;
+
+	bus_space_write_4(sc-sc_bst, sc-sc_usb2phy_bsh,
+		USB_PHY_HSIC_CTRL1, phyhsic1);
+	bus_space_write_4(sc-sc_bst, sc-sc_usb2phy_bsh,
+		USB_PHY_HSIC_CTRL2, phyhsic2);
+	DELAY(2);
 
 	/* enable EHCI DMA burst: */
 	ehcictrl = bus_space_read_4(sc-sc_bst, sc-sc_usb2phy_bsh,
@@ -583,13 +621,6 @@ exynos5410_usb2phy_enable(struct exynos_
 		HOST_EHCICTRL_ENA_INCR16;
 	bus_space_write_4(sc-sc_bst, sc-sc_usb2phy_bsh,
 		USB_PHY_HOST_EHCICTRL, ehcictrl);
-
-	/* suspend OHCI legacy (?) */
-	ohcictrl = 

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

2014-09-21 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Sun Sep 21 15:23:55 UTC 2014

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

Log Message:
Re-enable OHCI since the Exynos5 SoC OHCI hang has been fixed


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbarm/conf/ODROID

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/ODROID
diff -u src/sys/arch/evbarm/conf/ODROID:1.10 src/sys/arch/evbarm/conf/ODROID:1.11
--- src/sys/arch/evbarm/conf/ODROID:1.10	Fri Sep 19 14:48:42 2014
+++ src/sys/arch/evbarm/conf/ODROID	Sun Sep 21 15:23:55 2014
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: ODROID,v 1.10 2014/09/19 14:48:42 reinoud Exp $
+#	$NetBSD: ODROID,v 1.11 2014/09/21 15:23:55 reinoud Exp $
 #
 #	ODROID -- ODROID series Exynos Kernel
 #
@@ -217,9 +217,9 @@ gpio*		at exyogpio?
 
 # On-board USB
 exyousb*	at exyo0
-#ohci*		at exyousb?
+ohci*		at exyousb?
 ehci*		at exyousb?
-#usb*		at ohci?
+usb*		at ohci?
 usb*		at ehci?
 
 # Network phy for the LAN9730



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

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 15:43:11 UTC 2014

Modified Files:
src/sys/arch/amiga/amiga: disksubr.c

Log Message:
remove dead code


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/amiga/amiga/disksubr.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/amiga/disksubr.c
diff -u src/sys/arch/amiga/amiga/disksubr.c:1.61 src/sys/arch/amiga/amiga/disksubr.c:1.62
--- src/sys/arch/amiga/amiga/disksubr.c:1.61	Tue Jan 21 19:25:16 2014
+++ src/sys/arch/amiga/amiga/disksubr.c	Sun Sep 21 11:43:11 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: disksubr.c,v 1.61 2014/01/22 00:25:16 christos Exp $	*/
+/*	$NetBSD: disksubr.c,v 1.62 2014/09/21 15:43:11 christos Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -66,7 +66,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.61 2014/01/22 00:25:16 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: disksubr.c,v 1.62 2014/09/21 15:43:11 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -567,16 +567,6 @@ writedisklabel(dev_t dev, void (*strat)(
 done:
 	brelse(bp, 0);
 	return (error); 
-
-	/*
-	 * get write out partition list iff cpu_label is valid.
-	 */
-	if (clp-valid == 0 ||
-	(clp-rdblock = 0 || clp-rdblock = RDB_MAXBLOCKS))
-		return(EINVAL);
-
-	(void)getrdbmap(dev, strat, lp, clp);
-	return(EINVAL);
 }
 
 u_long



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

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 15:44:17 UTC 2014

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

Log Message:
remove dead code


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/amiga/dev/siop.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/siop.c
diff -u src/sys/arch/amiga/dev/siop.c:1.68 src/sys/arch/amiga/dev/siop.c:1.69
--- src/sys/arch/amiga/dev/siop.c:1.68	Tue Jan 21 19:25:16 2014
+++ src/sys/arch/amiga/dev/siop.c	Sun Sep 21 11:44:17 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: siop.c,v 1.68 2014/01/22 00:25:16 christos Exp $ */
+/*	$NetBSD: siop.c,v 1.69 2014/09/21 15:44:17 christos Exp $ */
 
 /*
  * Copyright (c) 1990 The Regents of the University of California.
@@ -70,7 +70,7 @@
 #include opt_ddb.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: siop.c,v 1.68 2014/01/22 00:25:16 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: siop.c,v 1.69 2014/09/21 15:44:17 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1127,9 +1127,6 @@ siop_checkintr(struct siop_softc *sc, u_
 			}
 /*			rp-siop_dcntl |= SIOP_DCNTL_STD;*/
 			return (0);
-#ifdef DDB
-			Debugger();
-#endif
 		}
 #endif
 		*status = -1;



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

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 15:44:47 UTC 2014

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

Log Message:
remove dead code


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/amiga/dev/siop2.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/siop2.c
diff -u src/sys/arch/amiga/dev/siop2.c:1.42 src/sys/arch/amiga/dev/siop2.c:1.43
--- src/sys/arch/amiga/dev/siop2.c:1.42	Tue Jan 21 19:25:16 2014
+++ src/sys/arch/amiga/dev/siop2.c	Sun Sep 21 11:44:47 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: siop2.c,v 1.42 2014/01/22 00:25:16 christos Exp $ */
+/*	$NetBSD: siop2.c,v 1.43 2014/09/21 15:44:47 christos Exp $ */
 
 /*
  * Copyright (c) 1990 The Regents of the University of California.
@@ -70,7 +70,7 @@
 #include opt_ddb.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: siop2.c,v 1.42 2014/01/22 00:25:16 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: siop2.c,v 1.43 2014/09/21 15:44:47 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1256,9 +1256,6 @@ siopng_checkintr(struct siop_softc *sc, 
 			}
 /*			rp-siop_dcntl |= SIOP_DCNTL_STD;*/
 			return (0);
-#ifdef DDB
-			Debugger();
-#endif
 		}
 #endif
 		*status = -1;



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

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 15:45:46 UTC 2014

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

Log Message:
remove dead code


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

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

Modified files:

Index: src/sys/arch/arm/arm32/pmap.c
diff -u src/sys/arch/arm/arm32/pmap.c:1.299 src/sys/arch/arm/arm32/pmap.c:1.300
--- src/sys/arch/arm/arm32/pmap.c:1.299	Fri Sep  5 01:25:28 2014
+++ src/sys/arch/arm/arm32/pmap.c	Sun Sep 21 11:45:46 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.299 2014/09/05 05:25:28 matt Exp $	*/
+/*	$NetBSD: pmap.c,v 1.300 2014/09/21 15:45:46 christos Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -216,7 +216,7 @@
 #include arm/locore.h
 //#include arm/arm32/katelib.h
 
-__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.299 2014/09/05 05:25:28 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap.c,v 1.300 2014/09/21 15:45:46 christos Exp $);
 
 //#define PMAP_DEBUG
 #ifdef PMAP_DEBUG
@@ -6233,12 +6233,6 @@ pmap_set_pt_cache_mode(pd_entry_t *kl1, 
 rv = 1;
 			}
 			return rv;
-			if (pde  L1_S_V6_SUPER) {
-va = (va  -L1_SS_SIZE) + L1_SS_SIZE;
-			} else {
-va = (va  -L1_S_SIZE) + L1_S_SIZE;
-			}
-			continue;
 		}
 		vaddr_t pa = l1pte_pa(pde);
 		pt_entry_t *ptep = (pt_entry_t *)kernel_pt_lookup(pa);



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

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 15:46:44 UTC 2014

Modified Files:
src/sys/arch/arm/iomd: iomd_irqhandler.c

Log Message:
fix leak.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/iomd/iomd_irqhandler.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/iomd/iomd_irqhandler.c
diff -u src/sys/arch/arm/iomd/iomd_irqhandler.c:1.20 src/sys/arch/arm/iomd/iomd_irqhandler.c:1.21
--- src/sys/arch/arm/iomd/iomd_irqhandler.c:1.20	Wed Mar 26 15:44:51 2014
+++ src/sys/arch/arm/iomd/iomd_irqhandler.c	Sun Sep 21 11:46:44 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: iomd_irqhandler.c,v 1.20 2014/03/26 19:44:51 christos Exp $	*/
+/*	$NetBSD: iomd_irqhandler.c,v 1.21 2014/09/21 15:46:44 christos Exp $	*/
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -40,7 +40,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: iomd_irqhandler.c,v 1.20 2014/03/26 19:44:51 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: iomd_irqhandler.c,v 1.21 2014/09/21 15:46:44 christos Exp $);
 
 #include opt_irqstats.h
 
@@ -356,8 +356,10 @@ intr_claim(int irq, int level, const cha
 	ih-ih_arg = ih_arg;
 	ih-ih_flags = 0;
 
-	if (irq_claim(irq, ih) != 0)
+	if (irq_claim(irq, ih) != 0) {
+		free(ih, M_DEVBUF);
 		return NULL;
+	}
 	return ih;
 }
 



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

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 15:47:29 UTC 2014

Modified Files:
src/sys/arch/arm/ofw: ofw_irqhandler.c

Log Message:
fix leak.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/ofw/ofw_irqhandler.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/ofw/ofw_irqhandler.c
diff -u src/sys/arch/arm/ofw/ofw_irqhandler.c:1.20 src/sys/arch/arm/ofw/ofw_irqhandler.c:1.21
--- src/sys/arch/arm/ofw/ofw_irqhandler.c:1.20	Fri Jun 20 09:17:59 2014
+++ src/sys/arch/arm/ofw/ofw_irqhandler.c	Sun Sep 21 11:47:29 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ofw_irqhandler.c,v 1.20 2014/06/20 13:17:59 joerg Exp $	*/
+/*	$NetBSD: ofw_irqhandler.c,v 1.21 2014/09/21 15:47:29 christos Exp $	*/
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -42,7 +42,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ofw_irqhandler.c,v 1.20 2014/06/20 13:17:59 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: ofw_irqhandler.c,v 1.21 2014/09/21 15:47:29 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -301,8 +301,10 @@ intr_claim(int irq, int level, int (*ih_
 	ih-ih_arg = ih_arg;
 	ih-ih_flags = 0;
 
-	if (irq_claim(irq, ih, group, name) != 0)
+	if (irq_claim(irq, ih, group, name) != 0) {
+		free(ih, M_DEVBUF);
 		return(NULL);
+	}
 	return(ih);
 }
 



CVS commit: src/sys/arch/shark/isa

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 15:48:29 UTC 2014

Modified Files:
src/sys/arch/shark/isa: isa_irqhandler.c

Log Message:
fix leak


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/shark/isa/isa_irqhandler.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/shark/isa/isa_irqhandler.c
diff -u src/sys/arch/shark/isa/isa_irqhandler.c:1.26 src/sys/arch/shark/isa/isa_irqhandler.c:1.27
--- src/sys/arch/shark/isa/isa_irqhandler.c:1.26	Sat Feb 22 13:56:25 2014
+++ src/sys/arch/shark/isa/isa_irqhandler.c	Sun Sep 21 11:48:29 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: isa_irqhandler.c,v 1.26 2014/02/22 18:56:25 matt Exp $	*/
+/*	$NetBSD: isa_irqhandler.c,v 1.27 2014/09/21 15:48:29 christos Exp $	*/
 
 /*
  * Copyright 1997
@@ -75,7 +75,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: isa_irqhandler.c,v 1.26 2014/02/22 18:56:25 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: isa_irqhandler.c,v 1.27 2014/09/21 15:48:29 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -320,8 +320,10 @@ intr_claim(int irq, int level, int (*ih_
 	ih-ih_arg = ih_arg;
 	ih-ih_flags = 0;
 
-	if (irq_claim(irq, ih, group, name) != 0) 
+	if (irq_claim(irq, ih, group, name) != 0) {
+		free(ih, M_DEVBUF);
 		return(NULL);
+	}
 
 	return(ih);
 }



CVS commit: src/sys/arch/atari/atari

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 15:49:21 UTC 2014

Modified Files:
src/sys/arch/atari/atari: intr.c

Log Message:
fix leak.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/atari/atari/intr.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/atari/atari/intr.c
diff -u src/sys/arch/atari/atari/intr.c:1.23 src/sys/arch/atari/atari/intr.c:1.24
--- src/sys/arch/atari/atari/intr.c:1.23	Sun Dec 19 19:25:30 2010
+++ src/sys/arch/atari/atari/intr.c	Sun Sep 21 11:49:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.23 2010/12/20 00:25:30 matt Exp $	*/
+/*	$NetBSD: intr.c,v 1.24 2014/09/21 15:49:21 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.23 2010/12/20 00:25:30 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.24 2014/09/21 15:49:21 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -132,8 +132,10 @@ intr_establish(int vector, int type, int
 	 */
 	switch (type  (AUTO_VEC|USER_VEC)) {
 	case AUTO_VEC:
-		if (vector  AVEC_MIN || vector  AVEC_MAX)
+		if (vector  AVEC_MIN || vector  AVEC_MAX) {
+			free(ih, M_DEVBUF);
 			return NULL;
+		}
 		vec_list = autovec_list[vector-1];
 		hard_vec = autovects[vector-1];
 		ih-ih_intrcnt = intrcnt_auto[vector-1];



CVS commit: src/sys/arch/ews4800mips/sbd

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 15:50:35 UTC 2014

Modified Files:
src/sys/arch/ews4800mips/sbd: fb_sbdio.c

Log Message:
fix leak.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/ews4800mips/sbd/fb_sbdio.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/ews4800mips/sbd/fb_sbdio.c
diff -u src/sys/arch/ews4800mips/sbd/fb_sbdio.c:1.13 src/sys/arch/ews4800mips/sbd/fb_sbdio.c:1.14
--- src/sys/arch/ews4800mips/sbd/fb_sbdio.c:1.13	Fri Jan 31 10:41:48 2014
+++ src/sys/arch/ews4800mips/sbd/fb_sbdio.c	Sun Sep 21 11:50:35 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: fb_sbdio.c,v 1.13 2014/01/31 15:41:48 tsutsui Exp $	*/
+/*	$NetBSD: fb_sbdio.c,v 1.14 2014/09/21 15:50:35 christos Exp $	*/
 
 /*-
  * Copyright (c) 2004, 2005 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #define WIRED_FB_TLB
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fb_sbdio.c,v 1.13 2014/01/31 15:41:48 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: fb_sbdio.c,v 1.14 2014/09/21 15:50:35 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -154,6 +154,7 @@ fb_sbdio_attach(device_t parent, device_
 		ga = malloc(sizeof(struct ga), M_DEVBUF, M_NOWAIT | M_ZERO);
 		if (ga == NULL) {
 			printf(:can't allocate ga memory\n);
+			free(ri, M_DEVBUF);
 			return;
 		}
 		ga-reg_paddr = sa-sa_addr2;



CVS commit: src/sys/arch/hpcmips/tx

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 15:52:43 UTC 2014

Modified Files:
src/sys/arch/hpcmips/tx: tx39icu.c

Log Message:
fix leak.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/hpcmips/tx/tx39icu.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/hpcmips/tx/tx39icu.c
diff -u src/sys/arch/hpcmips/tx/tx39icu.c:1.33 src/sys/arch/hpcmips/tx/tx39icu.c:1.34
--- src/sys/arch/hpcmips/tx/tx39icu.c:1.33	Wed Mar 26 13:53:36 2014
+++ src/sys/arch/hpcmips/tx/tx39icu.c	Sun Sep 21 11:52:43 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: tx39icu.c,v 1.33 2014/03/26 17:53:36 christos Exp $ */
+/*	$NetBSD: tx39icu.c,v 1.34 2014/09/21 15:52:43 christos Exp $ */
 
 /*-
  * Copyright (c) 1999-2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tx39icu.c,v 1.33 2014/03/26 17:53:36 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: tx39icu.c,v 1.34 2014/09/21 15:52:43 christos Exp $);
 
 #include opt_vr41xx.h
 #include opt_tx39xx.h
@@ -634,11 +634,9 @@ tx39_poll_establish(tx_chipset_tag_t tc,
 	s = splhigh();
 	sc = tc-tc_intrt;
 
-	if (!(p = malloc(sizeof(struct txpoll_entry), 
-	M_DEVBUF, M_NOWAIT))) {
+	if (!(p = malloc(sizeof(*p), M_DEVBUF, M_NOWAIT | M_ZERO))) {
 		panic (tx39_poll_establish: no memory.);
 	}
-	memset(p, 0, sizeof(struct txpoll_entry));
 
 	p-p_fun = ih_fun;
 	p-p_arg = ih_arg;
@@ -647,13 +645,13 @@ tx39_poll_establish(tx_chipset_tag_t tc,
 	if (!sc-sc_polling) {
 		tx39clock_alarm_set(tc, 33); /* 33 msec */
 		
-		if (!(sc-sc_poll_ih = 
-		tx_intr_establish(
-			tc, MAKEINTR(5, TX39_INTRSTATUS5_ALARMINT),
-			IST_EDGE, level, tx39_poll_intr, sc)))  {
+		if (!(sc-sc_poll_ih = tx_intr_establish(
+		tc, MAKEINTR(5, TX39_INTRSTATUS5_ALARMINT),
+		IST_EDGE, level, tx39_poll_intr, sc)))  {
 			printf(tx39_poll_establish: can't hook\n);
 
 			splx(s);
+			free(p, M_DEVBUF);
 			return (0);
 		}
 	}



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

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 16:32:51 UTC 2014

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

Log Message:
fix cut-n-paste


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

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

Modified files:

Index: src/sys/arch/m68k/m68k/db_disasm.c
diff -u src/sys/arch/m68k/m68k/db_disasm.c:1.40 src/sys/arch/m68k/m68k/db_disasm.c:1.41
--- src/sys/arch/m68k/m68k/db_disasm.c:1.40	Sat Oct 19 15:13:51 2013
+++ src/sys/arch/m68k/m68k/db_disasm.c	Sun Sep 21 12:32:51 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_disasm.c,v 1.40 2013/10/19 19:13:51 martin Exp $	*/
+/*	$NetBSD: db_disasm.c,v 1.41 2014/09/21 16:32:51 christos Exp $	*/
 
 /*
  * Copyright (c) 1994 Christian E. Hopps
@@ -63,7 +63,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: db_disasm.c,v 1.40 2013/10/19 19:13:51 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: db_disasm.c,v 1.41 2014/09/21 16:32:51 christos Exp $);
 
 #include sys/param.h
 #ifdef _KERNEL
@@ -1189,7 +1189,7 @@ opcode_1000(dis_buffer_t *dbuf, u_short 
 		addstr(dbuf, @-,);
 		PRINT_AREG(dbuf,BITFIELD(opc,11,9));
 		addstr(dbuf, @-);
-	} else if (IS_INST(SBCDA,opc)) {
+	} else if (IS_INST(SBCDD,opc)) {
 		addstr(dbuf, sbcd\t);
 		PRINT_DREG(dbuf,BITFIELD(opc,2,0));
 		addchar(',');
@@ -1247,7 +1247,7 @@ opcode_1100(dis_buffer_t *dbuf, u_short 
 		addstr(dbuf, @-,);
 		PRINT_AREG(dbuf,BITFIELD(opc,11,9));
 		addstr(dbuf, @-);
-	} else if (IS_INST(ABCDA,opc)) {
+	} else if (IS_INST(ABCDD,opc)) {
 		addstr(dbuf, abcd\t);
 		PRINT_DREG(dbuf,BITFIELD(opc,2,0));
 		addchar(',');



CVS commit: src/sys/arch/mvme68k/stand/installboot

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 16:33:48 UTC 2014

Modified Files:
src/sys/arch/mvme68k/stand/installboot: installboot.c

Log Message:
remove dead code


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 \
src/sys/arch/mvme68k/stand/installboot/installboot.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/mvme68k/stand/installboot/installboot.c
diff -u src/sys/arch/mvme68k/stand/installboot/installboot.c:1.18 src/sys/arch/mvme68k/stand/installboot/installboot.c:1.19
--- src/sys/arch/mvme68k/stand/installboot/installboot.c:1.18	Sat Jun 22 22:06:05 2013
+++ src/sys/arch/mvme68k/stand/installboot/installboot.c	Sun Sep 21 12:33:48 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: installboot.c,v 1.18 2013/06/23 02:06:05 dholland Exp $ */
+/*	$NetBSD: installboot.c,v 1.19 2014/09/21 16:33:48 christos Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -219,10 +219,6 @@ loadprotoblocks(char *fname, size_t *siz
 	}
 
 	return (char *)bp;
-
-	if (bp)
-		free((void *)bp);
-	return NULL;
 }
 
 static void



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

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 16:34:53 UTC 2014

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

Log Message:
this is not python (add missing braces)


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/news68k/news68k/bus_space.c

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

Modified files:

Index: src/sys/arch/news68k/news68k/bus_space.c
diff -u src/sys/arch/news68k/news68k/bus_space.c:1.12 src/sys/arch/news68k/news68k/bus_space.c:1.13
--- src/sys/arch/news68k/news68k/bus_space.c:1.12	Mon Mar 24 15:54:28 2014
+++ src/sys/arch/news68k/news68k/bus_space.c	Sun Sep 21 12:34:53 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_space.c,v 1.12 2014/03/24 19:54:28 christos Exp $	*/
+/*	$NetBSD: bus_space.c,v 1.13 2014/09/21 16:34:53 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bus_space.c,v 1.12 2014/03/24 19:54:28 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: bus_space.c,v 1.13 2014/09/21 16:34:53 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -61,9 +61,10 @@ bus_space_map(bus_space_tag_t t, bus_add
 		return 0;
 	}
 
-	if (t == NEWS68K_BUS_SPACE_EIO)
+	if (t == NEWS68K_BUS_SPACE_EIO) {
 		*bshp = (bus_space_handle_t)bpa; /* XXX use tt0 mapping */
 		return 0;
+	}
 
 	return 1;
 }



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

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 16:35:44 UTC 2014

Modified Files:
src/sys/arch/newsmips/stand/boot: netif_news.c

Log Message:
remove stray ;


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/newsmips/stand/boot/netif_news.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/newsmips/stand/boot/netif_news.c
diff -u src/sys/arch/newsmips/stand/boot/netif_news.c:1.8 src/sys/arch/newsmips/stand/boot/netif_news.c:1.9
--- src/sys/arch/newsmips/stand/boot/netif_news.c:1.8	Wed Oct 21 19:12:09 2009
+++ src/sys/arch/newsmips/stand/boot/netif_news.c	Sun Sep 21 12:35:44 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: netif_news.c,v 1.8 2009/10/21 23:12:09 snj Exp $	*/
+/*	$NetBSD: netif_news.c,v 1.9 2014/09/21 16:35:44 christos Exp $	*/
 
 /*
  * Copyright (c) 1995 Gordon W. Ross
@@ -191,7 +191,7 @@ int
 prom_getether(struct romdev *pd, u_char *ea)
 {
 
-	if (apcall_ioctl(pd-fd, APIOCGIFHWADDR, ea));
+	if (apcall_ioctl(pd-fd, APIOCGIFHWADDR, ea))
 		return -1;
 
 #ifdef BOOT_DEBUG



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

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 16:36:32 UTC 2014

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

Log Message:
fix leak.


To generate a diff of this commit:
cvs rdiff -u -r1.326 -r1.327 src/sys/arch/sparc/sparc/machdep.c

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

Modified files:

Index: src/sys/arch/sparc/sparc/machdep.c
diff -u src/sys/arch/sparc/sparc/machdep.c:1.326 src/sys/arch/sparc/sparc/machdep.c:1.327
--- src/sys/arch/sparc/sparc/machdep.c:1.326	Fri Feb 28 05:16:51 2014
+++ src/sys/arch/sparc/sparc/machdep.c	Sun Sep 21 12:36:32 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.326 2014/02/28 10:16:51 skrll Exp $ */
+/*	$NetBSD: machdep.c,v 1.327 2014/09/21 16:36:32 christos Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.326 2014/02/28 10:16:51 skrll Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.327 2014/09/21 16:36:32 christos Exp $);
 
 #include opt_compat_netbsd.h
 #include opt_compat_sunos.h
@@ -1378,8 +1378,10 @@ _bus_dmamem_alloc(bus_dma_tag_t t, bus_s
 	 */
 	error = uvm_pglistalloc(size, low, high, 0, 0,
 mlist, nsegs, (flags  BUS_DMA_NOWAIT) == 0);
-	if (error)
+	if (error) {
+		free(mlist, M_DEVBUF);
 		return (error);
+	}
 
 	/*
 	 * Simply keep a pointer around to the linked list, so



CVS commit: src/sys/arch/sparc64/sparc64

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 16:37:34 UTC 2014

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

Log Message:
fix leak


To generate a diff of this commit:
cvs rdiff -u -r1.278 -r1.279 src/sys/arch/sparc64/sparc64/machdep.c

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

Modified files:

Index: src/sys/arch/sparc64/sparc64/machdep.c
diff -u src/sys/arch/sparc64/sparc64/machdep.c:1.278 src/sys/arch/sparc64/sparc64/machdep.c:1.279
--- src/sys/arch/sparc64/sparc64/machdep.c:1.278	Mon Jul 14 08:40:38 2014
+++ src/sys/arch/sparc64/sparc64/machdep.c	Sun Sep 21 12:37:34 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.278 2014/07/14 12:40:38 nakayama Exp $ */
+/*	$NetBSD: machdep.c,v 1.279 2014/09/21 16:37:34 christos Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.278 2014/07/14 12:40:38 nakayama Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.279 2014/09/21 16:37:34 christos Exp $);
 
 #include opt_ddb.h
 #include opt_multiprocessor.h
@@ -1437,8 +1437,10 @@ _bus_dmamem_alloc(bus_dma_tag_t t, bus_s
 	 */
 	error = uvm_pglistalloc(size, low, high,
 	alignment, boundary, pglist, nsegs, (flags  BUS_DMA_NOWAIT) == 0);
-	if (error)
+	if (error) {
+		free(pglist, M_DEVBUF);
 		return (error);
+	}
 
 	/*
 	 * Compute the location, size, and number of segments actually



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

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 16:39:12 UTC 2014

Modified Files:
src/sys/arch/sparc64/dev: psycho.c schizo.c

Log Message:
fix leak


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/arch/sparc64/dev/psycho.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/sparc64/dev/schizo.c

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

Modified files:

Index: src/sys/arch/sparc64/dev/psycho.c
diff -u src/sys/arch/sparc64/dev/psycho.c:1.118 src/sys/arch/sparc64/dev/psycho.c:1.119
--- src/sys/arch/sparc64/dev/psycho.c:1.118	Sat Dec  7 06:17:24 2013
+++ src/sys/arch/sparc64/dev/psycho.c	Sun Sep 21 12:39:12 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: psycho.c,v 1.118 2013/12/07 11:17:24 nakayama Exp $	*/
+/*	$NetBSD: psycho.c,v 1.119 2014/09/21 16:39:12 christos Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000 Matthew R. Green
@@ -55,7 +55,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: psycho.c,v 1.118 2013/12/07 11:17:24 nakayama Exp $);
+__KERNEL_RCSID(0, $NetBSD: psycho.c,v 1.119 2014/09/21 16:39:12 christos Exp $);
 
 #include opt_ddb.h
 
@@ -1272,8 +1272,7 @@ psycho_intr_establish(bus_space_tag_t t,
 	int ino;
 	long vec = INTVEC(ihandle);
 
-	ih = (struct intrhand *)
-		malloc(sizeof(struct intrhand), M_DEVBUF, M_NOWAIT);
+	ih = malloc(sizeof(struct intrhand), M_DEVBUF, M_NOWAIT);
 	if (ih == NULL)
 		return (NULL);
 
@@ -1342,6 +1341,7 @@ psycho_intr_establish(bus_space_tag_t t,
 	}
 
 	printf(Cannot find interrupt vector %lx\n, vec);
+	free(ih, M_DEVBUF);
 	return (NULL);
 
 found:

Index: src/sys/arch/sparc64/dev/schizo.c
diff -u src/sys/arch/sparc64/dev/schizo.c:1.31 src/sys/arch/sparc64/dev/schizo.c:1.32
--- src/sys/arch/sparc64/dev/schizo.c:1.31	Fri Jun 21 16:09:58 2013
+++ src/sys/arch/sparc64/dev/schizo.c	Sun Sep 21 12:39:12 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: schizo.c,v 1.31 2013/06/21 20:09:58 nakayama Exp $	*/
+/*	$NetBSD: schizo.c,v 1.32 2014/09/21 16:39:12 christos Exp $	*/
 /*	$OpenBSD: schizo.c,v 1.55 2008/08/18 20:29:37 brad Exp $	*/
 
 /*
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: schizo.c,v 1.31 2013/06/21 20:09:58 nakayama Exp $);
+__KERNEL_RCSID(0, $NetBSD: schizo.c,v 1.32 2014/09/21 16:39:12 christos Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -195,6 +195,7 @@ schizo_attach(device_t parent, device_t 
 			  ma-ma_reg[0].ur_len,
 			  BUS_SPACE_MAP_LINEAR, pbm-sp_intrh)) {
 		aprint_error(: failed to interrupt map registers\n);
+		kmem_free(pbm, sizeof(*pbm));
 		return;
 	}
 



CVS commit: src/sys/arch/x86/x86

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 16:40:53 UTC 2014

Modified Files:
src/sys/arch/x86/x86: ipmi.c

Log Message:
fix leak.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/x86/x86/ipmi.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/x86/x86/ipmi.c
diff -u src/sys/arch/x86/x86/ipmi.c:1.57 src/sys/arch/x86/x86/ipmi.c:1.58
--- src/sys/arch/x86/x86/ipmi.c:1.57	Sun Aug 10 12:44:34 2014
+++ src/sys/arch/x86/x86/ipmi.c	Sun Sep 21 12:40:53 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipmi.c,v 1.57 2014/08/10 16:44:34 tls Exp $ */
+/*	$NetBSD: ipmi.c,v 1.58 2014/09/21 16:40:53 christos Exp $ */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -52,7 +52,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ipmi.c,v 1.57 2014/08/10 16:44:34 tls Exp $);
+__KERNEL_RCSID(0, $NetBSD: ipmi.c,v 1.58 2014/09/21 16:40:53 christos Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -1209,6 +1209,7 @@ get_sdr(struct ipmi_softc *sc, uint16_t 
 		psdr + offset, NULL)) {
 			printf(ipmi: get chunk : %d,%d fails\n,
 			offset, len);
+			free(psdr, M_DEVBUF);
 			return (-1);
 		}
 	}



CVS commit: src/sys/arch/x86/x86

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 16:52:26 UTC 2014

Modified Files:
src/sys/arch/x86/x86: x86_autoconf.c

Log Message:
remove stray continue.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/arch/x86/x86/x86_autoconf.c

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

Modified files:

Index: src/sys/arch/x86/x86/x86_autoconf.c
diff -u src/sys/arch/x86/x86/x86_autoconf.c:1.71 src/sys/arch/x86/x86/x86_autoconf.c:1.72
--- src/sys/arch/x86/x86/x86_autoconf.c:1.71	Tue Jun 10 18:01:40 2014
+++ src/sys/arch/x86/x86/x86_autoconf.c	Sun Sep 21 12:52:26 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: x86_autoconf.c,v 1.71 2014/06/10 22:01:40 christos Exp $	*/
+/*	$NetBSD: x86_autoconf.c,v 1.72 2014/09/21 16:52:26 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: x86_autoconf.c,v 1.71 2014/06/10 22:01:40 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: x86_autoconf.c,v 1.72 2014/09/21 16:52:26 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -423,7 +423,6 @@ findroot(void)
 		for (dv = deviter_first(di, DEVITER_F_ROOT_FIRST);
 		 dv != NULL;
 		 dv = deviter_next(di)) {
-continue;
 
 			if (device_is_a(dv, fd) 
 			device_class(dv) == DV_DISK) {



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

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 16:53:38 UTC 2014

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

Log Message:
fix leak.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/xen/xen/privcmd.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/privcmd.c
diff -u src/sys/arch/xen/xen/privcmd.c:1.45 src/sys/arch/xen/xen/privcmd.c:1.46
--- src/sys/arch/xen/xen/privcmd.c:1.45	Wed Nov  6 01:23:15 2013
+++ src/sys/arch/xen/xen/privcmd.c	Sun Sep 21 12:53:38 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: privcmd.c,v 1.45 2013/11/06 06:23:15 mrg Exp $ */
+/* $NetBSD: privcmd.c,v 1.46 2014/09/21 16:53:38 christos Exp $ */
 
 /*-
  * Copyright (c) 2004 Christian Limpach.
@@ -27,7 +27,7 @@
 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: privcmd.c,v 1.45 2013/11/06 06:23:15 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: privcmd.c,v 1.46 2014/09/21 16:53:38 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -360,8 +360,11 @@ privcmd_ioctl(void *v)
 			}
 			error  = privcmd_map_obj(vmm, va, maddr,
 			mentry.npages, mcmd-dom);
-			if (error)
+			if (error) {
+kmem_free(maddr, 
+sizeof(paddr_t) * mentry.npages);
 return error;
+			}
 		}
 		break;
 	}



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

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 16:56:44 UTC 2014

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

Log Message:
fix leak.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/xen/xen/privcmd.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/privcmd.c
diff -u src/sys/arch/xen/xen/privcmd.c:1.46 src/sys/arch/xen/xen/privcmd.c:1.47
--- src/sys/arch/xen/xen/privcmd.c:1.46	Sun Sep 21 12:53:38 2014
+++ src/sys/arch/xen/xen/privcmd.c	Sun Sep 21 12:56:44 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: privcmd.c,v 1.46 2014/09/21 16:53:38 christos Exp $ */
+/* $NetBSD: privcmd.c,v 1.47 2014/09/21 16:56:44 christos Exp $ */
 
 /*-
  * Copyright (c) 2004 Christian Limpach.
@@ -27,7 +27,7 @@
 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: privcmd.c,v 1.46 2014/09/21 16:53:38 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: privcmd.c,v 1.47 2014/09/21 16:56:44 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -556,7 +556,7 @@ privcmd_map_obj(struct vm_map *map, vadd
 	/* remove current entries */
 	uvm_unmap1(map, start, start + size, 0);
 
-	obj = kmem_alloc(sizeof(struct privcmd_object), KM_SLEEP);
+	obj = kmem_alloc(sizeof(*obj), KM_SLEEP);
 	if (obj == NULL) {
 		kmem_free(maddr, sizeof(paddr_t) * npages);
 		return ENOMEM;
@@ -576,6 +576,8 @@ privcmd_map_obj(struct vm_map *map, vadd
 	if (error) {
 		if (obj)
 			obj-uobj.pgops-pgo_detach(obj-uobj);
+		kmem_free(maddr, sizeof(paddr_t) * npages);
+		kmem_free(obj, sizeof(*obj));
 		return error;
 	}
 	if (newstart != start) {



CVS commit: src/sys/compat/linux/arch/i386

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 16:58:42 UTC 2014

Modified Files:
src/sys/compat/linux/arch/i386: linux_ptrace.c

Log Message:
fix leak


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/compat/linux/arch/i386/linux_ptrace.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/compat/linux/arch/i386/linux_ptrace.c
diff -u src/sys/compat/linux/arch/i386/linux_ptrace.c:1.28 src/sys/compat/linux/arch/i386/linux_ptrace.c:1.29
--- src/sys/compat/linux/arch/i386/linux_ptrace.c:1.28	Tue Apr 15 13:53:09 2014
+++ src/sys/compat/linux/arch/i386/linux_ptrace.c	Sun Sep 21 12:58:42 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_ptrace.c,v 1.28 2014/04/15 17:53:09 maxv Exp $	*/
+/*	$NetBSD: linux_ptrace.c,v 1.29 2014/09/21 16:58:42 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_ptrace.c,v 1.28 2014/04/15 17:53:09 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_ptrace.c,v 1.29 2014/09/21 16:58:42 christos Exp $);
 
 #include sys/param.h
 #include sys/malloc.h
@@ -182,7 +182,8 @@ linux_sys_ptrace_arch(struct lwp *l, con
 	mutex_enter(proc_lock);
 	if ((t = proc_find(SCARG(uap, pid))) == NULL) {
 		mutex_exit(proc_lock);
-		return ESRCH;
+		error = ESRCH;
+		goto out;
 	}
 	mutex_enter(t-p_lock);
 	mutex_exit(proc_lock);



CVS commit: src/sys/compat/linux/arch/powerpc

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 16:59:09 UTC 2014

Modified Files:
src/sys/compat/linux/arch/powerpc: linux_ptrace.c

Log Message:
fix leak


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/compat/linux/arch/powerpc/linux_ptrace.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/compat/linux/arch/powerpc/linux_ptrace.c
diff -u src/sys/compat/linux/arch/powerpc/linux_ptrace.c:1.25 src/sys/compat/linux/arch/powerpc/linux_ptrace.c:1.26
--- src/sys/compat/linux/arch/powerpc/linux_ptrace.c:1.25	Tue Apr 15 13:53:09 2014
+++ src/sys/compat/linux/arch/powerpc/linux_ptrace.c	Sun Sep 21 12:59:08 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_ptrace.c,v 1.25 2014/04/15 17:53:09 maxv Exp $ */
+/*	$NetBSD: linux_ptrace.c,v 1.26 2014/09/21 16:59:08 christos Exp $ */
 
 /*-
  * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_ptrace.c,v 1.25 2014/04/15 17:53:09 maxv Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_ptrace.c,v 1.26 2014/09/21 16:59:08 christos Exp $);
 
 #include sys/param.h
 #include sys/malloc.h
@@ -159,7 +159,7 @@ linux_sys_ptrace_arch(struct lwp *l, con
 	mutex_enter(proc_lock);
 	if ((t = proc_find(SCARG(uap, pid))) == NULL) {
 		mutex_exit(proc_lock);
-		return ESRCH;
+		goto out;
 	}
 	mutex_enter(t-p_lock);
 	mutex_exit(proc_lock);



CVS commit: src/sys/dev/marvell

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 17:00:36 UTC 2014

Modified Files:
src/sys/dev/marvell: if_gfe.c

Log Message:
this is not python (add braces)


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/marvell/if_gfe.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/marvell/if_gfe.c
diff -u src/sys/dev/marvell/if_gfe.c:1.42 src/sys/dev/marvell/if_gfe.c:1.43
--- src/sys/dev/marvell/if_gfe.c:1.42	Sun Aug 10 12:44:35 2014
+++ src/sys/dev/marvell/if_gfe.c	Sun Sep 21 13:00:35 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_gfe.c,v 1.42 2014/08/10 16:44:35 tls Exp $	*/
+/*	$NetBSD: if_gfe.c,v 1.43 2014/09/21 17:00:35 christos Exp $	*/
 
 /*
  * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: if_gfe.c,v 1.42 2014/08/10 16:44:35 tls Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_gfe.c,v 1.43 2014/09/21 17:00:35 christos Exp $);
 
 #include opt_inet.h
 
@@ -2018,9 +2018,10 @@ gfe_hash_fill(struct gfe_softc *sc)
 
 	error = gfe_hash_entry_op(sc, GE_HASH_ADD, GE_RXPRIO_HI,
 	CLLADDR(sc-sc_ec.ec_if.if_sadl));
-	if (error)
+	if (error) {
 		GE_FUNC_EXIT(sc, !);
 		return error;
+	}
 
 	sc-sc_flags = ~GE_ALLMULTI;
 	if ((sc-sc_ec.ec_if.if_flags  IFF_PROMISC) == 0)



CVS commit: src/sys/dev/usb

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 17:02:24 UTC 2014

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

Log Message:
remove stray return


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/usb/stuirda.c

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

Modified files:

Index: src/sys/dev/usb/stuirda.c
diff -u src/sys/dev/usb/stuirda.c:1.15 src/sys/dev/usb/stuirda.c:1.16
--- src/sys/dev/usb/stuirda.c:1.15	Tue Jun 12 16:25:58 2012
+++ src/sys/dev/usb/stuirda.c	Sun Sep 21 13:02:24 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: stuirda.c,v 1.15 2012/06/12 20:25:58 joerg Exp $	*/
+/*	$NetBSD: stuirda.c,v 1.16 2014/09/21 17:02:24 christos Exp $	*/
 
 /*
  * Copyright (c) 2001,2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: stuirda.c,v 1.15 2012/06/12 20:25:58 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: stuirda.c,v 1.16 2014/09/21 17:02:24 christos Exp $);
 
 #include sys/param.h
 
@@ -175,7 +175,6 @@ stuirda_fwload(struct uirda_softc *sc) {
 	if (rc) {
 		printf(%s: Cannot load firmware\n,
 			device_xname(sc-sc_dev));
-		return 0;
 		return rc;
 	}
 	fwsize = firmware_get_size(fh);



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

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 17:05:02 UTC 2014

Modified Files:
src/sys/dev/pci/cxgb: cxgb_offload.c

Log Message:
comment out code that was never used, but probably intended to be used.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/cxgb/cxgb_offload.c

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

Modified files:

Index: src/sys/dev/pci/cxgb/cxgb_offload.c
diff -u src/sys/dev/pci/cxgb/cxgb_offload.c:1.3 src/sys/dev/pci/cxgb/cxgb_offload.c:1.4
--- src/sys/dev/pci/cxgb/cxgb_offload.c:1.3	Tue Mar 25 12:19:14 2014
+++ src/sys/dev/pci/cxgb/cxgb_offload.c	Sun Sep 21 13:05:02 2014
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
 
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: cxgb_offload.c,v 1.3 2014/03/25 16:19:14 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: cxgb_offload.c,v 1.4 2014/09/21 17:05:02 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -711,7 +711,7 @@ do_hwtid_rpl(struct toedev *dev, struct 
 
 printf(do_hwtid_rpl m=%p\n, m);
 return (0);
-
+#ifdef notyet
 
 hwtid = G_TID(ntohl(p-opcode_tid));
 
@@ -725,6 +725,7 @@ do_hwtid_rpl(struct toedev *dev, struct 
 dev-name, p-opcode);
 return CPL_RET_BUF_DONE | CPL_RET_BAD_MSG;
 }
+#endif
 }
 
 static int



CVS commit: src/sys/dev/ieee1394

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 17:10:01 UTC 2014

Modified Files:
src/sys/dev/ieee1394: fwcrom.c

Log Message:
fix cut-n-paste, use arrays instead of separate variables to avoid code
duplication.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/ieee1394/fwcrom.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/ieee1394/fwcrom.c
diff -u src/sys/dev/ieee1394/fwcrom.c:1.14 src/sys/dev/ieee1394/fwcrom.c:1.15
--- src/sys/dev/ieee1394/fwcrom.c:1.14	Thu Mar 27 22:16:47 2014
+++ src/sys/dev/ieee1394/fwcrom.c	Sun Sep 21 13:10:00 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: fwcrom.c,v 1.14 2014/03/28 02:16:47 christos Exp $	*/
+/*	$NetBSD: fwcrom.c,v 1.15 2014/09/21 17:10:00 christos Exp $	*/
 /*-
  * Copyright (c) 2002-2003
  * 	Hidetoshi Shimokawa. All rights reserved.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fwcrom.c,v 1.14 2014/03/28 02:16:47 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: fwcrom.c,v 1.15 2014/09/21 17:10:00 christos Exp $);
 
 #include sys/param.h
 #ifdef _KERNEL
@@ -48,11 +48,11 @@ __KERNEL_RCSID(0, $NetBSD: fwcrom.c,v 1
 #include dev/ieee1394/firewire.h
 #include dev/ieee1394/iec13213.h
 
-#define MAX_ROM (1024 - sizeof(uint32_t) * 5)
+#define MAX_ROM (1024 - sizeof(uint[2]2_t) * 5)
 #define CROM_END(cc) ((char *)(cc)-stack[0].dir + MAX_ROM - 1)
 
 void
-crom_init_context(struct crom_context *cc, uint32_t *p)
+crom_init_context(struct crom_context *cc, uint[2]2_t *p)
 {
 	struct csrhdr *hdr;
 
@@ -139,7 +139,7 @@ crom_search_key(struct crom_context *cc,
 }
 
 int
-crom_has_specver(uint32_t *p, uint32_t spec, uint32_t ver)
+crom_has_specver(uint[2]2_t *p, uint[2]2_t spec, uint[2]2_t ver)
 {
 	struct csrreg *reg;
 	struct crom_context c, *cc;
@@ -170,7 +170,7 @@ crom_parse_text(struct crom_context *cc,
 {
 	struct csrreg *reg;
 	struct csrtext *textleaf;
-	uint32_t *bp;
+	uint[2]2_t *bp;
 	int i, qlen;
 	static char *nullstr = (char *)(null);
 
@@ -198,7 +198,7 @@ crom_parse_text(struct crom_context *cc,
 
 	/* XXX should check spec and type */
 
-	bp = (uint32_t *)buf;
+	bp = (uint[2]2_t *)buf;
 	qlen = textleaf-crc_len - 2;
 	if (len  qlen * 4)
 		qlen = len/4;
@@ -212,10 +212,10 @@ crom_parse_text(struct crom_context *cc,
 }
 
 uint16_t
-crom_crc(uint32_t *ptr, int len)
+crom_crc(uint[2]2_t *ptr, int len)
 {
 	int i, shift;
-	uint32_t data, sum, crc = 0;
+	uint[2]2_t data, sum, crc = 0;
 
 	for (i = 0; i  len; i++) {
 		data = ptr[i];
@@ -230,7 +230,7 @@ crom_crc(uint32_t *ptr, int len)
 
 #if !defined(_KERNEL)  !defined(_BOOT)
 static void
-crom_desc_specver(uint32_t spec, uint32_t ver, char *buf, int len)
+crom_desc_specver(uint[2]2_t spec, uint[2]2_t ver, char *buf, int len)
 {
 	const char *s = NULL;
 
@@ -308,7 +308,7 @@ crom_desc(struct crom_context *cc, char 
 		/* XXX fall through */
 	case CSRTYPE_D:
 		dir = (struct csrdirectory *) (reg + reg-val);
-		crc = crom_crc((uint32_t *)dir-entry, dir-crc_len);
+		crc = crom_crc((uint[2]2_t *)dir-entry, dir-crc_len);
 		l += snprintf(buf + l, len - l, len=%d crc=0x%04x ,
 		dir-crc_len, crc);
 
@@ -396,7 +396,7 @@ crom_desc(struct crom_context *cc, char 
 #if defined(_KERNEL) || defined(_BOOT) || defined(TEST)
 
 int
-crom_add_quad(struct crom_chunk *chunk, uint32_t entry)
+crom_add_quad(struct crom_chunk *chunk, uint[2]2_t entry)
 {
 	int index;
 
@@ -415,7 +415,7 @@ crom_add_entry(struct crom_chunk *chunk,
 {
 	union {
 		struct csrreg reg;
-		uint32_t i;
+		uint[2]2_t i;
 	} foo;
 
 	foo.reg.key = key;
@@ -450,7 +450,7 @@ crom_add_simple_text(struct crom_src *sr
 		 struct crom_chunk *chunk, const char *buf)
 {
 	struct csrtext *tl;
-	uint32_t *p;
+	uint[2]2_t *p;
 	int len, i;
 	char t[MAX_TEXT];
 
@@ -461,38 +461,38 @@ crom_add_simple_text(struct crom_src *sr
 	}
 
 	tl = (struct csrtext *) chunk-data;
-	tl-crc_len = howmany(sizeof(struct csrtext) + len, sizeof(uint32_t));
+	tl-crc_len = howmany(sizeof(struct csrtext) + len, sizeof(uint[2]2_t));
 	tl-spec_id = 0;
 	tl-spec_type = 0;
 	tl-lang_id = 0;
-	memset(t, 0, roundup2(len, sizeof(uint32_t)));
+	memset(t, 0, roundup2(len, sizeof(uint[2]2_t)));
 	memcpy(t, buf, len);
-	p = (uint32_t *)t;
-	for (i = 0; i  howmany(len, sizeof(uint32_t)); i++)
+	p = (uint[2]2_t *)t;
+	for (i = 0; i  howmany(len, sizeof(uint[2]2_t)); i++)
 		tl-text[i] = ntohl(*p++);
 	return crom_add_chunk(src, parent, chunk, CROM_TEXTLEAF);
 }
 
 static int
-crom_copy(uint32_t *src, uint32_t *dst, int *offset, int len, int maxlen)
+crom_copy(uint[2]2_t *src, uint[2]2_t *dst, int *offset, int len, int maxlen)
 {
 
 	if (*offset + len  maxlen) {
 		printf(Config. ROM is too large for the buffer\n);
 		return -1;
 	}
-	memcpy((char *)(dst + *offset), src, len * sizeof(uint32_t));
+	memcpy((char *)(dst + *offset), src, len * sizeof(uint[2]2_t));
 	*offset += len;
 	return 0;
 }
 
 int
-crom_load(struct crom_src *src, 

CVS commit: src/sys/dev/pci

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 17:11:07 UTC 2014

Modified Files:
src/sys/dev/pci: twa.c

Log Message:
fix memset size inconsistency


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/pci/twa.c

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

Modified files:

Index: src/sys/dev/pci/twa.c
diff -u src/sys/dev/pci/twa.c:1.50 src/sys/dev/pci/twa.c:1.51
--- src/sys/dev/pci/twa.c:1.50	Fri Jul 25 04:10:38 2014
+++ src/sys/dev/pci/twa.c	Sun Sep 21 13:11:07 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: twa.c,v 1.50 2014/07/25 08:10:38 dholland Exp $ */
+/*	$NetBSD: twa.c,v 1.51 2014/09/21 17:11:07 christos Exp $ */
 /*	$wasabi: twa.c,v 1.27 2006/07/28 18:17:21 wrstuden Exp $	*/
 
 /*-
@@ -67,7 +67,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: twa.c,v 1.50 2014/07/25 08:10:38 dholland Exp $);
+__KERNEL_RCSID(0, $NetBSD: twa.c,v 1.51 2014/09/21 17:11:07 christos Exp $);
 
 //#define TWA_DEBUG
 
@@ -2955,7 +2955,7 @@ twa_describe_controller(struct twa_softc
 	uint32_t		dsize;
 	uint8_t			ports;
 
-	memset(p, sizeof(struct twa_param_9k *), 10);
+	memset(p, 0, sizeof(*p));
 
 	/* Get the port count. */
 	rv |= twa_get_param(sc, TWA_PARAM_CONTROLLER,



CVS commit: src/sys/kern

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 17:17:15 UTC 2014

Modified Files:
src/sys/kern: kern_ctf.c kern_descrip.c kern_ktrace.c kgdb_stub.c
sys_process.c

Log Message:
remove casts to the same type.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/kern/kern_ctf.c
cvs rdiff -u -r1.227 -r1.228 src/sys/kern/kern_descrip.c
cvs rdiff -u -r1.164 -r1.165 src/sys/kern/kern_ktrace.c
cvs rdiff -u -r1.27 -r1.28 src/sys/kern/kgdb_stub.c
cvs rdiff -u -r1.163 -r1.164 src/sys/kern/sys_process.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/kern_ctf.c
diff -u src/sys/kern/kern_ctf.c:1.3 src/sys/kern/kern_ctf.c:1.4
--- src/sys/kern/kern_ctf.c:1.3	Mon May  3 05:51:36 2010
+++ src/sys/kern/kern_ctf.c	Sun Sep 21 13:17:15 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_ctf.c,v 1.3 2010/05/03 09:51:36 darran Exp $	*/
+/*	$NetBSD: kern_ctf.c,v 1.4 2014/09/21 17:17:15 christos Exp $	*/
 /*-
  * Copyright (c) 2008 John Birrell j...@freebsd.org
  * All rights reserved.
@@ -204,7 +204,7 @@ mod_ctf_get(struct module *mod, mod_ctf_
 		}
 
 		zs.avail_in = ctfsize - CTF_HDR_SIZE;
-		zs.next_in = ((uint8_t *) ctfaddr) + CTF_HDR_SIZE;
+		zs.next_in = ctfaddr + CTF_HDR_SIZE;
 		zs.avail_out = sz - CTF_HDR_SIZE;
 		zs.next_out = ((uint8_t *) ctftab) + CTF_HDR_SIZE;
 		inflateReset(zs);

Index: src/sys/kern/kern_descrip.c
diff -u src/sys/kern/kern_descrip.c:1.227 src/sys/kern/kern_descrip.c:1.228
--- src/sys/kern/kern_descrip.c:1.227	Fri Sep  5 05:20:59 2014
+++ src/sys/kern/kern_descrip.c	Sun Sep 21 13:17:15 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_descrip.c,v 1.227 2014/09/05 09:20:59 matt Exp $	*/
+/*	$NetBSD: kern_descrip.c,v 1.228 2014/09/21 17:17:15 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_descrip.c,v 1.227 2014/09/05 09:20:59 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_descrip.c,v 1.228 2014/09/21 17:17:15 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -1457,7 +1457,7 @@ fd_copy(void)
 	ffp = fdp-fd_dt-dt_ff;
 	nffp = newdt-dt_ff;
 	newlast = -1;
-	for (i = 0; i = (int)lastfile; i++, ffp++, nffp++) {
+	for (i = 0; i = lastfile; i++, ffp++, nffp++) {
 		KASSERT(i = NDFDFILE ||
 		*nffp == (fdfile_t *)newfdp-fd_dfdfile[i]);
 		ff = *ffp;

Index: src/sys/kern/kern_ktrace.c
diff -u src/sys/kern/kern_ktrace.c:1.164 src/sys/kern/kern_ktrace.c:1.165
--- src/sys/kern/kern_ktrace.c:1.164	Mon Dec  9 11:45:23 2013
+++ src/sys/kern/kern_ktrace.c	Sun Sep 21 13:17:15 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_ktrace.c,v 1.164 2013/12/09 16:45:23 pooka Exp $	*/
+/*	$NetBSD: kern_ktrace.c,v 1.165 2014/09/21 17:17:15 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kern_ktrace.c,v 1.164 2013/12/09 16:45:23 pooka Exp $);
+__KERNEL_RCSID(0, $NetBSD: kern_ktrace.c,v 1.165 2014/09/21 17:17:15 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -930,7 +930,7 @@ ktruser(const char *id, void *addr, size
 	ktp-ktr_id[KTR_USER_MAXIDLEN-1] = '\0';
 
 	user_dta = (void *)(ktp + 1);
-	if ((error = copyin(addr, (void *)user_dta, len)) != 0)
+	if ((error = copyin(addr, user_dta, len)) != 0)
 		len = 0;
 
 	ktraddentry(l, kte, KTA_WAITOK);

Index: src/sys/kern/kgdb_stub.c
diff -u src/sys/kern/kgdb_stub.c:1.27 src/sys/kern/kgdb_stub.c:1.28
--- src/sys/kern/kgdb_stub.c:1.27	Sat Mar 22 22:56:33 2014
+++ src/sys/kern/kgdb_stub.c	Sun Sep 21 13:17:15 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: kgdb_stub.c,v 1.27 2014/03/23 02:56:33 christos Exp $	*/
+/*	$NetBSD: kgdb_stub.c,v 1.28 2014/09/21 17:17:15 christos Exp $	*/
 
 /*
  * Copyright (c) 1990, 1993
@@ -45,7 +45,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kgdb_stub.c,v 1.27 2014/03/23 02:56:33 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: kgdb_stub.c,v 1.28 2014/09/21 17:17:15 christos Exp $);
 
 #include opt_ddb.h
 #include opt_kgdb.h
@@ -465,9 +465,9 @@ kgdb_trap(int type, db_regs_t *regs)
 kgdb_send(E05);
 continue;
 			}
-			db_read_bytes(addr, (size_t)len,
-	(char *)buffer + sizeof(buffer) / 2);
-			mem2hex(buffer, buffer + sizeof(buffer) / 2, len);
+			char *ptr = (char *)buffer + sizeof(buffer) / 2;
+			db_read_bytes(addr, len, ptr);
+			mem2hex(buffer, ptr, len);
 			kgdb_send(buffer);
 			continue;
 
@@ -496,7 +496,7 @@ kgdb_trap(int type, db_regs_t *regs)
 kgdb_send(E0A);
 continue;
 			}
-			db_write_bytes(addr, (size_t)len, (char *)buffer);
+			db_write_bytes(addr, len, (char *)buffer);
 			kgdb_send(OK);
 			continue;
 

Index: src/sys/kern/sys_process.c
diff -u src/sys/kern/sys_process.c:1.163 src/sys/kern/sys_process.c:1.164
--- src/sys/kern/sys_process.c:1.163	Fri Jan  3 19:10:03 2014
+++ src/sys/kern/sys_process.c	Sun Sep 21 13:17:15 2014
@@ 

CVS commit: [netbsd-7] src/sys/external/bsd/drm2

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 17:41:53 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/dist/drm/nouveau [netbsd-7]: nouveau_bo.c
nouveau_drm.c nouveau_drm.h nouveau_fence.c nouveau_gem.c
nouveau_nv10_fence.c nouveau_nv50_display.c
src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine [netbsd-7]:
nouveau_engine_xtensa.c
src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/copy [netbsd-7]:
nouveau_engine_copy_nva3.c
src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/crypt [netbsd-7]:
nouveau_engine_crypt_nv84.c nouveau_engine_crypt_nv98.c
src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device 
[netbsd-7]:
nouveau_engine_device_base.c
src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp [netbsd-7]:
nouveau_engine_disp_dacnv50.c nouveau_engine_disp_nv04.c
nouveau_engine_disp_nv50.c nouveau_engine_disp_nvd0.c nv50.h
src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo [netbsd-7]:
nouveau_engine_fifo_base.c nouveau_engine_fifo_nvc0.c
nouveau_engine_fifo_nve0.c nve0.h
src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/graph [netbsd-7]:
nouveau_engine_graph_ctxnvd7.c nouveau_engine_graph_gm107.c
nouveau_engine_graph_nv50.c nouveau_engine_graph_nvc0.c
src/sys/external/bsd/drm2/dist/drm/nouveau/core/engine/perfmon 
[netbsd-7]:
nouveau_engine_perfmon_base.c
src/sys/external/bsd/drm2/dist/drm/nouveau/core/include/core [netbsd-7]:
device.h
src/sys/external/bsd/drm2/dist/drm/nouveau/core/include/engine 
[netbsd-7]:
device.h
src/sys/external/bsd/drm2/dist/drm/nouveau/core/include/subdev 
[netbsd-7]:
bar.h fb.h pwr.h
src/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bar [netbsd-7]:
nouveau_subdev_bar_base.c
src/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/instmem 
[netbsd-7]:
nouveau_subdev_instmem_nv04.c nouveau_subdev_instmem_nv40.c nv04.h
src/sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/pwr [netbsd-7]:
nouveau_subdev_pwr_base.c
src/sys/external/bsd/drm2/dist/drm/nouveau/dispnv04 [netbsd-7]:
nouveau_dispnv04_tvmodesnv17.c nouveau_dispnv04_tvnv17.c
src/sys/external/bsd/drm2/include/drm [netbsd-7]: drm_agp_netbsd.h
src/sys/external/bsd/drm2/include/linux [netbsd-7]: bitops.h i2c.h
mutex.h pagemap.h pm_runtime.h spinlock.h vmalloc.h
src/sys/external/bsd/drm2/nouveau [netbsd-7]: files.nouveau
nouveau_module.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #95):
sys/external/bsd/drm2/dist/drm/nouveau/core/include/subdev/fb.h: 
revision 1.2
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nv10_fence.c: revision 
1.2

sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bar/nouveau_subdev_bar_base.c:
 revision 1.2
sys/external/bsd/drm2/dist/drm/nouveau/core/include/engine/device.h: 
revision 1.2
sys/external/bsd/drm2/dist/drm/nouveau/core/include/subdev/pwr.h: 
revision 1.2

sys/external/bsd/drm2/dist/drm/nouveau/core/engine/nouveau_engine_xtensa.c: 
revision 1.2
sys/external/bsd/drm2/include/linux/bitops.h: revision 1.8

sys/external/bsd/drm2/dist/drm/nouveau/dispnv04/nouveau_dispnv04_tvnv17.c: 
revision 1.3

sys/external/bsd/drm2/dist/drm/nouveau/dispnv04/nouveau_dispnv04_tvmodesnv17.c: 
revision 1.3
sys/external/bsd/drm2/dist/drm/nouveau/core/include/core/device.h: 
revision 1.3
sys/external/bsd/drm2/include/drm/drm_agp_netbsd.h: revision 1.4
sys/external/bsd/drm2/include/linux/spinlock.h: revision 1.4
sys/external/bsd/drm2/include/linux/pm_runtime.h: revision 1.3

sys/external/bsd/drm2/dist/drm/nouveau/core/engine/crypt/nouveau_engine_crypt_nv98.c:
 revision 1.2
sys/external/bsd/drm2/nouveau/files.nouveau: revision 1.3

sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nouveau_engine_disp_dacnv50.c:
 revision 1.2

sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c:
 revision 1.2

sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nouveau_engine_disp_nv50.c:
 revision 1.2
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_gem.c: revision 1.3
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bo.c: revision 1.5

sys/external/bsd/drm2/dist/drm/nouveau/core/engine/perfmon/nouveau_engine_perfmon_base.c:
 revision 1.2

sys/external/bsd/drm2/dist/drm/nouveau/core/engine/crypt/nouveau_engine_crypt_nv84.c:
 revision 1.2
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fence.c: revision 1.3

sys/external/bsd/drm2/dist/drm/nouveau/core/engine/graph/nouveau_engine_graph_nv50.c:
 revision 

CVS commit: [netbsd-7] src/sys/external/bsd/drm2/include/linux

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 17:48:40 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/include/linux [netbsd-7]: timer.h

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #96):
sys/external/bsd/drm2/include/linux/timer.h: revision 1.5
Add Linux timer_pending and del_timer.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.2.1 src/sys/external/bsd/drm2/include/linux/timer.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/external/bsd/drm2/include/linux/timer.h
diff -u src/sys/external/bsd/drm2/include/linux/timer.h:1.4 src/sys/external/bsd/drm2/include/linux/timer.h:1.4.2.1
--- src/sys/external/bsd/drm2/include/linux/timer.h:1.4	Wed Jul 16 20:56:25 2014
+++ src/sys/external/bsd/drm2/include/linux/timer.h	Sun Sep 21 17:48:40 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: timer.h,v 1.4 2014/07/16 20:56:25 riastradh Exp $	*/
+/*	$NetBSD: timer.h,v 1.4.2.1 2014/09/21 17:48:40 snj Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -83,12 +83,26 @@ mod_timer_pinned(struct timer_list *time
 }
 
 static inline void
+del_timer(struct timer_list *timer)
+{
+
+	callout_stop(timer-tl_callout);
+}
+
+static inline void
 del_timer_sync(struct timer_list *timer)
 {
 
 	callout_halt(timer-tl_callout, NULL);
 }
 
+static inline bool
+timer_pending(struct timer_list *timer)
+{
+
+	return callout_pending(timer-tl_callout);
+}
+
 /*
  * XXX This is bogus -- the Linux version does various machinations to
  * give some jitter so that stuff doesn't wake up all at once.



CVS commit: [netbsd-7] src/sys/external/bsd/drm2

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 17:55:03 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/dist/drm/via [netbsd-7]: via_dma.c
via_dmablit.c via_dmablit.h via_drv.h via_irq.c via_video.c
Added Files:
src/sys/external/bsd/drm2/via [netbsd-7]: files.via

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #97):
sys/external/bsd/drm2/dist/drm/via/via_video.c: revision 1.2
sys/external/bsd/drm2/dist/drm/via/via_dmablit.c: revision 1.2
sys/external/bsd/drm2/dist/drm/via/via_dmablit.h: revision 1.2
sys/external/bsd/drm2/via/files.via: revision 1.1
sys/external/bsd/drm2/dist/drm/via/via_irq.c: revision 1.2
sys/external/bsd/drm2/dist/drm/via/via_drv.h: revision 1.2
sys/external/bsd/drm2/dist/drm/via/via_dma.c: revision 1.2
Partial viadrm2 snapshot.
To do:
- autoconf attachment (shouldn't be hard)
- viafb (maybe steal unichromefb and adapt attachment structure)
- actually run it (no hardware here)


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.2.1 \
src/sys/external/bsd/drm2/dist/drm/via/via_dma.c \
src/sys/external/bsd/drm2/dist/drm/via/via_dmablit.c \
src/sys/external/bsd/drm2/dist/drm/via/via_drv.h \
src/sys/external/bsd/drm2/dist/drm/via/via_irq.c \
src/sys/external/bsd/drm2/dist/drm/via/via_video.c
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.10.1 \
src/sys/external/bsd/drm2/dist/drm/via/via_dmablit.h
cvs rdiff -u -r0 -r1.1.2.2 src/sys/external/bsd/drm2/via/files.via

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/dist/drm/via/via_dma.c
diff -u src/sys/external/bsd/drm2/dist/drm/via/via_dma.c:1.1.1.2 src/sys/external/bsd/drm2/dist/drm/via/via_dma.c:1.1.1.2.2.1
--- src/sys/external/bsd/drm2/dist/drm/via/via_dma.c:1.1.1.2	Wed Jul 16 19:35:29 2014
+++ src/sys/external/bsd/drm2/dist/drm/via/via_dma.c	Sun Sep 21 17:55:03 2014
@@ -39,6 +39,8 @@
 #include via_drv.h
 #include via_3d_reg.h
 
+#include linux/delay.h
+
 #define CMDBUF_ALIGNMENT_SIZE   (0x100)
 #define CMDBUF_ALIGNMENT_MASK   (0x0ff)
 
@@ -234,13 +236,21 @@ static int via_dma_init(struct drm_devic
 
 	switch (init-func) {
 	case VIA_INIT_DMA:
+#ifdef __NetBSD__
+		if (!DRM_SUSER())
+#else
 		if (!capable(CAP_SYS_ADMIN))
+#endif
 			retcode = -EPERM;
 		else
 			retcode = via_initialize(dev, dev_priv, init);
 		break;
 	case VIA_CLEANUP_DMA:
+#ifdef __NetBSD__
+		if (!DRM_SUSER())
+#else
 		if (!capable(CAP_SYS_ADMIN))
+#endif
 			retcode = -EPERM;
 		else
 			retcode = via_dma_cleanup(dev);
@@ -586,13 +596,11 @@ static inline void via_dummy_bitblt(drm_
 
 static void via_cmdbuf_jump(drm_via_private_t *dev_priv)
 {
-	uint32_t agp_base;
 	uint32_t pause_addr_lo, pause_addr_hi;
 	uint32_t jump_addr_lo, jump_addr_hi;
 	volatile uint32_t *last_pause_ptr;
 	uint32_t dma_low_save1, dma_low_save2;
 
-	agp_base = dev_priv-dma_offset + (uint32_t) dev_priv-agpAddr;
 	via_align_cmd(dev_priv, HC_HAGPBpID_JUMP, 0, jump_addr_hi,
 		  jump_addr_lo, 0);
 
Index: src/sys/external/bsd/drm2/dist/drm/via/via_dmablit.c
diff -u src/sys/external/bsd/drm2/dist/drm/via/via_dmablit.c:1.1.1.2 src/sys/external/bsd/drm2/dist/drm/via/via_dmablit.c:1.1.1.2.2.1
--- src/sys/external/bsd/drm2/dist/drm/via/via_dmablit.c:1.1.1.2	Wed Jul 16 19:35:29 2014
+++ src/sys/external/bsd/drm2/dist/drm/via/via_dmablit.c	Sun Sep 21 17:55:03 2014
@@ -41,6 +41,7 @@
 
 #include linux/pagemap.h
 #include linux/slab.h
+#include linux/timer.h
 
 #define VIA_PGDN(x)	 (((unsigned long)(x))  PAGE_MASK)
 #define VIA_PGOFF(x)	(((unsigned long)(x))  ~PAGE_MASK)
@@ -61,8 +62,12 @@ typedef struct _drm_via_descriptor {
 
 
 static void
-via_unmap_blit_from_device(struct pci_dev *pdev, drm_via_sg_info_t *vsg)
+via_unmap_blit_from_device(struct drm_device *dev, struct pci_dev *pdev,
+drm_via_sg_info_t *vsg)
 {
+#ifdef __NetBSD__
+	bus_dmamap_unload(dev-dmat, vsg-dmamap);
+#else
 	int num_desc = vsg-num_desc;
 	unsigned cur_descriptor_page = num_desc / vsg-descriptors_per_page;
 	unsigned descriptor_this_page = num_desc % vsg-descriptors_per_page;
@@ -82,6 +87,7 @@ via_unmap_blit_from_device(struct pci_de
 		next = (dma_addr_t) desc_ptr-next;
 		desc_ptr--;
 	}
+#endif
 }
 
 /*
@@ -101,7 +107,9 @@ via_map_blit_for_device(struct pci_dev *
 	unsigned num_descriptors_this_page = 0;
 	unsigned char *mem_addr = xfer-mem_addr;
 	unsigned char *cur_mem;
+#ifndef __NetBSD__
 	unsigned char *first_addr = (unsigned char *)VIA_PGDN(mem_addr);
+#endif
 	uint32_t fb_addr = xfer-fb_addr;
 	uint32_t cur_fb;
 	unsigned long line_len;
@@ -126,18 +134,31 @@ via_map_blit_for_device(struct pci_dev *
 			line_len -= remaining_len;
 
 			if (mode == 1) {
+#ifdef __NetBSD__
+const bus_dma_segment_t *const seg =
+vsg-dmamap-dm_segs[atop(cur_mem)];
+desc_ptr-mem_addr =
+seg-ds_addr + trunc_page((vaddr_t)cur_mem);

CVS commit: src/sys/arch/i386/pci

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 17:59:52 UTC 2014

Modified Files:
src/sys/arch/i386/pci: gcscehci.c

Log Message:
adjust for the new findvendor


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/i386/pci/gcscehci.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/i386/pci/gcscehci.c
diff -u src/sys/arch/i386/pci/gcscehci.c:1.10 src/sys/arch/i386/pci/gcscehci.c:1.11
--- src/sys/arch/i386/pci/gcscehci.c:1.10	Sat Mar 29 15:28:28 2014
+++ src/sys/arch/i386/pci/gcscehci.c	Sun Sep 21 13:59:52 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: gcscehci.c,v 1.10 2014/03/29 19:28:28 christos Exp $ */
+/* $NetBSD: gcscehci.c,v 1.11 2014/09/21 17:59:52 christos Exp $ */
 
 /*
  * Copyright (c) 2001, 2002, 2007 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: gcscehci.c,v 1.10 2014/03/29 19:28:28 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: gcscehci.c,v 1.11 2014/09/21 17:59:52 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -96,7 +96,6 @@ gcscehci_attach(device_t parent, device_
 	pcitag_t tag = pa-pa_tag;
 	char const *intrstr;
 	pci_intr_handle_t ih;
-	const char *vendor;
 	const char *devname = device_xname(self);
 	char devinfo[256];
 	usbd_status r;
@@ -151,13 +150,9 @@ gcscehci_attach(device_t parent, device_
 	sc-sc.sc_bus.usbrev = USBREV_2_0;
 
 	/* Figure out vendor for root hub descriptor. */
-	vendor = pci_findvendor(pa-pa_id);
 	sc-sc.sc_id_vendor = PCI_VENDOR(pa-pa_id);
-	if (vendor)
-		strlcpy(sc-sc.sc_vendor, vendor, sizeof(sc-sc.sc_vendor));
-	else
-		snprintf(sc-sc.sc_vendor, sizeof(sc-sc.sc_vendor),
-		vendor 0x%04x, PCI_VENDOR(pa-pa_id));
+	pci_findvendor(sc-sc.sc_vendor, sizeof(sc-sc.sc_vendor),
+	sc-sc.sc_id_vendor);
 
 	/*
 	 * Find companion controllers.  According to the spec they always



CVS commit: [netbsd-7] src/sys/external/bsd/drm2/include/drm

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 18:00:33 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/include/drm [netbsd-7]: drm_wait_netbsd.h

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #98):
sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h: revision 1.5
Return 0, not uninitialized, if the condition is already true.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.2.1 \
src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.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/external/bsd/drm2/include/drm/drm_wait_netbsd.h
diff -u src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h:1.4 src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h:1.4.2.1
--- src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h:1.4	Wed Jul 16 20:59:58 2014
+++ src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h	Sun Sep 21 18:00:33 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_wait_netbsd.h,v 1.4 2014/07/16 20:59:58 riastradh Exp $	*/
+/*	$NetBSD: drm_wait_netbsd.h,v 1.4.2.1 2014/09/21 18:00:33 snj Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -177,6 +177,7 @@ DRM_SPIN_WAKEUP_ALL(drm_waitqueue_t *q, 
 	KASSERT(!cpu_intr_p());		\
 	KASSERT(!cpu_softintr_p());	\
 	KASSERT(!cold);			\
+	(RET) = 0;			\
 	while (!(CONDITION)) {		\
 		/* XXX errno NetBSD-Linux */\
 		(RET) = -WAIT((Q), (INTERLOCK)-sl_lock);		\



CVS commit: [netbsd-7] src/sys/external/bsd/drm2/include/linux

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 18:01:28 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/include/linux [netbsd-7]: io-mapping.h

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #98):
sys/external/bsd/drm2/include/linux/io-mapping.h: revision 1.3
Make Linux io_mapping actually work.
Can't use bus_space_map/bus_space_unmap in interrupt context, where
Linux uses this io_mapping abstraction.  Instead, do uvm_km_alloc up
front and then use bus_space_mmap/pmap_kenter_pa to map it.
XXX Should bus_space_reserve the region (but that's x86-only for now).
XXX Should use direct map if possible.
XXX Should set an MTRR WC too in case of direct map or no PAT.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.8.1 \
src/sys/external/bsd/drm2/include/linux/io-mapping.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/external/bsd/drm2/include/linux/io-mapping.h
diff -u src/sys/external/bsd/drm2/include/linux/io-mapping.h:1.2 src/sys/external/bsd/drm2/include/linux/io-mapping.h:1.2.8.1
--- src/sys/external/bsd/drm2/include/linux/io-mapping.h:1.2	Tue Mar 18 18:20:43 2014
+++ src/sys/external/bsd/drm2/include/linux/io-mapping.h	Sun Sep 21 18:01:28 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: io-mapping.h,v 1.2 2014/03/18 18:20:43 riastradh Exp $	*/
+/*	$NetBSD: io-mapping.h,v 1.2.8.1 2014/09/21 18:01:28 snj Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -32,40 +32,58 @@
 #ifndef _LINUX_IO_MAPPING_H_
 #define _LINUX_IO_MAPPING_H_
 
+#include sys/param.h
 #include sys/bus.h
 #include sys/kmem.h
 #include sys/systm.h
 
+#include uvm/uvm_extern.h
+
 struct io_mapping {
 	bus_space_tag_t		diom_bst;
 	bus_addr_t		diom_addr;
 	bus_size_t		diom_size;
-	int			diom_flags;
-	bus_space_handle_t	diom_bsh;
-	void			*diom_vaddr;
+	vaddr_t			diom_va;
+	bool			diom_mapped;
 };
 
 static inline struct io_mapping *
 bus_space_io_mapping_create_wc(bus_space_tag_t bst, bus_addr_t addr,
 bus_size_t size)
 {
-	struct io_mapping *const mapping = kmem_alloc(sizeof(*mapping),
-	KM_SLEEP);
+	struct io_mapping *mapping;
+	bus_size_t offset;
+
+	KASSERT(PAGE_SIZE = size);
+	KASSERT(0 == (size  (PAGE_SIZE - 1)));
+	KASSERT(__type_fit(off_t, size));
+
+	/*
+	 * XXX For x86: Reserve the region (bus_space_reserve) and set
+	 * an MTRR to make it write-combining.  Doesn't matter if we
+	 * have PAT and we use pmap_kenter_pa, but matters if we don't
+	 * have PAT or if we later make this use direct map.
+	 */
+
+	/* Make sure the region is mappable.  */
+	for (offset = 0; offset  size; offset += PAGE_SIZE) {
+		if (bus_space_mmap(bst, addr, offset, PROT_READ|PROT_WRITE,
+			BUS_SPACE_MAP_LINEAR|BUS_SPACE_MAP_PREFETCHABLE)
+		== (paddr_t)-1)
+			return NULL;
+	}
+
+	/* Create a mapping record.  */
+	mapping = kmem_alloc(sizeof(*mapping), KM_SLEEP);
 	mapping-diom_bst = bst;
 	mapping-diom_addr = addr;
 	mapping-diom_size = size;
-	mapping-diom_flags = 0;
-	mapping-diom_flags |= BUS_SPACE_MAP_LINEAR;
-	mapping-diom_flags |= BUS_SPACE_MAP_PREFETCHABLE;
-	mapping-diom_vaddr = NULL;
-
-	bus_space_handle_t bsh;
-	if (bus_space_map(mapping-diom_bst, addr, PAGE_SIZE,
-		mapping-diom_flags, bsh)) {
-		kmem_free(mapping, sizeof(*mapping));
-		return NULL;
-	}
-	bus_space_unmap(mapping-diom_bst, bsh, PAGE_SIZE);
+	mapping-diom_mapped = false;
+
+	/* Allocate kva for one page.  */
+	mapping-diom_va = uvm_km_alloc(kernel_map, PAGE_SIZE, PAGE_SIZE,
+	UVM_KMF_VAONLY | UVM_KMF_WAITVA);
+	KASSERT(mapping-diom_va != 0);
 
 	return mapping;
 }
@@ -74,44 +92,61 @@ static inline void
 io_mapping_free(struct io_mapping *mapping)
 {
 
-	KASSERT(mapping-diom_vaddr == NULL);
+	KASSERT(!mapping-diom_mapped);
+
+	uvm_km_free(kernel_map, mapping-diom_va, PAGE_SIZE, UVM_KMF_VAONLY);
 	kmem_free(mapping, sizeof(*mapping));
 }
 
 static inline void *
 io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset)
 {
+	paddr_t cookie;
 
-	KASSERT(mapping-diom_vaddr == NULL);
-	KASSERT(ISSET(mapping-diom_flags, BUS_SPACE_MAP_LINEAR));
-	if (bus_space_map(mapping-diom_bst, (mapping-diom_addr + offset),
-		PAGE_SIZE, mapping-diom_flags, mapping-diom_bsh))
-		panic(Unable to make I/O mapping!); /* XXX */
-	mapping-diom_vaddr = bus_space_vaddr(mapping-diom_bst,
-	mapping-diom_bsh);
+	KASSERT(0 == (offset  (PAGE_SIZE - 1)));
+	KASSERT(PAGE_SIZE = mapping-diom_size);
+	KASSERT(offset = (mapping-diom_size - PAGE_SIZE));
+	KASSERT(__type_fit(off_t, offset));
+	KASSERT(!mapping-diom_mapped);
+
+	cookie = bus_space_mmap(mapping-diom_bst, mapping-diom_addr, offset,
+	PROT_READ|PROT_WRITE,
+	BUS_SPACE_MAP_LINEAR|BUS_SPACE_MAP_PREFETCHABLE);
+	KASSERT(cookie != (paddr_t)-1);
+
+	pmap_kenter_pa(mapping-diom_va, pmap_phys_address(cookie),
+	PROT_READ|PROT_WRITE, pmap_mmap_flags(cookie));
+	pmap_update(pmap_kernel());
 
-	return mapping-diom_vaddr;
+	

CVS commit: src/sys/dev/ieee1394

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 18:03:47 UTC 2014

Modified Files:
src/sys/dev/ieee1394: fwcrom.c

Log Message:
ran sed too agressively.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/ieee1394/fwcrom.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/ieee1394/fwcrom.c
diff -u src/sys/dev/ieee1394/fwcrom.c:1.15 src/sys/dev/ieee1394/fwcrom.c:1.16
--- src/sys/dev/ieee1394/fwcrom.c:1.15	Sun Sep 21 13:10:00 2014
+++ src/sys/dev/ieee1394/fwcrom.c	Sun Sep 21 14:03:47 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: fwcrom.c,v 1.15 2014/09/21 17:10:00 christos Exp $	*/
+/*	$NetBSD: fwcrom.c,v 1.16 2014/09/21 18:03:47 christos Exp $	*/
 /*-
  * Copyright (c) 2002-2003
  * 	Hidetoshi Shimokawa. All rights reserved.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: fwcrom.c,v 1.15 2014/09/21 17:10:00 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: fwcrom.c,v 1.16 2014/09/21 18:03:47 christos Exp $);
 
 #include sys/param.h
 #ifdef _KERNEL
@@ -48,11 +48,11 @@ __KERNEL_RCSID(0, $NetBSD: fwcrom.c,v 1
 #include dev/ieee1394/firewire.h
 #include dev/ieee1394/iec13213.h
 
-#define MAX_ROM (1024 - sizeof(uint[2]2_t) * 5)
+#define MAX_ROM (1024 - sizeof(uint32_t) * 5)
 #define CROM_END(cc) ((char *)(cc)-stack[0].dir + MAX_ROM - 1)
 
 void
-crom_init_context(struct crom_context *cc, uint[2]2_t *p)
+crom_init_context(struct crom_context *cc, uint32_t *p)
 {
 	struct csrhdr *hdr;
 
@@ -139,7 +139,7 @@ crom_search_key(struct crom_context *cc,
 }
 
 int
-crom_has_specver(uint[2]2_t *p, uint[2]2_t spec, uint[2]2_t ver)
+crom_has_specver(uint32_t *p, uint32_t spec, uint32_t ver)
 {
 	struct csrreg *reg;
 	struct crom_context c, *cc;
@@ -170,7 +170,7 @@ crom_parse_text(struct crom_context *cc,
 {
 	struct csrreg *reg;
 	struct csrtext *textleaf;
-	uint[2]2_t *bp;
+	uint32_t *bp;
 	int i, qlen;
 	static char *nullstr = (char *)(null);
 
@@ -198,7 +198,7 @@ crom_parse_text(struct crom_context *cc,
 
 	/* XXX should check spec and type */
 
-	bp = (uint[2]2_t *)buf;
+	bp = (uint32_t *)buf;
 	qlen = textleaf-crc_len - 2;
 	if (len  qlen * 4)
 		qlen = len/4;
@@ -212,10 +212,10 @@ crom_parse_text(struct crom_context *cc,
 }
 
 uint16_t
-crom_crc(uint[2]2_t *ptr, int len)
+crom_crc(uint32_t *ptr, int len)
 {
 	int i, shift;
-	uint[2]2_t data, sum, crc = 0;
+	uint32_t data, sum, crc = 0;
 
 	for (i = 0; i  len; i++) {
 		data = ptr[i];
@@ -230,7 +230,7 @@ crom_crc(uint[2]2_t *ptr, int len)
 
 #if !defined(_KERNEL)  !defined(_BOOT)
 static void
-crom_desc_specver(uint[2]2_t spec, uint[2]2_t ver, char *buf, int len)
+crom_desc_specver(uint32_t spec, uint32_t ver, char *buf, int len)
 {
 	const char *s = NULL;
 
@@ -308,7 +308,7 @@ crom_desc(struct crom_context *cc, char 
 		/* XXX fall through */
 	case CSRTYPE_D:
 		dir = (struct csrdirectory *) (reg + reg-val);
-		crc = crom_crc((uint[2]2_t *)dir-entry, dir-crc_len);
+		crc = crom_crc((uint32_t *)dir-entry, dir-crc_len);
 		l += snprintf(buf + l, len - l, len=%d crc=0x%04x ,
 		dir-crc_len, crc);
 
@@ -396,7 +396,7 @@ crom_desc(struct crom_context *cc, char 
 #if defined(_KERNEL) || defined(_BOOT) || defined(TEST)
 
 int
-crom_add_quad(struct crom_chunk *chunk, uint[2]2_t entry)
+crom_add_quad(struct crom_chunk *chunk, uint32_t entry)
 {
 	int index;
 
@@ -415,7 +415,7 @@ crom_add_entry(struct crom_chunk *chunk,
 {
 	union {
 		struct csrreg reg;
-		uint[2]2_t i;
+		uint32_t i;
 	} foo;
 
 	foo.reg.key = key;
@@ -450,7 +450,7 @@ crom_add_simple_text(struct crom_src *sr
 		 struct crom_chunk *chunk, const char *buf)
 {
 	struct csrtext *tl;
-	uint[2]2_t *p;
+	uint32_t *p;
 	int len, i;
 	char t[MAX_TEXT];
 
@@ -461,38 +461,38 @@ crom_add_simple_text(struct crom_src *sr
 	}
 
 	tl = (struct csrtext *) chunk-data;
-	tl-crc_len = howmany(sizeof(struct csrtext) + len, sizeof(uint[2]2_t));
+	tl-crc_len = howmany(sizeof(struct csrtext) + len, sizeof(uint32_t));
 	tl-spec_id = 0;
 	tl-spec_type = 0;
 	tl-lang_id = 0;
-	memset(t, 0, roundup2(len, sizeof(uint[2]2_t)));
+	memset(t, 0, roundup2(len, sizeof(uint32_t)));
 	memcpy(t, buf, len);
-	p = (uint[2]2_t *)t;
-	for (i = 0; i  howmany(len, sizeof(uint[2]2_t)); i++)
+	p = (uint32_t *)t;
+	for (i = 0; i  howmany(len, sizeof(uint32_t)); i++)
 		tl-text[i] = ntohl(*p++);
 	return crom_add_chunk(src, parent, chunk, CROM_TEXTLEAF);
 }
 
 static int
-crom_copy(uint[2]2_t *src, uint[2]2_t *dst, int *offset, int len, int maxlen)
+crom_copy(uint32_t *src, uint32_t *dst, int *offset, int len, int maxlen)
 {
 
 	if (*offset + len  maxlen) {
 		printf(Config. ROM is too large for the buffer\n);
 		return -1;
 	}
-	memcpy((char *)(dst + *offset), src, len * sizeof(uint[2]2_t));
+	memcpy((char *)(dst + *offset), src, len * sizeof(uint32_t));
 	*offset += len;
 	return 0;
 }
 
 int
-crom_load(struct crom_src *src, uint[2]2_t *buf, int maxlen)
+crom_load(struct crom_src 

CVS commit: [netbsd-7] src/sys/external/bsd/drm2/linux

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 18:03:33 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/linux [netbsd-7]: linux_work.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #98):
sys/external/bsd/drm2/linux/linux_work.c: revision 1.8
Don't forget to lock wq_lock around handling wq_delayed.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.2.1 src/sys/external/bsd/drm2/linux/linux_work.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/linux/linux_work.c
diff -u src/sys/external/bsd/drm2/linux/linux_work.c:1.7 src/sys/external/bsd/drm2/linux/linux_work.c:1.7.2.1
--- src/sys/external/bsd/drm2/linux/linux_work.c:1.7	Tue Jul 29 17:36:06 2014
+++ src/sys/external/bsd/drm2/linux/linux_work.c	Sun Sep 21 18:03:33 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_work.c,v 1.7 2014/07/29 17:36:06 riastradh Exp $	*/
+/*	$NetBSD: linux_work.c,v 1.7.2.1 2014/09/21 18:03:33 snj Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_work.c,v 1.7 2014/07/29 17:36:06 riastradh Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_work.c,v 1.7.2.1 2014/09/21 18:03:33 snj Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -577,7 +577,9 @@ queue_delayed_work(struct workqueue_stru
 			linux_worker_intr, dw);
 			dw-work.w_state = WORK_DELAYED;
 			dw-work.w_wq = wq;
+			mutex_enter(wq-wq_lock);
 			TAILQ_INSERT_HEAD(wq-wq_delayed, dw, dw_entry);
+			mutex_exit(wq-wq_lock);
 		}
 		newly_queued = true;
 		break;
@@ -636,7 +638,9 @@ mod_delayed_work(struct workqueue_struct
 			linux_worker_intr, dw);
 			dw-work.w_state = WORK_DELAYED;
 			dw-work.w_wq = wq;
+			mutex_enter(wq-wq_lock);
 			TAILQ_INSERT_HEAD(wq-wq_delayed, dw, dw_entry);
+			mutex_exit(wq-wq_lock);
 		}
 		timer_modified = false;
 		break;



CVS commit: [netbsd-7] src/sys/external/bsd/drm2/ttm

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 18:04:38 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/ttm [netbsd-7]: ttm_bo_vm.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #98):
sys/external/bsd/drm2/ttm/ttm_bo_vm.c: revision 1.5
We dropped vmobjlock, so reacquire it before uvmfault_unlockall.


To generate a diff of this commit:
cvs rdiff -u -r1.2.4.2 -r1.2.4.3 src/sys/external/bsd/drm2/ttm/ttm_bo_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/ttm/ttm_bo_vm.c
diff -u src/sys/external/bsd/drm2/ttm/ttm_bo_vm.c:1.2.4.2 src/sys/external/bsd/drm2/ttm/ttm_bo_vm.c:1.2.4.3
--- src/sys/external/bsd/drm2/ttm/ttm_bo_vm.c:1.2.4.2	Fri Aug 22 10:35:59 2014
+++ src/sys/external/bsd/drm2/ttm/ttm_bo_vm.c	Sun Sep 21 18:04:38 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ttm_bo_vm.c,v 1.2.4.2 2014/08/22 10:35:59 martin Exp $	*/
+/*	$NetBSD: ttm_bo_vm.c,v 1.2.4.3 2014/09/21 18:04:38 snj Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ttm_bo_vm.c,v 1.2.4.2 2014/08/22 10:35:59 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: ttm_bo_vm.c,v 1.2.4.3 2014/09/21 18:04:38 snj Exp $);
 
 #include sys/types.h
 
@@ -107,9 +107,11 @@ ttm_bo_uvm_fault(struct uvm_faultinfo *u
 		if (ret != -EBUSY)
 			goto out0;
 		/*
-		 * It's currently locked.  Unlock the fault, wait for
-		 * it, and start over.
+		 * It's currently locked.  Unlock the fault (requires
+		 * relocking uobj's vmobjlock first), wait for it, and
+		 * start over.
 		 */
+		mutex_enter(uobj-vmobjlock);
 		uvmfault_unlockall(ufi, ufi-entry-aref.ar_amap, uobj);
 		(void)ttm_bo_wait_unreserved(bo);
 		return -ERESTART;



CVS commit: [netbsd-7] src/sys/external/bsd/drm2/dist/drm/i915

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 18:10:52 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915 [netbsd-7]: i915_irq.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #99):
sys/external/bsd/drm2/dist/drm/i915/i915_irq.c: revision 1.7
Fix i915 locking around error handling.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.2.1 \
src/sys/external/bsd/drm2/dist/drm/i915/i915_irq.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/dist/drm/i915/i915_irq.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_irq.c:1.6 src/sys/external/bsd/drm2/dist/drm/i915/i915_irq.c:1.6.2.1
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_irq.c:1.6	Wed Jul 16 20:56:25 2014
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_irq.c	Sun Sep 21 18:10:52 2014
@@ -1099,7 +1099,9 @@ static void notify_ring(struct drm_devic
 {
 	unsigned long flags;
 	spin_lock_irqsave(dev_priv-irq_lock, flags);
-	/* XXX Set a flag under the lock...  */
+	/*
+	 * XXX Set a flag under the lock or push the lock out to callers.
+	 */
 	DRM_SPIN_WAKEUP_ALL(ring-irq_queue, dev_priv-irq_lock);
 	spin_unlock_irqrestore(dev_priv-irq_lock, flags);
 }
@@ -1315,8 +1317,10 @@ static void snb_gt_irq_handler(struct dr
 	if (gt_iir  (GT_BLT_CS_ERROR_INTERRUPT |
 		  GT_BSD_CS_ERROR_INTERRUPT |
 		  GT_RENDER_CS_MASTER_ERROR_INTERRUPT)) {
+		spin_lock(dev_priv-irq_lock);
 		i915_handle_error(dev, false, GT error interrupt 0x%08x,
   gt_iir);
+		spin_unlock(dev_priv-irq_lock);
 	}
 
 	if (gt_iir  GT_PARITY_ERROR(dev))
@@ -1589,9 +1593,11 @@ static void gen6_rps_irq_handler(struct 
 			notify_ring(dev_priv-dev, dev_priv-ring[VECS]);
 
 		if (pm_iir  PM_VEBOX_CS_ERROR_INTERRUPT) {
+			spin_lock(dev_priv-irq_lock);
 			i915_handle_error(dev_priv-dev, false,
 	  VEBOX CS error interrupt 0x%08x,
 	  pm_iir);
+			spin_unlock(dev_priv-irq_lock);
 		}
 	}
 }
@@ -2357,6 +2363,8 @@ void i915_handle_error(struct drm_device
 	va_list args;
 	char error_msg[80];
 
+	assert_spin_locked(dev_priv-irq_lock);
+
 	va_start(args, fmt);
 	vscnprintf(error_msg, sizeof(error_msg), fmt, args);
 	va_end(args);
@@ -2734,6 +2742,8 @@ static void i915_hangcheck_elapsed(unsig
 	if (!i915.enable_hangcheck)
 		return;
 
+	spin_lock(dev_priv-irq_lock);
+
 	for_each_ring(ring, dev_priv, i) {
 		u64 acthd;
 		u32 seqno;
@@ -2747,9 +2757,7 @@ static void i915_hangcheck_elapsed(unsig
 		if (ring-hangcheck.seqno == seqno) {
 			if (ring_idle(ring, seqno)) {
 ring-hangcheck.action = HANGCHECK_IDLE;
-
 #ifdef __NetBSD__
-spin_lock(dev_priv-irq_lock);
 if (DRM_SPIN_WAITERS_P(ring-irq_queue,
 	dev_priv-irq_lock)) {
 	if (!test_and_set_bit(ring-id, dev_priv-gpu_error.missed_irq_rings)) {
@@ -2765,7 +2773,6 @@ static void i915_hangcheck_elapsed(unsig
 } else {
 	busy = false;
 }
-spin_unlock(dev_priv-irq_lock);
 #else
 if (waitqueue_active(ring-irq_queue)) {
 	/* Issue a wake-up to catch stuck h/w. */
@@ -2845,6 +2852,8 @@ static void i915_hangcheck_elapsed(unsig
 	if (rings_hung)
 		return i915_handle_error(dev, true, Ring hung);
 
+	spin_unlock(dev_priv-irq_lock);
+
 	if (busy_count)
 		/* Reset timer case chip hangs without another request
 		 * being added */



CVS commit: [netbsd-7] src/sys/external/bsd/drm2/dist/drm/i915

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 18:11:38 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915 [netbsd-7]: i915_irq.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #99):
sys/external/bsd/drm2/dist/drm/i915/i915_irq.c: revision 1.9
Lock irq_lock around i915_error_wake_up in i915_error_work_func.


To generate a diff of this commit:
cvs rdiff -u -r1.6.2.1 -r1.6.2.2 \
src/sys/external/bsd/drm2/dist/drm/i915/i915_irq.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/dist/drm/i915/i915_irq.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_irq.c:1.6.2.1 src/sys/external/bsd/drm2/dist/drm/i915/i915_irq.c:1.6.2.2
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_irq.c:1.6.2.1	Sun Sep 21 18:10:52 2014
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_irq.c	Sun Sep 21 18:11:37 2014
@@ -2250,7 +2250,9 @@ static void i915_error_work_func(struct 
 		 * Note: The wake_up also serves as a memory barrier so that
 		 * waiters see the update value of the reset counter atomic_t.
 		 */
+		spin_lock(dev_priv-irq_lock);
 		i915_error_wake_up(dev_priv, true);
+		spin_unlock(dev_priv-irq_lock);
 	}
 }
 



CVS commit: [netbsd-7] src/sys/external/bsd/drm2/dist/drm/i915

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 18:12:18 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915 [netbsd-7]: i915_irq.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #99):
sys/external/bsd/drm2/dist/drm/i915/i915_irq.c: revision 1.8
Fix two mistakes in previous.
- i915_error_wake_up is given irq_lock, so it need not take that.
- Unlock irq_lock on exit from i915_hangcheck_elapsed if ring_hung.
XXX This introduces the lock order irq_lock - pending_flip_lock.
How about just using irq_lock for pending flips?


To generate a diff of this commit:
cvs rdiff -u -r1.6.2.2 -r1.6.2.3 \
src/sys/external/bsd/drm2/dist/drm/i915/i915_irq.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/dist/drm/i915/i915_irq.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_irq.c:1.6.2.2 src/sys/external/bsd/drm2/dist/drm/i915/i915_irq.c:1.6.2.3
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_irq.c:1.6.2.2	Sun Sep 21 18:11:37 2014
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_irq.c	Sun Sep 21 18:12:18 2014
@@ -2138,11 +2138,10 @@ static void i915_error_wake_up(struct dr
 	 * a gpu reset pending so that i915_error_work_func can acquire them).
 	 */
 
+	assert_spin_locked(dev_priv-irq_lock);
 #ifdef __NetBSD__
-	spin_lock(dev_priv-irq_lock);
 	for_each_ring(ring, dev_priv, i)
 		DRM_SPIN_WAKEUP_ALL(ring-irq_queue, dev_priv-irq_lock);
-	spin_unlock(dev_priv-irq_lock);
 
 	spin_lock(dev_priv-pending_flip_lock);
 	DRM_SPIN_WAKEUP_ALL(dev_priv-pending_flip_queue,
@@ -2851,8 +2850,11 @@ static void i915_hangcheck_elapsed(unsig
 		}
 	}
 
-	if (rings_hung)
-		return i915_handle_error(dev, true, Ring hung);
+	if (rings_hung) {
+		i915_handle_error(dev, true, Ring hung);
+		spin_unlock(dev_priv-irq_lock);
+		return;
+	}
 
 	spin_unlock(dev_priv-irq_lock);
 



CVS commit: [netbsd-7] src/sys/external/bsd/drm2/linux

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 18:22:22 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/linux [netbsd-7]: linux_kmap.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #101):
sys/external/bsd/drm2/linux/linux_kmap.c: revisions 1.5-1.10
- Use an adaptive lock where a spin lock is not needed.
- Tweak style.
- Assert sleepable where appropriate.
- Use __diagused, not __unused.
- Use direct map where available.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.8.1 src/sys/external/bsd/drm2/linux/linux_kmap.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/linux/linux_kmap.c
diff -u src/sys/external/bsd/drm2/linux/linux_kmap.c:1.4 src/sys/external/bsd/drm2/linux/linux_kmap.c:1.4.8.1
--- src/sys/external/bsd/drm2/linux/linux_kmap.c:1.4	Fri Mar 28 23:22:27 2014
+++ src/sys/external/bsd/drm2/linux/linux_kmap.c	Sun Sep 21 18:22:22 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_kmap.c,v 1.4 2014/03/28 23:22:27 riastradh Exp $	*/
+/*	$NetBSD: linux_kmap.c,v 1.4.8.1 2014/09/21 18:22:22 snj Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,13 +30,17 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux_kmap.c,v 1.4 2014/03/28 23:22:27 riastradh Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux_kmap.c,v 1.4.8.1 2014/09/21 18:22:22 snj Exp $);
 
 #include sys/types.h
 #include sys/kmem.h
 #include sys/mutex.h
 #include sys/rbtree.h
 
+#ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS
+#include dev/mm.h
+#endif
+
 #include uvm/uvm_extern.h
 
 #include linux/highmem.h
@@ -48,12 +52,6 @@ __KERNEL_RCSID(0, $NetBSD: linux_kmap.c
  * use at a time.
  */
 
-/*
- * XXX Use direct-mapped physical pages where available, e.g. amd64.
- *
- * XXX ...or add an abstraction to uvm for this.  (uvm_emap?)
- */
-
 static kmutex_t linux_kmap_atomic_lock;
 static vaddr_t linux_kmap_atomic_vaddr;
 
@@ -106,7 +104,7 @@ int
 linux_kmap_init(void)
 {
 
-	/* IPL_VM is needed to block pmap_kenter_pa.  */
+	/* IPL_VM since interrupt handlers use kmap_atomic.  */
 	mutex_init(linux_kmap_atomic_lock, MUTEX_DEFAULT, IPL_VM);
 
 	linux_kmap_atomic_vaddr = uvm_km_alloc(kernel_map, PAGE_SIZE, 0,
@@ -115,7 +113,7 @@ linux_kmap_init(void)
 	KASSERT(linux_kmap_atomic_vaddr != 0);
 	KASSERT(!pmap_extract(pmap_kernel(), linux_kmap_atomic_vaddr, NULL));
 
-	mutex_init(linux_kmap_lock, MUTEX_DEFAULT, IPL_VM);
+	mutex_init(linux_kmap_lock, MUTEX_DEFAULT, IPL_NONE);
 	rb_tree_init(linux_kmap_entries, linux_kmap_entry_ops);
 
 	return 0;
@@ -125,9 +123,8 @@ void
 linux_kmap_fini(void)
 {
 
-	KASSERT(rb_tree_iterate(linux_kmap_entries, NULL, RB_DIR_RIGHT) ==
-	NULL);
-#if 0/* XXX no rb_tree_destroy*/
+	KASSERT(RB_TREE_MIN(linux_kmap_entries) == NULL);
+#if 0/* XXX no rb_tree_destroy */
 	rb_tree_destroy(linux_kmap_entries);
 #endif
 	mutex_destroy(linux_kmap_lock);
@@ -145,16 +142,18 @@ void *
 kmap_atomic(struct page *page)
 {
 	const paddr_t paddr = uvm_vm_page_to_phys(page-p_vmp);
+	vaddr_t vaddr;
 
-	mutex_spin_enter(linux_kmap_atomic_lock);
+#ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS
+	if (mm_md_direct_mapped_phys(paddr, vaddr))
+		return (void *)vaddr;
+#endif
 
+	mutex_spin_enter(linux_kmap_atomic_lock);
 	KASSERT(linux_kmap_atomic_vaddr != 0);
 	KASSERT(!pmap_extract(pmap_kernel(), linux_kmap_atomic_vaddr, NULL));
-
-	const vaddr_t vaddr = linux_kmap_atomic_vaddr;
-	const int prot = (VM_PROT_READ | VM_PROT_WRITE);
-	const int flags = 0;
-	pmap_kenter_pa(vaddr, paddr, prot, flags);
+	vaddr = linux_kmap_atomic_vaddr;
+	pmap_kenter_pa(vaddr, paddr, (VM_PROT_READ | VM_PROT_WRITE), 0);
 	pmap_update(pmap_kernel());
 
 	return (void *)vaddr;
@@ -165,6 +164,19 @@ kunmap_atomic(void *addr)
 {
 	const vaddr_t vaddr = (vaddr_t)addr;
 
+#ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS
+{
+	paddr_t paddr;
+	vaddr_t vaddr1;
+	bool ok __diagused;
+
+	ok = pmap_extract(pmap_kernel(), vaddr, paddr);
+	KASSERT(ok);
+	if (mm_md_direct_mapped_phys(paddr, vaddr1)  vaddr1 == vaddr)
+		return;
+}
+#endif
+
 	KASSERT(mutex_owned(linux_kmap_atomic_lock));
 	KASSERT(linux_kmap_atomic_vaddr == vaddr);
 	KASSERT(pmap_extract(pmap_kernel(), vaddr, NULL));
@@ -179,7 +191,16 @@ void *
 kmap(struct page *page)
 {
 	const paddr_t paddr = VM_PAGE_TO_PHYS(page-p_vmp);
-	const vaddr_t vaddr = uvm_km_alloc(kernel_map, PAGE_SIZE, 0,
+	vaddr_t vaddr;
+
+	ASSERT_SLEEPABLE();
+
+#ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS
+	if (mm_md_direct_mapped_phys(paddr, vaddr))
+		return (void *)vaddr;
+#endif
+
+	vaddr = uvm_km_alloc(kernel_map, PAGE_SIZE, 0,
 	(UVM_KMF_VAONLY | UVM_KMF_WAITVA));
 	KASSERT(vaddr != 0);
 
@@ -188,16 +209,14 @@ kmap(struct page *page)
 	lke-lke_paddr = paddr;
 	lke-lke_vaddr = vaddr;
 
-	mutex_spin_enter(linux_kmap_lock);
-	struct linux_kmap_entry *const collision __unused =
+	mutex_enter(linux_kmap_lock);
+	struct linux_kmap_entry *const collision 

CVS commit: [netbsd-7] src/sys/external/bsd/drm2/include/linux

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 18:31:06 UTC 2014

Modified Files:
src/sys/external/bsd/drm2/include/linux [netbsd-7]: ww_mutex.h

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #102):
sys/external/bsd/drm2/include/linux/ww_mutex.h: revisions 1.5, 1.6
Use KASSERTMSG in ww_acquire_fini to show number of locks held.
Omit vestigial notes on porting before the API was made to match.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.4.1 \
src/sys/external/bsd/drm2/include/linux/ww_mutex.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/external/bsd/drm2/include/linux/ww_mutex.h
diff -u src/sys/external/bsd/drm2/include/linux/ww_mutex.h:1.4 src/sys/external/bsd/drm2/include/linux/ww_mutex.h:1.4.4.1
--- src/sys/external/bsd/drm2/include/linux/ww_mutex.h:1.4	Sat Jul 26 21:36:40 2014
+++ src/sys/external/bsd/drm2/include/linux/ww_mutex.h	Sun Sep 21 18:31:06 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ww_mutex.h,v 1.4 2014/07/26 21:36:40 riastradh Exp $	*/
+/*	$NetBSD: ww_mutex.h,v 1.4.4.1 2014/09/21 18:31:06 snj Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -29,17 +29,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-/*
- * Notes on porting:
- *
- * - We require a context for all locks, so ww_mutex_lock(m, NULL) is
- *   not kosher.  Locking without a context is too painful to
- *   contemplate.
- *
- * - We require passing the context to trylock and unlock.  Unlocking
- *   the wrong lock is too serious an error to pass up detection.
- */
-
 #ifndef _ASM_WW_MUTEX_H_
 #define _ASM_WW_MUTEX_H_
 
@@ -119,7 +108,8 @@ static inline void
 ww_acquire_fini(struct ww_acquire_ctx *ctx)
 {
 
-	KASSERT(ctx-wwx_acquired == 0);
+	KASSERTMSG((ctx-wwx_acquired == 0), ctx %p still holds %u locks,
+	ctx, ctx-wwx_acquired);
 	ctx-wwx_acquired = ~0U;	/* Fail if called again. */
 }
 



CVS commit: [netbsd-7] src/share/man/man9

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 18:33:20 UTC 2014

Modified Files:
src/share/man/man9 [netbsd-7]: uvm_map.9

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #103):
share/man/man9/uvm_map.9: revision 1.6
Fix typo: mask, not mark.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.2.1 src/share/man/man9/uvm_map.9

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/uvm_map.9
diff -u src/share/man/man9/uvm_map.9:1.5 src/share/man/man9/uvm_map.9:1.5.2.1
--- src/share/man/man9/uvm_map.9:1.5	Wed May 21 12:15:25 2014
+++ src/share/man/man9/uvm_map.9	Sun Sep 21 18:33:20 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: uvm_map.9,v 1.5 2014/05/21 12:15:25 wiz Exp $
+.\	$NetBSD: uvm_map.9,v 1.5.2.1 2014/09/21 18:33:20 snj Exp $
 .\
 .\ Copyright (c) 1998 Matthew R. Green
 .\ All rights reserved.
@@ -190,7 +190,7 @@ Copy the map.
 .It UVM_INH_NONE
 No inheritance.
 .It UVM_INH_MASK
-Mark to extract inherit flags.
+Mask to extract inherit flags.
 .El
 .Pp
 The values that



CVS commit: [netbsd-7] src/external/mit/xorg/server/drivers/xf86-video-intel

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 18:34:51 UTC 2014

Modified Files:
src/external/mit/xorg/server/drivers/xf86-video-intel [netbsd-7]:
Makefile

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #104):
external/mit/xorg/server/drivers/xf86-video-intel/Makefile: revision 
1.16
Switch default accelmethod back to UXA until we import a stabler SNA.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.2.1 \
src/external/mit/xorg/server/drivers/xf86-video-intel/Makefile

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

Modified files:

Index: src/external/mit/xorg/server/drivers/xf86-video-intel/Makefile
diff -u src/external/mit/xorg/server/drivers/xf86-video-intel/Makefile:1.15 src/external/mit/xorg/server/drivers/xf86-video-intel/Makefile:1.15.2.1
--- src/external/mit/xorg/server/drivers/xf86-video-intel/Makefile:1.15	Sun Aug 10 14:17:19 2014
+++ src/external/mit/xorg/server/drivers/xf86-video-intel/Makefile	Sun Sep 21 18:34:50 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2014/08/10 14:17:19 jmcneill Exp $
+#	$NetBSD: Makefile,v 1.15.2.1 2014/09/21 18:34:50 snj Exp $
 
 .include bsd.own.mk
 
@@ -136,7 +136,7 @@ CPPFLAGS+=	-DHAVE_ATOMIC_PRIMITIVES
 CPPFLAGS+=	-DENABLE_XVMC
 CPPFLAGS+=	-DUSE_UXA
 CPPFLAGS+=	-DUSE_SNA
-CPPFLAGS+=	-DDEFAULT_ACCEL_METHOD=SNA
+CPPFLAGS+=	-DDEFAULT_ACCEL_METHOD=UXA
 CPPFLAGS+=	-DHAS_PIXMAN_GLYPHS=1
 CPPFLAGS+=	-DHAS_PIXMAN_TRIANGLES=1
 



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

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 18:38:53 UTC 2014

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

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #105):
usr.sbin/pcictl/pcictl.8: revisions 1.15-1.16
Sternly advise against `pcictl read/write'.  Use .Cm, not .Nm, while here.
Fix pasto.


To generate a diff of this commit:
cvs rdiff -u -r1.10.22.1 -r1.10.22.2 src/usr.sbin/pcictl/pcictl.8

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/pcictl/pcictl.8
diff -u src/usr.sbin/pcictl/pcictl.8:1.10.22.1 src/usr.sbin/pcictl/pcictl.8:1.10.22.2
--- src/usr.sbin/pcictl/pcictl.8:1.10.22.1	Wed Sep 10 08:38:31 2014
+++ src/usr.sbin/pcictl/pcictl.8	Sun Sep 21 18:38:53 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: pcictl.8,v 1.10.22.1 2014/09/10 08:38:31 martin Exp $
+.\	$NetBSD: pcictl.8,v 1.10.22.2 2014/09/21 18:38:53 snj Exp $
 .\
 .\ Copyright 2001 Wasabi Systems, Inc.
 .\ All rights reserved.
@@ -80,7 +80,7 @@ If the bus is not specified, it defaults
 PCI bus specified on the command line.
 If the function is not specified, it defaults to 0.
 .Pp
-.Nm read
+.Cm read
 .Op Fl b Ar bus
 .Fl d Ar device
 .Op Fl f Ar function
@@ -92,7 +92,16 @@ If the bus is not specified, it defaults
 PCI bus specified on the command line.
 If the function is not specified, it defaults to 0.
 .Pp
-.Nm write
+.Em WARNING:
+.Nm
+.Cm read
+is a dangerous command that can damage hardware and panic the operating
+system, even though it appears to be a harmless read-only operation.
+It is meant as a diagnostic tool for experiments or to debug device
+drivers.
+Do not use it as a substitute for a device driver!
+.Pp
+.Cm write
 .Op Fl b Ar bus
 .Fl d Ar device
 .Op Fl f Ar function
@@ -104,6 +113,15 @@ configuration register.
 If the bus is not specified, it defaults to the bus number of the
 PCI bus specified on the command line.
 If the function is not specified, it defaults to 0.
+.Pp
+.Em WARNING:
+.Nm
+.Cm write
+is a dangerous command that can damage hardware and panic the operating
+system.
+It is meant as a diagnostic tool for experiments or to debug device
+drivers.
+Do not use it as a substitute for a device driver!
 .Sh FILES
 .Pa /dev/pci*
 - PCI bus device nodes



CVS commit: [netbsd-7] src/sys/net

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 18:41:39 UTC 2014

Modified Files:
src/sys/net [netbsd-7]: bpf.c

Log Message:
Pull up following revision(s) (requested by rmind in ticket #106):
sys/net/bpf.c: revision 1.189
PR/49190: bpf_deliver: set scratch memory store in bpf_args_t.


To generate a diff of this commit:
cvs rdiff -u -r1.187 -r1.187.2.1 src/sys/net/bpf.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/bpf.c
diff -u src/sys/net/bpf.c:1.187 src/sys/net/bpf.c:1.187.2.1
--- src/sys/net/bpf.c:1.187	Thu Aug  7 03:40:21 2014
+++ src/sys/net/bpf.c	Sun Sep 21 18:41:39 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bpf.c,v 1.187 2014/08/07 03:40:21 ozaki-r Exp $	*/
+/*	$NetBSD: bpf.c,v 1.187.2.1 2014/09/21 18:41:39 snj Exp $	*/
 
 /*
  * Copyright (c) 1990, 1991, 1993
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bpf.c,v 1.187 2014/08/07 03:40:21 ozaki-r Exp $);
+__KERNEL_RCSID(0, $NetBSD: bpf.c,v 1.187.2.1 2014/09/21 18:41:39 snj Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_bpf.h
@@ -1388,25 +1388,24 @@ static inline void
 bpf_deliver(struct bpf_if *bp, void *(*cpfn)(void *, const void *, size_t),
 void *pkt, u_int pktlen, u_int buflen, const bool rcv)
 {
-	struct timespec ts;
+	const bpf_ctx_t *bc = NULL;
+	uint32_t mem[BPF_MEMWORDS];
 	bpf_args_t args = {
 		.pkt = (const uint8_t *)pkt,
 		.wirelen = pktlen,
 		.buflen = buflen,
-		.mem = NULL,
+		.mem = mem,
 		.arg = NULL
 	};
-	struct bpf_d *d;
-
-	const bpf_ctx_t *bc = NULL;
 	bool gottime = false;
+	struct timespec ts;
 
 	/*
 	 * Note that the IPL does not have to be raised at this point.
 	 * The only problem that could arise here is that if two different
 	 * interfaces shared any data.  This is not the case.
 	 */
-	for (d = bp-bif_dlist; d != NULL; d = d-bd_next) {
+	for (struct bpf_d *d = bp-bif_dlist; d != NULL; d = d-bd_next) {
 		u_int slen;
 
 		if (!d-bd_seesent  !rcv) {



CVS commit: [netbsd-7] src/usr.bin/indent

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 18:58:56 UTC 2014

Modified Files:
src/usr.bin/indent [netbsd-7]: args.c indent.1 indent.c indent_globs.h
io.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #110):
usr.bin/indent/io.c: revision 1.15
usr.bin/indent/indent_globs.h: revision 1.10
usr.bin/indent/args.c: revision 1.11
usr.bin/indent/indent.1: revision 1.23
usr.bin/indent/indent.c: revision 1.19
port the -ut / -nut options from freebsd.  -ut (default) enables tabs
in output, the -nut uses spaces.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.24.1 src/usr.bin/indent/args.c
cvs rdiff -u -r1.22 -r1.22.8.1 src/usr.bin/indent/indent.1
cvs rdiff -u -r1.18 -r1.18.24.1 src/usr.bin/indent/indent.c
cvs rdiff -u -r1.9 -r1.9.24.1 src/usr.bin/indent/indent_globs.h
cvs rdiff -u -r1.14 -r1.14.24.1 src/usr.bin/indent/io.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/indent/args.c
diff -u src/usr.bin/indent/args.c:1.10 src/usr.bin/indent/args.c:1.10.24.1
--- src/usr.bin/indent/args.c:1.10	Sun Apr 12 11:09:49 2009
+++ src/usr.bin/indent/args.c	Sun Sep 21 18:58:56 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: args.c,v 1.10 2009/04/12 11:09:49 lukem Exp $	*/
+/*	$NetBSD: args.c,v 1.10.24.1 2014/09/21 18:58:56 snj Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -68,7 +68,7 @@
 #if 0
 static char sccsid[] = @(#)args.c	8.1 (Berkeley) 6/6/93;
 #else
-__RCSID($NetBSD: args.c,v 1.10 2009/04/12 11:09:49 lukem Exp $);
+__RCSID($NetBSD: args.c,v 1.10.24.1 2014/09/21 18:58:56 snj Exp $);
 #endif
 #endif/* not lint */
 
@@ -274,6 +274,9 @@ struct pro {
 		nsc, PRO_BOOL, true, OFF, star_comment_cont
 	},
 	{
+		nut, PRO_BOOL, true, OFF, use_tabs
+	},
+	{
 		nsob, PRO_BOOL, false, OFF, swallow_optional_blanklines
 	},
 	{
@@ -301,6 +304,9 @@ struct pro {
 		troff, PRO_BOOL, false, ON, troff
 	},
 	{
+		ut, PRO_BOOL, true, ON, use_tabs
+	},
+	{
 		v, PRO_BOOL, false, ON, verbose
 	},
 	/* whew! */

Index: src/usr.bin/indent/indent.1
diff -u src/usr.bin/indent/indent.1:1.22 src/usr.bin/indent/indent.1:1.22.8.1
--- src/usr.bin/indent/indent.1:1.22	Sat Oct 13 14:18:17 2012
+++ src/usr.bin/indent/indent.1	Sun Sep 21 18:58:56 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: indent.1,v 1.22 2012/10/13 14:18:17 njoly Exp $
+.\	$NetBSD: indent.1,v 1.22.8.1 2014/09/21 18:58:56 snj Exp $
 .\
 .\ Copyright (c) 1980, 1990, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -61,7 +61,7 @@
 .\
 .\	from: @(#)indent.1	8.1 (Berkeley) 7/1/93
 .\
-.Dd July 1, 1993
+.Dd September 2, 2014
 .Dt INDENT 1
 .Os
 .Sh NAME
@@ -98,6 +98,7 @@
 .Op Fl sob | Fl nsob
 .Op Fl \st
 .Op Fl troff
+.Op Fl ut | Fl nut
 .Op Fl v | Fl \nv
 .Sh DESCRIPTION
 .Nm
@@ -135,6 +136,11 @@ is specified,
 checks to make sure it is different from
 .Ar input-file  .
 .Pp
+If no
+.Ar input-file
+is specified
+input is read from stdin and the formatted file is written to stdout. 
+.Pp
 The options listed below control the formatting style imposed by
 .Nm  .
 .Bl -tag -width Op
@@ -417,6 +423,11 @@ listing in much the same spirit as
 .Xr vgrind 1 .
 If the output file is not specified, the default is standard output,
 rather than formatting in place.
+.It Fl ut , nut
+Enables (disables) the use of tab characters in the output.
+Tabs are assumed to be aligned on columns divisible by 8.
+The default is
+.Fl ut .
 .It Fl v , \nv
 .Fl v
 turns on `verbose' mode;

Index: src/usr.bin/indent/indent.c
diff -u src/usr.bin/indent/indent.c:1.18 src/usr.bin/indent/indent.c:1.18.24.1
--- src/usr.bin/indent/indent.c:1.18	Sun Apr 12 11:09:49 2009
+++ src/usr.bin/indent/indent.c	Sun Sep 21 18:58:56 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: indent.c,v 1.18 2009/04/12 11:09:49 lukem Exp $	*/
+/*	$NetBSD: indent.c,v 1.18.24.1 2014/09/21 18:58:56 snj Exp $	*/
 
 /*
  * Copyright (c) 1980, 1993
@@ -75,7 +75,7 @@ __COPYRIGHT(@(#) Copyright (c) 1985 Sun
 #if 0
 static char sccsid[] = @(#)indent.c	5.17 (Berkeley) 6/7/93;
 #else
-__RCSID($NetBSD: indent.c,v 1.18 2009/04/12 11:09:49 lukem Exp $);
+__RCSID($NetBSD: indent.c,v 1.18.24.1 2014/09/21 18:58:56 snj Exp $);
 #endif
 #endif/* not lint */
 
@@ -123,6 +123,7 @@ main(int argc, char **argv)
  * without the matching : in a c?s:s
  * construct */
 	const char *t_ptr;	/* used for copying tokens */
+	int	tabs_to_var = 0; /* true if using tabs to indent to var name */
 	int type_code;	/* the type of token, returned by lexi */
 
 	int last_else = 0;	/* true iff last keyword was an else */
@@ -998,6 +999,7 @@ check_type:
 		 * : i);
 		 */
 			dec_ind = ps.decl_indent  0 ? ps.decl_indent : i;
+			tabs_to_var = (use_tabs ? ps.decl_indent  0 : 0);
 			goto copy_id;
 
 		case ident:	/* got an identifier or constant */
@@ -1012,11 +1014,44 @@ check_type:
 			sprintf(e_code, \n.De %dp+\200p\n, dec_ind * 7);
 		

CVS commit: [netbsd-7] src/doc

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 19:02:39 UTC 2014

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

Log Message:
Tickets 95-99, 101-107, 110.


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

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

Modified files:

Index: src/doc/CHANGES-7.0
diff -u src/doc/CHANGES-7.0:1.1.2.35 src/doc/CHANGES-7.0:1.1.2.36
--- src/doc/CHANGES-7.0:1.1.2.35	Thu Sep 18 15:50:49 2014
+++ src/doc/CHANGES-7.0	Sun Sep 21 19:02:39 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.35 2014/09/18 15:50:49 martin Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.36 2014/09/21 19:02:39 snj Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -732,3 +732,155 @@ external/gpl3/gcc.old/dist/gcc/config/i3
 	Kill the throw() on a forward declaration for posix_memalign (it
 	does not match our base declaration and may cause warnings).
 	[joerg, ticket #109]
+
+sys/external/bsd/drm2/dist/drm/nouveau/core/engine/copy/nouveau_engine_copy_nva3.c 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/engine/crypt/nouveau_engine_crypt_nv84.c 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/engine/crypt/nouveau_engine_crypt_nv98.c 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c 1.3
+sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nouveau_engine_disp_dacnv50.c 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nouveau_engine_disp_nv04.c 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nouveau_engine_disp_nv50.c 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nouveau_engine_disp_nvd0.c 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nv50.h 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_base.c 1.3
+sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nvc0.c 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nouveau_engine_fifo_nve0.c 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/engine/fifo/nve0.h 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/engine/graph/nouveau_engine_graph_ctxnvd7.c 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/engine/graph/nouveau_engine_graph_gm107.c 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/engine/graph/nouveau_engine_graph_nv50.c 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/engine/graph/nouveau_engine_graph_nvc0.c 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/engine/nouveau_engine_xtensa.c 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/engine/perfmon/nouveau_engine_perfmon_base.c 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/include/core/device.h 1.3
+sys/external/bsd/drm2/dist/drm/nouveau/core/include/engine/device.h 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/include/subdev/bar.h 1.3
+sys/external/bsd/drm2/dist/drm/nouveau/core/include/subdev/fb.h 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/include/subdev/pwr.h 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/bar/nouveau_subdev_bar_base.c 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/instmem/nouveau_subdev_instmem_nv04.c 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/instmem/nouveau_subdev_instmem_nv40.c 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/instmem/nv04.h 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/core/subdev/pwr/nouveau_subdev_pwr_base.c 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/dispnv04/nouveau_dispnv04_tvmodesnv17.c 1.3
+sys/external/bsd/drm2/dist/drm/nouveau/dispnv04/nouveau_dispnv04_tvnv17.c 1.3
+sys/external/bsd/drm2/dist/drm/nouveau/nouveau_bo.c 1.5
+sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c 1.3
+sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.h 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/nouveau_fence.c 1.3
+sys/external/bsd/drm2/dist/drm/nouveau/nouveau_gem.c 1.3
+sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nv10_fence.c 1.2
+sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nv50_display.c 1.2
+sys/external/bsd/drm2/include/drm/drm_agp_netbsd.h 1.4
+sys/external/bsd/drm2/include/linux/bitops.h	1.8
+sys/external/bsd/drm2/include/linux/i2c.h	1.6
+sys/external/bsd/drm2/include/linux/mutex.h	1.7
+sys/external/bsd/drm2/include/linux/pagemap.h	1.3
+sys/external/bsd/drm2/include/linux/pm_runtime.h 1.3
+sys/external/bsd/drm2/include/linux/spinlock.h	1.4
+sys/external/bsd/drm2/include/linux/vmalloc.h	1.4
+sys/external/bsd/drm2/nouveau/files.nouveau	1.3
+sys/external/bsd/drm2/nouveau/nouveau_module.c	1.2
+
+	Bring nouveau closer to a buildable state.
+	[riastradh, ticket #95]
+
+sys/external/bsd/drm2/include/linux/timer.h	1.5
+
+	Add Linux timer_pending and del_timer.
+	[riastradh, ticket #96]
+
+sys/external/bsd/drm2/dist/drm/via/via_dma.c	1.2
+sys/external/bsd/drm2/dist/drm/via/via_dmablit.c 1.2
+sys/external/bsd/drm2/dist/drm/via/via_dmablit.h 1.2

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

2014-09-21 Thread Reinoud Zandijk
Module Name:src
Committed By:   reinoud
Date:   Sun Sep 21 20:49:31 UTC 2014

Modified Files:
src/sys/arch/evbarm/odroid: odroid_machdep.c

Log Message:
Refactor usb hub attachment making it easier to read


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/evbarm/odroid/odroid_machdep.c

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

Modified files:

Index: src/sys/arch/evbarm/odroid/odroid_machdep.c
diff -u src/sys/arch/evbarm/odroid/odroid_machdep.c:1.33 src/sys/arch/evbarm/odroid/odroid_machdep.c:1.34
--- src/sys/arch/evbarm/odroid/odroid_machdep.c:1.33	Tue Sep  9 21:21:22 2014
+++ src/sys/arch/evbarm/odroid/odroid_machdep.c	Sun Sep 21 20:49:31 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: odroid_machdep.c,v 1.33 2014/09/09 21:21:22 reinoud Exp $ */
+/*	$NetBSD: odroid_machdep.c,v 1.34 2014/09/21 20:49:31 reinoud Exp $ */
 
 /*
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: odroid_machdep.c,v 1.33 2014/09/09 21:21:22 reinoud Exp $);
+__KERNEL_RCSID(0, $NetBSD: odroid_machdep.c,v 1.34 2014/09/21 20:49:31 reinoud Exp $);
 
 #include opt_evbarm_boardtype.h
 #include opt_exynos.h
@@ -752,52 +752,52 @@ exynos_usb_init_usb3503_hub(device_t sel
 	prop_dictionary_get_cstring_nocopy(dict, nreset, pin_nreset);
 	prop_dictionary_get_cstring_nocopy(dict, hubconnect, pin_hubconnect);
 	prop_dictionary_get_cstring_nocopy(dict, nint, pin_nint);
-	if (pin_nreset  pin_hubconnect  pin_nint) {
-		ok1 = exynos_gpio_pin_reserve(pin_nreset, nreset_pin);
-		ok2 = exynos_gpio_pin_reserve(pin_hubconnect, hubconnect_pin);
-		ok3 = exynos_gpio_pin_reserve(pin_nint, nint_pin);
-		if (!ok1)
-			aprint_error_dev(self,
-			can't reserve GPIO pin %s\n, pin_nreset);
-		if (!ok2)
-			aprint_error_dev(self,
-			can't reserve GPIO pin %s\n, pin_hubconnect);
-		if (!ok3)
-			aprint_error_dev(self,
-			can't reserve GPIO pin %s\n, pin_nint);
-		if (!(ok1  ok2  ok3))
-			return;
-
-		/* reset pin to zero */
-		exynos_gpio_pindata_write(nreset_pin, 0);
-		DELAY(1);
-
-		/* pull intn low */
-		exynos_gpio_pindata_ctl(nint_pin, GPIO_PIN_PULLDOWN);
-		DELAY(1);
-
-		/* set hubconnect low */
-		exynos_gpio_pindata_write(hubconnect_pin, 0);
-		DELAY(1);
-
-		/* reset pin up again, hub enters RefClk stage */
-		exynos_gpio_pindata_write(nreset_pin, 1);
-		DELAY(1);
-
-		/* set hubconnect high */
-		exynos_gpio_pindata_write(hubconnect_pin, 1);
-		DELAY(1);
-
-		/* release intn */
-		exynos_gpio_pindata_ctl(nint_pin, GPIO_PIN_TRISTATE);
-		DELAY(1);
-
-		/* DONE! */
-	} else {
+	if (!(pin_nreset  pin_hubconnect  pin_nint)) {
 		aprint_error_dev(self,
 			failed to lookup GPIO pins for usb3503 hub init);
+		return;
 	}
-	/* XXX leaving pins claimed! */
+
+	ok1 = exynos_gpio_pin_reserve(pin_nreset, nreset_pin);
+	ok2 = exynos_gpio_pin_reserve(pin_hubconnect, hubconnect_pin);
+	ok3 = exynos_gpio_pin_reserve(pin_nint, nint_pin);
+	if (!ok1)
+		aprint_error_dev(self,
+		can't reserve GPIO pin %s\n, pin_nreset);
+	if (!ok2)
+		aprint_error_dev(self,
+		can't reserve GPIO pin %s\n, pin_hubconnect);
+	if (!ok3)
+		aprint_error_dev(self,
+		can't reserve GPIO pin %s\n, pin_nint);
+	if (!(ok1  ok2  ok3))
+		return;
+
+	/* reset pin to zero */
+	exynos_gpio_pindata_write(nreset_pin, 0);
+	DELAY(1);
+
+	/* pull intn low */
+	exynos_gpio_pindata_ctl(nint_pin, GPIO_PIN_PULLDOWN);
+	DELAY(1);
+
+	/* set hubconnect low */
+	exynos_gpio_pindata_write(hubconnect_pin, 0);
+	DELAY(1);
+
+	/* reset pin up again, hub enters RefClk stage */
+	exynos_gpio_pindata_write(nreset_pin, 1);
+	DELAY(1);
+
+	/* set hubconnect high */
+	exynos_gpio_pindata_write(hubconnect_pin, 1);
+	DELAY(1);
+
+	/* release intn */
+	exynos_gpio_pindata_ctl(nint_pin, GPIO_PIN_TRISTATE);
+	DELAY(1);
+
+	/* DONE! */
 }
 
 



CVS commit: [netbsd-6-1] src/share/zoneinfo

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 21:20:58 UTC 2014

Added Files:
src/share/zoneinfo [netbsd-6-1]: NEWS backzone

Log Message:
Apply patch (requested by apb in ticket #1155):
Import tzdata2014g from ftp://ftp.iana.org/tz/releases/tzdata2014g.tar.gz
This includes changes for Turks  Caicos that will take effect on
2014-11-02, changes that affect times in the past, and some
re-organisation of the source files.  See src/share/zoneinfo/NEWS
for more details.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/share/zoneinfo/NEWS \
src/share/zoneinfo/backzone

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

Added files:

Index: src/share/zoneinfo/NEWS
diff -u /dev/null src/share/zoneinfo/NEWS:1.1.2.1
--- /dev/null	Sun Sep 21 21:20:58 2014
+++ src/share/zoneinfo/NEWS	Sun Sep 21 21:20:58 2014
@@ -0,0 +1,2825 @@
+News for the tz database
+
+Release 2014g - 2014-08-28 12:31:23 -0700
+
+  Changes affecting future time stamps
+
+Turks  Caicos is switching from US eastern time to UTC-4 year-round,
+modeled as a switch from EST/EDT to AST on 2014-11-02 at 02:00.
+
+  Changes affecting past time stamps
+
+Time in Russia or the USSR before 1926 or so has been corrected by
+a few seconds in the following zones: Asia/Irkutsk,
+Asia/Krasnoyarsk, Asia/Omsk, Asia/Samarkand, Asia/Tbilisi,
+Asia/Vladivostok, Asia/Yakutsk, Europe/Riga, Europe/Samara.  For
+Asia/Yekaterinburg the correction is a few minutes.  (Thanks to
+Vladimir Karpinsky.)
+
+The Portuguese decree of 1911-05-26 took effect on 1912-01-01.
+This affects 1911 time stamps in Africa/Bissau, Africa/Luanda,
+Atlantic/Azores, and Atlantic/Madeira.  Also, Lisbon's pre-1912
+GMT offset was -0:36:45 (rounded from -0:36:44.68), not -0:36:32.
+(Thanks to Stephen Colebourne for pointing to the decree.)
+
+Asia/Dhaka ended DST on 2009-12-31 at 24:00, not 23:59.
+
+A new file 'backzone' contains data which may appeal to
+connoisseurs of old time stamps, although it is out of scope for
+the tz database, is often poorly sourced, and contains some data
+that is known to be incorrect.  The new file is not recommended
+for ordinary use and its entries are not installed by default.
+(Thanks to Lester Caine for the high-quality Jersey, Guernsey, and
+Isle of Man entries.)
+
+Some more zones have been turned into links, when they differed
+from existing zones only for older time stamps.  As usual,
+these changes affect UTC offsets in pre-1970 time stamps only.
+Their old contents have been moved to the 'backzone' file.
+The affected zones are: Africa/Bangui, Africa/Brazzaville,
+Africa/Douala, Africa/Kinshasa, Africa/Libreville, Africa/Luanda,
+Africa/Malabo, Africa/Niamey, and Africa/Porto-Novo.
+
+  Changes affecting code
+
+Unless NETBSD_INSPIRED is defined to 0, the tz library now
+supplies functions for creating and using objects that represent
+time zones. The new functions are tzalloc, tzfree, localtime_rz,
+mktime_z, and (if STD_INSPIRED is also defined) posix2time_z and
+time2posix_z.  They are intended for performance: for example,
+localtime_rz (unlike localtime_r) is trivially thread-safe without
+locking.  (Thanks to Christos Zoulas for proposing NetBSD-inspired
+functions, and to Alan Barrett and Jonathan Lennox for helping to
+debug the change.)
+
+zdump now builds with the tz library unless USE_LTZ is defined to 0,
+This lets zdump use tz features even if the system library lacks them.
+To build zdump with the system library, use 'make CFLAGS=-DUSE_LTZ=0
+TZDOBJS=zdump.o CHECK_TIME_T_ALTERNATIVES='.
+
+zdump now uses localtime_rz if available, as it's significantly faster,
+and it can help zdump better diagnose invalid time zone names.
+Define HAVE_LOCALTIME_RZ to 0 to suppress this.  HAVE_LOCALTIME_RZ
+defaults to 1 if NETBSD_INSPIRED  USE_LTZ.  When localtime_rz is
+not available, zdump now uses localtime_r and tzset if available,
+as this is a bit cleaner and faster than plain localtime.  Compile
+with -DHAVE_LOCALTIME_R=0 and/or -DHAVE_TZSET=0 if your system
+lacks these two functions.
+
+If THREAD_SAFE is defined to 1, the tz library is now thread-safe.
+Although not needed for tz's own applications, which are single-threaded,
+this supports POSIX better if the tz library is used in multithreaded apps.
+
+Some crashes have been fixed when zdump or the tz library is given
+invalid or outlandish input.
+
+The tz library no longer mishandles leap seconds on platforms with
+unsigned time_t in time zones that lack ordinary transitions after 1970.
+
+The tz code now attempts to infer TM_GMTOFF and TM_ZONE if not
+already defined, to make it easier to configure on common platforms.
+Define NO_TM_GMTOFF and NO_TM_ZONE 

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

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 21:27:30 UTC 2014

Modified Files:
src/doc [netbsd-6-1]: CHANGES-6.1.5

Log Message:
1155


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.25 -r1.1.2.26 src/doc/CHANGES-6.1.5

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.1.5
diff -u src/doc/CHANGES-6.1.5:1.1.2.25 src/doc/CHANGES-6.1.5:1.1.2.26
--- src/doc/CHANGES-6.1.5:1.1.2.25	Sat Sep 13 17:56:51 2014
+++ src/doc/CHANGES-6.1.5	Sun Sep 21 21:27:30 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1.5,v 1.1.2.25 2014/09/13 17:56:51 snj Exp $
+# $NetBSD: CHANGES-6.1.5,v 1.1.2.26 2014/09/21 21:27:30 snj Exp $
 
 A complete list of changes from the NetBSD 6.1.4 release to the NetBSD 6.1.5
 release:
@@ -1311,3 +1311,22 @@ sys/dev/pci/pci_usrreq.c			1.26
 	kassert.
 	[riastradh, ticket #1124]
 
+doc/3RDPARTY	patch 
+share/zoneinfo/NEWSpatch
+share/zoneinfo/africapatch
+share/zoneinfo/antarctica			patch
+share/zoneinfo/asiapatch
+share/zoneinfo/australasia			patch
+share/zoneinfo/backwardpatch
+share/zoneinfo/backzonepatch
+share/zoneinfo/europepatch
+share/zoneinfo/leapseconds			patch
+share/zoneinfo/leapseconds.awk			patch
+share/zoneinfo/northamerica			patch
+share/zoneinfo/southamerica			patch
+share/zoneinfo/zone.tabpatch
+share/zoneinfo/zone1970.tab			patch
+
+	Update to tzdata2014g.
+	[apb, ticket #1155]
+



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

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 21:27:49 UTC 2014

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

Log Message:
1155


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.25 -r1.1.2.26 src/doc/CHANGES-6.0.6

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.6
diff -u src/doc/CHANGES-6.0.6:1.1.2.25 src/doc/CHANGES-6.0.6:1.1.2.26
--- src/doc/CHANGES-6.0.6:1.1.2.25	Sat Sep 13 17:55:10 2014
+++ src/doc/CHANGES-6.0.6	Sun Sep 21 21:27:49 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.6,v 1.1.2.25 2014/09/13 17:55:10 snj Exp $
+# $NetBSD: CHANGES-6.0.6,v 1.1.2.26 2014/09/21 21:27:49 snj Exp $
 
 A complete list of changes from the NetBSD 6.0.5 release to the NetBSD 6.0.6
 release:
@@ -1311,3 +1311,22 @@ sys/dev/pci/pci_usrreq.c			1.26
 	kassert.
 	[riastradh, ticket #1124]
 
+doc/3RDPARTY	patch 
+share/zoneinfo/NEWSpatch
+share/zoneinfo/africapatch
+share/zoneinfo/antarctica			patch
+share/zoneinfo/asiapatch
+share/zoneinfo/australasia			patch
+share/zoneinfo/backwardpatch
+share/zoneinfo/backzonepatch
+share/zoneinfo/europepatch
+share/zoneinfo/leapseconds			patch
+share/zoneinfo/leapseconds.awk			patch
+share/zoneinfo/northamerica			patch
+share/zoneinfo/southamerica			patch
+share/zoneinfo/zone.tabpatch
+share/zoneinfo/zone1970.tab			patch
+
+	Update to tzdata2014g.
+	[apb, ticket #1155]
+



CVS commit: [netbsd-6] src/doc

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 21:29:57 UTC 2014

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

Log Message:
1155


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.133 -r1.1.2.134 src/doc/CHANGES-6.2

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.2
diff -u src/doc/CHANGES-6.2:1.1.2.133 src/doc/CHANGES-6.2:1.1.2.134
--- src/doc/CHANGES-6.2:1.1.2.133	Sat Sep 13 17:55:23 2014
+++ src/doc/CHANGES-6.2	Sun Sep 21 21:29:57 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.133 2014/09/13 17:55:23 snj Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.134 2014/09/21 21:29:57 snj Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -3744,3 +3744,22 @@ sys/dev/pci/pci_usrreq.c			1.26
 	Reject unaligned PCI config register ioctl requests before we kassert.
 	[riastradh, ticket #1124]
 
+doc/3RDPARTY	patch 
+share/zoneinfo/NEWSpatch
+share/zoneinfo/africapatch
+share/zoneinfo/antarctica			patch
+share/zoneinfo/asiapatch
+share/zoneinfo/australasia			patch
+share/zoneinfo/backwardpatch
+share/zoneinfo/backzonepatch
+share/zoneinfo/europepatch
+share/zoneinfo/leapseconds			patch
+share/zoneinfo/leapseconds.awk			patch
+share/zoneinfo/northamerica			patch
+share/zoneinfo/southamerica			patch
+share/zoneinfo/zone.tabpatch
+share/zoneinfo/zone1970.tab			patch
+
+	Update to tzdata2014g.
+	[apb, ticket #1155]
+



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

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Sep 21 22:04:16 UTC 2014

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

Log Message:
Fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/doc/CHANGES-6.0.6

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.6
diff -u src/doc/CHANGES-6.0.6:1.1.2.26 src/doc/CHANGES-6.0.6:1.1.2.27
--- src/doc/CHANGES-6.0.6:1.1.2.26	Sun Sep 21 21:27:49 2014
+++ src/doc/CHANGES-6.0.6	Sun Sep 21 22:04:16 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.6,v 1.1.2.26 2014/09/21 21:27:49 snj Exp $
+# $NetBSD: CHANGES-6.0.6,v 1.1.2.27 2014/09/21 22:04:16 snj Exp $
 
 A complete list of changes from the NetBSD 6.0.5 release to the NetBSD 6.0.6
 release:
@@ -657,7 +657,7 @@ libexec/httpd/small/Makefile			1.2
 sys/kern/kern_core.c1.23
 
 	Fix a read-beyond-end string read.
-	[maxt, ticket #1097]
+	[maxv, ticket #1097]
 
 sys/kern/sys_module.c1.15
 



CVS commit: [netbsd-6-1] src

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Sep 22 00:15:09 UTC 2014

Modified Files:
src/distrib/notes/common [netbsd-6-1]: main
src/doc [netbsd-6-1]: CHANGES-6.1.5
src/sys/sys [netbsd-6-1]: param.h

Log Message:
Welcome to 6.1.5!


To generate a diff of this commit:
cvs rdiff -u -r1.484.2.6.2.8 -r1.484.2.6.2.9 src/distrib/notes/common/main
cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/doc/CHANGES-6.1.5
cvs rdiff -u -r1.408.2.12.2.10 -r1.408.2.12.2.11 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/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.484.2.6.2.8 src/distrib/notes/common/main:1.484.2.6.2.9
--- src/distrib/notes/common/main:1.484.2.6.2.8	Sat Apr 12 21:30:55 2014
+++ src/distrib/notes/common/main	Mon Sep 22 00:15:09 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.484.2.6.2.8 2014/04/12 21:30:55 snj Exp $
+.\	$NetBSD: main,v 1.484.2.6.2.9 2014/09/22 00:15:09 snj Exp $
 .\
 .\ Copyright (c) 1999-2012 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -50,7 +50,7 @@
 .as MACHINE_LIST  sgimips shark sparc sparc64 sun2 sun3 vax x68k xen zaurus .
 .so \*[.CURDIR]/../common/macros
 .
-.Dd April 12, 2014
+.Dd September 22, 2014
 .Dt INSTALL 8
 .Os NetBSD
 .Sh NAME
@@ -458,48 +458,122 @@ possible, it's likely that
 wouldn't exist.
 .
 .if \n[FOR_RELEASE] \{\
-.Ss Changes Between The NetBSD 6.1.3 and 6.1.4 Releases
+.Ss Changes Between The NetBSD 6.1.4 and 6.1.5 Releases
 .Pp
 .Nx
 \*V
-is the fourth critical/security update of the NetBSD 6.1 release branch.
+is the fifth critical/security update of the NetBSD 6.1 release branch.
 It represents a selected subset of fixes deemed critical for security
 or stability reasons.
 .Pp
 The complete list of changes can be found in the
-CHANGES-6.1.4:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/NetBSD-6.1.4/CHANGES-6.1.4
-file in the top level directory of the NetBSD 6.1.4 release tree.
+CHANGES-6.1.5:
+.Lk http://ftp.NetBSD.org/pub/NetBSD/NetBSD-6.1.5/CHANGES-6.1.5
+file in the top level directory of the NetBSD 6.1.5 release tree.
 An abbreviated list is as follows:
 .Ss2 Security Advisory Fixes
 .(bullet
-NetBSD-SA2014-003:
-.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-003.txt.asc
-posix_spawn unbounded kernel memory allocation
-.It
-NetBSD-SA2014-004:
-.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-004.txt.asc
-OpenSSL information disclosure (heartbleed)
+NetBSD-SA2014-005:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-005.txt.asc
+libXfont multiple vulnerabilities
+.It
+NetBSD-SA2014-006:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-006.txt.asc
+Multiple OpenSSL vulnerabilities
+.It
+NetBSD-SA2014-007:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-007.txt.asc
+bozohttpd basic http authentication bypass
+.It
+NetBSD-SA2014-008:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-008.txt.asc
+Multiple OpenSSL vulnerabilities
+.It
+NetBSD-SA2014-009:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-009.txt.asc
+Multiple vulnerabilities in the execve system call
+.It
+NetBSD-SA2014-010:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-010.txt.asc
+Multiple vulnerabilities in the compatibility layers
+.It
+NetBSD-SA2014-011:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-011.txt.asc
+User-controlled memory allocation in the modctl system call
+.It
+NetBSD-SA2014-012:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-012.txt.asc
+Memory leak in the setsockopt system call
 .bullet)
 .
 .Pp
-Advisories prior to NetBSD-SA2014-003 do not affect
-NetBSD 6.1.4:
-.Lk http://www.NetBSD.org/support/security/patches-6.1.4.html .
+Advisories prior to NetBSD-SA2014-005 do not affect
+NetBSD 6.1.5:
+.Lk http://www.NetBSD.org/support/security/patches-6.1.5.html .
 .Ss2 Other Security Fixes
 .(bullet
-OpenSSL: CVE-2014-0076
+Fix various issues in the mount syscall, which could be used by a local user to panic the system.
+.It
+OpenPAM: Fix incorrect error handling in PAM policy parser.
+CVE-2014-3879.
+.bullet)
+.
+.Ss2 Kernel
+.(bullet
+.Xr wm 4 :
+Bump max TX DMA size to avoid pathological condition with TSO.
+.It
+.Xr tap 4 :
+Fix a race.
+PR kern/47506 and kern/46199.
+.It
+.Xr urndis 4 :
+Fix a panic.
+.It
+.Xr vioif 4 :
+Fix a panic. PR kern/49007.
+.It
+Fix a mbuf leak in IPFilter.
+.It
+Fix two overflows and a memory corruption bug in ptyfs and umapfs.
+.It
+Reject unaligned PCI config register ioctl requests before we kassert.
 .bullet)
 .
 .Ss2 Miscellaneous
 .(bullet
-Fix memory leak on bogus ELF binary.
+heimdal: Fix file descriptor leak.
+Fixes PR lib/48718
+.It
+Update to tzdata2014g.
+.It
+Update bozohttpd to 20140708.
 .It
-veriexec: Avoid a use-after-free error.
+Update 

CVS commit: [netbsd-6-0] src

2014-09-21 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Sep 22 00:18:45 UTC 2014

Modified Files:
src/distrib/notes/common [netbsd-6-0]: main
src/doc [netbsd-6-0]: CHANGES-6.0.6
src/sys/sys [netbsd-6-0]: param.h

Log Message:
Welcome to 6.0.6!


To generate a diff of this commit:
cvs rdiff -u -r1.484.2.4.2.9 -r1.484.2.4.2.10 src/distrib/notes/common/main
cvs rdiff -u -r1.1.2.27 -r1.1.2.28 src/doc/CHANGES-6.0.6
cvs rdiff -u -r1.408.2.6.2.11 -r1.408.2.6.2.12 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/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.484.2.4.2.9 src/distrib/notes/common/main:1.484.2.4.2.10
--- src/distrib/notes/common/main:1.484.2.4.2.9	Sat Apr 12 20:12:38 2014
+++ src/distrib/notes/common/main	Mon Sep 22 00:18:45 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.484.2.4.2.9 2014/04/12 20:12:38 snj Exp $
+.\	$NetBSD: main,v 1.484.2.4.2.10 2014/09/22 00:18:45 snj Exp $
 .\
 .\ Copyright (c) 1999-2012 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -50,7 +50,7 @@
 .as MACHINE_LIST  sgimips shark sparc sparc64 sun2 sun3 vax x68k xen zaurus .
 .so \*[.CURDIR]/../common/macros
 .
-.Dd April 12, 2014
+.Dd September 22, 2014
 .Dt INSTALL 8
 .Os NetBSD
 .Sh NAME
@@ -458,42 +458,123 @@ possible, it's likely that
 wouldn't exist.
 .
 .if \n[FOR_RELEASE] \{\
-.Ss Changes Between The NetBSD 6.0.4 and 6.0.5 Releases
+.Ss Changes Between The NetBSD 6.0.5 and 6.0.6 Releases
+.Pp
+.Nx
+\*V
+is the sixth critical/security update of the NetBSD 6.0 release branch.
+It represents a selected subset of fixes deemed critical for security
+or stability reasons.
 .Pp
 The complete list of changes can be found in the
-CHANGES-6.0.5:
-.Lk http://ftp.NetBSD.org/pub/NetBSD/NetBSD-6.0.5/CHANGES-6.0.5
-file in the top level directory of the NetBSD 6.0.5 release tree.
+CHANGES-6.0.6:
+.Lk http://ftp.NetBSD.org/pub/NetBSD/NetBSD-6.0.6/CHANGES-6.0.6
+file in the top level directory of the NetBSD 6.0.6 release tree.
 An abbreviated list is as follows:
 .Ss2 Security Advisory Fixes
 .(bullet
-NetBSD-SA2014-003:
-.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-003.txt.asc
-posix_spawn unbounded kernel memory allocation
-.It
-NetBSD-SA2014-004:
-.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-004.txt.asc
-OpenSSL information disclosure (heartbleed)
+NetBSD-SA2014-005:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-005.txt.asc
+libXfont multiple vulnerabilities
+.It
+NetBSD-SA2014-006:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-006.txt.asc
+Multiple OpenSSL vulnerabilities
+.It
+NetBSD-SA2014-007:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-007.txt.asc
+bozohttpd basic http authentication bypass
+.It
+NetBSD-SA2014-008:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-008.txt.asc
+Multiple OpenSSL vulnerabilities
+.It
+NetBSD-SA2014-009:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-009.txt.asc
+Multiple vulnerabilities in the execve system call
+.It
+NetBSD-SA2014-010:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-010.txt.asc
+Multiple vulnerabilities in the compatibility layers
+.It
+NetBSD-SA2014-011:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-011.txt.asc
+User-controlled memory allocation in the modctl system call
+.It
+NetBSD-SA2014-012:
+.Lk http://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2014-012.txt.asc
+Memory leak in the setsockopt system call
 .bullet)
 .
 .Pp
-Advisories prior to NetBSD-SA2014-003 do not affect
-NetBSD 6.0.5:
-.Lk http://www.NetBSD.org/support/security/patches-6.0.5.html .
+Advisories prior to NetBSD-SA2014-005 do not affect
+NetBSD 6.0.6:
+.Lk http://www.NetBSD.org/support/security/patches-6.0.6.html .
 .Ss2 Other Security Fixes
 .(bullet
-OpenSSL: CVE-2014-0076
+Fix various issues in the mount syscall, which could be used by a local user to panic the system.
+.It
+OpenPAM: Fix incorrect error handling in PAM policy parser.
+CVE-2014-3879.
+.bullet)
+.
+.Ss2 Kernel
+.(bullet
+.Xr wm 4 :
+Bump max TX DMA size to avoid pathological condition with TSO.
+.It
+.Xr tap 4 :
+Fix a race.
+PR kern/47506 and kern/46199.
+.It
+.Xr urndis 4 :
+Fix a panic.
+.It
+.Xr vioif 4 :
+Fix a panic.
+PR kern/49007.
+.It
+Fix a mbuf leak in IPFilter.
+.It
+Fix two overflows and a memory corruption bug in ptyfs and umapfs.
+.It
+Reject unaligned PCI config register ioctl requests before we kassert.
 .bullet)
 .
 .Ss2 Miscellaneous
 .(bullet
-Fix memory leak on bogus ELF binary.
+heimdal: Fix file descriptor leak.
+Fixes PR lib/48718
+.It
+Update to tzdata2014g.
 .It
-veriexec: Avoid a use-after-free error.
+Update bozohttpd to 20140708.
 .It
-atari: Fix a kernel crash when a user tries to switch to a nonexistent terminal.