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

2016-09-27 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Sep 27 23:25:10 UTC 2016

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

Log Message:
Missed the mlx_pci module in previous commit (to disable)


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/distrib/sets/lists/modules/mi

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

Modified files:

Index: src/distrib/sets/lists/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.98 src/distrib/sets/lists/modules/mi:1.99
--- src/distrib/sets/lists/modules/mi:1.98	Tue Sep 27 20:52:43 2016
+++ src/distrib/sets/lists/modules/mi	Tue Sep 27 23:25:10 2016
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.98 2016/09/27 20:52:43 pgoyette Exp $
+# $NetBSD: mi,v 1.99 2016/09/27 23:25:10 pgoyette Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -220,8 +220,8 @@
 ./@MODULEDIR@/miniroot/miniroot.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/mlxbase-obsolete		obsolete
 ./@MODULEDIR@/mlx/mlx.kmod			base-obsolete		obsolete
-./@MODULEDIR@/mlx_pcibase-kernel-modules	kmod
-./@MODULEDIR@/mlx_pci/mlx_pci.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/mlx_pcibase-obsolete		obsolete
+./@MODULEDIR@/mlx_pci/mlx_pci.kmod		base-obsolete		obsolete
 ./@MODULEDIR@/mqueuebase-kernel-modules	kmod
 ./@MODULEDIR@/mqueue/mqueue.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/msdosbase-kernel-modules	kmod



CVS commit: src/doc

2016-09-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Sep 27 22:54:57 UTC 2016

Modified Files:
src/doc: TODO.modules

Log Message:
Minor edit.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/doc/TODO.modules

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

Modified files:

Index: src/doc/TODO.modules
diff -u src/doc/TODO.modules:1.6 src/doc/TODO.modules:1.7
--- src/doc/TODO.modules:1.6	Tue Sep 27 18:27:50 2016
+++ src/doc/TODO.modules	Tue Sep 27 18:54:57 2016
@@ -1,11 +1,11 @@
-/* $NetBSD: TODO.modules,v 1.6 2016/09/27 22:27:50 pgoyette Exp $ */
+/* $NetBSD: TODO.modules,v 1.7 2016/09/27 22:54:57 christos Exp $ */
 
 Some notes on the limitations of our current (as of 7.99.35) module
 subsystem.  This list was triggered by an Email exchange between
 christos and pgoyette.
 
-1. Builtin drivers can't depend on modularized drivers (the modularized
-   drivers are attempted to load as builtins).
+ 1. Builtin drivers can't depend on modularized drivers (the modularized
+drivers are attempted to load as builtins).
 
 	The assumption is that dependencies are loaded before those
 	modules which depend on them.  At load time, a module's
@@ -25,14 +25,17 @@ christos and pgoyette.
 	requires that the parent module know about all potentially
 	loadable children.
 
-2. Currently, config(1) has no way to "no define" drivers
-
-3. It is not always obvious by their names which drivers/options
-   correspond to which modules.
-
-4. Right now critical drivers that would need to be pre-loaded (ffs,
-   exec_elf64) are still built-in so that we don't need to alter the boot
-   blocks to boot.
+ 2. Currently, config(1) has no way to "no define" drivers
+	XXX: I don't think this is true anymore. I think we can
+	undefine drivers now, see MODULAR in amd64, which does
+	no ath* and no select sppp*
+
+ 3. It is not always obvious by their names which drivers/options
+correspond to which modules.
+
+ 4. Right now critical drivers that would need to be pre-loaded (ffs,
+exec_elf64) are still built-in so that we don't need to alter the boot
+blocks to boot.
 
 	This was a conscious decision by core@ some years ago.  It is
 	not a requirement that ffs or exec_* be built-in.  The only
@@ -43,13 +46,13 @@ christos and pgoyette.
 	this in all cases; currently the "push" only occurs if the
 	booted filesystem is not ffs.)
 
-5. Not all parent bus drivers are capable of rescan, so some drivers
-   just have to be built-in.
+ 5. Not all parent bus drivers are capable of rescan, so some drivers
+just have to be built-in.
 
-6. Many (most?) drivers are not yet modularized
+ 6. Many (most?) drivers are not yet modularized
 
-7. There's currently no provisions for autoconfig to figure out which
-   modules are needed, and thus to load the required modules.
+ 7. There's currently no provisions for autoconfig to figure out which
+modules are needed, and thus to load the required modules.
 
 	In the "normal" built-in world, autoconfigure can only ask
 	existing drivers if they're willing to manage (ie, attach) a
@@ -58,8 +61,8 @@ christos and pgoyette.
 	mechanism for identifying and loading drivers based on what
 	devices might be found.
 
-8. Even for existing modules, there are "surprise" dependencies with
-   code that has not yet been modularized.
+ 8. Even for existing modules, there are "surprise" dependencies with
+code that has not yet been modularized.
 
 	For example, even though the bpf code has been modularized,
 	there is some shared code in bpf_filter.c which is needed by
@@ -78,27 +81,31 @@ christos and pgoyette.
 	have "sysmon_taskq" and "sysmon" built-in since "sysmon_power"
 	rerefences them.
 
-9. As a corollary to #8 above, having dependencies on modules from code
-   which has not been modularized makes it extremely difficult to test
-   the module code adequately.  Testing of module code should include
-   both testing-as-a-built-in module and testing-as-a-loaded-module, and
-   all dependencies need to be identified.
-
-10.The current /stand/$ARCH/$VERSION/modules/ hierarchy won't scale as
-   we get more and more modules.  There are hundreds of potential device
-   driver modules.
-
-11.There currently isn't any good way to handle attachment-specific
-   modules.  The build infrastructure (ie, sys/modules/Makefile) doesn't
-   readily lend itself to bus-specific modules irrespective of $ARCH,
-   and maintaining distrib/sets/lists/modules/* is awkward at best.
-
-   Furthermore, devices such as ld(4), which can attach to a large set
-   of parent devices, need to be modified.  The parent devices need to
-   provide a common attribute (for example, ld_bud), and the ld driver
-   should attach to that attribute rather than to each parent.  But
-   currently, config(1) doesn't handle this - it doesn't allow an
-   attribute to be used as the device tree's pseudo-root.
+ 9. As a corollary to #8 

CVS commit: src/doc

2016-09-27 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Sep 27 22:27:50 UTC 2016

Modified Files:
src/doc: TODO.modules

Log Message:
Add some additional comments resulting from my recent efforts to provide
ld(4) modularization.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/doc/TODO.modules

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

Modified files:

Index: src/doc/TODO.modules
diff -u src/doc/TODO.modules:1.5 src/doc/TODO.modules:1.6
--- src/doc/TODO.modules:1.5	Sat Aug  6 00:30:57 2016
+++ src/doc/TODO.modules	Tue Sep 27 22:27:50 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: TODO.modules,v 1.5 2016/08/06 00:30:57 pgoyette Exp $ */
+/* $NetBSD: TODO.modules,v 1.6 2016/09/27 22:27:50 pgoyette Exp $ */
 
 Some notes on the limitations of our current (as of 7.99.35) module
 subsystem.  This list was triggered by an Email exchange between
@@ -84,3 +84,21 @@ christos and pgoyette.
both testing-as-a-built-in module and testing-as-a-loaded-module, and
all dependencies need to be identified.
 
