CVS commit: src/libexec/ld.elf_so/arch/mips

2019-11-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov  3 03:15:59 UTC 2019

Modified Files:
src/libexec/ld.elf_so/arch/mips: mips_reloc.c

Log Message:
simplify pointer gymnastics that sprained gcc-8


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/libexec/ld.elf_so/arch/mips/mips_reloc.c

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

Modified files:

Index: src/libexec/ld.elf_so/arch/mips/mips_reloc.c
diff -u src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.72 src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.73
--- src/libexec/ld.elf_so/arch/mips/mips_reloc.c:1.72	Fri Jan 19 18:17:41 2018
+++ src/libexec/ld.elf_so/arch/mips/mips_reloc.c	Sat Nov  2 23:15:59 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_reloc.c,v 1.72 2018/01/19 23:17:41 christos Exp $	*/
+/*	$NetBSD: mips_reloc.c,v 1.73 2019/11/03 03:15:59 christos Exp $	*/
 
 /*
  * Copyright 1997 Michael L. Hitch 
@@ -30,7 +30,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: mips_reloc.c,v 1.72 2018/01/19 23:17:41 christos Exp $");
+__RCSID("$NetBSD: mips_reloc.c,v 1.73 2019/11/03 03:15:59 christos Exp $");
 #endif /* not lint */
 
 #include 
@@ -95,7 +95,8 @@ load_ptr(void *where, size_t len)
 	(void)memcpy(, where, len);
 #endif
 #if BYTE_ORDER == BIG_ENDIAN
-	(void)memcpy((uint8_t *)(()+1) - len, where, len);
+	uint8_t *valp = (void *)
+	(void)memcpy(valp + sizeof(val) - len, where, len);
 #endif
 	return (len == sizeof(Elf_Sxword)) ? val : (Elf_Sword)val;
 }
@@ -117,7 +118,8 @@ store_ptr(void *where, Elf_Sxword val, s
 	(void)memcpy(where, , len);
 #endif
 #if BYTE_ORDER == BIG_ENDIAN
-	(void)memcpy(where, (const uint8_t *)(()+1) - len, len);
+	const uint8_t *valp = (const void *)
+	(void)memcpy(where, valp + sizeof(val) - len, len);
 #endif
 }
 



CVS commit: src/libexec/ld.elf_so/arch/mips

2019-11-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov  3 03:15:59 UTC 2019

Modified Files:
src/libexec/ld.elf_so/arch/mips: mips_reloc.c

Log Message:
simplify pointer gymnastics that sprained gcc-8


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/libexec/ld.elf_so/arch/mips/mips_reloc.c

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



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

2019-11-02 Thread Yuuki Enomoto
Module Name:src
Committed By:   uki
Date:   Sun Nov  3 01:35:47 UTC 2019

Modified Files:
src/distrib/sets/lists/xdebug: md.alpha md.amd64 md.amiga md.bebox
md.cats md.dreamcast md.evbarm md.evbarm.armeb md.evbmips
md.ews4800mips md.hp300 md.hpcarm md.hpcmips md.hpcsh md.i386
md.ibmnws md.iyonix md.luna68k md.mac68k md.macppc md.netwinder
md.newsmips md.ofppc md.prep md.sgimips md.shark md.sparc
md.sparc64 md.vax md.zaurus mi shl.mi

Log Message:
Give syspkg names to xdebug files without some machine dependent files


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/distrib/sets/lists/xdebug/md.alpha \
src/distrib/sets/lists/xdebug/md.evbarm.armeb \
src/distrib/sets/lists/xdebug/md.ofppc \
src/distrib/sets/lists/xdebug/md.sparc \
src/distrib/sets/lists/xdebug/md.sparc64
cvs rdiff -u -r1.49 -r1.50 src/distrib/sets/lists/xdebug/md.amd64
cvs rdiff -u -r1.10 -r1.11 src/distrib/sets/lists/xdebug/md.amiga \
src/distrib/sets/lists/xdebug/md.evbmips
cvs rdiff -u -r1.9 -r1.10 src/distrib/sets/lists/xdebug/md.bebox \
src/distrib/sets/lists/xdebug/md.ews4800mips \
src/distrib/sets/lists/xdebug/md.hpcarm \
src/distrib/sets/lists/xdebug/md.hpcmips \
src/distrib/sets/lists/xdebug/md.hpcsh \
src/distrib/sets/lists/xdebug/md.netwinder \
src/distrib/sets/lists/xdebug/md.newsmips \
src/distrib/sets/lists/xdebug/md.prep \
src/distrib/sets/lists/xdebug/md.vax
cvs rdiff -u -r1.12 -r1.13 src/distrib/sets/lists/xdebug/md.cats
cvs rdiff -u -r1.11 -r1.12 src/distrib/sets/lists/xdebug/md.dreamcast \
src/distrib/sets/lists/xdebug/md.hp300 \
src/distrib/sets/lists/xdebug/md.sgimips
cvs rdiff -u -r1.21 -r1.22 src/distrib/sets/lists/xdebug/md.evbarm
cvs rdiff -u -r1.44 -r1.45 src/distrib/sets/lists/xdebug/md.i386
cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/xdebug/md.ibmnws
cvs rdiff -u -r1.2 -r1.3 src/distrib/sets/lists/xdebug/md.iyonix
cvs rdiff -u -r1.8 -r1.9 src/distrib/sets/lists/xdebug/md.luna68k \
src/distrib/sets/lists/xdebug/md.mac68k \
src/distrib/sets/lists/xdebug/md.zaurus
cvs rdiff -u -r1.14 -r1.15 src/distrib/sets/lists/xdebug/md.macppc \
src/distrib/sets/lists/xdebug/md.shark
cvs rdiff -u -r1.33 -r1.34 src/distrib/sets/lists/xdebug/mi
cvs rdiff -u -r1.52 -r1.53 src/distrib/sets/lists/xdebug/shl.mi

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



CVS commit: src/external/gpl3/gcc/dist/gcc/config/pa

2019-11-02 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Nov  3 01:03:30 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/pa: pa-netbsd.h

Log Message:
netbsd/hppa uses 16 byte alignment.  the inherited default changed..


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h

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



CVS commit: src/external/gpl3/gcc/dist/gcc/config/pa

2019-11-02 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Nov  3 01:03:30 UTC 2019

Modified Files:
src/external/gpl3/gcc/dist/gcc/config/pa: pa-netbsd.h

Log Message:
netbsd/hppa uses 16 byte alignment.  the inherited default changed..


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/dist/gcc/config/pa/pa-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/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h
diff -u src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h:1.5 src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h:1.6
--- src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h:1.5	Fri Aug 19 05:11:10 2016
+++ src/external/gpl3/gcc/dist/gcc/config/pa/pa-netbsd.h	Sun Nov  3 01:03:30 2019
@@ -131,6 +131,10 @@ along with GCC; see the file COPYING3.  
 #undef PTRDIFF_TYPE
 #define PTRDIFF_TYPE "long int"
 
+/* NetBSD always uses 128 byte alignment.  */
+#undef MALLOC_ABI_ALIGNMENT
+#define MALLOC_ABI_ALIGNMENT 128
+
 #if 0
 #undef TARGET_SYNC_LIBCALL
 #define TARGET_SYNC_LIBCALL 1



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

2019-11-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Nov  2 23:13:00 UTC 2019

Modified Files:
src/sys/arch/zaurus/conf: GENERIC

Log Message:
Put back options WSDISPLAY_COMPAT_RAWKBD. It's required by Xorg server.

Should be pulled up to netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/arch/zaurus/conf/GENERIC

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/zaurus/conf/GENERIC
diff -u src/sys/arch/zaurus/conf/GENERIC:1.87 src/sys/arch/zaurus/conf/GENERIC:1.88
--- src/sys/arch/zaurus/conf/GENERIC:1.87	Wed Aug 21 04:17:41 2019
+++ src/sys/arch/zaurus/conf/GENERIC	Sat Nov  2 23:13:00 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: GENERIC,v 1.87 2019/08/21 04:17:41 msaitoh Exp $
+#	$NetBSD: GENERIC,v 1.88 2019/11/02 23:13:00 tsutsui Exp $
 #
 # GENERIC machine description file
 #
