CVS commit: [netbsd-7] src/sys/dev/ic

2015-02-26 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Feb 27 07:19:22 UTC 2015

Modified Files:
src/sys/dev/ic [netbsd-7]: dwc_gmac.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #546):
sys/dev/ic/dwc_gmac.c: revision 1.32
Apply patch from FUKAUMI Naoki to fix ring buffer handling when the
ring fills completely.


To generate a diff of this commit:
cvs rdiff -u -r1.24.2.6 -r1.24.2.7 src/sys/dev/ic/dwc_gmac.c

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

Modified files:

Index: src/sys/dev/ic/dwc_gmac.c
diff -u src/sys/dev/ic/dwc_gmac.c:1.24.2.6 src/sys/dev/ic/dwc_gmac.c:1.24.2.7
--- src/sys/dev/ic/dwc_gmac.c:1.24.2.6	Tue Feb  3 08:11:21 2015
+++ src/sys/dev/ic/dwc_gmac.c	Fri Feb 27 07:19:22 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_gmac.c,v 1.24.2.6 2015/02/03 08:11:21 bouyer Exp $ */
+/* $NetBSD: dwc_gmac.c,v 1.24.2.7 2015/02/27 07:19:22 snj Exp $ */
 
 /*-
  * Copyright (c) 2013, 2014 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(1, $NetBSD: dwc_gmac.c,v 1.24.2.6 2015/02/03 08:11:21 bouyer Exp $);
+__KERNEL_RCSID(1, $NetBSD: dwc_gmac.c,v 1.24.2.7 2015/02/27 07:19:22 snj Exp $);
 
 /* #define	DWC_GMAC_DEBUG	1 */
 
@@ -803,6 +803,10 @@ dwc_gmac_start(struct ifnet *ifp)
 		}
 		IFQ_DEQUEUE(ifp-if_snd, m0);
 		bpf_mtap(ifp, m0);