+10.The current /stand/$ARCH/$VERSION/modules/ hierarchy won't scale as
+   we get more and more modules.  There are hundreds of potential device
+   driver modules.
+
+11.There currently isn't any good way to handle attachment-specific
+   modules.  The build infrastructure (ie, sys/modules/Makefile) doesn't
+   readily lend itself to bus-specific modules irrespective of $ARCH,
+   and maintaining distrib/sets/lists/modules/* is awkward at best.
+
+   Furthermore, devices such as ld(4), which can attach to a large set
+   of parent devices, need to be modified.  The parent devices need to
+   provide a common attribute (for example, ld_bud), and the ld driver
+   should attach to that attribute rather than to each parent.  But
+   currently, config(1) doesn't handle this - it doesn't allow an
+   attribute to be used as the device tree's pseudo-root.
+
+12.Item #11 gets even murkier when a particular parent can provide more
+   than one attribute.



CVS commit: src

2016-09-27 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Sep 27 20:52:43 UTC 2016

Modified Files:
src/distrib/sets/lists/modules: md.alpha md.amd64 md.hppa md.i386
md.prep md.sgimips mi
src/sys/modules: Makefile

Log Message:
For now, disable all the newly-created ld(4) related modules.  We need
to come up with a better way to handle attachment-specific modules, and
possibly a better directory structure for modules in general, as the
current mechanism doesn't scale.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/modules/md.alpha \
src/distrib/sets/lists/modules/md.hppa
cvs rdiff -u -r1.68 -r1.69 src/distrib/sets/lists/modules/md.amd64
cvs rdiff -u -r1.70 -r1.71 src/distrib/sets/lists/modules/md.i386
cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/lists/modules/md.prep \
src/distrib/sets/lists/modules/md.sgimips
cvs rdiff -u -r1.97 -r1.98 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.178 -r1.179 src/sys/modules/Makefile

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

Modified files:

Index: src/distrib/sets/lists/modules/md.alpha
diff -u src/distrib/sets/lists/modules/md.alpha:1.4 src/distrib/sets/lists/modules/md.alpha:1.5
--- src/distrib/sets/lists/modules/md.alpha:1.4	Tue Sep 27 04:00:33 2016
+++ src/distrib/sets/lists/modules/md.alpha	Tue Sep 27 20:52:43 2016
@@ -1,7 +1,7 @@
-# $NetBSD: md.alpha,v 1.4 2016/09/27 04:00:33 pgoyette Exp $
-./@MODULEDIR@/cac_eisabase-kernel-modules	kmod
-./@MODULEDIR@/cac_eisa/cac_eisa.kmod		base-kernel-modules	kmod
+# $NetBSD: md.alpha,v 1.5 2016/09/27 20:52:43 pgoyette Exp $
+./@MODULEDIR@/cac_eisabase-obsolete		obsolete
+./@MODULEDIR@/cac_eisa/cac_eisa.kmod		base-obsolete		obsolete
 ./@MODULEDIR@/exec_elf64			base-kernel-modules	kmod
 ./@MODULEDIR@/exec_elf64/exec_elf64.kmod	base-kernel-modules	kmod
-./@MODULEDIR@/mlx_eisabase-kernel-modules	kmod
-./@MODULEDIR@/mlx_eisa/mlx_eisa.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/mlx_eisabase-obsolete		obsolete
+./@MODULEDIR@/mlx_eisa/mlx_eisa.kmod		base-obsolete		obsolete
Index: src/distrib/sets/lists/modules/md.hppa
diff -u src/distrib/sets/lists/modules/md.hppa:1.4 src/distrib/sets/lists/modules/md.hppa:1.5
--- src/distrib/sets/lists/modules/md.hppa:1.4	Tue Sep 27 04:00:33 2016
+++ src/distrib/sets/lists/modules/md.hppa	Tue Sep 27 20:52:43 2016
@@ -1,8 +1,8 @@
-# $NetBSD: md.hppa,v 1.4 2016/09/27 04:00:33 pgoyette Exp $
-./@MODULEDIR@/cac_eisabase-kernel-modules	kmod
-./@MODULEDIR@/cac_eisa/cac_eisa.kmod		base-kernel-modules	kmod
+# $NetBSD: md.hppa,v 1.5 2016/09/27 20:52:43 pgoyette Exp $
+./@MODULEDIR@/cac_eisabase-obsolete		obsolete
+./@MODULEDIR@/cac_eisa/cac_eisa.kmod		base-obsolete		obsolete
 ./@MODULEDIR@/exec_elf32			base-kernel-modules	kmod
 ./@MODULEDIR@/exec_elf32/exec_elf32.kmod	base-kernel-modules	kmod
-./@MODULEDIR@/mlx_eisabase-kernel-modules	kmod
-./@MODULEDIR@/mlx_eisa/mlx_eisa.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/mlx_eisabase-obsolete		obsolete
+./@MODULEDIR@/mlx_eisa/mlx_eisa.kmod		base-obsolete		obsolete
 

Index: src/distrib/sets/lists/modules/md.amd64
diff -u src/distrib/sets/lists/modules/md.amd64:1.68 src/distrib/sets/lists/modules/md.amd64:1.69
--- src/distrib/sets/lists/modules/md.amd64:1.68	Tue Sep 27 04:00:33 2016
+++ src/distrib/sets/lists/modules/md.amd64	Tue Sep 27 20:52:43 2016
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.68 2016/09/27 04:00:33 pgoyette Exp $
+# $NetBSD: md.amd64,v 1.69 2016/09/27 20:52:43 pgoyette Exp $
 #
 # NOTE that there are two sets of files here:
 # @MODULEDIR@ and amd64-xen
@@ -111,8 +111,8 @@
 ./@MODULEDIR@/i915drmkms/i915drmkms.kmod	base-kernel-modules	kmod
 ./@MODULEDIR@/itesiobase-kernel-modules	kmod
 ./@MODULEDIR@/itesio/itesio.kmod		base-kernel-modules	kmod
-./@MODULEDIR@/ld_nvmebase-kernel-modules	kmod
-./@MODULEDIR@/ld_nvme/ld_nvme.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/ld_nvmebase-obsolete		obsolete
+./@MODULEDIR@/ld_nvme/ld_nvme.kmod		base-obsolete		obsolete
 ./@MODULEDIR@/lg3303base-kernel-modules	kmod
 ./@MODULEDIR@/lg3303/lg3303.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/lmbase-kernel-modules	kmod
@@ -125,8 +125,8 @@
 ./@MODULEDIR@/lm_wbsio/lm_wbsio.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/mt2131base-kernel-modules	kmod
 ./@MODULEDIR@/mt2131/mt2131.kmod		base-kernel-modules	kmod
-./@MODULEDIR@/nvmebase-kernel-modules	kmod
-./@MODULEDIR@/nvme/nvme.kmod			base-kernel-modules	kmod
+./@MODULEDIR@/nvmebase-obsolete		obsolete
+./@MODULEDIR@/nvme/nvme.kmod			base-obsolete		obsolete
 ./@MODULEDIR@/nxt2kbase-kernel-modules	kmod
 ./@MODULEDIR@/nxt2k/nxt2k.kmod			base-kernel-modules	kmod
 ./@MODULEDIR@/odcmbase-kernel-modules	kmod

Index: src/distrib/sets/lists/modules/md.i386
diff -u src/distrib/sets/lists/modules/md.i386:1.70 src/distrib/sets/lists/modules/md.i386:1.71
--- src/distrib/sets/lists/modules/md.i386:1.70	Tue Sep 27 

CVS commit: src/sys/dev/ic

2016-09-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Sep 27 20:37:06 UTC 2016

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

Log Message:
remove stray debugging, fix debugging message.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/ic/rt2860.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/rt2860.c
diff -u src/sys/dev/ic/rt2860.c:1.22 src/sys/dev/ic/rt2860.c:1.23
--- src/sys/dev/ic/rt2860.c:1.22	Tue Sep 27 16:16:35 2016
+++ src/sys/dev/ic/rt2860.c	Tue Sep 27 16:37:05 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rt2860.c,v 1.22 2016/09/27 20:16:35 christos Exp $	*/
+/*	$NetBSD: rt2860.c,v 1.23 2016/09/27 20:37:05 christos Exp $	*/
 /*	$OpenBSD: rt2860.c,v 1.90 2016/04/13 10:49:26 mpi Exp $	*/
 /*	$FreeBSD: head/sys/dev/ral/rt2860.c 297793 2016-04-10 23:07:00Z pfg $ */
 
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1.22 2016/09/27 20:16:35 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1.23 2016/09/27 20:37:05 christos Exp $");
 
 #include 
 #include 