@@ -143,7 +143,7 @@ options 	WS_KERNEL_FG=WSCOL_GREEN
 # compatibility to other console drivers
 options 	WSDISPLAY_COMPAT_PCVT		# emulate some ioctls
 options 	WSDISPLAY_COMPAT_USL		# wsconscfg VT handling
-# options 	WSDISPLAY_COMPAT_RAWKBD		# can get raw scancodes
+options 	WSDISPLAY_COMPAT_RAWKBD		# can get raw scancodes
 
 # Development and Debugging options
 



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

2019-11-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Nov  2 23:13:00 UTC 2019

Modified Files:
src/sys/arch/zaurus/conf: GENERIC

Log Message:
Put back options WSDISPLAY_COMPAT_RAWKBD. It's required by Xorg server.

Should be pulled up to netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/arch/zaurus/conf/GENERIC

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



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

2019-11-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Nov  2 23:03:53 UTC 2019

Modified Files:
src/sys/arch/zaurus/dev: zrc.c

Log Message:
Fix build errors with options WSDISPLAY_COMPAT_RAWKBD.

- Add missing RAWKEY_* macro definitions (taken from OpenBSD)
- Explicitly include "opt_wsdisplay_compat.h" for
  #ifdef WSDISPLAY_COMPAT_RAWKBD conditionals.
  (it is not properly pulled at least in netbsd-8)
 https://mail-index.netbsd.org/port-zaurus/2019/11/02/msg83.html

Should be pulled up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/zaurus/dev/zrc.c

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



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

2019-11-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Nov  2 23:03:53 UTC 2019

Modified Files:
src/sys/arch/zaurus/dev: zrc.c

Log Message:
Fix build errors with options WSDISPLAY_COMPAT_RAWKBD.

- Add missing RAWKEY_* macro definitions (taken from OpenBSD)
- Explicitly include "opt_wsdisplay_compat.h" for
  #ifdef WSDISPLAY_COMPAT_RAWKBD conditionals.
  (it is not properly pulled at least in netbsd-8)
 https://mail-index.netbsd.org/port-zaurus/2019/11/02/msg83.html

Should be pulled up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/zaurus/dev/zrc.c

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

Modified files:

Index: src/sys/arch/zaurus/dev/zrc.c
diff -u src/sys/arch/zaurus/dev/zrc.c:1.9 src/sys/arch/zaurus/dev/zrc.c:1.10
--- src/sys/arch/zaurus/dev/zrc.c:1.9	Sat Oct 27 17:18:14 2012
+++ src/sys/arch/zaurus/dev/zrc.c	Sat Nov  2 23:03:53 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: zrc.c,v 1.9 2012/10/27 17:18:14 chs Exp $	*/
+/*	$NetBSD: zrc.c,v 1.10 2019/11/02 23:03:53 tsutsui Exp $	*/
 /*	$OpenBSD: zaurus_remote.c,v 1.1 2005/11/17 05:26:31 uwe Exp $	*/
 
 /*
@@ -17,8 +17,10 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include "opt_wsdisplay_compat.h"
+
 #include 
-__KERNEL_RCSID(0, "$NetBSD: zrc.c,v 1.9 2012/10/27 17:18:14 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zrc.c,v 1.10 2019/11/02 23:03:53 tsutsui Exp $");
 
 #include 
 #include 
@@ -131,6 +133,11 @@ static const keysym_t zrc_keydesc[] = {
 };
 
 #ifdef WSDISPLAY_COMPAT_RAWKBD
+/* XXX see OpenBSD's  */
+#define	RAWKEY_Null		0x00
+#define	RAWKEY_AudioMute	0x85
+#define	RAWKEY_AudioLower	0x86
+#define	RAWKEY_AudioRaise 	0x87
 #define	RAWKEY_AudioRewind	0xa0
 #define	RAWKEY_AudioForward	0xa1
 #define	RAWKEY_AudioPlay	0xa2



CVS commit: src/sys/dev/spi

2019-11-02 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat Nov  2 22:55:58 UTC 2019

Modified Files:
src/sys/dev/spi: ssdfb_spi.c

Log Message:
add fdt device_compatible_entry


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/spi/ssdfb_spi.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/spi/ssdfb_spi.c
diff -u src/sys/dev/spi/ssdfb_spi.c:1.2 src/sys/dev/spi/ssdfb_spi.c:1.3
--- src/sys/dev/spi/ssdfb_spi.c:1.2	Sat Nov  2 17:13:20 2019
+++ src/sys/dev/spi/ssdfb_spi.c	Sat Nov  2 22:55:57 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ssdfb_spi.c,v 1.2 2019/11/02 17:13:20 tnn Exp $ */
+/* $NetBSD: ssdfb_spi.c,v 1.3 2019/11/02 22:55:57 tnn Exp $ */
 
 /*
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ssdfb_spi.c,v 1.2 2019/11/02 17:13:20 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ssdfb_spi.c,v 1.3 2019/11/02 22:55:57 tnn Exp $");
 
 #include 
 #include 
@@ -73,18 +73,28 @@ static void	ssdfb_bitstream_final(struct
 CFATTACH_DECL_NEW(ssdfb_spi, sizeof(struct ssdfb_spi_softc),
 ssdfb_spi_match, ssdfb_spi_attach, NULL, NULL);
 
+static const struct device_compatible_entry compat_data[] = {
+	{ "solomon,ssd1322",	0 },
+	{ NULL,			0 }
+};
+
 static int
 ssdfb_spi_match(device_t parent, cfdata_t match, void *aux)
 {
 	struct spi_attach_args *sa = aux;
+	int res;
+
+	res = spi_compatible_match(sa, match, compat_data);
+	if (!res)
+		return res;
 
 	/*
 	 * SSD1306 and SSD1322 data sheets specify 100ns cycle time.
 	 */
 	if (spi_configure(sa->sa_handle, SPI_MODE_0, 1000))
-		return 0;
+		res = 0;
 
-	return 1;
+	return res;
 }
 
 static void



CVS commit: src/sys/dev/spi

2019-11-02 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat Nov  2 22:55:58 UTC 2019

Modified Files:
src/sys/dev/spi: ssdfb_spi.c

Log Message:
add fdt device_compatible_entry


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/spi/ssdfb_spi.c

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



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

2019-11-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  2 21:34:58 UTC 2019

Modified Files:
src/distrib/sets/lists/comp: ad.powerpc

Log Message:
Fix sets for gcc-8


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/distrib/sets/lists/comp/ad.powerpc

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



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

2019-11-02 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Nov  2 21:34:58 UTC 2019

Modified Files:
src/distrib/sets/lists/comp: ad.powerpc

Log Message:
Fix sets for gcc-8


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/distrib/sets/lists/comp/ad.powerpc

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/comp/ad.powerpc
diff -u src/distrib/sets/lists/comp/ad.powerpc:1.95 src/distrib/sets/lists/comp/ad.powerpc:1.96
--- src/distrib/sets/lists/comp/ad.powerpc:1.95	Wed Oct  2 20:59:50 2019
+++ src/distrib/sets/lists/comp/ad.powerpc	Sat Nov  2 17:34:58 2019
@@ -1,4 +1,4 @@
-# $NetBSD: ad.powerpc,v 1.95 2019/10/03 00:59:50 mrg Exp $
+# $NetBSD: ad.powerpc,v 1.96 2019/11/02 21:34:58 christos Exp $
 ./usr/bin/elf2aoutcomp-sysutil-bin
 ./usr/bin/psim	comp-debug-bin		gdb
 ./usr/include/altivec.hcomp-obsolete		obsolete
@@ -75,17 +75,24 @@
 ./usr/include/gcc-7/spu2vmx.h			comp-c-include		gcc=7
 ./usr/include/gcc-7/tgmath.h			comp-c-include		gcc=7
 ./usr/include/gcc-7/vec_types.h			comp-c-include		gcc=7