+		if (sc-sc_txq.t_queued == AWGE_TX_RING_COUNT) {
+			ifp-if_flags |= IFF_OACTIVE;
+			break;
+		}
 	}
 
 	if (sc-sc_txq.t_queued != old) {
@@ -847,7 +851,7 @@ dwc_gmac_queue(struct dwc_gmac_softc *sc
 	struct dwc_gmac_dev_dmadesc *desc = NULL;
 	struct dwc_gmac_tx_data *data = NULL;
 	bus_dmamap_t map;
-	uint32_t flags, len;
+	uint32_t flags, len, status;
 	int error, i, first;
 
 #ifdef DWC_GMAC_DEBUG
@@ -857,7 +861,6 @@ dwc_gmac_queue(struct dwc_gmac_softc *sc
 
 	first = sc-sc_txq.t_cur;
 	map = sc-sc_txq.t_data[first].td_map;
-	flags = 0;
 
 	error = bus_dmamap_load_mbuf(sc-sc_dmat, map, m0,
 	BUS_DMA_WRITE|BUS_DMA_NOWAIT);
@@ -867,21 +870,19 @@ dwc_gmac_queue(struct dwc_gmac_softc *sc
 		return error;
 	}
 
-	if (sc-sc_txq.t_queued + map-dm_nsegs = AWGE_TX_RING_COUNT) {
+	if (sc-sc_txq.t_queued + map-dm_nsegs  AWGE_TX_RING_COUNT) {
 		bus_dmamap_unload(sc-sc_dmat, map);
 		return ENOBUFS;
 	}
 
-	data = NULL;
 	flags = DDESC_CNTL_TXFIRST|DDESC_CNTL_TXCHAIN;
+	status = 0;
 	for (i = 0; i  map-dm_nsegs; i++) {
 		data = sc-sc_txq.t_data[sc-sc_txq.t_cur];
 		desc = sc-sc_txq.t_desc[sc-sc_txq.t_cur];
 
 		desc-ddesc_data = htole32(map-dm_segs[i].ds_addr);
-		len = __SHIFTIN(map-dm_segs[i].ds_len,DDESC_CNTL_SIZE1MASK);
-		if (i == map-dm_nsegs-1)
-			flags |= DDESC_CNTL_TXLAST|DDESC_CNTL_TXINT;
+		len = __SHIFTIN(map-dm_segs[i].ds_len, DDESC_CNTL_SIZE1MASK);
 
 #ifdef DWC_GMAC_DEBUG
 		aprint_normal_dev(sc-sc_dev, enqueing desc #%d data %08lx 
@@ -898,16 +899,14 @@ dwc_gmac_queue(struct dwc_gmac_softc *sc
 		 * Defer passing ownership of the first descriptor
 		 * until we are done.
 		 */
-		if (i)
-			desc-ddesc_status = htole32(DDESC_STATUS_OWNEDBYDEV);
+		desc-ddesc_status = htole32(status);
+		status |= DDESC_STATUS_OWNEDBYDEV;
 
 		sc-sc_txq.t_queued++;
 		sc-sc_txq.t_cur = TX_NEXT(sc-sc_txq.t_cur);
 	}
 
-	/* Pass first to device */
-	sc-sc_txq.t_desc[first].ddesc_status
-	= htole32(DDESC_STATUS_OWNEDBYDEV);
+	desc-ddesc_cntl |= htole32(DDESC_CNTL_TXLAST|DDESC_CNTL_TXINT);
 
 	data-td_m = m0;
 	data-td_active = map;
@@ -915,6 +914,10 @@ dwc_gmac_queue(struct dwc_gmac_softc *sc
 	bus_dmamap_sync(sc-sc_dmat, map, 0, map-dm_mapsize,
 	BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
 
+	/* Pass first to device */
+	sc-sc_txq.t_desc[first].ddesc_status =
+	htole32(DDESC_STATUS_OWNEDBYDEV);
+
 	return 0;
 }
 
@@ -969,21 +972,19 @@ dwc_gmac_ioctl(struct ifnet *ifp, u_long
 static void
 dwc_gmac_tx_intr(struct dwc_gmac_softc *sc)
 {
+	struct ifnet *ifp = sc-sc_ec.ec_if;
 	struct dwc_gmac_tx_data *data;
 	struct dwc_gmac_dev_dmadesc *desc;
-	uint32_t flags;
-	int i;
-
-	for (i = sc-sc_txq.t_next; sc-sc_txq.t_queued  0;
-	i = TX_NEXT(i), sc-sc_txq.t_queued--) {
+	uint32_t status;
+	int i, nsegs;
 
+	for (i = sc-sc_txq.t_next; sc-sc_txq.t_queued  0; i = TX_NEXT(i)) {
 #ifdef DWC_GMAC_DEBUG
 		aprint_normal_dev(sc-sc_dev,
 		dwc_gmac_tx_intr: checking desc #%d (t_queued: %d)\n,
 		i, sc-sc_txq.t_queued);
 #endif
 
-		desc = sc-sc_txq.t_desc[i];
 		/*
 		 * i+1 does not need to be a valid descriptor,
 		 * this is just a special notion to just sync
@@ -991,15 +992,18 @@ dwc_gmac_tx_intr(struct dwc_gmac_softc *
 		 */
 		dwc_gmac_txdesc_sync(sc, i, i+1,
 		BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
-		flags = le32toh(desc-ddesc_status);
 
-		if (flags  DDESC_STATUS_OWNEDBYDEV)
+		desc = sc-sc_txq.t_desc[i];
+		status = le32toh(desc-ddesc_status);
+		if (status  DDESC_STATUS_OWNEDBYDEV)
 			break;
 
 		data = sc-sc_txq.t_data[i];
 		if (data-td_m == NULL)
 			continue;
-		sc-sc_ec.ec_if.if_opackets++;
+
+		

CVS commit: [netbsd-7] src/doc

2015-02-26 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Feb 27 07:20:19 UTC 2015

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

Log Message:
546


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.212 -r1.1.2.213 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.212 src/doc/CHANGES-7.0:1.1.2.213
--- src/doc/CHANGES-7.0:1.1.2.212	Thu Feb 26 21:47:12 2015
+++ src/doc/CHANGES-7.0	Fri Feb 27 07:20:18 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.212 2015/02/26 21:47:12 snj Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.213 2015/02/27 07:20:18 snj Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -16099,3 +16099,8 @@ sys/external/bsd/acpica/dist/namespace/n
 	sync with upstream.
 	[chs, ticket #546]
 
+sys/dev/ic/dwc_gmac.c1.32
+
+	Fix ring buffer handling when the ring fills completely.
+	[martin, ticket #546]
+



CVS commit: src/tests/lib/libc/db

2015-02-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Feb 26 13:00:26 UTC 2015

Modified Files:
src/tests/lib/libc/db: t_db.sh

Log Message:
bsize_ffactor takes *very* long to complete on some slower machines (maybe
we should investigate?).
Bump timeout up to 1800 seconds (my hppa machine takes ~1100).


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/db/t_db.sh

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

Modified files:

Index: src/tests/lib/libc/db/t_db.sh
diff -u src/tests/lib/libc/db/t_db.sh:1.4 src/tests/lib/libc/db/t_db.sh:1.5
--- src/tests/lib/libc/db/t_db.sh:1.4	Mon Jul 29 10:43:15 2013
+++ src/tests/lib/libc/db/t_db.sh	Thu Feb 26 13:00:26 2015
@@ -1,4 +1,4 @@
-# $NetBSD: t_db.sh,v 1.4 2013/07/29 10:43:15 skrll Exp $
+# $NetBSD: t_db.sh,v 1.5 2015/02/26 13:00:26 martin Exp $
 #
 # Copyright (c) 2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -801,7 +801,7 @@ ffactor=$ffactor,nelem=25000,cachesize=6
 atf_test_case bsize_ffactor
 bsize_ffactor_head()
 {
-	atf_set timeout 480
+	atf_set timeout 1800
 	atf_set descr Checks hash database with various \
 	bucketsizes and fill factors
 }



CVS commit: src/sys

2015-02-26 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Feb 26 12:58:37 UTC 2015

Modified Files:
src/sys/netinet: in.c
src/sys/netinet6: in6.c

Log Message:
Don't add local routes for the any address or p2p addresses where the address 
matches the destination.


To generate a diff of this commit:
cvs rdiff -u -r1.150 -r1.151 src/sys/netinet/in.c
cvs rdiff -u -r1.184 -r1.185 src/sys/netinet6/in6.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/netinet/in.c
diff -u src/sys/netinet/in.c:1.150 src/sys/netinet/in.c:1.151
--- src/sys/netinet/in.c:1.150	Thu Feb 26 09:54:46 2015
+++ src/sys/netinet/in.c	Thu Feb 26 12:58:36 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: in.c,v 1.150 2015/02/26 09:54:46 roy Exp $	*/
+/*	$NetBSD: in.c,v 1.151 2015/02/26 12:58:36 roy Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: in.c,v 1.150 2015/02/26 09:54:46 roy Exp $);
+__KERNEL_RCSID(0, $NetBSD: in.c,v 1.151 2015/02/26 12:58:36 roy Exp $);
 
 #include opt_inet.h
 #include opt_inet_conf.h
@@ -606,6 +606,16 @@ in_control(struct socket *so, u_long cmd
 static void
 in_ifaddlocal(struct ifaddr *ifa)
 {
+	struct in_ifaddr *ia;
+
+	ia = (struct in_ifaddr *)ifa;
+	if (ia-ia_addr.sin_addr.s_addr == INADDR_ANY ||
+	(ia-ia_ifp-if_flags  IFF_POINTOPOINT 
+	in_hosteq(ia-ia_dstaddr.sin_addr, ia-ia_addr.sin_addr)))
+	{
+		rt_newaddrmsg(RTM_NEWADDR, ifa, 0, NULL);
+		return;
+	}
 
 	rt_ifa_addlocal(ifa);
 }

Index: src/sys/netinet6/in6.c
diff -u src/sys/netinet6/in6.c:1.184 src/sys/netinet6/in6.c:1.185
--- src/sys/netinet6/in6.c:1.184	Thu Feb 26 09:54:46 2015
+++ src/sys/netinet6/in6.c	Thu Feb 26 12:58:36 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6.c,v 1.184 2015/02/26 09:54:46 roy Exp $	*/
+/*	$NetBSD: in6.c,v 1.185 2015/02/26 12:58:36 roy Exp $	*/
 /*	$KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: in6.c,v 1.184 2015/02/26 09:54:46 roy Exp $);
+__KERNEL_RCSID(0, $NetBSD: in6.c,v 1.185 2015/02/26 12:58:36 roy Exp $);
 
 #include opt_inet.h
 #include opt_compat_netbsd.h
@@ -155,6 +155,14 @@ void
 in6_ifaddlocal(struct ifaddr *ifa)
 {
 
+	if (IN6_ARE_ADDR_EQUAL(IFA_IN6(ifa), in6addr_any) ||
+	(ifa-ifa_ifp-if_flags  IFF_POINTOPOINT 
+	IN6_ARE_ADDR_EQUAL(IFA_IN6(ifa), IFA_DSTIN6(ifa
+	{
+		rt_newaddrmsg(RTM_NEWADDR, ifa, 0, NULL);
+		return;
+	}
+
 	rt_ifa_addlocal(ifa);
 }
 



CVS commit: src/sys/dev/ic

2015-02-26 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Thu Feb 26 16:07:11 UTC 2015

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

Log Message:
Stop the interface before detaching to avoid the race between
tlp_detach() and tlp_intr().

While there, add missing callout_destroy()s.


To generate a diff of this commit:
cvs rdiff -u -r1.184 -r1.185 src/sys/dev/ic/tulip.c

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

Modified files:

Index: src/sys/dev/ic/tulip.c
diff -u src/sys/dev/ic/tulip.c:1.184 src/sys/dev/ic/tulip.c:1.185
--- src/sys/dev/ic/tulip.c:1.184	Sun Aug 10 16:44:35 2014
+++ src/sys/dev/ic/tulip.c	Thu Feb 26 16:07:10 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tulip.c,v 1.184 2014/08/10 16:44:35 tls Exp $	*/
+/*	$NetBSD: tulip.c,v 1.185 2015/02/26 16:07:10 nakayama Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tulip.c,v 1.184 2014/08/10 16:44:35 tls Exp $);
+__KERNEL_RCSID(0, $NetBSD: tulip.c,v 1.185 2015/02/26 16:07:10 nakayama Exp $);
 
 
 #include sys/param.h
@@ -592,7 +592,7 @@ tlp_detach(struct tulip_softc *sc)
 	struct tulip_rxsoft *rxs;
 	struct tulip_txsoft *txs;
 	device_t self = sc-sc_dev;
-	int i;
+	int i, s;
 
 	/*
 	 * Succeed now if there isn't any work to do.
@@ -600,9 +600,14 @@ tlp_detach(struct tulip_softc *sc)
 	if ((sc-sc_flags  TULIPF_ATTACHED) == 0)
 		return (0);
 
-	/* Unhook our tick handler. */
-	if (sc-sc_tick)
-		callout_stop(sc-sc_tick_callout);
+	s = splnet();
+	/* Stop the interface. Callouts are stopped in it. */
+	tlp_stop(ifp, 1);
+	splx(s);
+
+	/* Destroy our callouts. */
+	callout_destroy(sc-sc_nway_callout);
+	callout_destroy(sc-sc_tick_callout);
 
 	if (sc-sc_flags  TULIPF_HAS_MII) {
 		/* Detach all PHYs */



CVS commit: src/sys/sys

2015-02-26 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Feb 26 15:01:53 UTC 2015

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

Log Message:
lib/49696: Circular dependency and namespace pollution by sys/bswap.h
including sys/types.h for no good reason. Restrict to sys/stdint.h.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/sys/bswap.h

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

Modified files:

Index: src/sys/sys/bswap.h
diff -u src/sys/sys/bswap.h:1.17 src/sys/sys/bswap.h:1.18
--- src/sys/sys/bswap.h:1.17	Wed Dec  3 18:33:02 2014
+++ src/sys/sys/bswap.h	Thu Feb 26 15:01:53 2015
@@ -1,4 +1,4 @@
-/*  $NetBSD: bswap.h,v 1.17 2014/12/03 18:33:02 joerg Exp $  */
+/*  $NetBSD: bswap.h,v 1.18 2015/02/26 15:01:53 joerg Exp $  */
 
 /* Written by Manuel Bouyer. Public domain */
 
@@ -6,8 +6,7 @@
 #define _SYS_BSWAP_H_
 
 #ifndef _LOCORE
-#include sys/cdefs.h
-#include sys/types.h
+#include sys/stdint.h
 
 #include machine/bswap.h
 



CVS commit: src/tests/net/icmp

2015-02-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Feb 26 13:03:21 UTC 2015

Modified Files:
src/tests/net/icmp: t_forward.c

Log Message:
Do not use artificial low timeouts - slow machines might be still paging
in all the rump environment. Bump timeout from 4 seconds to 20 (my shark
needs ~9).


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/net/icmp/t_forward.c

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

Modified files:

Index: src/tests/net/icmp/t_forward.c
diff -u src/tests/net/icmp/t_forward.c:1.8 src/tests/net/icmp/t_forward.c:1.9
--- src/tests/net/icmp/t_forward.c:1.8	Sun Mar 18 09:46:50 2012
+++ src/tests/net/icmp/t_forward.c	Thu Feb 26 13:03:21 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_forward.c,v 1.8 2012/03/18 09:46:50 jruoho Exp $	*/
+/*	$NetBSD: t_forward.c,v 1.9 2015/02/26 13:03:21 martin Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: t_forward.c,v 1.8 2012/03/18 09:46:50 jruoho Exp $);
+__RCSID($NetBSD: t_forward.c,v 1.9 2015/02/26 13:03:21 martin Exp $);
 #endif /* not lint */
 
 #include sys/types.h
@@ -129,7 +129,7 @@ ATF_TC_HEAD(returndatabytes, tc)
 
 	atf_tc_set_md_var(tc, descr, icmp.returndatabytes with certain 
 	packets can cause kernel panic (PR kern/43548));
-	atf_tc_set_md_var(tc, timeout, 4); /* just in case */
+	atf_tc_set_md_var(tc, timeout, 20); /* just in case */
 }
 
 ATF_TC_BODY(returndatabytes, tc)



CVS commit: src/tests/net/icmp

2015-02-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Feb 26 13:06:10 UTC 2015

Modified Files:
src/tests/net/icmp: t_ping.c

Log Message:
Bump timeout to 20 seconds for slower machines.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/tests/net/icmp/t_ping.c

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

Modified files:

Index: src/tests/net/icmp/t_ping.c
diff -u src/tests/net/icmp/t_ping.c:1.15 src/tests/net/icmp/t_ping.c:1.16
--- src/tests/net/icmp/t_ping.c:1.15	Tue Sep  4 22:31:58 2012
+++ src/tests/net/icmp/t_ping.c	Thu Feb 26 13:06:10 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ping.c,v 1.15 2012/09/04 22:31:58 alnsn Exp $	*/
+/*	$NetBSD: t_ping.c,v 1.16 2015/02/26 13:06:10 martin Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
 
 #include sys/cdefs.h
 #ifndef lint
-__RCSID($NetBSD: t_ping.c,v 1.15 2012/09/04 22:31:58 alnsn Exp $);
+__RCSID($NetBSD: t_ping.c,v 1.16 2015/02/26 13:06:10 martin Exp $);
 #endif /* not lint */
 
 #include sys/types.h
@@ -60,7 +60,7 @@ ATF_TC_HEAD(simpleping, tc)
 {
 
 	atf_tc_set_md_var(tc, descr, check that kernel responds to ping);
-	atf_tc_set_md_var(tc, timeout, 2);
+	atf_tc_set_md_var(tc, timeout, 20);
 }
 
 ATF_TC_BODY(simpleping, tc)
@@ -316,7 +316,7 @@ ATF_TC_HEAD(ping_of_death, tc)
 {
 
 	atf_tc_set_md_var(tc, descr, send a \ping of death\);
-	atf_tc_set_md_var(tc, timeout, 2);
+	atf_tc_set_md_var(tc, timeout, 20);
 }
 
 ATF_TC_BODY(ping_of_death, tc)



CVS commit: src/etc/etc.evbarm

2015-02-26 Thread KIYOHARA Takashi
Module Name:src
Committed By:   kiyohara
Date:   Thu Feb 26 14:00:17 UTC 2015

Modified Files:
src/etc/etc.evbarm: Makefile.inc

Log Message:
Add OVERO to v7 and v7hf.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/etc/etc.evbarm/Makefile.inc

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

Modified files:

Index: src/etc/etc.evbarm/Makefile.inc
diff -u src/etc/etc.evbarm/Makefile.inc:1.68 src/etc/etc.evbarm/Makefile.inc:1.69
--- src/etc/etc.evbarm/Makefile.inc:1.68	Tue Jan 27 20:26:34 2015
+++ src/etc/etc.evbarm/Makefile.inc	Thu Feb 26 14:00:17 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.68 2015/01/27 20:26:34 jmcneill Exp $
+#	$NetBSD: Makefile.inc,v 1.69 2015/02/26 14:00:17 kiyohara Exp $
 #
 #	etc.evbarm/Makefile.inc -- evbarm-specific etc Makefile targets
 #
@@ -104,7 +104,8 @@ EVBARM_BOARDS.armv7+=		NETWALKER
 EVBARM_BOARDS.armv7hf+=		NETWALKER
 EVBARM_BOARDS.armv7+=		OMAP5EVM
 EVBARM_BOARDS.armv7hf+=		OMAP5EVM
-#EVBARM_BOARDS.armv7+=		OVERO
+EVBARM_BOARDS.armv7+=		OVERO
+EVBARM_BOARDS.armv7hf+=		OVERO
 EVBARM_BOARDS.armv7+=		PANDABOARD
 EVBARM_BOARDS.armv7hf+= 	PANDABOARD
 EVBARM_BOARDS.armv7+=		KOBO



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

2015-02-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Feb 26 14:10:14 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915: i915_gem.c

Log Message:
Fix returned timeout in wait_seqno: remaining time, not time slept.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.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_gem.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.19 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.20
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.19	Tue Dec 30 09:58:53 2014
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c	Thu Feb 26 14:10:14 2015
@@ -1441,8 +1441,22 @@ __wait_seqno(struct intel_ring_buffer *r
 
 	if (!irq_test_in_progress)
 		ring-irq_put(ring);
-	if (timeout)
-		timespecsub(after, before, timeout);
+	if (timeout) {
+		struct timespec slept;
+
+		/* Compute slept = after - before.  */
+		timespecsub(after, before, slept);
+
+		/*
+		 * Return the time remaining, timeout - slept, if we
+		 * slept for less time than the timeout; or zero if we
+		 * timed out.
+		 */
+		if (timespeccmp(slept, timeout, ))
+			timespecsub(timeout, slept, timeout);
+		else
+			timespecclear(timeout);
+	}
 	return MAX(ret, 0);	/* ignore remaining ticks */
 }
 #else



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

2015-02-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Feb 26 19:43:43 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915: i915_gem.c

Log Message:
Fix return code of __wait_seqno.

MAX(ret, 0) is 0 if ret is negative, but if ret is negative we want
to return that negative value, meaning error.  Should've been
MIN(ret, 0), but I'll just rewrite it to clarify a wee bit.

If the GPU reset, call i915_gem_check_wedge and always return failure
like Linux does.  Caller must retry in that case.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.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_gem.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.20 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.21
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.20	Thu Feb 26 14:10:14 2015
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c	Thu Feb 26 19:43:43 2015
@@ -1457,7 +1457,15 @@ __wait_seqno(struct intel_ring_buffer *r
 		else
 			timespecclear(timeout);
 	}
-	return MAX(ret, 0);	/* ignore remaining ticks */
+	if (wedged) {		/* GPU reset while we were waiting.  */
+		ret = i915_gem_check_wedge(dev_priv-gpu_error,
+		interruptible);
+		if (ret == 0)
+			ret = -EAGAIN;
+	}
+	if (ret  0)		/* Failure.  */
+		return ret;
+	return 0;		/* Success, possibly with time to spare.  */
 }
 #else
 static int __wait_seqno(struct intel_ring_buffer *ring, u32 seqno,



CVS commit: xsrc/external/mit/xorg-server/dist/hw/xfree86/common

2015-02-26 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Thu Feb 26 21:16:16 UTC 2015

Modified Files:
xsrc/external/mit/xorg-server/dist/hw/xfree86/common: xf86Config.c

Log Message:
don't look for _drv.o files.  we haven't built any since the bad old days
when all the world was xfree86.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Config.c

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

Modified files:

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Config.c
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Config.c:1.11 xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Config.c:1.12
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Config.c:1.11	Sun Jan 25 21:45:44 2015
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Config.c	Thu Feb 26 21:16:16 2015
@@ -528,7 +528,7 @@ GenerateDriverlist(char * dirname)
 {
 char **ret;
 const char *subdirs[] = { dirname, NULL };
-static const char *patlist[] = {(.*)_drv\\.so$, (.*)_drv\\.o$, NULL};
+static const char *patlist[] = {(.*)_drv\\.so$, NULL};
 ret = LoaderListDirs(subdirs, patlist);
 
 /* fix up the probe order for video drivers */



CVS commit: xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bus

2015-02-26 Thread Soren Jacobsen
Module Name:xsrc
Committed By:   snj
Date:   Thu Feb 26 21:30:00 UTC 2015

Modified Files:
xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bus: Pci.h

Log Message:
we've been happily using bsdPciInit since xorg was first imported.
remove local changes that were only relevant in the xfree86 days.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bus/Pci.h

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

Modified files:

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bus/Pci.h
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bus/Pci.h:1.7 xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bus/Pci.h:1.8
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bus/Pci.h:1.7	Tue Aug  2 07:15:04 2011
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bus/Pci.h	Thu Feb 26 21:30:00 2015
@@ -148,14 +148,8 @@
 #endif /* defined(linux) */
 
 #ifndef ARCH_PCI_INIT
-#if defined(__NetBSD__)
-#  define ARCH_PCI_INIT netbsdPciInit
-#  define INCLUDE_XF86_MAP_PCI_MEM
-#  define INCLUDE_XF86_NO_DOMAIN
-#else
 #error No PCI support available for this architecture/OS combination
 #endif
-#endif
 
 extern void ARCH_PCI_INIT(void);
 



CVS commit: [netbsd-7] src/sys/external/bsd/acpica/dist/namespace

2015-02-26 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Feb 26 21:45:29 UTC 2015

Modified Files:
src/sys/external/bsd/acpica/dist/namespace [netbsd-7]: nsinit.c

Log Message:
Pull up following revision(s) (requested by chs in ticket #546):
sys/external/bsd/acpica/dist/namespace/nsinit.c: revision 1.7
revert rev 1.5, which brings back PR 48494.
that earlier revision itself reverted an upstream bugfix,
and that change fixed some systems but broke others
(in particular, it broke my HP Z800 workstation.)
this latest revision brings us back in sync with upstream.
the current upstream (and this latest flip-flop of our copy)
is clearly correct, since it zeros a buffer which is intended
to be used as scratch space for a single acpica operation.
agreed by christos and ryoon back in april 2014.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.4.1 \
src/sys/external/bsd/acpica/dist/namespace/nsinit.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/acpica/dist/namespace/nsinit.c
diff -u src/sys/external/bsd/acpica/dist/namespace/nsinit.c:1.5 src/sys/external/bsd/acpica/dist/namespace/nsinit.c:1.5.4.1
--- src/sys/external/bsd/acpica/dist/namespace/nsinit.c:1.5	Sun Jan  5 15:45:43 2014
+++ src/sys/external/bsd/acpica/dist/namespace/nsinit.c	Thu Feb 26 21:45:28 2015
@@ -618,10 +618,7 @@ AcpiNsInitOneDevice (
 ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (
 ACPI_TYPE_METHOD, DeviceNode, METHOD_NAME__INI));
 
-#if 0
-// https://bugs.acpica.org/show_bug.cgi?id=1016
 ACPI_MEMSET (Info, 0, sizeof (ACPI_EVALUATE_INFO));
-#endif
 Info-PrefixNode = DeviceNode;
 Info-RelativePathname = __UNCONST(METHOD_NAME__INI);
 Info-Parameters = NULL;



CVS commit: [netbsd-7] src/doc

2015-02-26 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Feb 26 21:47:12 UTC 2015

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

Log Message:
546


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.211 -r1.1.2.212 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.211 src/doc/CHANGES-7.0:1.1.2.212
--- src/doc/CHANGES-7.0:1.1.2.211	Tue Feb 24 10:53:54 2015
+++ src/doc/CHANGES-7.0	Thu Feb 26 21:47:12 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0,v 1.1.2.211 2015/02/24 10:53:54 martin Exp $
+# $NetBSD: CHANGES-7.0,v 1.1.2.212 2015/02/26 21:47:12 snj Exp $
 
 A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014
 until the 7.0 release:
@@ -16091,3 +16091,11 @@ sys/sys/syscallargs.h(regen)
 	Fix return type of the readlinkat(2) syscall.
 	[khorben, ticket #547]
 
+sys/external/bsd/acpica/dist/namespace/nsinit.c	1.7
+
+	Revert rev 1.5, which brings back PR 48494.  That earlier revision
+	itself reverted an upstream bugfix, and that change fixed some
+	systems but broke others.  This latest revision brings us back in
+	sync with upstream.
+	[chs, ticket #546]
+



CVS commit: src/external/cddl/osnet/dev

2015-02-26 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Feb 26 09:10:53 UTC 2015

Modified Files:
src/external/cddl/osnet/dev/dtrace: dtrace_modevent.c dtrace_unload.c
src/external/cddl/osnet/dev/fbt: fbt.c
src/external/cddl/osnet/dev/sdt: sdt.c

Log Message:
Fix module unload of dtrace, sdt and fbt

- Don't unload when there are users of dtrace
- Forbid auto unloading (not supported for now)

PR 49695


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/cddl/osnet/dev/dtrace/dtrace_modevent.c
cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/dev/dtrace/dtrace_unload.c
cvs rdiff -u -r1.16 -r1.17 src/external/cddl/osnet/dev/fbt/fbt.c
cvs rdiff -u -r1.9 -r1.10 src/external/cddl/osnet/dev/sdt/sdt.c

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

Modified files:

Index: src/external/cddl/osnet/dev/dtrace/dtrace_modevent.c
diff -u src/external/cddl/osnet/dev/dtrace/dtrace_modevent.c:1.3 src/external/cddl/osnet/dev/dtrace/dtrace_modevent.c:1.4
--- src/external/cddl/osnet/dev/dtrace/dtrace_modevent.c:1.3	Sat Mar 13 22:31:15 2010
+++ src/external/cddl/osnet/dev/dtrace/dtrace_modevent.c	Thu Feb 26 09:10:52 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: dtrace_modevent.c,v 1.3 2010/03/13 22:31:15 christos Exp $	*/
+/*	$NetBSD: dtrace_modevent.c,v 1.4 2015/02/26 09:10:52 ozaki-r Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -29,6 +29,7 @@ static int
 dtrace_modcmd(modcmd_t cmd, void *data)
 {
 	int bmajor = -1, cmajor = -1;
+	int error;
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:
@@ -36,8 +37,12 @@ dtrace_modcmd(modcmd_t cmd, void *data)
 		return devsw_attach(dtrace, NULL, bmajor,
 		dtrace_cdevsw, cmajor);
 	case MODULE_CMD_FINI:
-		dtrace_unload();
+		error = dtrace_unload();
+		if (error != 0)
+			return error;
 		return devsw_detach(NULL, dtrace_cdevsw);
+	case MODULE_CMD_AUTOUNLOAD:
+		return EBUSY;
 	default:
 		return ENOTTY;
 	}

Index: src/external/cddl/osnet/dev/dtrace/dtrace_unload.c
diff -u src/external/cddl/osnet/dev/dtrace/dtrace_unload.c:1.5 src/external/cddl/osnet/dev/dtrace/dtrace_unload.c:1.6
--- src/external/cddl/osnet/dev/dtrace/dtrace_unload.c:1.5	Tue Jul 26 12:26:33 2011
+++ src/external/cddl/osnet/dev/dtrace/dtrace_unload.c	Thu Feb 26 09:10:52 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: dtrace_unload.c,v 1.5 2011/07/26 12:26:33 yamt Exp $	*/
+/*	$NetBSD: dtrace_unload.c,v 1.6 2015/02/26 09:10:52 ozaki-r Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -37,9 +37,7 @@ dtrace_unload()
 	mutex_enter(dtrace_lock);
 	mutex_enter(cpu_lock);
 
-	ASSERT(dtrace_opens == 0);
-
-	if (dtrace_helpers  0) {
+	if (dtrace_opens  0 || dtrace_helpers  0) {
 		mutex_exit(cpu_lock);
 		mutex_exit(dtrace_lock);
 		mutex_exit(dtrace_provider_lock);

Index: src/external/cddl/osnet/dev/fbt/fbt.c
diff -u src/external/cddl/osnet/dev/fbt/fbt.c:1.16 src/external/cddl/osnet/dev/fbt/fbt.c:1.17
--- src/external/cddl/osnet/dev/fbt/fbt.c:1.16	Sat Jul 26 04:54:20 2014
+++ src/external/cddl/osnet/dev/fbt/fbt.c	Thu Feb 26 09:10:52 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: fbt.c,v 1.16 2014/07/26 04:54:20 ryoon Exp $	*/
+/*	$NetBSD: fbt.c,v 1.17 2015/02/26 09:10:52 ozaki-r Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -2107,6 +2107,7 @@ static int
 fbt_modcmd(modcmd_t cmd, void *data)
 {
 	int bmajor = -1, cmajor = -1;
+	int error;
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:
@@ -2114,8 +2115,12 @@ fbt_modcmd(modcmd_t cmd, void *data)
 		return devsw_attach(fbt, NULL, bmajor,
 		fbt_cdevsw, cmajor);
 	case MODULE_CMD_FINI:
-		fbt_unload();
+		error = fbt_unload();
+		if (error != 0)
+			return error;
 		return devsw_detach(NULL, fbt_cdevsw);
+	case MODULE_CMD_AUTOUNLOAD:
+		return EBUSY;
 	default:
 		return ENOTTY;
 	}

Index: src/external/cddl/osnet/dev/sdt/sdt.c
diff -u src/external/cddl/osnet/dev/sdt/sdt.c:1.9 src/external/cddl/osnet/dev/sdt/sdt.c:1.10
--- src/external/cddl/osnet/dev/sdt/sdt.c:1.9	Sat Jul 26 04:54:20 2014
+++ src/external/cddl/osnet/dev/sdt/sdt.c	Thu Feb 26 09:10:53 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdt.c,v 1.9 2014/07/26 04:54:20 ryoon Exp $	*/
+/*	$NetBSD: sdt.c,v 1.10 2015/02/26 09:10:53 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -433,7 +433,7 @@ sdt_unload(void)
 			printf(%s: failed to unregister %s error = %d\n,
 			sdt_list[ind]-name, res);
 #endif
-			error = res;
+			return res;
 		} else {
 #ifdef SDT_DEBUG
 			printf(sdt: unregistered %s id = %d\n,
@@ -453,6 +453,7 @@ static int
 sdt_modcmd(modcmd_t cmd, void *data)
 {
 	int bmajor = -1, cmajor = -1;
+	int error;
 
 	switch (cmd) {
 	case MODULE_CMD_INIT:
@@ -460,8 +461,12 @@ sdt_modcmd(modcmd_t cmd, void *data)
 		return devsw_attach(sdt, NULL, bmajor,
 		sdt_cdevsw, cmajor);
 	case MODULE_CMD_FINI:
-		sdt_unload();
+		error = sdt_unload();
+		if (error != 0)
+			return error;
 		return devsw_detach(NULL, sdt_cdevsw);
+	case MODULE_CMD_AUTOUNLOAD:
+		return EBUSY;
 	default:
 		return ENOTTY;
 	}



CVS commit: src/sbin/route

2015-02-26 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Feb 26 09:56:11 UTC 2015

Modified Files:
src/sbin/route: route.8 route.c rtutil.c show.c

Log Message:
Teach route(8) about RTF_LOCAL.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sbin/route/route.8
cvs rdiff -u -r1.149 -r1.150 src/sbin/route/route.c
cvs rdiff -u -r1.4 -r1.5 src/sbin/route/rtutil.c
cvs rdiff -u -r1.46 -r1.47 src/sbin/route/show.c

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

Modified files:

Index: src/sbin/route/route.8
diff -u src/sbin/route/route.8:1.53 src/sbin/route/route.8:1.54
--- src/sbin/route/route.8:1.53	Mon Dec  1 20:30:27 2014
+++ src/sbin/route/route.8	Thu Feb 26 09:56:11 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: route.8,v 1.53 2014/12/01 20:30:27 christos Exp $
+.\	$NetBSD: route.8,v 1.54 2015/02/26 09:56:11 roy Exp $
 .\
 .\ Copyright (c) 1983, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\ @(#)route.8	8.4 (Berkeley) 6/1/94
 .\
-.Dd December 1, 2014
+.Dd February 26, 2015
 .Dt ROUTE 8
 .Os
 .Sh NAME
@@ -304,6 +304,7 @@ by indicating the following correspondin
 .It Li G Ta  Ta  RTF_GATEWAY Ta forwarded to dest by intermediary
 .It Li H Ta  Ta  RTF_HOST Ta host entry (net otherwise)
 .It Li L Ta -llinfo Ta  RTF_LLINFO Ta translate proto to link addr
+.It Li l Ta  Ta  RTF_LOCAL Ta Route represents a local address
 .It Li M Ta  Ta  RTF_MODIFIED Ta modified dynamically (redirect)
 .It Li p Ta -proxy Ta  RTF_ANNOUNCE Ta make entry a link level proxy
 .It Li R Ta -reject Ta  RTF_REJECT Ta send ICMP unreachable on match

Index: src/sbin/route/route.c
diff -u src/sbin/route/route.c:1.149 src/sbin/route/route.c:1.150
--- src/sbin/route/route.c:1.149	Sat Dec 20 13:15:48 2014
+++ src/sbin/route/route.c	Thu Feb 26 09:56:11 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.149 2014/12/20 13:15:48 prlw1 Exp $	*/
+/*	$NetBSD: route.c,v 1.150 2015/02/26 09:56:11 roy Exp $	*/
 
 /*
  * Copyright (c) 1983, 1989, 1991, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = @(#)route.c	8.6 (Berkeley) 4/28/95;
 #else
-__RCSID($NetBSD: route.c,v 1.149 2014/12/20 13:15:48 prlw1 Exp $);
+__RCSID($NetBSD: route.c,v 1.150 2015/02/26 09:56:11 roy Exp $);
 #endif
 #endif /* not lint */
 
@@ -1292,7 +1292,7 @@ const char * const msgtypes[] = {
 const char metricnames[] =
 \011pksent\010rttvar\7rtt\6ssthresh\5sendpipe\4recvpipe\3expire\2hopcount\1mtu;
 const char routeflags[] =
-\1UP\2GATEWAY\3HOST\4REJECT\5DYNAMIC\6MODIFIED\7DONE\010MASK_PRESENT\011CLONING\012XRESOLVE\013LLINFO\014STATIC\015BLACKHOLE\016CLONED\017PROTO2\020PROTO1;
+\1UP\2GATEWAY\3HOST\4REJECT\5DYNAMIC\6MODIFIED\7DONE\010MASK_PRESENT\011CLONING\012XRESOLVE\013LLINFO\014STATIC\015BLACKHOLE\016CLONED\017PROTO2\020PROTO1\023LOCAL;
 const char ifnetflags[] =
 \1UP\2BROADCAST\3DEBUG\4LOOPBACK\5PTP\6NOTRAILERS\7RUNNING\010NOARP\011PPROMISC\012ALLMULTI\013OACTIVE\014SIMPLEX\015LINK0\016LINK1\017LINK2\020MULTICAST;
 const char addrnames[] =

Index: src/sbin/route/rtutil.c
diff -u src/sbin/route/rtutil.c:1.4 src/sbin/route/rtutil.c:1.5
--- src/sbin/route/rtutil.c:1.4	Wed Jan  7 22:38:32 2015
+++ src/sbin/route/rtutil.c	Thu Feb 26 09:56:11 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtutil.c,v 1.4 2015/01/07 22:38:32 christos Exp $	*/
+/*	$NetBSD: rtutil.c,v 1.5 2015/02/26 09:56:11 roy Exp $	*/
 /*	$OpenBSD: show.c,v 1.1 2006/05/27 19:16:37 claudio Exp $	*/
 
 /*
@@ -92,6 +92,7 @@ static const struct bits bits[] = {
 	{ RTF_CLONED,	'c' },
 	/* { RTF_JUMBO,	'J' }, */
 	{ RTF_ANNOUNCE,	'p' },
+	{ RTF_LOCAL, 'l'},
 	{ 0, 0 }
 };
 

Index: src/sbin/route/show.c
diff -u src/sbin/route/show.c:1.46 src/sbin/route/show.c:1.47
--- src/sbin/route/show.c:1.46	Thu Nov  6 21:29:32 2014
+++ src/sbin/route/show.c	Thu Feb 26 09:56:11 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: show.c,v 1.46 2014/11/06 21:29:32 christos Exp $	*/
+/*	$NetBSD: show.c,v 1.47 2015/02/26 09:56:11 roy Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = from: @(#)route.c	8.3 (Berkeley) 3/9/94;
 #else
-__RCSID($NetBSD: show.c,v 1.46 2014/11/06 21:29:32 christos Exp $);
+__RCSID($NetBSD: show.c,v 1.47 2015/02/26 09:56:11 roy Exp $);
 #endif
 #endif /* not lint */
 
@@ -137,7 +137,7 @@ show(int argc, char *const *argv, int fl
 {
 	int af, rflags;
 	static int interesting = RTF_UP | RTF_GATEWAY | RTF_HOST |
-	RTF_REJECT | RTF_LLINFO;
+	RTF_REJECT | RTF_LLINFO | RTF_LOCAL;
 
 	parse_show_opts(argc, argv, af, rflags, NULL, true);
 	p_rttables(af, flags, rflags, interesting);



CVS commit: src/share/man/man4

2015-02-26 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Feb 26 09:58:39 UTC 2015

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

Log Message:
Document RTF_LOCAL


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/share/man/man4/route.4

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

Modified files:

Index: src/share/man/man4/route.4
diff -u src/share/man/man4/route.4:1.23 src/share/man/man4/route.4:1.24
--- src/share/man/man4/route.4:1.23	Tue Feb 24 19:11:13 2015
+++ src/share/man/man4/route.4	Thu Feb 26 09:58:39 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: route.4,v 1.23 2015/02/24 19:11:13 roy Exp $
+.\	$NetBSD: route.4,v 1.24 2015/02/26 09:58:39 roy Exp $
 .\
 .\ Copyright (c) 1990, 1991, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\ @(#)route.4	8.6 (Berkeley) 4/19/94
 .\
-.Dd February 24, 2015
+.Dd February 26, 2015
 .Dt ROUTE 4
 .Os
 .Sh NAME
@@ -310,6 +310,7 @@ Flags include the values:
 #define	RTF_PROTO10x8000/* protocol specific routing flag */
 #define	RTF_SRC   0x1   /* route has fixed source address */
 #define	RTF_ANNOUNCE  0x2   /* announce new ARP or NDP entry */
+#define	RTF_LOCAL 0x4   /* route represents a local address */
 .Ed
 .Pp
 Specifiers for metric values in rmx_locks and rtm_inits are:



CVS commit: src/usr.bin/netstat

2015-02-26 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Feb 26 09:58:12 UTC 2015

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

Log Message:
Document RTF_LOCAL


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/usr.bin/netstat/netstat.1

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

Modified files:

Index: src/usr.bin/netstat/netstat.1
diff -u src/usr.bin/netstat/netstat.1:1.70 src/usr.bin/netstat/netstat.1:1.71
--- src/usr.bin/netstat/netstat.1:1.70	Sat Oct 11 09:23:32 2014
+++ src/usr.bin/netstat/netstat.1	Thu Feb 26 09:58:12 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: netstat.1,v 1.70 2014/10/11 09:23:32 wiz Exp $
+.\	$NetBSD: netstat.1,v 1.71 2015/02/26 09:58:12 roy Exp $
 .\
 .\ Copyright (c) 1983, 1990, 1992, 1993
 .\	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\
 .\	@(#)netstat.1	8.8 (Berkeley) 4/18/94
 .\
-.Dd October 19, 2013
+.Dd February 26, 2015
 .Dt NETSTAT 1
 .Os
 .Sh NAME
@@ -378,6 +378,7 @@ The mapping between letters and flags is
 .It G	RTF_GATEWAY	Destination requires forwarding by intermediary
 .It H	RTF_HOST	Host entry (net otherwise)
 .It L	RTF_LLINFO	Valid protocol to link address translation.
+.It l	RTF_LOCAL	Route represents a local address
 .It M	RTF_MODIFIED	Modified dynamically (by redirect)
 .It p	RTF_ANNOUNCE	Link level proxy
 .It R	RTF_REJECT	Host or net unreachable



CVS commit: src/external/cddl/osnet/dev

2015-02-26 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Feb 26 10:31:52 UTC 2015

Modified Files:
src/external/cddl/osnet/dev/fbt: fbt.c
src/external/cddl/osnet/dev/sdt: sdt.c

Log Message:
Fix inconsistency between module and internal names of sdt and fbt

PR 49697
OK wiz@


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/external/cddl/osnet/dev/fbt/fbt.c
cvs rdiff -u -r1.10 -r1.11 src/external/cddl/osnet/dev/sdt/sdt.c

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

Modified files:

Index: src/external/cddl/osnet/dev/fbt/fbt.c
diff -u src/external/cddl/osnet/dev/fbt/fbt.c:1.17 src/external/cddl/osnet/dev/fbt/fbt.c:1.18
--- src/external/cddl/osnet/dev/fbt/fbt.c:1.17	Thu Feb 26 09:10:52 2015
+++ src/external/cddl/osnet/dev/fbt/fbt.c	Thu Feb 26 10:31:52 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: fbt.c,v 1.17 2015/02/26 09:10:52 ozaki-r Exp $	*/
+/*	$NetBSD: fbt.c,v 1.18 2015/02/26 10:31:52 ozaki-r Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -2104,7 +2104,7 @@ fbt_unload(void)
 
 
 static int
-fbt_modcmd(modcmd_t cmd, void *data)
+dtrace_fbt_modcmd(modcmd_t cmd, void *data)
 {
 	int bmajor = -1, cmajor = -1;
 	int error;
@@ -2132,4 +2132,4 @@ fbt_open(dev_t dev, int flags, int mode,
 	return (0);
 }
 
-MODULE(MODULE_CLASS_MISC, fbt, dtrace);
+MODULE(MODULE_CLASS_MISC, dtrace_fbt, dtrace);

Index: src/external/cddl/osnet/dev/sdt/sdt.c
diff -u src/external/cddl/osnet/dev/sdt/sdt.c:1.10 src/external/cddl/osnet/dev/sdt/sdt.c:1.11
--- src/external/cddl/osnet/dev/sdt/sdt.c:1.10	Thu Feb 26 09:10:53 2015
+++ src/external/cddl/osnet/dev/sdt/sdt.c	Thu Feb 26 10:31:52 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdt.c,v 1.10 2015/02/26 09:10:53 ozaki-r Exp $	*/
+/*	$NetBSD: sdt.c,v 1.11 2015/02/26 10:31:52 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -450,7 +450,7 @@ sdt_unload(void)
 }
 
 static int
-sdt_modcmd(modcmd_t cmd, void *data)
+dtrace_sdt_modcmd(modcmd_t cmd, void *data)
 {
 	int bmajor = -1, cmajor = -1;
 	int error;
@@ -478,4 +478,4 @@ sdt_open(dev_t dev, int flags, int mode,
 	return (0);
 }
 
-MODULE(MODULE_CLASS_MISC, sdt, dtrace);
+MODULE(MODULE_CLASS_MISC, dtrace_sdt, dtrace);



CVS commit: src/sys

2015-02-26 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Feb 26 09:54:46 UTC 2015

Modified Files:
src/sys/net: route.c route.h
src/sys/netinet: if_arp.c in.c ip_carp.c
src/sys/netinet6: in6.c in6_var.h

Log Message:
Introduce the routing flag RTF_LOCAL to track local address routes.
Add functions rt_ifa_addlocal() and rt_ifa_remlocal() to add and remove
local routes for the address and announce the new address and route
to the routing socket.

Add in_ifaddlocal() and in_ifremlocal() to use these functions.
Rename in6_if{add,rem}loop() to in6_if{add,rem}local() and use these
functions.

rtinit() no longer announces the address, just the network route for the
address. As such, calls to rt_newaddrmsg() have been removed from
in_addprefix() and in_scrubprefix().

This solves the problem of potentially more than one announcement, or no
announcement at all for the address in certain situations.


To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.136 src/sys/net/route.c
cvs rdiff -u -r1.86 -r1.87 src/sys/net/route.h
cvs rdiff -u -r1.160 -r1.161 src/sys/netinet/if_arp.c
cvs rdiff -u -r1.149 -r1.150 src/sys/netinet/in.c
cvs rdiff -u -r1.59 -r1.60 src/sys/netinet/ip_carp.c
cvs rdiff -u -r1.183 -r1.184 src/sys/netinet6/in6.c
cvs rdiff -u -r1.71 -r1.72 src/sys/netinet6/in6_var.h

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

Modified files:

Index: src/sys/net/route.c
diff -u src/sys/net/route.c:1.135 src/sys/net/route.c:1.136
--- src/sys/net/route.c:1.135	Wed Feb 25 12:45:34 2015
+++ src/sys/net/route.c	Thu Feb 26 09:54:46 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.135 2015/02/25 12:45:34 roy Exp $	*/
+/*	$NetBSD: route.c,v 1.136 2015/02/26 09:54:46 roy Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -90,10 +90,11 @@
  *	@(#)route.c	8.3 (Berkeley) 1/9/95
  */
 
+#include opt_inet.h
 #include opt_route.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: route.c,v 1.135 2015/02/25 12:45:34 roy Exp $);
+__KERNEL_RCSID(0, $NetBSD: route.c,v 1.136 2015/02/26 09:54:46 roy Exp $);
 
 #include sys/param.h
 #include sys/kmem.h
@@ -960,7 +961,7 @@ rtinit(struct ifaddr *ifa, int cmd, int 
 		;
 	else switch (cmd) {
 	case RTM_DELETE:
-		rt_newaddrmsg(cmd, ifa, error, nrt);
+		rt_newmsg(cmd, nrt);
 		if (rt-rt_refcnt = 0) {
 			rt-rt_refcnt++;
 			rtfree(rt);
@@ -984,7 +985,7 @@ rtinit(struct ifaddr *ifa, int cmd, int 
 
 		if (cmd == RTM_LLINFO_UPD  ifa-ifa_rtrequest != NULL)
 			ifa-ifa_rtrequest(RTM_LLINFO_UPD, rt, info);
-		rt_newaddrmsg(RTM_CHANGE, ifa, error, nrt);
+		rt_newmsg(RTM_CHANGE, nrt);
 		break;
 	case RTM_ADD:
 		rt-rt_refcnt--;
@@ -1000,12 +1001,132 @@ rtinit(struct ifaddr *ifa, int cmd, int 
 			if (ifa-ifa_rtrequest != NULL)
 ifa-ifa_rtrequest(RTM_ADD, rt, info);
 		}
-		rt_newaddrmsg(cmd, ifa, error, nrt);
+		rt_newmsg(cmd, nrt);
 		break;
 	}
 	return error;
 }
 
+static const struct in_addr inmask32 = {.s_addr = INADDR_BROADCAST};
+
+/* Subroutine for rt_ifa_addlocal() and rt_ifa_remlocal() */
+static int
+rt_ifa_localrequest(int cmd, struct ifaddr *ifa)
+{
+	struct sockaddr *all1_sa;
+	struct sockaddr_in all1_sin;
+#ifdef INET6
+	struct sockaddr_in6 all1_sin6;
+#endif
+	struct rtentry *nrt = NULL;
+	int flags, e;
+
+	switch(ifa-ifa_addr-sa_family) {
+	case AF_INET:
+		sockaddr_in_init(all1_sin, inmask32, 0);
+		all1_sa = (struct sockaddr *)all1_sin;
+		break;
+#ifdef INET6
+	case AF_INET6:
+		sockaddr_in6_init(all1_sin6, in6mask128, 0, 0, 0);
+		all1_sa = (struct sockaddr *)all1_sin6;
+		break;
+#endif
+	default:
+		return 0;
+	}
+
+	flags = RTF_UP | RTF_HOST | RTF_LOCAL;
+	if (!(ifa-ifa_ifp-if_flags  (IFF_LOOPBACK | IFF_POINTOPOINT)))
+		flags |= RTF_LLINFO;
+	e = rtrequest(cmd, ifa-ifa_addr, ifa-ifa_addr, all1_sa, flags, nrt);
+
+	/* Make sure rt_ifa be equal to IFA, the second argument of the
+	 * function. */
+	if (cmd == RTM_ADD  nrt  ifa != nrt-rt_ifa)
+		rt_replace_ifa(nrt, ifa);
+
+	rt_newaddrmsg(cmd, ifa, e, nrt);
+	if (nrt) {
+		if (cmd == RTM_DELETE) {
+			if (nrt-rt_refcnt = 0) {
+/* XXX: we should free the entry ourselves. */
+nrt-rt_refcnt++;
+rtfree(nrt);
+			}
+		} else {
+			/* the cmd must be RTM_ADD here */
+			nrt-rt_refcnt--;
+		}
+	}
+	return e;
+}
+
+/*
+ * Create a local route entry for the address.
+ * Announce the addition of the address and the route to the routing socket.
+ */
+int
+rt_ifa_addlocal(struct ifaddr *ifa)
+{
+	struct rtentry *rt;
+	int e;
+
+	/* If there is no loopback entry, allocate one. */
+	rt = rtalloc1(ifa-ifa_addr, 0);
+	if (rt == NULL || (rt-rt_flags  RTF_HOST) == 0 ||
+	(rt-rt_ifp-if_flags  IFF_LOOPBACK) == 0)
+		e = rt_ifa_localrequest(RTM_ADD, ifa);
+	else {
+		e = 0;
+		rt_newaddrmsg(RTM_NEWADDR, ifa, 0, NULL);
+	}
+	if (rt != NULL)
+		rt-rt_refcnt--;
+	return e;
+}
+
+/*
+ * Remove the local route entry for the address.
+ * Announce the removal of the address and the route to the routing socket.
+ 

CVS commit: src/external/bsd/dhcp/bin/clientscript

2015-02-26 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Feb 26 09:59:55 UTC 2015

Modified Files:
src/external/bsd/dhcp/bin/clientscript: dhclient-script

Log Message:
No longer a need to add local routes for the address.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/bsd/dhcp/bin/clientscript/dhclient-script

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

Modified files:

Index: src/external/bsd/dhcp/bin/clientscript/dhclient-script
diff -u src/external/bsd/dhcp/bin/clientscript/dhclient-script:1.1 src/external/bsd/dhcp/bin/clientscript/dhclient-script:1.2
--- src/external/bsd/dhcp/bin/clientscript/dhclient-script:1.1	Sun Mar 24 15:54:30 2013
+++ src/external/bsd/dhcp/bin/clientscript/dhclient-script	Thu Feb 26 09:59:55 2015
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: dhclient-script,v 1.1 2013/03/24 15:54:30 christos Exp $
+# $NetBSD: dhclient-script,v 1.2 2015/02/26 09:59:55 roy Exp $
 
 ENTERHOOKS=/etc/dhclient-enter-hooks
 EXITHOOKS=/etc/dhclient-exit-hooks
@@ -147,7 +147,6 @@ PREINIT)
 	if [ ! -z $alias_ip_address ]; then
 		ifconfig $interface inet \
 		-alias $alias_ip_address /dev/null 21
-		route delete $alias_ip_address 127.0.0.1  /dev/null 21
 	fi
 
 	ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \
@@ -182,14 +181,11 @@ BOUND|RENEW|REBIND|REBOOT)
 	\( x$alias_ip_address != x$old_ip_address \) ]; then
 		ifconfig $interface inet \
 		-alias $alias_ip_address  /dev/null 21
-		route delete $alias_ip_address 127.0.0.1  /dev/null 21
 	fi
 
 	if [ \( ! -z $old_ip_address \) -a \
 	\( x$old_ip_address != x$new_ip_address \) ]; then
 		eval ifconfig $interface inet -alias $old_ip_address $medium
-		route delete $old_ip_address 127.0.0.1 /dev/null 21
-
 		delete_old_routes
 	fi
 
@@ -198,8 +194,6 @@ BOUND|RENEW|REBIND|REBOOT)
 	\( x$reason = xBOUND \) -o \( x$reason = xREBOOT \) ]; then
 		eval ifconfig $interface inet $new_ip_address \
 		$new_netmask_arg $new_broadcast_arg $medium
-		route add $new_ip_address 127.0.0.1 /dev/null 21
-
 		add_new_routes
 	fi
 
@@ -207,7 +201,6 @@ BOUND|RENEW|REBIND|REBOOT)
 	\( x$new_ip_address != x$alias_ip_address \) ]; then
 		ifconfig $interface inet alias $alias_ip_address \
 		$alias_subnet_arg
-		route add $alias_ip_address 127.0.0.1
 	fi
 	make_resolv_conf
 	exit_with_hooks 0
@@ -223,12 +216,10 @@ EXPIRE|FAIL|RELEASE|STOP)
 
 	if [ ! -z $alias_ip_address ]; then
 		ifconfig $interface inet -alias $alias_ip_address 
-		route delete $alias_ip_address 127.0.0.1
 	fi  /dev/null 21
 
 	if [ ! -z $old_ip_address ]; then
 		eval ifconfig $interface inet -alias $old_ip_address $medium
-		route delete $old_ip_address 127.0.0.1 /dev/null 21
 		delete_old_routes
 
 	fi
@@ -236,7 +227,6 @@ EXPIRE|FAIL|RELEASE|STOP)
 	if [ ! -z $alias_ip_address ]; then
 		ifconfig $interface inet alias $alias_ip_address \
 		$alias_subnet_arg
-		route add $alias_ip_address 127.0.0.1
 	fi
 
 	restore_resolv_conf
@@ -246,7 +236,6 @@ EXPIRE|FAIL|RELEASE|STOP)
 TIMEOUT)
 	if [ ! -z $alias_ip_address ]; then
 		ifconfig $interface inet -alias $alias_ip_address
-		route delete $alias_ip_address 127.0.0.1
 	fi  /dev/null 21
 
 	if [ ! -z $new_host_name ]; then
@@ -273,11 +262,8 @@ TIMEOUT)
 			then
 ifconfig $interface inet alias \
 $alias_ip_address $alias_subnet_arg
-route add $alias_ip_address 127.0.0.1
 			fi
 
-			route add $new_ip_address 127.0.0.1 /dev/null 21
-
 			add_new_routes
 			make_resolv_conf
 			exit_with_hooks 0



CVS commit: src/doc

2015-02-26 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Feb 26 10:14:33 UTC 2015

Modified Files:
src/doc: CHANGES

Log Message:
Document addition of RTF_LOCAL


To generate a diff of this commit:
cvs rdiff -u -r1.2047 -r1.2048 src/doc/CHANGES

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
diff -u src/doc/CHANGES:1.2047 src/doc/CHANGES:1.2048
--- src/doc/CHANGES:1.2047	Mon Feb 23 07:17:37 2015
+++ src/doc/CHANGES	Thu Feb 26 10:14:33 2015
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.2047 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.2048 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -133,3 +133,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0:
 	libc: Import tzdata2015a. [christos 20150131]
 	postfix(1): Import version 2.11.4. [tron 20150221]
 	bind: patch to version 9.10.1-P2. [spz 20150221]
+	network: introduce RTF_LOCAL for local address routes. [roy 20150226]



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

2015-02-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Feb 26 23:32:40 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915: i915_gem.c

Log Message:
...and one more fix for __wait_seqno return value.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.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_gem.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.21 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.22
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.21	Thu Feb 26 19:43:43 2015
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c	Thu Feb 26 23:32:40 2015
@@ -1463,9 +1463,11 @@ __wait_seqno(struct intel_ring_buffer *r
 		if (ret == 0)
 			ret = -EAGAIN;
 	}
-	if (ret  0)		/* Failure.  */
+	if (ret  0)		/* Error.  */
 		return ret;
-	return 0;		/* Success, possibly with time to spare.  */
+	if (ret == 0)		/* Seqno didn't pass.  */
+		return -ETIME;
+	return 0;		/* Seqno passed, maybe time to spare.  */
 }
 #else
 static int __wait_seqno(struct intel_ring_buffer *ring, u32 seqno,



CVS commit: [netbsd-5] src/include

2015-02-26 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Feb 26 21:59:43 UTC 2015

Modified Files:
src/include [netbsd-5]: wchar.h

Log Message:
Apply patch (requested by christos in ticket #1943):
Properly expose wcsto{f,ld,ll,ull} and v{fw,sw,ws}scanf when
_POSIX_C_SOURCE = 200112L and _XOPEN_SOURCE = 600.


To generate a diff of this commit:
cvs rdiff -u -r1.27.8.1 -r1.27.8.2 src/include/wchar.h

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

Modified files:

Index: src/include/wchar.h
diff -u src/include/wchar.h:1.27.8.1 src/include/wchar.h:1.27.8.2
--- src/include/wchar.h:1.27.8.1	Fri May 20 19:18:37 2011
+++ src/include/wchar.h	Thu Feb 26 21:59:43 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: wchar.h,v 1.27.8.1 2011/05/20 19:18:37 bouyer Exp $	*/
+/*	$NetBSD: wchar.h,v 1.27.8.2 2015/02/26 21:59:43 snj Exp $	*/
 
 /*-
  * Copyright (c)1999 Citrus Project,
@@ -138,7 +138,8 @@ long int wcstol(const wchar_t * __restri
 double wcstod(const wchar_t * __restrict, wchar_t ** __restrict);
 
 #if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0)  199901L || \
-defined(_NETBSD_SOURCE)
+defined(_NETBSD_SOURCE) || \
+(_POSIX_C_SOURCE - 0) = 200112L || (_XOPEN_SOURCE - 0) = 600
 float wcstof(const wchar_t * __restrict, wchar_t ** __restrict);
 long double wcstold(const wchar_t * __restrict, wchar_t ** __restrict);
 
@@ -174,7 +175,8 @@ int vwprintf(const wchar_t * __restrict,
 int wprintf(const wchar_t * __restrict, ...);
 int wscanf(const wchar_t * __restrict, ...);
 #if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0)  199901L || \
-defined(_NETBSD_SOURCE)
+defined(_NETBSD_SOURCE) || \
+	(_POSIX_C_SOURCE - 0) = 200112L || (_XOPEN_SOURCE - 0) = 600
 int vfwscanf(FILE * __restrict, const wchar_t * __restrict, _BSD_VA_LIST_);
 int vswscanf(const wchar_t * __restrict, const wchar_t * __restrict,
 _BSD_VA_LIST_);



CVS commit: src/sys/ddb

2015-02-26 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Fri Feb 27 00:47:30 UTC 2015

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

Log Message:
Don't use an unset value as an address

Instead, show usage if no address is passed.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/ddb/db_xxx.c

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

Modified files:

Index: src/sys/ddb/db_xxx.c
diff -u src/sys/ddb/db_xxx.c:1.70 src/sys/ddb/db_xxx.c:1.71
--- src/sys/ddb/db_xxx.c:1.70	Fri Sep  5 09:27:24 2014
+++ src/sys/ddb/db_xxx.c	Fri Feb 27 00:47:30 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_xxx.c,v 1.70 2014/09/05 09:27:24 matt Exp $	*/
+/*	$NetBSD: db_xxx.c,v 1.71 2015/02/27 00:47:30 ozaki-r Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: db_xxx.c,v 1.70 2014/09/05 09:27:24 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: db_xxx.c,v 1.71 2015/02/27 00:47:30 ozaki-r Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_kgdb.h
@@ -161,6 +161,12 @@ db_show_files_cmd(db_expr_t addr, bool h
 	bool full = false;
 	fdtab_t *dt;
 
+	if (!haddr) {
+		db_printf(usage: show files address\n);
+		db_printf(\taddress == an address of a proc structure\n);
+		return;
+	}
+
 	if (modif[0] == 'f')
 		full = true;
 



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

2015-02-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Thu Feb 26 23:27:41 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/include/drm: drm_wait_netbsd.h

Log Message:
Another attempt to fix the drm timed wait blarf blugh blahhh.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
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.5 src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h:1.6
--- src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h:1.5	Tue Aug 26 00:48:29 2014
+++ src/sys/external/bsd/drm2/include/drm/drm_wait_netbsd.h	Thu Feb 26 23:27:41 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_wait_netbsd.h,v 1.5 2014/08/26 00:48:29 riastradh Exp $	*/
+/*	$NetBSD: drm_wait_netbsd.h,v 1.6 2015/02/26 23:27:41 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -129,6 +129,19 @@ DRM_SPIN_WAKEUP_ALL(drm_waitqueue_t *q, 
 #define	DRM_WAIT_UNTIL(RET, Q, I, C)\
 	_DRM_WAIT_UNTIL(RET, cv_wait_sig, Q, I, C)
 
+/*
+ * Timed wait.  Return:
+ *
+ * - 0 if condition is false after timeout,
+ * - 1 if condition is true after timeout or one tick before timeout,
+ * - number of ticks left if condition evaluated to true before timeout, or
+ * - error if failure (e.g., interrupted).
+ *
+ * XXX Comments in Linux say it returns -ERESTARTSYS if interrupted.
+ * What if by a signal without SA_RESTART?  Shouldn't it be -EINTR
+ * then?  I'm going to leave it as what cv_timedwait returned, which is
+ * ERESTART for signals with SA_RESTART and EINTR otherwise.
+ */
 #define	_DRM_TIMED_WAIT_UNTIL(RET, WAIT, Q, INTERLOCK, TICKS, CONDITION) do \
 {	\
 	extern int hardclock_ticks;	\
@@ -145,14 +158,17 @@ DRM_SPIN_WAKEUP_ALL(drm_waitqueue_t *q, 
 		/* XXX errno NetBSD-Linux */\
 		(RET) = -WAIT((Q), (INTERLOCK)-mtx_lock,		\
 		_dtwu_ticks);	\
-		if (RET)		\
+		if (RET) {		\
+			if ((RET) == -EWOULDBLOCK)			\
+(RET) = (CONDITION) ? 1 : 0;		\
 			break;		\
+		}			\
 		const int _dtwu_now = hardclock_ticks;			\
 		KASSERT(_dtwu_start = _dtwu_now);			\
 		if ((_dtwu_now - _dtwu_start)  _dtwu_ticks) {		\
 			_dtwu_ticks -= (_dtwu_now - _dtwu_start);	\
 		} else {		\
-			(RET) = 0;	\
+			(RET) = (CONDITION) ? 1 : 0;			\
 			break;		\
 		}			\
 	}\
@@ -210,14 +226,17 @@ DRM_SPIN_WAKEUP_ALL(drm_waitqueue_t *q, 
 		/* XXX errno NetBSD-Linux */\
 		(RET) = -WAIT((Q), (INTERLOCK)-sl_lock,		\
 		_dstwu_ticks);	\
-		if (RET)		\
+		if (RET) {		\
+			if ((RET) == -EWOULDBLOCK)			\
+(RET) = (CONDITION) ? 1 : 0;		\
 			break;		\
+		}			\
 		const int _dstwu_now = hardclock_ticks;			\
 		KASSERT(_dstwu_start = _dstwu_now);			\
 		if ((_dstwu_now - _dstwu_start)  _dstwu_ticks) {	\
 			_dstwu_ticks -= (_dstwu_now - _dstwu_start);	\
 		} else {		\
-			(RET) = 0;	\
+			(RET) = (CONDITION) ? 1 : 0;			\
 			break;		\
 		}			\
 	}\



CVS commit: src/sys/dev/sdmmc

2015-02-26 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Fri Feb 27 01:52:15 UTC 2015

Modified Files:
src/sys/dev/sdmmc: sdhc.c

Log Message:
Don't clear other bits. pq3sdhc is set more bits.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/dev/sdmmc/sdhc.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/sdmmc/sdhc.c
diff -u src/sys/dev/sdmmc/sdhc.c:1.52 src/sys/dev/sdmmc/sdhc.c:1.53
--- src/sys/dev/sdmmc/sdhc.c:1.52	Mon Jan 26 04:56:56 2015
+++ src/sys/dev/sdmmc/sdhc.c	Fri Feb 27 01:52:15 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhc.c,v 1.52 2015/01/26 04:56:56 nonaka Exp $	*/
+/*	$NetBSD: sdhc.c,v 1.53 2015/02/27 01:52:15 nonaka Exp $	*/
 /*	$OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sdhc.c,v 1.52 2015/01/26 04:56:56 nonaka Exp $);
+__KERNEL_RCSID(0, $NetBSD: sdhc.c,v 1.53 2015/02/27 01:52:15 nonaka Exp $);
 
 #ifdef _KERNEL_OPT
 #include opt_sdmmc.h
@@ -1629,7 +1629,7 @@ sdhc_soft_reset(struct sdhc_host *hp, in
 	}
 
 	if (ISSET(hp-sc-sc_flags, SDHC_FLAG_ENHANCED)) {
-		HWRITE4(hp, SDHC_DMA_CTL, SDHC_DMA_SNOOP);
+		HSET4(hp, SDHC_DMA_CTL, SDHC_DMA_SNOOP);
 	}
 
 	return 0;



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

2015-02-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Feb 27 04:40:17 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915: intel_i2c.c

Log Message:
Also get the sense of the condition to wait until right.  @!#^$@!*


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.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/intel_i2c.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c:1.6 src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c:1.7
--- src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c:1.6	Fri Feb 27 04:35:02 2015
+++ src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c	Fri Feb 27 04:40:17 2015
@@ -302,7 +302,7 @@ gmbus_wait_hw_status(struct drm_i915_pri
 		DRM_SPIN_TIMED_WAIT_UNTIL(ret, dev_priv-gmbus_wait_queue,
 		dev_priv-gmbus_wait_lock, mstohz(50),
 		(gmbus2 = I915_READ_NOTRACE(GMBUS2 + reg_offset),
-			!ISSET(gmbus2, (GMBUS_SATOER | gmbus2_status;
+			ISSET(gmbus2, (GMBUS_SATOER | gmbus2_status;
 	}
 	spin_unlock(dev_priv-gmbus_wait_lock);
 #else



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

2015-02-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Feb 27 04:35:02 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915: intel_i2c.c

Log Message:
Make gmbus_wait_hw_status consistently use 50ms timeout like Linux.

Apparently I changed this to a 1-tick timeout.  No clue why.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.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/intel_i2c.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c:1.5 src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c:1.6
--- src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c:1.5	Fri Feb 27 04:29:27 2015
+++ src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c	Fri Feb 27 04:35:02 2015
@@ -289,17 +289,18 @@ gmbus_wait_hw_status(struct drm_i915_pri
 #ifdef __NetBSD__
 	spin_lock(dev_priv-gmbus_wait_lock);
 	if (cold) {
-		unsigned timo = 1000;
+		unsigned timo = 50;
+
 		while (gmbus2 = I915_READ_NOTRACE(GMBUS2 + reg_offset),
 		!ISSET(gmbus2, (GMBUS_SATOER | gmbus2_status))) {
 			if (timo-- == 0)
 break;
-			DELAY(100);
+			DELAY(1000);
 		}
 	} else {
 		int ret;
 		DRM_SPIN_TIMED_WAIT_UNTIL(ret, dev_priv-gmbus_wait_queue,
-		dev_priv-gmbus_wait_lock, 1,
+		dev_priv-gmbus_wait_lock, mstohz(50),
 		(gmbus2 = I915_READ_NOTRACE(GMBUS2 + reg_offset),
 			!ISSET(gmbus2, (GMBUS_SATOER | gmbus2_status;
 	}



CVS commit: [netbsd-5] src/doc

2015-02-26 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Feb 27 02:55:45 UTC 2015

Modified Files:
src/doc [netbsd-5]: CHANGES-5.3

Log Message:
1943


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.100 -r1.1.2.101 src/doc/CHANGES-5.3

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-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.100 src/doc/CHANGES-5.3:1.1.2.101
--- src/doc/CHANGES-5.3:1.1.2.100	Mon Feb 23 09:43:18 2015
+++ src/doc/CHANGES-5.3	Fri Feb 27 02:55:45 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.100 2015/02/23 09:43:18 msaitoh Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.101 2015/02/27 02:55:45 snj Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3743,3 +3743,10 @@ dist/bind/lib/dns/zone.c			patch
 	an untrusted replacement could cause named to crash with an assertion
 	failure.
 	[spz, ticket #1950]
+
+include/wchar.h	patch
+
+	Properly expose wcsto{f,ld,ll,ull} and v{fw,sw,ws}scanf when
+	_POSIX_C_SOURCE = 200112L and _XOPEN_SOURCE = 600.
+	[christos, ticket #1943]
+



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

2015-02-26 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Feb 27 04:29:27 UTC 2015

Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915: intel_i2c.c

Log Message:
Limit scope of ret and omit needless use of it to reduce confusion.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.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/intel_i2c.c
diff -u src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c:1.4 src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c:1.5
--- src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c:1.4	Wed Jul 16 20:56:25 2014
+++ src/sys/external/bsd/drm2/dist/drm/i915/intel_i2c.c	Fri Feb 27 04:29:27 2015
@@ -269,9 +269,7 @@ gmbus_wait_hw_status(struct drm_i915_pri
 #endif
 	int reg_offset = dev_priv-gpio_mmio_base;
 	u32 gmbus2 = 0;
-#ifdef __NetBSD__
-	int ret;
-#else
+#ifndef __NetBSD__
 	DEFINE_WAIT(wait);
 #endif
 
@@ -292,16 +290,14 @@ gmbus_wait_hw_status(struct drm_i915_pri
 	spin_lock(dev_priv-gmbus_wait_lock);
 	if (cold) {
 		unsigned timo = 1000;
-		ret = 0;
 		while (gmbus2 = I915_READ_NOTRACE(GMBUS2 + reg_offset),
 		!ISSET(gmbus2, (GMBUS_SATOER | gmbus2_status))) {
-			if (timo-- == 0) {
-ret = -ETIMEDOUT;
+			if (timo-- == 0)
 break;
-			}
 			DELAY(100);
 		}
 	} else {
+		int ret;
 		DRM_SPIN_TIMED_WAIT_UNTIL(ret, dev_priv-gmbus_wait_queue,
 		dev_priv-gmbus_wait_lock, 1,
 		(gmbus2 = I915_READ_NOTRACE(GMBUS2 + reg_offset),