@@ -1231,7 +1231,7 @@ rt2860_tx_intr(struct rt2860_softc *sc, 
 	rt2860_drain_stats_fifo(sc);
 
 	hw = RAL_READ(sc, RT2860_TX_DTX_IDX(qid));
-	DPRINTF(("%s: rx mbuf %#x\n", __func__, hw));
+	DPRINTF(("%s: tx mbuf %#x\n", __func__, hw));
 	while (ring->next != hw) {
 		struct rt2860_tx_data *data = ring->data[ring->next];
 
@@ -1385,7 +1385,6 @@ rt2860_rx_intr(struct rt2860_softc *sc)
 			m->m_data += 2;
 			wh = mtod(m, struct ieee80211_frame *);
 		}
-		printf("%s wh=%p\n", __func__, wh);
 
 #ifdef HW_CRYPTO
 		if (__predict_false(rxd->flags & htole32(RT2860_RX_MICERR))) {



CVS commit: src/sys/net80211

2016-09-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Sep 27 20:20:06 UTC 2016

Modified Files:
src/sys/net80211: ieee80211_input.c ieee80211_netbsd.c ieee80211_node.c
ieee80211_rssadapt.c ieee80211_var.h

Log Message:
- use ether_snprintf() so that we don't overwrite our buffer for printing
  ethernet-like addresses
- make this compile againw without IEEE80211_DEBUG.


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 src/sys/net80211/ieee80211_input.c
cvs rdiff -u -r1.27 -r1.28 src/sys/net80211/ieee80211_netbsd.c
cvs rdiff -u -r1.71 -r1.72 src/sys/net80211/ieee80211_node.c
cvs rdiff -u -r1.20 -r1.21 src/sys/net80211/ieee80211_rssadapt.c
cvs rdiff -u -r1.30 -r1.31 src/sys/net80211/ieee80211_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/net80211/ieee80211_input.c
diff -u src/sys/net80211/ieee80211_input.c:1.84 src/sys/net80211/ieee80211_input.c:1.85
--- src/sys/net80211/ieee80211_input.c:1.84	Sat May 14 09:35:40 2016
+++ src/sys/net80211/ieee80211_input.c	Tue Sep 27 16:20:06 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ieee80211_input.c,v 1.84 2016/05/14 13:35:40 mlelstv Exp $	*/
+/*	$NetBSD: ieee80211_input.c,v 1.85 2016/09/27 20:20:06 christos Exp $	*/
 /*-
  * Copyright (c) 2001 Atsushi Onoe
  * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@@ -36,7 +36,7 @@
 __FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.81 2005/08/10 16:22:29 sam Exp $");
 #endif
 #ifdef __NetBSD__
-__KERNEL_RCSID(0, "$NetBSD: ieee80211_input.c,v 1.84 2016/05/14 13:35:40 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ieee80211_input.c,v 1.85 2016/09/27 20:20:06 christos Exp $");
 #endif
 
 #ifdef _KERNEL_OPT
@@ -48,7 +48,7 @@ __KERNEL_RCSID(0, "$NetBSD: ieee80211_in
 
 #include 
 #include 
-#include  
+#include 
 #include 
 #include 
 #include 
@@ -66,7 +66,6 @@ __KERNEL_RCSID(0, "$NetBSD: ieee80211_in
 #include 
 #include 
 
-#include 
 #include 
 
 #include 
@@ -116,6 +115,7 @@ doprint(struct ieee80211com *ic, int sub
 	if ((_ic)->ic_debug & (_m))	\
 		ieee80211_discard_mac(_ic, _mac, _type, _fmt, __VA_ARGS__);\
 } while (0)
+#define	IEEE80211_DEBUGVAR(a) a
 
 static const u_int8_t *ieee80211_getbssid(struct ieee80211com *,
 	const struct ieee80211_frame *);
@@ -130,6 +130,7 @@ static void ieee80211_discard_mac(struct
 #define	IEEE80211_DISCARD(_ic, _m, _wh, _type, _fmt, ...)
 #define	IEEE80211_DISCARD_IE(_ic, _m, _wh, _type, _fmt, ...)
 #define	IEEE80211_DISCARD_MAC(_ic, _m, _mac, _type, _fmt, ...)
+#define	IEEE80211_DEBUGVAR(a)
 #endif /* IEEE80211_DEBUG */
 
 static struct mbuf *ieee80211_defrag(struct ieee80211com *,
@@ -172,6 +173,7 @@ ieee80211_input(struct ieee80211com *ic,
 	u_int8_t dir, type, subtype;
 	u_int8_t *bssid;
 	u_int16_t rxseq;
+	IEEE80211_DEBUGVAR(char ebuf[3 * ETHER_ADDR_LEN]);
 
 	IASSERT(ni != NULL, ("null node"));
 	ni->ni_inact = ni->ni_inact_reload;
@@ -222,7 +224,9 @@ ieee80211_input(struct ieee80211com *ic,
 			if (!IEEE80211_ADDR_EQ(bssid, ni->ni_bssid)) {
 /* not interested in */
 IEEE80211_DISCARD_MAC(ic, IEEE80211_MSG_INPUT,
-bssid, NULL, "%s", "not to bss");
+bssid, NULL, "node %s, %s",
+ether_snprintf(ebuf, sizeof(ebuf),
+ni->ni_bssid), "not to bss");
 ic->ic_stats.is_rx_wrongbss++;
 goto out;
 			}
@@ -265,8 +269,14 @@ ieee80211_input(struct ieee80211com *ic,
 			if (!IEEE80211_ADDR_EQ(bssid, ic->ic_bss->ni_bssid) &&
 			!IEEE80211_ADDR_EQ(bssid, ifp->if_broadcastaddr)) {
 /* not interested in */
+IEEE80211_DEBUGVAR(
+char bbuf[3 * ETHER_ADDR_LEN]);
 IEEE80211_DISCARD_MAC(ic, IEEE80211_MSG_INPUT,
-bssid, NULL, "%s", "not to bss");
+bssid, NULL, "bss %s, broadcast %s, %s",
+ether_snprintf(ebuf, sizeof(ebuf),
+ic->ic_bss->ni_bssid),
+ether_snprintf(bbuf, sizeof(bbuf),
+ifp->if_broadcastaddr), "not to bss");
 ic->ic_stats.is_rx_wrongbss++;
 goto out;
 			}
@@ -553,7 +563,8 @@ ieee80211_input(struct ieee80211com *ic,
 			if_printf(ic->ic_ifp, "received %s from %s rssi %d\n",
 			ieee80211_mgt_subtype_name[subtype >>
 IEEE80211_FC0_SUBTYPE_SHIFT],
-			ether_sprintf(wh->i_addr2), rssi);
+			ether_snprintf(ebuf, sizeof(ebuf), wh->i_addr2),
+			rssi);
 		}
 #endif
 		if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
@@ -919,11 +930,13 @@ ieee80211_setup_rates(struct ieee80211_n
 		 */
 		nxrates = xrates[1];
 		if (rs->rs_nrates + nxrates > IEEE80211_RATE_MAXSIZE) {
+			IEEE80211_DEBUGVAR(char ebuf[3 * ETHER_ADDR_LEN]);
 			nxrates = IEEE80211_RATE_MAXSIZE - rs->rs_nrates;
 			IEEE80211_DPRINTF(ic, IEEE80211_MSG_XRATE,
 			 "[%s] extended rate set too large;"
 			 " only using %u of %u rates\n",
-			 ether_sprintf(ni->ni_macaddr), nxrates, xrates[1]);
+			 ether_snprintf(ebuf, sizeof(ebuf), ni->ni_macaddr),
+			 nxrates, xrates[1]);
 			ic->ic_stats.is_rx_rstoobig++;
 		}
 		

CVS commit: src/sys/dev/ic

2016-09-27 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Sep 27 20:16:36 UTC 2016

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

Log Message:
works, tested without privacy, wep and wpa. Soft crypto only for now.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/ic/rt2860.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/rt2860.c
diff -u src/sys/dev/ic/rt2860.c:1.21 src/sys/dev/ic/rt2860.c:1.22
--- src/sys/dev/ic/rt2860.c:1.21	Tue Jul 12 20:01:27 2016
+++ src/sys/dev/ic/rt2860.c	Tue Sep 27 16:16:35 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: rt2860.c,v 1.21 2016/07/13 00:01:27 christos Exp $	*/
+/*	$NetBSD: rt2860.c,v 1.22 2016/09/27 20:16:35 christos Exp $	*/
 /*	$OpenBSD: rt2860.c,v 1.90 2016/04/13 10:49:26 mpi Exp $	*/
 /*	$FreeBSD: head/sys/dev/ral/rt2860.c 297793 2016-04-10 23:07:00Z pfg $ */
 
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1.21 2016/07/13 00:01:27 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1.22 2016/09/27 20:16:35 christos Exp $");
 
 #include 
 #include 
@@ -340,10 +340,14 @@ rt2860_attachhook(device_t self)
 	IEEE80211_C_APPMGT |	/* HostAP power management */
 #endif
 #endif
+	IEEE80211_C_WDS |		/* 4-address traffic works */
+	IEEE80211_C_WME |		/* 802.11e */
 	IEEE80211_C_SHPREAMBLE |	/* short preamble supported */
 	IEEE80211_C_SHSLOT |	/* short slot time supported */
-	IEEE80211_C_WEP |		/* s/w WEP */
-	IEEE80211_C_WPA;		/* WPA/RSN */
+#ifdef HW_CRYPTO
+	IEEE80211_C_WEP |		/* WEP */
+#endif
+	IEEE80211_C_WPA; 		/* 802.11i */
 
 	if (sc->rf_rev == RT2860_RF_2750 || sc->rf_rev == RT2860_RF_2850) {
 		/* set supported .11a rates */
@@ -1227,6 +1231,7 @@ rt2860_tx_intr(struct rt2860_softc *sc, 
 	rt2860_drain_stats_fifo(sc);
 
 	hw = RAL_READ(sc, RT2860_TX_DTX_IDX(qid));
+	DPRINTF(("%s: rx mbuf %#x\n", __func__, hw));
 	while (ring->next != hw) {
 		struct rt2860_tx_data *data = ring->data[ring->next];
 
@@ -1235,7 +1240,7 @@ rt2860_tx_intr(struct rt2860_softc *sc, 
 			data->map->dm_mapsize, BUS_DMASYNC_POSTWRITE);
 			bus_dmamap_unload(sc->sc_dmat, data->map);
 			m_freem(data->m);
-			data->m= NULL;
+			data->m = NULL;
 			ieee80211_free_node(data->ni);
 			data->ni = NULL;
 
@@ -1288,7 +1293,7 @@ rt2860_rx_intr(struct rt2860_softc *sc)
 	uint16_t phy;
 
 	hw = RAL_READ(sc, RT2860_FS_DRX_IDX) & 0xfff;
-	DPRINTF(("rx mbuf %#x\n", hw));
+	DPRINTF(("%s: rx mbuf %#x\n", __func__, hw));
 	while (sc->rxq.cur != hw) {
 		struct rt2860_rx_data *data = >rxq.data[sc->rxq.cur];
 		struct rt2860_rxd *rxd = >rxq.rxd[sc->rxq.cur];
@@ -1375,11 +1380,12 @@ rt2860_rx_intr(struct rt2860_softc *sc)
 
 		/* HW may insert 2 padding bytes after 802.11 header */
 		if (rxd->flags & htole32(RT2860_RX_L2PAD)) {
-			u_int hdrlen = ieee80211_hdrspace(ic, wh);
+			u_int hdrlen = ieee80211_hdrsize(wh);
 			memmove((char *)wh + 2, wh, hdrlen);
 			m->m_data += 2;
 			wh = mtod(m, struct ieee80211_frame *);
 		}
+		printf("%s wh=%p\n", __func__, wh);
 
 #ifdef HW_CRYPTO
 		if (__predict_false(rxd->flags & htole32(RT2860_RX_MICERR))) {
@@ -1431,7 +1437,6 @@ rt2860_rx_intr(struct rt2860_softc *sc)
 		}
 		bpf_mtap2(sc->sc_drvbpf, tap, sc->sc_rxtap_len, m);
 skipbpf:
-		wh = mtod(m, struct ieee80211_frame *);
 		/* grab a reference to the source node */
 		ni = ieee80211_find_rxnode(ic,
 		(struct ieee80211_frame_min *)wh);
@@ -1574,8 +1579,8 @@ rt2860_tx(struct rt2860_softc *sc, struc
 	data = SLIST_FIRST(>data_pool);
 
 	wh = mtod(m, struct ieee80211_frame *);
-#if 0
-	if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+#ifndef HW_CRYPTO
+	if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
 		struct ieee80211_key *k = ieee80211_crypto_encap(ic, ni, m);
 		if (k == NULL) {
 			m_freem(m);
@@ -1587,7 +1592,7 @@ rt2860_tx(struct rt2860_softc *sc, struc
 	}
 #endif
 
-	hdrlen = ieee80211_hdrspace(ic, wh);
+	hdrlen = ieee80211_anyhdrsize(wh);
 	type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK;
 
 	if ((hasqos = ieee80211_has_qos(wh))) {
@@ -1719,8 +1724,7 @@ rt2860_tx(struct rt2860_softc *sc, struc
 	/* first segment is TXWI + 802.11 header */
 	txd = >txd[ring->cur];
 	txd->sdp0 = htole32(data->paddr);
-	int pad = (hdrlen + 3) & ~3;
-	txd->sdl0 = htole16(sizeof (struct rt2860_txwi) + pad);
+	txd->sdl0 = htole16(sizeof (struct rt2860_txwi) + hdrlen);
 	txd->flags = qsel;
 
 	/* setup payload segments */
@@ -1788,6 +1792,7 @@ rt2860_start(struct ifnet *ifp)
 
 	for (;;) {
 		if (SLIST_EMPTY(>data_pool) || sc->qfullmsk != 0) {
+			DPRINTF(("%s: stuffup\n", __func__));
 			ifp->if_flags |= IFF_OACTIVE;
 			break;
 		}
@@ -1796,32 +1801,42 @@ rt2860_start(struct ifnet *ifp)
 		if (m != NULL) {
 			ni = M_GETCTX(m, struct ieee80211_node *);
 			M_CLEARCTX(m);
+			DPRINTF(("%s: send management\n", __func__));
 			goto sendit;
 		}
-		if (ic->ic_state != IEEE80211_S_RUN)
+		if (ic->ic_state != IEEE80211_S_RUN) {
+			

CVS commit: src/external/mit/xorg/server/drivers/xf86-video-sunffb

2016-09-27 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Sep 27 19:26:06 UTC 2016

Modified Files:
src/external/mit/xorg/server/drivers/xf86-video-sunffb: Makefile

Log Message:
Split -mv8plus into the appropiate flags for GCC and clang.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 \
src/external/mit/xorg/server/drivers/xf86-video-sunffb/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-sunffb/Makefile
diff -u src/external/mit/xorg/server/drivers/xf86-video-sunffb/Makefile:1.12 src/external/mit/xorg/server/drivers/xf86-video-sunffb/Makefile:1.13
--- src/external/mit/xorg/server/drivers/xf86-video-sunffb/Makefile:1.12	Tue Sep 27 19:24:19 2016
+++ src/external/mit/xorg/server/drivers/xf86-video-sunffb/Makefile	Tue Sep 27 19:26:06 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.12 2016/09/27 19:24:19 joerg Exp $
+#	$NetBSD: Makefile,v 1.13 2016/09/27 19:26:06 joerg Exp $
 
 DRIVER=		xf86-video-sunffb
 DRIVER_NAME=	sunffb_drv
@@ -14,7 +14,8 @@ AFLAGS+= -x assembler-with-cpp -Wa,-Av9a
 
 .if ${MACHINE_ARCH} == "sparc"
 AFLAGS+= -x assembler-with-cpp -Wa,-Av8plusa
-COPTS= -mv8plus
+COPTS+=	${${ACTIVE_CC} == "gcc" :? -mv8plus :}
+COPTS+=	${${ACTIVE_CC} == "clang" :? -Wa,-Av8plusa :}
 .endif
 
 CPPFLAGS+=	${X11FLAGS.DRI} -DUSE_VIS



CVS commit: src/external/mit/xorg/server/drivers

2016-09-27 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Sep 27 19:24:19 UTC 2016

Modified Files:
src/external/mit/xorg/server/drivers/xf86-video-suncg6: Makefile
src/external/mit/xorg/server/drivers/xf86-video-sunffb: Makefile

Log Message:
Don't bail out on the const lose for the driver name for clang. Also
accepts differences in pointer signs.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/external/mit/xorg/server/drivers/xf86-video-suncg6/Makefile
cvs rdiff -u -r1.11 -r1.12 \
src/external/mit/xorg/server/drivers/xf86-video-sunffb/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-suncg6/Makefile
diff -u src/external/mit/xorg/server/drivers/xf86-video-suncg6/Makefile:1.8 src/external/mit/xorg/server/drivers/xf86-video-suncg6/Makefile:1.9
--- src/external/mit/xorg/server/drivers/xf86-video-suncg6/Makefile:1.8	Mon Sep  5 06:30:40 2016
+++ src/external/mit/xorg/server/drivers/xf86-video-suncg6/Makefile	Tue Sep 27 19:24:19 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2016/09/05 06:30:40 martin Exp $
+#	$NetBSD: Makefile,v 1.9 2016/09/27 19:24:19 joerg Exp $
 
 DRIVER=		xf86-video-suncg6
 DRIVER_NAME=	suncg6_drv
@@ -15,3 +15,4 @@ MAN=		suncg6.4
 .if ${HAVE_GCC:U0} > 48
 COPTS.cg6_accel.c+=	${${ACTIVE_CC} == "gcc":? -Wno-error=discarded-qualifiers :}
 .endif
+COPTS.cg6_accel.c+=	${${ACTIVE_CC} == "clang":? -Wno-error=incompatible-pointer-types-discards-qualifiers :}

Index: src/external/mit/xorg/server/drivers/xf86-video-sunffb/Makefile
diff -u src/external/mit/xorg/server/drivers/xf86-video-sunffb/Makefile:1.11 src/external/mit/xorg/server/drivers/xf86-video-sunffb/Makefile:1.12
--- src/external/mit/xorg/server/drivers/xf86-video-sunffb/Makefile:1.11	Mon Sep  5 06:30:40 2016
+++ src/external/mit/xorg/server/drivers/xf86-video-sunffb/Makefile	Tue Sep 27 19:24:19 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.11 2016/09/05 06:30:40 martin Exp $
+#	$NetBSD: Makefile,v 1.12 2016/09/27 19:24:19 joerg Exp $
 
 DRIVER=		xf86-video-sunffb
 DRIVER_NAME=	sunffb_drv
@@ -28,3 +28,6 @@ MAN=		sunffb.4
 COPTS.ffb_dac.c+=	${${ACTIVE_CC} == "gcc":? -Wno-error=discarded-qualifiers :}
 COPTS.ffb_dga.c+=	${${ACTIVE_CC} == "gcc":? -Wno-error=discarded-qualifiers :}
 .endif
+COPTS.ffb_dac.c+=	${${ACTIVE_CC} == "clang":? -Wno-error=incompatible-pointer-types-discards-qualifiers :}
+COPTS.ffb_dga.c+=	${${ACTIVE_CC} == "clang":? -Wno-error=incompatible-pointer-types-discards-qualifiers :}
+COPTS.ffb_exa.c+=	${${ACTIVE_CC} == "clang":? -Wno-error=pointer-sign :}



CVS commit: src/external/mit/xorg/lib

2016-09-27 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Sep 27 19:18:42 UTC 2016

Modified Files:
src/external/mit/xorg/lib/fontconfig/src: Makefile
src/external/mit/xorg/lib/gallium: Makefile
src/external/mit/xorg/lib/libxshmfence: Makefile

Log Message:
Allow clang to generate SPARCv8+ assembly for now.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/external/mit/xorg/lib/fontconfig/src/Makefile
cvs rdiff -u -r1.15 -r1.16 src/external/mit/xorg/lib/gallium/Makefile
cvs rdiff -u -r1.4 -r1.5 src/external/mit/xorg/lib/libxshmfence/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/lib/fontconfig/src/Makefile
diff -u src/external/mit/xorg/lib/fontconfig/src/Makefile:1.18 src/external/mit/xorg/lib/fontconfig/src/Makefile:1.19
--- src/external/mit/xorg/lib/fontconfig/src/Makefile:1.18	Tue May 31 02:35:49 2016
+++ src/external/mit/xorg/lib/fontconfig/src/Makefile	Tue Sep 27 19:18:42 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.18 2016/05/31 02:35:49 pgoyette Exp $
+#	$NetBSD: Makefile,v 1.19 2016/09/27 19:18:42 joerg Exp $
 
 .include 
 
@@ -135,5 +135,14 @@ CPPFLAGS.fcxml.c=	-Wno-error
 
 CWARNFLAGS.clang+=	-Wno-pointer-sign -Wno-switch
 
+.if ${MACHINE_ARCH} == "sparc" || ${COMMON_MACHINE_ARCH:U} == "sparc"
+COPTS.fccache.c+=	${${ACTIVE_CC} == "clang":? -Wa,-Av8plus  :}
+COPTS.fccfg.c+=	${${ACTIVE_CC} == "clang":? -Wa,-Av8plus  :}
+COPTS.fccharset.c+=	${${ACTIVE_CC} == "clang":? -Wa,-Av8plus  :}
+COPTS.fcobjs.c+=	${${ACTIVE_CC} == "clang":? -Wa,-Av8plus  :}
+COPTS.fcpat.c+=	${${ACTIVE_CC} == "clang":? -Wa,-Av8plus  :}
+COPTS.fcstr.c+=	${${ACTIVE_CC} == "clang":? -Wa,-Av8plus  :}
+.endif
+
 .include 
 .include 

Index: src/external/mit/xorg/lib/gallium/Makefile
diff -u src/external/mit/xorg/lib/gallium/Makefile:1.15 src/external/mit/xorg/lib/gallium/Makefile:1.16
--- src/external/mit/xorg/lib/gallium/Makefile:1.15	Tue Aug 16 21:05:14 2016
+++ src/external/mit/xorg/lib/gallium/Makefile	Tue Sep 27 19:18:42 2016
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2016/08/16 21:05:14 mrg Exp $
+# $NetBSD: Makefile,v 1.16 2016/09/27 19:18:42 joerg Exp $
 
 # Link the gallium mega driver.
 
@@ -632,6 +632,10 @@ SYMLINKS+= gallium_dri.so.${SHLIB_MAJOR}
 .endif
 .endfor
 
+.if ${MACHINE_ARCH} == "sparc" || ${COMMON_MACHINE_ARCH:U} == "sparc"
+COPTS+=	${${ACTIVE_CC} == "clang":? -Wa,-Av8plus  :}
+.endif
+
 .include 
 # Don't regenerate c files
 .y.c:

Index: src/external/mit/xorg/lib/libxshmfence/Makefile
diff -u src/external/mit/xorg/lib/libxshmfence/Makefile:1.4 src/external/mit/xorg/lib/libxshmfence/Makefile:1.5
--- src/external/mit/xorg/lib/libxshmfence/Makefile:1.4	Wed Aug 31 14:29:13 2016
+++ src/external/mit/xorg/lib/libxshmfence/Makefile	Tue Sep 27 19:18:42 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2016/08/31 14:29:13 christos Exp $
+#	$NetBSD: Makefile,v 1.5 2016/09/27 19:18:42 joerg Exp $
 
 .include 
 
@@ -25,5 +25,9 @@ PKGDIST=	${LIB}
 
 COPTS.xshmfence_semaphore.c += -Wno-stack-protector
 
+.if ${MACHINE_ARCH} == "sparc" || ${COMMON_MACHINE_ARCH:U} == "sparc"
+COPTS.xshmfence_semaphore.c+=	${${ACTIVE_CC} == "clang":? -Wa,-Av8plus  :}
+.endif
+
 .include 
 .include 



CVS commit: src/external/mit/xorg/server/drivers

2016-09-27 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Sep 27 19:15:10 UTC 2016

Modified Files:
src/external/mit/xorg/server/drivers/xf86-video-suncg14: Makefile
src/external/mit/xorg/server/drivers/xf86-video-suntcx: Makefile

Log Message:
Disable pointer sign warnings for clang.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/external/mit/xorg/server/drivers/xf86-video-suncg14/Makefile
cvs rdiff -u -r1.3 -r1.4 \
src/external/mit/xorg/server/drivers/xf86-video-suntcx/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-suncg14/Makefile
diff -u src/external/mit/xorg/server/drivers/xf86-video-suncg14/Makefile:1.6 src/external/mit/xorg/server/drivers/xf86-video-suncg14/Makefile:1.7
--- src/external/mit/xorg/server/drivers/xf86-video-suncg14/Makefile:1.6	Tue Aug 16 06:24:02 2016
+++ src/external/mit/xorg/server/drivers/xf86-video-suncg14/Makefile	Tue Sep 27 19:15:10 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2016/08/16 06:24:02 mrg Exp $
+#	$NetBSD: Makefile,v 1.7 2016/09/27 19:15:10 joerg Exp $
 
 DRIVER=		xf86-video-suncg14
 DRIVER_NAME=	suncg14_drv
@@ -7,5 +7,6 @@ SRCS=		cg14_driver.c cg14_cursor.c cg14_
 MAN=		suncg14.4
 
 CPPFLAGS+=	-I${X11SRCDIR.${DRIVER}}/../include
+CWARNFLAGS.clang+=	-Wno-pointer-sign
 
 .include "../Makefile.xf86-driver"

Index: src/external/mit/xorg/server/drivers/xf86-video-suntcx/Makefile
diff -u src/external/mit/xorg/server/drivers/xf86-video-suntcx/Makefile:1.3 src/external/mit/xorg/server/drivers/xf86-video-suntcx/Makefile:1.4
--- src/external/mit/xorg/server/drivers/xf86-video-suntcx/Makefile:1.3	Tue Aug 16 06:24:03 2016
+++ src/external/mit/xorg/server/drivers/xf86-video-suntcx/Makefile	Tue Sep 27 19:15:09 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2016/08/16 06:24:03 mrg Exp $
+#	$NetBSD: Makefile,v 1.4 2016/09/27 19:15:09 joerg Exp $
 
 DRIVER=		xf86-video-suntcx
 DRIVER_NAME=	suntcx_drv
@@ -9,4 +9,6 @@ CPPFLAGS+=	${X11FLAGS.DRI}
 
 MAN=		suntcx.4
 
+CWARNFLAGS.clang+=	-Wno-pointer-sign
+
 .include "../Makefile.xf86-driver"



CVS commit: xsrc/external/mit/xf86-video-sunffb/dist/src

2016-09-27 Thread Joerg Sonnenberger
Module Name:xsrc
Committed By:   joerg
Date:   Tue Sep 27 19:12:54 UTC 2016

Modified Files:
xsrc/external/mit/xf86-video-sunffb/dist/src: ffb_exa.c

Log Message:
CARD32 might not be an int, so cast explicitly to uint32_t and print
that correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
xsrc/external/mit/xf86-video-sunffb/dist/src/ffb_exa.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/xf86-video-sunffb/dist/src/ffb_exa.c
diff -u xsrc/external/mit/xf86-video-sunffb/dist/src/ffb_exa.c:1.4 xsrc/external/mit/xf86-video-sunffb/dist/src/ffb_exa.c:1.5
--- xsrc/external/mit/xf86-video-sunffb/dist/src/ffb_exa.c:1.4	Mon Aug 22 08:28:32 2016
+++ xsrc/external/mit/xf86-video-sunffb/dist/src/ffb_exa.c	Tue Sep 27 19:12:53 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: ffb_exa.c,v 1.4 2016/08/22 08:28:32 mrg Exp $ */
+/* $NetBSD: ffb_exa.c,v 1.5 2016/09/27 19:12:53 joerg Exp $ */
 /*
  * Copyright (c) 2015 Michael Lorenz
  * All rights reserved.
@@ -300,8 +300,8 @@ FFBPrepareComposite(int op, PicturePtr p
 		if (pSrcPicture->pSourcePict->type == SourcePictTypeSolidFill) {
 			pFfb->fillcolour =
 			pSrcPicture->pSourcePict->solidFill.color;
-			DPRINTF(X_ERROR, "%s: solid src %08x\n",
-			__func__, pFfb->fillcolour);
+			DPRINTF(X_ERROR, "%s: solid src %08"PRIx32"\n",
+			__func__, (uint32_t)pFfb->fillcolour);
 			pFfb->no_source_pixmap = TRUE;
 			pFfb->source_is_solid = TRUE;
 		}
@@ -311,8 +311,8 @@ FFBPrepareComposite(int op, PicturePtr p
 		SourcePictTypeSolidFill) {
 			pFfb->fillcolour = 
 			   pMaskPicture->pSourcePict->solidFill.color;
-			xf86Msg(X_ERROR, "%s: solid mask %08x\n",
-			__func__, pFfb->fillcolour);
+			xf86Msg(X_ERROR, "%s: solid mask %08"PRIx32"\n",
+			__func__, (uint32_t)pFfb->fillcolour);
 		}
 	}
 	if (pMaskPicture != NULL) {



CVS commit: xsrc/external/mit

2016-09-27 Thread Joerg Sonnenberger
Module Name:xsrc
Committed By:   joerg
Date:   Tue Sep 27 19:11:51 UTC 2016

Modified Files:
xsrc/external/mit/xf86-video-suncg14/dist/src: cg14_driver.c
xsrc/external/mit/xf86-video-suntcx/dist/src: tcx_driver.c

Log Message:
Don't directly use assignments in if (), but add the commonly accepted
explicit pair of parenthesis.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 \
xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c
cvs rdiff -u -r1.12 -r1.13 \
xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.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/xf86-video-suncg14/dist/src/cg14_driver.c
diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c:1.14 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c:1.15
--- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c:1.14	Sun Sep 18 02:05:38 2016
+++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_driver.c	Tue Sep 27 19:11:51 2016
@@ -351,7 +351,7 @@ CG14PreInit(ScrnInfoPtr pScrn, int flags
 	 pCg14->memsize = 0x0080;
 len = 24;
 prom = sparcPromInit();
-if (ptr = sparcPromGetProperty(>node, "reg", )) {
+if ((ptr = sparcPromGetProperty(>node, "reg", ))) {
 	if (len >= 24) {
 	memcpy(reg, ptr, 24);
 	size = reg[5];

Index: xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c
diff -u xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c:1.12 xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c:1.13
--- xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c:1.12	Fri Sep 23 20:51:57 2016
+++ xsrc/external/mit/xf86-video-suntcx/dist/src/tcx_driver.c	Tue Sep 27 19:11:51 2016
@@ -345,7 +345,7 @@ TCXPreInit(ScrnInfoPtr pScrn, int flags)
 prom = sparcPromInit();
 hwCursor = sparcPromGetBool(>node, "hw-cursor");
 lowDepth = sparcPromGetBool(>node, "tcx-8-bit");
-if (pTcx->HasStipROP = sparcPromGetBool(>node, "stip-rop")) {
+if ((pTcx->HasStipROP = sparcPromGetBool(>node, "stip-rop"))) {
 	xf86Msg(X_PROBED, "stipple space supports ROPs\n");
 }
 pTcx->Is8bit = (lowDepth != 0); 



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

2016-09-27 Thread Joerg Sonnenberger
Module Name:xsrc
Committed By:   joerg
Date:   Tue Sep 27 19:10:47 UTC 2016

Modified Files:
xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd:
ppc_video.c

Log Message:
Silently report success for enabling IO on platforms without it.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 \
xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/ppc_video.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/os-support/bsd/ppc_video.c
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/ppc_video.c:1.10 xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/ppc_video.c:1.11
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/ppc_video.c:1.10	Fri Sep 23 19:59:03 2016
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/os-support/bsd/ppc_video.c	Tue Sep 27 19:10:47 2016
@@ -82,8 +82,8 @@ xf86EnableIO()
 #ifdef __arm__
 IOPortBase = (unsigned int)ioBase;
 #endif
-return TRUE;
 #endif
+return TRUE;
 }
 
 



CVS commit: src/usr.sbin/pcictl

2016-09-27 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 27 16:44:04 UTC 2016

Modified Files:
src/usr.sbin/pcictl: pcictl.8

Log Message:
apply the previous typo in another place as well.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 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.18 src/usr.sbin/pcictl/pcictl.8:1.19
--- src/usr.sbin/pcictl/pcictl.8:1.18	Tue Sep 27 11:13:57 2016
+++ src/usr.sbin/pcictl/pcictl.8	Tue Sep 27 16:44:04 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pcictl.8,v 1.18 2016/09/27 11:13:57 wiz Exp $
+.\"	$NetBSD: pcictl.8,v 1.19 2016/09/27 16:44:04 mrg Exp $
 .\"
 .\" Copyright 2001 Wasabi Systems, Inc.
 .\" All rights reserved.
@@ -130,7 +130,7 @@ Do not use it as a substitute for a devi
 .Pa /dev/pci*
 - PCI bus device nodes
 .Sh EXAMPLES
-This show all PCI devices on the system:
+This shows all PCI devices on the system:
 .Pp
 .Dl pcictl pci0 list
 .Pp



CVS commit: src/share/mk

2016-09-27 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Sep 27 16:47:01 UTC 2016

Modified Files:
src/share/mk: bsd.own.mk

Log Message:
set X11SRCDIR.xf86-video-modesetting correctly for xorg-server 1.18.4.
should fix build errors for x86.


To generate a diff of this commit:
cvs rdiff -u -r1.962 -r1.963 src/share/mk/bsd.own.mk

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

Modified files:

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.962 src/share/mk/bsd.own.mk:1.963
--- src/share/mk/bsd.own.mk:1.962	Fri Sep 23 21:30:49 2016
+++ src/share/mk/bsd.own.mk	Tue Sep 27 16:47:01 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.962 2016/09/23 21:30:49 macallan Exp $
+#	$NetBSD: bsd.own.mk,v 1.963 2016/09/27 16:47:01 mrg Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -1453,10 +1453,18 @@ X11SRCDIR.${_dir}?=		${X11SRCDIRMIT}/${_
 X11SRCDIR.xf86-input-${_i}?=	${X11SRCDIRMIT}/xf86-input-${_i}/dist
 .endfor
 
+# xf86-video-modesetting move into the server build.
+EXTRA_DRIVERS=
+.if ${HAVE_XORG_SERVER_VER} == "118"
+X11SRCDIR.xf86-video-modesetting=${X11SRCDIR.xorg-server}/hw/xfree86/drivers/modesetting
+.else
+EXTRA_DRIVERS=	modesetting 
+.endif
+
 .for _v in \
 	ag10e amdgpu apm ark ast ati ati-kms chips cirrus crime \
 	geode glint i128 i740 igs imstt intel intel-old \
-	modesetting mach64 mga \
+	${EXTRA_DRIVERS} mach64 mga \
 	neomagic newport nouveau nsc nv nvxbox openchrome pnozz \
 	r128 rendition \
 	s3 s3virge savage siliconmotion sis suncg14 \



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

2016-09-27 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Tue Sep 27 13:01:18 UTC 2016

Modified Files:
src/sys/arch/mmeye/conf: MMTAICE

Log Message:
Clean up some commented out x86-specific things.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/mmeye/conf/MMTAICE

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/mmeye/conf/MMTAICE
diff -u src/sys/arch/mmeye/conf/MMTAICE:1.52 src/sys/arch/mmeye/conf/MMTAICE:1.53
--- src/sys/arch/mmeye/conf/MMTAICE:1.52	Fri Aug  7 13:53:28 2015
+++ src/sys/arch/mmeye/conf/MMTAICE	Tue Sep 27 13:01:18 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: MMTAICE,v 1.52 2015/08/07 13:53:28 maxv Exp $
+#	$NetBSD: MMTAICE,v 1.53 2016/09/27 13:01:18 maya Exp $
 #
 #	GENERIC -- everything that's currently supported
 #
@@ -16,13 +16,9 @@ include "arch/mmeye/conf/std.mmeye"
 maxusers	32		# estimated number of users
 
 # CPU support.  At least one is REQUIRED.
-#options 	I386_CPU
-#options 	I486_CPU
-#options 	I586_CPU
 options		SH3
 options 	SH7708		# 60MHz
 #options 	SH7708R		# 100MHz
-#options 	I686_CPU
 options 	PCLOCK=		# 33.33MHz
 options 	INITTODR_ALWAYS_USE_RTC
 
@@ -32,8 +28,6 @@ makeoptions	DEFTEXTADDR="0x8c01"
 
 # CPU-related options.
 #options 	MATH_EMULATE	# floating point emulation
-#options 	VM86		# virtual 8086 emulation
-#options 	USER_LDT	# user-settable LDT; used by WINE
 # eliminate delay no-ops in I/O; recommended on all but very old machines
 #options 	DUMMY_NOPS
 



CVS commit: src/sys/dev/pci

2016-09-27 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Sep 27 12:04:16 UTC 2016

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

Log Message:
Add a missing ')' in the call to bswap64().

Should fix compile error of twa module for sparc and sparc64


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 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.54 src/sys/dev/pci/twa.c:1.55
--- src/sys/dev/pci/twa.c:1.54	Tue Sep 27 03:33:32 2016
+++ src/sys/dev/pci/twa.c	Tue Sep 27 12:04:16 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: twa.c,v 1.54 2016/09/27 03:33:32 pgoyette Exp $ */
+/*	$NetBSD: twa.c,v 1.55 2016/09/27 12:04:16 pgoyette Exp $ */
 /*	$wasabi: twa.c,v 1.27 2006/07/28 18:17:21 wrstuden Exp $	*/
 
 /*-
@@ -67,7 +67,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: twa.c,v 1.54 2016/09/27 03:33:32 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: twa.c,v 1.55 2016/09/27 12:04:16 pgoyette Exp $");
 
 //#define TWA_DEBUG
 
@@ -778,7 +778,7 @@ twa_read_capacity(struct twa_request *tr
 	if (error == 0) {
 #if BYTE_ORDER == BIG_ENDIAN
 		array_size = bswap64(_8btol(
-		((struct scsipi_read_capacity_16_data *)tr->tr_data->addr) + 1);
+		((struct scsipi_read_capacity_16_data *)tr->tr_data)->addr) + 1);
 #else
 		array_size = _8btol(((struct scsipi_read_capacity_16_data *)
 tr->tr_data)->addr) + 1;



CVS commit: src/usr.sbin/pcictl

2016-09-27 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Sep 27 11:13:57 UTC 2016

Modified Files:
src/usr.sbin/pcictl: pcictl.8

Log Message:
Sort sections. Formatting nitpicks. Fix typo.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 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.17 src/usr.sbin/pcictl/pcictl.8:1.18
--- src/usr.sbin/pcictl/pcictl.8:1.17	Sun Sep 25 00:06:49 2016
+++ src/usr.sbin/pcictl/pcictl.8	Tue Sep 27 11:13:57 2016
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pcictl.8,v 1.17 2016/09/25 00:06:49 mrg Exp $
+.\"	$NetBSD: pcictl.8,v 1.18 2016/09/27 11:13:57 wiz Exp $
 .\"
 .\" Copyright 2001 Wasabi Systems, Inc.
 .\" All rights reserved.
@@ -96,7 +96,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
-.Em WARNING:
+.Em WARNING :
 .Nm
 .Cm read
 is a dangerous command that can damage hardware and panic the operating
@@ -118,7 +118,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
-.Em WARNING:
+.Em WARNING :
 .Nm
 .Cm write
 is a dangerous command that can damage hardware and panic the operating
@@ -126,17 +126,17 @@ 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
 .Sh EXAMPLES
 This show all PCI devices on the system:
 .Pp
 .Dl pcictl pci0 list
 .Pp
-This show all PCI devices on the system, including attached drivers:
+This shows all PCI devices on the system, including attached drivers:
 .Pp
 .Dl pcictl pci0 list -N
-.Sh FILES
-.Pa /dev/pci*
-- PCI bus device nodes
 .Sh SEE ALSO
 .Xr pci 3 ,
 .Xr pci 4 ,



CVS commit: src/lib/libc/sys

2016-09-27 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Sep 27 11:11:43 UTC 2016

Modified Files:
src/lib/libc/sys: clock_settime.2

Log Message:
Remove duplicate Pp.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/lib/libc/sys/clock_settime.2

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

Modified files:

Index: src/lib/libc/sys/clock_settime.2
diff -u src/lib/libc/sys/clock_settime.2:1.26 src/lib/libc/sys/clock_settime.2:1.27
--- src/lib/libc/sys/clock_settime.2:1.26	Sat Sep 24 01:05:51 2016
+++ src/lib/libc/sys/clock_settime.2	Tue Sep 27 11:11:43 2016
@@ -1,4 +1,4 @@
-.\" $NetBSD: clock_settime.2,v 1.26 2016/09/24 01:05:51 christos Exp $
+.\" $NetBSD: clock_settime.2,v 1.27 2016/09/27 11:11:43 wiz Exp $
 .\"
 .\" Copyright (c) 1999 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -76,7 +76,6 @@ unless
 is
 .Dv NULL .
 .Pp
-.Pp
 The following
 .Fa clock_id
 values are supported:



CVS commit: src/sys/dev/ata

2016-09-27 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Tue Sep 27 08:05:34 UTC 2016

Modified Files:
src/sys/dev/ata: ata_raid.c ld_ataraid.c

Log Message:
Remove some debug printf's that slipped through.  Thanks, wiz!


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/ata/ata_raid.c
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/ata/ld_ataraid.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/ata/ata_raid.c
diff -u src/sys/dev/ata/ata_raid.c:1.38 src/sys/dev/ata/ata_raid.c:1.39
--- src/sys/dev/ata/ata_raid.c:1.38	Tue Sep 27 03:33:32 2016
+++ src/sys/dev/ata/ata_raid.c	Tue Sep 27 08:05:34 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ata_raid.c,v 1.38 2016/09/27 03:33:32 pgoyette Exp $	*/
+/*	$NetBSD: ata_raid.c,v 1.39 2016/09/27 08:05:34 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ata_raid.c,v 1.38 2016/09/27 03:33:32 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata_raid.c,v 1.39 2016/09/27 08:05:34 pgoyette Exp $");
 
 #include 
 #include 
@@ -177,7 +177,6 @@ ata_raid_finalize(device_t self)
 		ataraid_cd.cd_name);
 
  out:
-printf("%s: exit\n", __func__);
 	return (1);
 }
 

Index: src/sys/dev/ata/ld_ataraid.c
diff -u src/sys/dev/ata/ld_ataraid.c:1.43 src/sys/dev/ata/ld_ataraid.c:1.44
--- src/sys/dev/ata/ld_ataraid.c:1.43	Tue Sep 27 03:33:32 2016
+++ src/sys/dev/ata/ld_ataraid.c	Tue Sep 27 08:05:34 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld_ataraid.c,v 1.43 2016/09/27 03:33:32 pgoyette Exp $	*/
+/*	$NetBSD: ld_ataraid.c,v 1.44 2016/09/27 08:05:34 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -47,7 +47,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ld_ataraid.c,v 1.43 2016/09/27 03:33:32 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_ataraid.c,v 1.44 2016/09/27 08:05:34 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "bio.h"
@@ -754,7 +754,6 @@ ld_ataraid_modcmd(modcmd_t cmd, void *op
 		error = ENOTTY;
 	break;
 	}
-printf("%s: return %d\n", __func__, error);
 #endif
 
 	return error;