+./usr/include/gcc-8/amo.h			comp-c-include		gcc=8
 ./usr/include/gcc-8/altivec.h			comp-c-include		gcc=8
+./usr/include/gcc-8/bmi2intrin.h		comp-c-include		gcc=8
+./usr/include/gcc-8/bmiintrin.h			comp-c-include		gcc=8
+./usr/include/gcc-8/emmintrin.h			comp-c-include		gcc=8
 ./usr/include/gcc-8/htmintrin.h			comp-c-include		gcc=8
 ./usr/include/gcc-8/htmxlintrin.h		comp-c-include		gcc=8
+./usr/include/gcc-8/mm_malloc.h			comp-c-include		gcc=8
+./usr/include/gcc-8/mmintrin.h			comp-c-include		gcc=8
 ./usr/include/gcc-8/paired.h			comp-c-include		gcc=8
 ./usr/include/gcc-8/ppc-asm.h			comp-c-include		gcc=8
 ./usr/include/gcc-8/ppu_intrinsics.h		comp-c-include		gcc=8
 ./usr/include/gcc-8/si2vmx.h			comp-c-include		gcc=8
-./usr/include/gcc-8/spe.h			comp-c-include		gcc=8
 ./usr/include/gcc-8/spu2vmx.h			comp-c-include		gcc=8
 ./usr/include/gcc-8/tgmath.h			comp-c-include		gcc=8
 ./usr/include/gcc-8/vec_types.h			comp-c-include		gcc=8
+./usr/include/gcc-8/x86intrin.h			comp-c-include		gcc=8
+./usr/include/gcc-8/xmmintrin.h			comp-c-include		gcc=8
 ./usr/include/powerpccomp-c-include
 ./usr/include/powerpc/ansi.h			comp-c-include
 ./usr/include/powerpc/aout_machdep.h		comp-c-include



CVS commit: src/sys/dev/pci

2019-11-02 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat Nov  2 21:11:55 UTC 2019

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

Log Message:
cast away unused return value


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/pci/if_ste.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/if_ste.c
diff -u src/sys/dev/pci/if_ste.c:1.57 src/sys/dev/pci/if_ste.c:1.58
--- src/sys/dev/pci/if_ste.c:1.57	Wed Oct 30 07:26:28 2019
+++ src/sys/dev/pci/if_ste.c	Sat Nov  2 21:11:55 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ste.c,v 1.57 2019/10/30 07:26:28 msaitoh Exp $	*/
+/*	$NetBSD: if_ste.c,v 1.58 2019/11/02 21:11:55 tnn Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ste.c,v 1.57 2019/10/30 07:26:28 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ste.c,v 1.58 2019/11/02 21:11:55 tnn Exp $");
 
 
 #include 
@@ -1100,7 +1100,7 @@ ste_stats_update(struct ste_softc *sc)
 	ifp->if_opackets +=
 	(u_int) bus_space_read_2(st, sh, STE_FramesTransmittedOK);
 
-	(u_int) bus_space_read_2(st, sh, STE_FramesReceivedOK);
+	(void) bus_space_read_2(st, sh, STE_FramesReceivedOK);
 
 	ifp->if_collisions +=
 	(u_int) bus_space_read_1(st, sh, STE_LateCollisions) +



CVS commit: src/share/man/man4

2019-11-02 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat Nov  2 19:22:37 UTC 2019

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

Log Message:
documentation for WSDISPLAYIO_FBINFO


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/share/man/man4/wsdisplay.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/wsdisplay.4
diff -u src/share/man/man4/wsdisplay.4:1.47 src/share/man/man4/wsdisplay.4:1.48
--- src/share/man/man4/wsdisplay.4:1.47	Mon Aug 12 11:11:28 2019
+++ src/share/man/man4/wsdisplay.4	Sat Nov  2 19:22:36 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: wsdisplay.4,v 1.47 2019/08/12 11:11:28 nia Exp $
+.\" $NetBSD: wsdisplay.4,v 1.48 2019/11/02 19:22:36 tnn Exp $
 .\"
 .\" Copyright (c) 1999 Matthias Drochner.
 .\" Copyright (c) 2002 Ben Harris.
@@ -26,7 +26,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd October 25, 2015
+.Dd November 2, 2019
 .Dt WSDISPLAY 4
 .Os
 .Sh NAME
@@ -192,6 +192,52 @@ Their definitions are found in
 Retrieve the type of the display.
 The list of types is in
 .In dev/wscons/wsconsio.h .
+.It Dv WSDISPLAYIO_FBINFO Pq Li "struct wsdisplayio_fbinfo"
+Retrieve extended information about a framebuffer display,
+including the framebuffer's pixel packing layout.
+The returned structure is as follows:
+.Bd -literal -offset indent
+struct wsdisplayio_fbinfo {
+	uint64_t fbi_fbsize;
+	uint64_t fbi_fboffset;
+	uint32_t fbi_width;
+	uint32_t fbi_height;
+	uint32_t fbi_stride;
+	uint32_t fbi_bitsperpixel;
+	uint32_t fbi_pixeltype;
+	union _fbi_subtype {
+		struct _fbi_rgbmasks {
+			uint32_t red_offset;
+			uint32_t red_size;
+			uint32_t green_offset;
+			uint32_t green_size;
+			uint32_t blue_offset;
+			uint32_t blue_size;
+			uint32_t alpha_offset;
+			uint32_t alpha_size;
+		} fbi_rgbmasks;
+		struct _fbi_cmapinfo {
+			uint32_t cmap_entries;
+		} fbi_cmapinfo;
+	} fbi_subtype;
+	uint32_t fbi_flags;
+};
+.Ed
+.Pp
+For a "true colour" display, the
+.Va fbi_pixeltype
+field contains
+.Dv WSFB_RGB
+and the
+.Va fbi_rgbmasks
+field contains the pixel packing layout.
+For a colour indexed display, the
+.Va fbi_pixeltype
+field contains
+.Dv WSFB_CI
+and the
+.Va fbi_cmapinfo
+field contains the number of color map entries.
 .It Dv WSDISPLAYIO_GINFO Pq Li "struct wsdisplay_fbinfo"
 Retrieve basic information about a framebuffer display.
 The returned structure is as follows:



CVS commit: src/share/man/man4

2019-11-02 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat Nov  2 19:22:37 UTC 2019

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

Log Message:
documentation for WSDISPLAYIO_FBINFO


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/share/man/man4/wsdisplay.4

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



CVS commit: src/share/man/man4

2019-11-02 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat Nov  2 18:56:41 UTC 2019

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

Log Message:
expand section on GPIOREAD


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/share/man/man4/gpio.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/gpio.4
diff -u src/share/man/man4/gpio.4:1.33 src/share/man/man4/gpio.4:1.34
--- src/share/man/man4/gpio.4:1.33	Sat May 19 13:59:06 2018
+++ src/share/man/man4/gpio.4	Sat Nov  2 18:56:41 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: gpio.4,v 1.33 2018/05/19 13:59:06 thorpej Exp $
+.\" $NetBSD: gpio.4,v 1.34 2019/11/02 18:56:41 tnn Exp $
 .\"	$OpenBSD: gpio.4,v 1.5 2004/11/23 09:39:29 reyk Exp $
 .\"
 .\" Copyright (c) 2004 Alexander Yurchenko 
@@ -15,7 +15,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd February 20, 2018
+.Dd November 2, 2019
 .Dt GPIO 4
 .Os
 .Sh NAME
@@ -102,6 +102,12 @@ The
 or
 .Fa gp_pin
 field must be set before calling.
+If both are set, gp_name takes precedence.
+On return, the
+.Fa gp_name
+field contains the current name of the pin, if set by the controller driver
+or an earlier call to
+.Dv GPIOSET .
 .Pp
 .It Dv GPIOWRITE ( struct gpio_req )
 Writes the output value to the pin.



CVS commit: src/share/man/man4

2019-11-02 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat Nov  2 18:56:41 UTC 2019

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

Log Message:
expand section on GPIOREAD


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/share/man/man4/gpio.4

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



CVS commit: src/lib/libpuffs

2019-11-02 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat Nov  2 18:14:36 UTC 2019

Modified Files:
src/lib/libpuffs: null.c

Log Message:
puffs_null_node_fsync: don't leak directory handle

Directory handles returned by opendir must be closed by closedir.
Also directory(3) says we mustn't close(2) descriptors returned by dirfd(3)


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/lib/libpuffs/null.c

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



CVS commit: src/lib/libpuffs

2019-11-02 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat Nov  2 18:14:36 UTC 2019

Modified Files:
src/lib/libpuffs: null.c

Log Message:
puffs_null_node_fsync: don't leak directory handle

Directory handles returned by opendir must be closed by closedir.
Also directory(3) says we mustn't close(2) descriptors returned by dirfd(3)


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/lib/libpuffs/null.c

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

Modified files:

Index: src/lib/libpuffs/null.c
diff -u src/lib/libpuffs/null.c:1.34 src/lib/libpuffs/null.c:1.35
--- src/lib/libpuffs/null.c:1.34	Mon Sep 23 12:00:57 2019
+++ src/lib/libpuffs/null.c	Sat Nov  2 18:14:36 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: null.c,v 1.34 2019/09/23 12:00:57 christos Exp $	*/
+/*	$NetBSD: null.c,v 1.35 2019/11/02 18:14:36 tnn Exp $	*/
 
 /*
  * Copyright (c) 2007  Antti Kantee.  All Rights Reserved.
@@ -27,7 +27,7 @@
 
 #include 
 #if !defined(lint)
-__RCSID("$NetBSD: null.c,v 1.34 2019/09/23 12:00:57 christos Exp $");
+__RCSID("$NetBSD: null.c,v 1.35 2019/11/02 18:14:36 tnn Exp $");
 #endif /* !lint */
 
 /*
@@ -412,20 +412,25 @@ puffs_null_node_fsync(struct puffs_userm
 	int fd, rv;
 	int fflags;
 	struct stat sb;
+	DIR *dirp;
 
 	rv = 0;
 	if (stat(PNPATH(pn), ) == -1)
 		return errno;
 	if (S_ISDIR(sb.st_mode)) {
-		DIR *dirp;
-		if ((dirp = opendir(PNPATH(pn))) == 0)
+		if ((dirp = opendir(PNPATH(pn))) == NULL)
 			return errno;
 		fd = dirfd(dirp);
-		if (fd == -1)
-			return errno;
+		if (fd == -1) {
+			rv = errno;
+			closedir(dirp);
+			return rv;
+		}
 
 		if (fsync(fd) == -1)
 			rv = errno;
+
+		closedir(dirp);
 	} else {
 		fd = writeableopen(PNPATH(pn));
 		if (fd == -1)
@@ -440,9 +445,9 @@ puffs_null_node_fsync(struct puffs_userm
 
 		if (fsync_range(fd, fflags, offlo, offhi - offlo) == -1)
 			rv = errno;
-	}
 
-	close(fd);
+		close(fd);
+	}
 
 	return rv;
 }



CVS commit: src/sys/dev

2019-11-02 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat Nov  2 17:13:20 UTC 2019

Modified Files:
src/sys/dev/ic: ssdfb.c
src/sys/dev/spi: ssdfb_spi.c

Log Message:
fix hang when SSDFB_ATTACH_FLAG_CONSOLE used with spi


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ic/ssdfb.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/spi/ssdfb_spi.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/ssdfb.c
diff -u src/sys/dev/ic/ssdfb.c:1.9 src/sys/dev/ic/ssdfb.c:1.10
--- src/sys/dev/ic/ssdfb.c:1.9	Sat Nov  2 14:18:36 2019
+++ src/sys/dev/ic/ssdfb.c	Sat Nov  2 17:13:20 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ssdfb.c,v 1.9 2019/11/02 14:18:36 tnn Exp $ */
+/* $NetBSD: ssdfb.c,v 1.10 2019/11/02 17:13:20 tnn Exp $ */
 
 /*
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ssdfb.c,v 1.9 2019/11/02 14:18:36 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ssdfb.c,v 1.10 2019/11/02 17:13:20 tnn Exp $");
 
 #include "opt_ddb.h"
 
@@ -331,7 +331,8 @@ ssdfb_attach(struct ssdfb_softc *sc, int
 	if (sc->sc_is_console)
 		ssdfb_set_usepoll(sc, true);
 
-	mutex_init(>sc_cond_mtx, MUTEX_DEFAULT, IPL_SCHED);
+	mutex_init(>sc_cond_mtx, MUTEX_DEFAULT,
+	ISSET(flags, SSDFB_ATTACH_FLAG_MPSAFE) ? IPL_SCHED : IPL_BIO);
 	cv_init(>sc_cond, "ssdfb");
 	kt_flags = KTHREAD_MUSTJOIN;
 	/* XXX spi(4) is not MPSAFE yet. */

Index: src/sys/dev/spi/ssdfb_spi.c
diff -u src/sys/dev/spi/ssdfb_spi.c:1.1 src/sys/dev/spi/ssdfb_spi.c:1.2
--- src/sys/dev/spi/ssdfb_spi.c:1.1	Sat Nov  2 14:33:27 2019
+++ src/sys/dev/spi/ssdfb_spi.c	Sat Nov  2 17:13:20 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ssdfb_spi.c,v 1.1 2019/11/02 14:33:27 tnn Exp $ */
+/* $NetBSD: ssdfb_spi.c,v 1.2 2019/11/02 17:13:20 tnn Exp $ */
 
 /*
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ssdfb_spi.c,v 1.1 2019/11/02 14:33:27 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ssdfb_spi.c,v 1.2 2019/11/02 17:13:20 tnn Exp $");
 
 #include 
 #include 
@@ -170,7 +170,7 @@ ssdfb_spi_xfer_rect_3wire_ssd1322(void *
 	/*
 	 * Unlike iic(4), there is no way to force spi(4) to use polling.
 	 */
-	if (usepoll || cold)
+	if (usepoll && !cold)
 		return 0;
 
 	ssdfb_bitstream_init(, bitstream);
@@ -294,7 +294,7 @@ ssdfb_spi_xfer_rect_4wire_ssd1322(void *
 	/*
 	 * Unlike iic(4), there is no way to force spi(4) to use polling.
 	 */
-	if (usepoll || cold)
+	if (usepoll && !cold)
 		return 0;
 
 	ssdfb_spi_4wire_set_dc(sc, 0);



CVS commit: src/sys/dev

2019-11-02 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat Nov  2 17:13:20 UTC 2019

Modified Files:
src/sys/dev/ic: ssdfb.c
src/sys/dev/spi: ssdfb_spi.c

Log Message:
fix hang when SSDFB_ATTACH_FLAG_CONSOLE used with spi


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ic/ssdfb.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/spi/ssdfb_spi.c

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



CVS commit: src/share/man/man4

2019-11-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Nov  2 16:36:57 UTC 2019

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

Log Message:
Mention smscphy. Link to jmphy. Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/share/man/man4/mii.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/mii.4
diff -u src/share/man/man4/mii.4:1.30 src/share/man/man4/mii.4:1.31
--- src/share/man/man4/mii.4:1.30	Sat Nov  2 16:34:30 2019
+++ src/share/man/man4/mii.4	Sat Nov  2 16:36:56 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mii.4,v 1.30 2019/11/02 16:34:30 wiz Exp $
+.\"	$NetBSD: mii.4,v 1.31 2019/11/02 16:36:56 wiz Exp $
 .\"
 .\" Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -28,7 +28,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd March 3, 2014
+.Dd November 2, 2019
 .Dt MII 4
 .Os
 .Sh NAME
@@ -60,6 +60,7 @@
 .Cd "qsphy*at mii? phy ?		# Quality Semiconductor QS6612 PHYs"
 .Cd "rgephy*   at mii? phy ?		# Realtek 8169S/8110S internal PHYs"
 .Cd "rlphy*at mii? phy ?		# Realtek 8139/8201L PHYs"
+.Cd "smscphy*  at mii? phy ?		# SMSC LAN87xx PHYs"
 .Cd "sqphy*at mii? phy ?		# Seeq 80220/80221/80223/80225 PHYs"
 .Cd "tlphy*at mii? phy ?		# ThunderLAN internal PHYs"
 .Cd "tqphy*at mii? phy ?		# TSC Semiconductor 78Q2120 PHYs"
@@ -116,6 +117,7 @@ program.
 .Xr ikphy 4 ,
 .Xr inphy 4 ,
 .Xr iophy 4 ,
+.Xr jmphy 4 ,
 .Xr lxtphy 4 ,
 .Xr makphy 4 ,
 .Xr micphy 4 ,
@@ -125,6 +127,7 @@ program.
 .Xr qsphy 4 ,
 .Xr rgephy 4 ,
 .Xr rlphy 4 ,
+.Xr smscphy 4 ,
 .Xr sqphy 4 ,
 .Xr tlphy 4 ,
 .Xr tqphy 4 ,



CVS commit: src/share/man/man4

2019-11-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Nov  2 16:36:57 UTC 2019

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

Log Message:
Mention smscphy. Link to jmphy. Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/share/man/man4/mii.4

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



CVS commit: src/share/man/man4

2019-11-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Nov  2 16:34:31 UTC 2019

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

Log Message:
Add missing quote.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/share/man/man4/mii.4

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



CVS commit: src/share/man/man4

2019-11-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Nov  2 16:34:14 UTC 2019

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

Log Message:
Fix RCS Id. Improve history. Punctuation nits.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/smscphy.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/smscphy.4
diff -u src/share/man/man4/smscphy.4:1.1 src/share/man/man4/smscphy.4:1.2
--- src/share/man/man4/smscphy.4:1.1	Fri Nov  1 02:53:23 2019
+++ src/share/man/man4/smscphy.4	Sat Nov  2 16:34:14 2019
@@ -1,4 +1,4 @@
-.\" $
+.\" $NetBSD: smscphy.4,v 1.2 2019/11/02 16:34:14 wiz Exp $
 .\"
 .\" Copyright (c) 2019 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -38,7 +38,7 @@
 .Sh DESCRIPTION
 The
 .Nm
-driver supports SMSC LAN8700, LAN8710 and LAN8720 10/100 Ethernet PHYs.
+driver supports SMSC LAN8700, LAN8710, and LAN8720 10/100 Ethernet PHYs.
 .Sh SEE ALSO
 .Xr ifmedia 4 ,
 .Xr intro 4 ,
@@ -48,7 +48,9 @@ driver supports SMSC LAN8700, LAN8710 an
 The
 .Nm
 device driver first appeared in
-.Fx 8.0 .
+.Fx 8.0
+and
+.Nx 9.0 .
 .Sh AUTHORS
 .An -nosplit
 The
@@ -58,6 +60,6 @@ driver was written by
 for
 .Fx
 and ported to
-.Nx 9.0
+.Nx
 by
-.An Masanobu SAITOH.
+.An Masanobu SAITOH .



CVS commit: src/share/man/man4

2019-11-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Nov  2 16:34:14 UTC 2019

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

Log Message:
Fix RCS Id. Improve history. Punctuation nits.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/smscphy.4

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



CVS commit: src/share/man/man4

2019-11-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Nov  2 16:34:50 UTC 2019

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

Log Message:
Fix date. Improve history. Wording. Punctuation nit.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/jmphy.4

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



CVS commit: src/share/man/man4

2019-11-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Nov  2 16:34:50 UTC 2019

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

Log Message:
Fix date. Improve history. Wording. Punctuation nit.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/jmphy.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/jmphy.4
diff -u src/share/man/man4/jmphy.4:1.1 src/share/man/man4/jmphy.4:1.2
--- src/share/man/man4/jmphy.4:1.1	Wed Oct 30 13:32:32 2019
+++ src/share/man/man4/jmphy.4	Sat Nov  2 16:34:49 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: jmphy.4,v 1.1 2019/10/30 13:32:32 msaitoh Exp $
+.\"	$NetBSD: jmphy.4,v 1.2 2019/11/02 16:34:49 wiz Exp $
 .\"	$openbsd: jmphy.4,v 1.2 2013/07/16 16:05:49 schwarze Exp $
 .\"
 .\" Copyright (c) 2008 Jonathan Gray 
@@ -15,7 +15,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd October 30 2019
+.Dd October 30, 2019
 .Dt JMPHY 4
 .Os
 .Sh NAME
@@ -38,7 +38,9 @@ JMP211 10/100/Gigabit Ethernet PHYs.
 The
 .Nm
 device driver first appeared in
-.Ox 4.5 .
+.Ox 4.5
+and
+.Nx 9.0 .
 .Sh AUTHORS
 .An -nosplit
 The
@@ -52,10 +54,10 @@ and ported to
 by
 .An Jonathan Gray Aq Mt j...@openbsd.org
 and then ported to
-.Nx 9.0
+.Nx
 by
-.An Masanobu SAITOH.
+.An Masanobu SAITOH .
 .Sh BUGS
-It the media is set to gigabit speed, it may not linkup or takes very log time
-to go link up.
-It depends on the link partnet.
+It the media is set to gigabit speed, it may not link up or take a very long time
+to set the link up.
+It depends on the link partner.



CVS commit: src/share/man/man4

2019-11-02 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sat Nov  2 16:34:31 UTC 2019

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

Log Message:
Add missing quote.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/share/man/man4/mii.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/mii.4
diff -u src/share/man/man4/mii.4:1.29 src/share/man/man4/mii.4:1.30
--- src/share/man/man4/mii.4:1.29	Wed Oct 30 12:06:25 2019
+++ src/share/man/man4/mii.4	Sat Nov  2 16:34:30 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mii.4,v 1.29 2019/10/30 12:06:25 msaitoh Exp $
+.\"	$NetBSD: mii.4,v 1.30 2019/11/02 16:34:30 wiz Exp $
 .\"
 .\" Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -50,7 +50,7 @@
 .Cd "inphy*at mii? phy ?		# Intel 82555 PHYs"
 .Cd "iophy*at mii? phy ?		# Intel 82553 PHYs"
 .Cd "ipgphy*   at mii? phy ?		# IC PLUS IP1000A/IP1001 PHYs"
-.Cd "jmphy*at mii? phy ?		# JMicron
+.Cd "jmphy*at mii? phy ?		# JMicron"
 .Cd "lxtphy*   at mii? phy ?		# Level One LXT-970 PHYs"
 .Cd "makphy*   at mii? phy ?		# Marvel 88E1000 Gig-E PHYs"
 .Cd "micphy*   at mii? phy ?		# Micrel KSZ9021 Gig-E PHYs"



CVS commit: src/share/man/man4

2019-11-02 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat Nov  2 14:47:35 UTC 2019

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

Log Message:
ssdfb: update manpage


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/ssdfb.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/ssdfb.4
diff -u src/share/man/man4/ssdfb.4:1.3 src/share/man/man4/ssdfb.4:1.4
--- src/share/man/man4/ssdfb.4:1.3	Sun Mar 17 11:20:36 2019
+++ src/share/man/man4/ssdfb.4	Sat Nov  2 14:47:35 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ssdfb.4,v 1.3 2019/03/17 11:20:36 wiz Exp $
+.\"	$NetBSD: ssdfb.4,v 1.4 2019/11/02 14:47:35 tnn Exp $
 .\"
 .\" Copyright (c) 2019 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd March 17, 2019
+.Dd November 2, 2019
 .Dt SSDFB 4
 .Os
 .Sh NAME
@@ -38,6 +38,7 @@
 .Cd "ssdfb* at iic? addr ?"
 .Cd "ssdfb* at iic? addr 0x3c"
 .Cd "ssdfb* at iic? addr 0x3d flags 0x102"
+.Cd "ssdfb* at spi? slave ? flags 0x105"
 .Cd "wsdisplay* at ssdfb?"
 .Sh DESCRIPTION
 The
@@ -51,6 +52,8 @@ of the following controller chips:
 Solomon Systech Ltd SSD1306
 .It
 Sino Wealth Electronic Ltd SH1106
+.It
+Solomon Systech Ltd SSD1322
 .El
 .Pp
 The following products (controller + panel assemblies) are supported:
@@ -67,6 +70,9 @@ Adafruit Industries, LLC product 938 (12
 .It
 .Em 0x04 :
 Adafruit Industries, LLC product 931 (128x32)
+.It
+.Em 0x05 :
+Generic SSD1322 modules using default settings
 .El
 .Pp
 The flags value can contain one or more of the following, bitwise OR'ed:
@@ -108,7 +114,6 @@ driver written by
 .An Patrick Wildt Aq Mt patr...@blueri.se
 but does not share any code.
 .Sh BUGS
-Some modules can be reconfigured to attach via
-.Xr spi 4 ,
-typically by moving surface mount zero ohm resistors.
-This is currently not supported.
+The "4-wire SPI" MCU interface which requires an auxiliary
+.Xr gpio 4
+pin for the D/C# signal is currently not supported.



CVS commit: src/share/man/man4

2019-11-02 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat Nov  2 14:47:35 UTC 2019

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

Log Message:
ssdfb: update manpage


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

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



CVS commit: src/sys/dev/spi

2019-11-02 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat Nov  2 14:33:27 UTC 2019

Modified Files:
src/sys/dev/spi: files.spi
Added Files:
src/sys/dev/spi: ssdfb_spi.c

Log Message:
add spi(4) bus frontend for ssdfb(4)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/spi/files.spi
cvs rdiff -u -r0 -r1.1 src/sys/dev/spi/ssdfb_spi.c

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



CVS commit: src/sys/dev/spi

2019-11-02 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat Nov  2 14:33:27 UTC 2019

Modified Files:
src/sys/dev/spi: files.spi
Added Files:
src/sys/dev/spi: ssdfb_spi.c

Log Message:
add spi(4) bus frontend for ssdfb(4)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/spi/files.spi
cvs rdiff -u -r0 -r1.1 src/sys/dev/spi/ssdfb_spi.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/spi/files.spi
diff -u src/sys/dev/spi/files.spi:1.6 src/sys/dev/spi/files.spi:1.7
--- src/sys/dev/spi/files.spi:1.6	Mon Aug  5 23:42:48 2019
+++ src/sys/dev/spi/files.spi	Sat Nov  2 14:33:27 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: files.spi,v 1.6 2019/08/05 23:42:48 tnn Exp $
+#	$NetBSD: files.spi,v 1.7 2019/11/02 14:33:27 tnn Exp $
 
 define	spibus { }
 
@@ -36,6 +36,10 @@ device	mcp23s17gpio: gpiobus
 attach	mcp23s17gpio at spi
 file	dev/spi/mcp23s17.c		mcp23s17gpio
 
+# Solomon Systech SSD13xx PLED/OLED display
+attach	ssdfb at spi with ssdfb_spi
+file	dev/spi/ssdfb_spi.c		ssdfb_spi
+
 # MCP3x0x ADC
 device	mcp3kadc: sysmon_envsys
 attach	mcp3kadc at spi

Added files:

Index: src/sys/dev/spi/ssdfb_spi.c
diff -u /dev/null src/sys/dev/spi/ssdfb_spi.c:1.1
--- /dev/null	Sat Nov  2 14:33:27 2019
+++ src/sys/dev/spi/ssdfb_spi.c	Sat Nov  2 14:33:27 2019
@@ -0,0 +1,339 @@
+/* $NetBSD: ssdfb_spi.c,v 1.1 2019/11/02 14:33:27 tnn Exp $ */
+
+/*
+ * Copyright (c) 2019 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Tobias Nygren.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: ssdfb_spi.c,v 1.1 2019/11/02 14:33:27 tnn Exp $");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+struct bs_state {
+	uint8_t	*base;
+	uint8_t	*cur;
+	uint8_t	mask;
+};
+
+struct ssdfb_spi_softc {
+	struct ssdfb_softc	sc;
+	struct spi_handle	*sc_sh;
+	bool			sc_3wiremode;
+};
+
+static int	ssdfb_spi_match(device_t, cfdata_t, void *);
+static void	ssdfb_spi_attach(device_t, device_t, void *);
+
+static int	ssdfb_spi_cmd_3wire(void *, uint8_t *, size_t, bool);
+static int	ssdfb_spi_xfer_rect_3wire_ssd1322(void *, uint8_t, uint8_t,
+		uint8_t, uint8_t, uint8_t *, size_t, bool);
+
+static int	ssdfb_spi_cmd_4wire(void *, uint8_t *, size_t, bool);
+static int	ssdfb_spi_xfer_rect_4wire_ssd1322(void *, uint8_t, uint8_t,
+		uint8_t, uint8_t, uint8_t *, size_t, bool);
+
+static void	ssdfb_bitstream_init(struct bs_state *, uint8_t *);
+static void	ssdfb_bitstream_append(struct bs_state *, uint8_t, uint8_t);
+static void	ssdfb_bitstream_append_cmd(struct bs_state *, uint8_t);
+static void	ssdfb_bitstream_append_data(struct bs_state *, uint8_t *,
+		size_t);
+static void	ssdfb_bitstream_final(struct bs_state *);
+
+CFATTACH_DECL_NEW(ssdfb_spi, sizeof(struct ssdfb_spi_softc),
+ssdfb_spi_match, ssdfb_spi_attach, NULL, NULL);
+
+static int
+ssdfb_spi_match(device_t parent, cfdata_t match, void *aux)
+{
+	struct spi_attach_args *sa = aux;
+
+	/*
+	 * SSD1306 and SSD1322 data sheets specify 100ns cycle time.
+	 */
+	if (spi_configure(sa->sa_handle, SPI_MODE_0, 1000))
+		return 0;
+
+	return 1;
+}
+
+static void
+ssdfb_spi_attach(device_t parent, device_t self, void *aux)
+{
+	struct ssdfb_spi_softc *sc = device_private(self);
+	struct cfdata *cf = device_cfdata(self);
+	struct spi_attach_args *sa = aux;
+	int flags = cf->cf_flags;
+
+	sc->sc.sc_dev = self;
+	sc->sc_sh = sa->sa_handle;
+	sc->sc.sc_cookie = (void *)sc;
+	if ((flags & SSDFB_ATTACH_FLAG_PRODUCT_MASK) == SSDFB_PRODUCT_UNKNOWN)
+		flags |= 

CVS commit: src/sys/dev/i2c

2019-11-02 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat Nov  2 14:24:00 UTC 2019

Modified Files:
src/sys/dev/i2c: ssdfb_i2c.c

Log Message:
set flag to indicate that worker thread should be created mpsafe

iic(4) is mpsafe, unlike spi(4) which hasn't been made mpsafe yet.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/i2c/ssdfb_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/dev/i2c/ssdfb_i2c.c
diff -u src/sys/dev/i2c/ssdfb_i2c.c:1.3 src/sys/dev/i2c/ssdfb_i2c.c:1.4
--- src/sys/dev/i2c/ssdfb_i2c.c:1.3	Tue May 28 17:17:16 2019
+++ src/sys/dev/i2c/ssdfb_i2c.c	Sat Nov  2 14:23:59 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ssdfb_i2c.c,v 1.3 2019/05/28 17:17:16 tnn Exp $ */
+/* $NetBSD: ssdfb_i2c.c,v 1.4 2019/11/02 14:23:59 tnn Exp $ */
 
 /*
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ssdfb_i2c.c,v 1.3 2019/05/28 17:17:16 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ssdfb_i2c.c,v 1.4 2019/11/02 14:23:59 tnn Exp $");
 
 #include 
 #include 
@@ -112,6 +112,7 @@ ssdfb_i2c_attach(device_t parent, device
 	if ((flags & SSDFB_ATTACH_FLAG_PRODUCT_MASK) == SSDFB_PRODUCT_UNKNOWN)
 		flags |= SSDFB_PRODUCT_SSD1306_GENERIC;
 
+	flags |= SSDFB_ATTACH_FLAG_MPSAFE;
 	sc->sc.sc_dev = self;
 	sc->sc_i2c_tag = ia->ia_tag;
 	sc->sc_i2c_addr = ia->ia_addr;



CVS commit: src/sys/dev/i2c

2019-11-02 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat Nov  2 14:24:00 UTC 2019

Modified Files:
src/sys/dev/i2c: ssdfb_i2c.c

Log Message:
set flag to indicate that worker thread should be created mpsafe

iic(4) is mpsafe, unlike spi(4) which hasn't been made mpsafe yet.


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

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



CVS commit: src/sys/dev/ic

2019-11-02 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat Nov  2 14:18:36 UTC 2019

Modified Files:
src/sys/dev/ic: ssdfb.c ssdfbvar.h

Log Message:
ssdfb: add support for SSD1322


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/ic/ssdfb.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ic/ssdfbvar.h

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

Modified files:

Index: src/sys/dev/ic/ssdfb.c
diff -u src/sys/dev/ic/ssdfb.c:1.8 src/sys/dev/ic/ssdfb.c:1.9
--- src/sys/dev/ic/ssdfb.c:1.8	Tue Oct 22 22:03:27 2019
+++ src/sys/dev/ic/ssdfb.c	Sat Nov  2 14:18:36 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ssdfb.c,v 1.8 2019/10/22 22:03:27 tnn Exp $ */
+/* $NetBSD: ssdfb.c,v 1.9 2019/11/02 14:18:36 tnn Exp $ */
 
 /*
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ssdfb.c,v 1.8 2019/10/22 22:03:27 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ssdfb.c,v 1.9 2019/11/02 14:18:36 tnn Exp $");
 
 #include "opt_ddb.h"
 
@@ -73,6 +73,7 @@ static void	ssdfb_cursor(void *, int, in
 
 /* hardware interface */
 static int	ssdfb_init_ssd1306(struct ssdfb_softc *);
+static int	ssdfb_init_ssd1322(struct ssdfb_softc *);
 static int	ssdfb_set_contrast(struct ssdfb_softc *, uint8_t, bool);
 static int	ssdfb_set_display_on(struct ssdfb_softc *, bool, bool);
 static int	ssdfb_set_mode(struct ssdfb_softc *, u_int);
@@ -85,8 +86,9 @@ static void	ssdfb_damage(struct ssdfb_so
 static void	ssdfb_thread(void *);
 static void	ssdfb_set_usepoll(struct ssdfb_softc *, bool);
 static int	ssdfb_sync(struct ssdfb_softc *, bool);
-static uint64_t	ssdfb_transpose_block_1bpp(uint8_t *, size_t);
-static uint64_t	ssdfb_transpose_block_8bpp(uint8_t *, size_t);
+static int	ssdfb_sync_ssd1306(struct ssdfb_softc *, bool);
+static int	ssdfb_sync_ssd1322(struct ssdfb_softc *, bool);
+static uint64_t	ssdfb_transpose_block(uint8_t *, size_t);
 
 /* misc helpers */
 static const struct ssdfb_product *
@@ -114,6 +116,7 @@ static const struct ssdfb_product ssdfb_
 		.p_name =		"generic",
 		.p_width =		128,
 		.p_height =		64,
+		.p_bits_per_pixel =	1,
 		.p_panel_shift =	0,
 		.p_fosc =		0x8,
 		.p_fosc_div =		0,
@@ -124,9 +127,8 @@ static const struct ssdfb_product ssdfb_
 		.p_vcomh_deselect_level = SSD1306_VCOMH_DESELECT_LEVEL_0_77_VCC,
 		.p_default_contrast =	0x7f,
 		.p_multiplex_ratio =	0x3f,
-		.p_chargepump_cmd =	SSD1306_CMD_SET_CHARGE_PUMP,
-		.p_chargepump_arg =	SSD1306_CHARGE_PUMP_ENABLE,
-		.p_init =		ssdfb_init_ssd1306
+		.p_init =		ssdfb_init_ssd1306,
+		.p_sync =		ssdfb_sync_ssd1306
 	},
 	{
 		.p_product_id =		SSDFB_PRODUCT_SH1106_GENERIC,
@@ -134,6 +136,7 @@ static const struct ssdfb_product ssdfb_
 		.p_name =		"generic",
 		.p_width =		128,
 		.p_height =		64,
+		.p_bits_per_pixel =	1,
 		.p_panel_shift =	2,
 		.p_fosc =		0x5,
 		.p_fosc_div =		0,
@@ -144,9 +147,8 @@ static const struct ssdfb_product ssdfb_
 		.p_vcomh_deselect_level = SH1106_VCOMH_DESELECT_LEVEL_DEFAULT,
 		.p_default_contrast =	0x80,
 		.p_multiplex_ratio =	0x3f,
-		.p_chargepump_cmd =	SH1106_CMD_SET_CHARGE_PUMP_7V4,
-		.p_chargepump_arg =	SSDFB_CMD_NOP,
-		.p_init =		ssdfb_init_ssd1306
+		.p_init =		ssdfb_init_ssd1306,
+		.p_sync =		ssdfb_sync_ssd1306
 	},
 	{
 		.p_product_id =		SSDFB_PRODUCT_ADAFRUIT_938,
@@ -154,6 +156,7 @@ static const struct ssdfb_product ssdfb_
 		.p_name =		"Adafruit Industries, LLC product 938",
 		.p_width =		128,
 		.p_height =		64,
+		.p_bits_per_pixel =	1,
 		.p_panel_shift =	0,
 		.p_fosc =		0x8,
 		.p_fosc_div =		0,
@@ -163,9 +166,8 @@ static const struct ssdfb_product ssdfb_
 		.p_vcomh_deselect_level = 0x40,
 		.p_default_contrast =	0x8f,
 		.p_multiplex_ratio =	0x3f,
-		.p_chargepump_cmd =	SSD1306_CMD_SET_CHARGE_PUMP,
-		.p_chargepump_arg =	SSD1306_CHARGE_PUMP_ENABLE,
-		.p_init =		ssdfb_init_ssd1306
+		.p_init =		ssdfb_init_ssd1306,
+		.p_sync =		ssdfb_sync_ssd1306
 	},
 	{
 		.p_product_id =		SSDFB_PRODUCT_ADAFRUIT_931,
@@ -173,6 +175,7 @@ static const struct ssdfb_product ssdfb_
 		.p_name =		"Adafruit Industries, LLC product 931",
 		.p_width =		128,
 		.p_height =		32,
+		.p_bits_per_pixel =	1,
 		.p_panel_shift =	0,
 		.p_fosc =		0x8,
 		.p_fosc_div =		0,
@@ -182,9 +185,24 @@ static const struct ssdfb_product ssdfb_
 		.p_vcomh_deselect_level = 0x40,
 		.p_default_contrast =	0x8f,
 		.p_multiplex_ratio =	0x1f,
-		.p_chargepump_cmd =	SSD1306_CMD_SET_CHARGE_PUMP,
-		.p_chargepump_arg =	SSD1306_CHARGE_PUMP_ENABLE,
-		.p_init =		ssdfb_init_ssd1306
+		.p_init =		ssdfb_init_ssd1306,
+		.p_sync =		ssdfb_sync_ssd1306
+	},
+	{
+		.p_product_id =		SSDFB_PRODUCT_SSD1322_GENERIC,
+		.p_controller_id =	SSDFB_CONTROLLER_SSD1322,
+		.p_name =		"generic",
+		.p_width =		256,
+		.p_height =		64,
+		.p_bits_per_pixel =	4,
+		.p_panel_shift =	28,
+		.p_vcomh_deselect_level = SSD1322_DEFAULT_VCOMH,
+		.p_fosc =		SSD1322_DEFAULT_FREQUENCY,
+		.p_fosc_div =		SSD1322_DEFAULT_DIVIDER,
+		.p_default_contrast =	

CVS commit: src/sys/dev/ic

2019-11-02 Thread Tobias Nygren
Module Name:src
Committed By:   tnn
Date:   Sat Nov  2 14:18:36 UTC 2019

Modified Files:
src/sys/dev/ic: ssdfb.c ssdfbvar.h

Log Message:
ssdfb: add support for SSD1322


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/ic/ssdfb.c
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ic/ssdfbvar.h

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



CVS commit: src/sys/compat/ossaudio

2019-11-02 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sat Nov  2 11:56:34 UTC 2019

Modified Files:
src/sys/compat/ossaudio: ossaudio.c

Log Message:
Use record.sample_rate for recording on SNDCTL_DSP_SPEED.
It's kernel side of PR lib/54667.


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/compat/ossaudio/ossaudio.c

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

Modified files:

Index: src/sys/compat/ossaudio/ossaudio.c
diff -u src/sys/compat/ossaudio/ossaudio.c:1.76 src/sys/compat/ossaudio/ossaudio.c:1.77
--- src/sys/compat/ossaudio/ossaudio.c:1.76	Thu Sep 26 01:37:52 2019
+++ src/sys/compat/ossaudio/ossaudio.c	Sat Nov  2 11:56:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ossaudio.c,v 1.76 2019/09/26 01:37:52 christos Exp $	*/
+/*	$NetBSD: ossaudio.c,v 1.77 2019/11/02 11:56:34 isaki Exp $	*/
 
 /*-
  * Copyright (c) 1997, 2008 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.76 2019/09/26 01:37:52 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.77 2019/11/02 11:56:34 isaki Exp $");
 
 #include 
 #include 
@@ -238,7 +238,10 @@ oss_ioctl_audio(struct lwp *l, const str
 			 __func__, error));
 			goto out;
 		}
-		idat = tmpinfo.play.sample_rate;
+		if (tmpinfo.mode == AUMODE_RECORD)
+			idat = tmpinfo.record.sample_rate;
+		else
+			idat = tmpinfo.play.sample_rate;
 		DPRINTF(("%s: SNDCTL_PCM_READ_RATE < %d\n", __func__, idat));
 		error = copyout(, SCARG(uap, data), sizeof idat);
 		if (error) {



CVS commit: src/sys/compat/ossaudio

2019-11-02 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sat Nov  2 11:56:34 UTC 2019

Modified Files:
src/sys/compat/ossaudio: ossaudio.c

Log Message:
Use record.sample_rate for recording on SNDCTL_DSP_SPEED.
It's kernel side of PR lib/54667.


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/compat/ossaudio/ossaudio.c

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



CVS commit: src/lib/libossaudio

2019-11-02 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sat Nov  2 11:48:23 UTC 2019

Modified Files:
src/lib/libossaudio: ossaudio.c

Log Message:
Use record.sample_rate for recording on SNDCTL_DSP_SPEED.
Fix PR lib/54667.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/lib/libossaudio/ossaudio.c

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



CVS commit: src/lib/libossaudio

2019-11-02 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sat Nov  2 11:48:23 UTC 2019

Modified Files:
src/lib/libossaudio: ossaudio.c

Log Message:
Use record.sample_rate for recording on SNDCTL_DSP_SPEED.
Fix PR lib/54667.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/lib/libossaudio/ossaudio.c

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

Modified files:

Index: src/lib/libossaudio/ossaudio.c
diff -u src/lib/libossaudio/ossaudio.c:1.36 src/lib/libossaudio/ossaudio.c:1.37
--- src/lib/libossaudio/ossaudio.c:1.36	Sat Feb  2 04:52:16 2019
+++ src/lib/libossaudio/ossaudio.c	Sat Nov  2 11:48:23 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ossaudio.c,v 1.36 2019/02/02 04:52:16 isaki Exp $	*/
+/*	$NetBSD: ossaudio.c,v 1.37 2019/11/02 11:48:23 isaki Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: ossaudio.c,v 1.36 2019/02/02 04:52:16 isaki Exp $");
+__RCSID("$NetBSD: ossaudio.c,v 1.37 2019/11/02 11:48:23 isaki Exp $");
 
 /*
  * This is an OSS (Linux) sound API emulator.
@@ -134,7 +134,10 @@ audio_ioctl(int fd, unsigned long com, v
 		retval = ioctl(fd, AUDIO_GETBUFINFO, );
 		if (retval < 0)
 			return retval;
-		INTARG = tmpinfo.play.sample_rate;
+		if (tmpinfo.mode == AUMODE_RECORD)
+			INTARG = tmpinfo.record.sample_rate;
+		else
+			INTARG = tmpinfo.play.sample_rate;
 		break;
 	case SNDCTL_DSP_STEREO:
 		AUDIO_INITINFO();



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

2019-11-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Nov  2 07:56:25 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: N900 OVERO

Log Message:
Replace tps65950pm with twl (the former has been removed)


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/evbarm/conf/N900
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/evbarm/conf/OVERO

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

Modified files:

Index: src/sys/arch/evbarm/conf/N900
diff -u src/sys/arch/evbarm/conf/N900:1.31 src/sys/arch/evbarm/conf/N900:1.32
--- src/sys/arch/evbarm/conf/N900:1.31	Sat May 18 08:49:23 2019
+++ src/sys/arch/evbarm/conf/N900	Sat Nov  2 07:56:25 2019
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: N900,v 1.31 2019/05/18 08:49:23 skrll Exp $
+#	$NetBSD: N900,v 1.32 2019/11/02 07:56:25 martin Exp $
 #
 #	N900 -- Nokia N900 Kernel
 #
@@ -230,10 +230,10 @@ iic*		at omapiic?
 
 # I2C devices
 # Power Management and System Companion Device
-tps65950pm0	at iic0 addr 0x48
-tps65950pm1	at iic0 addr 0x49
-tps65950pm2	at iic0 addr 0x4a
-tps65950pm3	at iic0 addr 0x4b
+twl0		at iic0 addr 0x48
+twl1		at iic0 addr 0x49
+twl2		at iic0 addr 0x4a
+twl3		at iic0 addr 0x4b
 
 # On-board 16550 UARTs
 #com0		at obio2 addr 0x4902 intr 74 mult 4	# UART3 (console)

Index: src/sys/arch/evbarm/conf/OVERO
diff -u src/sys/arch/evbarm/conf/OVERO:1.55 src/sys/arch/evbarm/conf/OVERO:1.56
--- src/sys/arch/evbarm/conf/OVERO:1.55	Fri Apr 26 22:46:03 2019
+++ src/sys/arch/evbarm/conf/OVERO	Sat Nov  2 07:56:25 2019
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: OVERO,v 1.55 2019/04/26 22:46:03 sevan Exp $
+#	$NetBSD: OVERO,v 1.56 2019/11/02 07:56:25 martin Exp $
 #
 #	OVERO -- Gumstix. Inc. Overo COMS platforms kernel
 #
@@ -179,10 +179,10 @@ omapiic1	at obio0 addr 0x4806 size 0
 iic*		at omapiic?
 
 # Power Management and System Companion Device
-tps65950pm0	at iic0 addr 0x48
-tps65950pm1	at iic0 addr 0x49
-tps65950pm2	at iic0 addr 0x4a
-tps65950pm3	at iic0 addr 0x4b
+twl0		at iic0 addr 0x48
+twl1		at iic0 addr 0x49
+twl2		at iic0 addr 0x4a
+twl3		at iic0 addr 0x4b
 
 # On-board 16550 UARTs
 com0		at obio2 addr 0x4902 intr 74 mult 4	# UART3 (console)



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

2019-11-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Nov  2 07:56:25 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: N900 OVERO

Log Message:
Replace tps65950pm with twl (the former has been removed)


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/evbarm/conf/N900
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/evbarm/conf/OVERO

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