CVS commit: src/sys/dev/pci

2019-11-14 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu Nov 14 08:49:48 UTC 2019

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

Log Message:
The 16C1054 and 16C1058 serial multi-port controllers need a clock
multiplier of 8, just like the 16C1050 controller.

Verified with an ExSys EX-41388.

ryo@ checked back with the hardware his original commit was based on,
and confirmed the change.

XXX Pull-up to netbsd-{7,8,9}


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/dev/pci/pucdata.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/pci

2019-11-14 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Thu Nov 14 08:49:48 UTC 2019

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

Log Message:
The 16C1054 and 16C1058 serial multi-port controllers need a clock
multiplier of 8, just like the 16C1050 controller.

Verified with an ExSys EX-41388.

ryo@ checked back with the hardware his original commit was based on,
and confirmed the change.

XXX Pull-up to netbsd-{7,8,9}


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/dev/pci/pucdata.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/pucdata.c
diff -u src/sys/dev/pci/pucdata.c:1.104 src/sys/dev/pci/pucdata.c:1.105
--- src/sys/dev/pci/pucdata.c:1.104	Thu May  2 21:33:12 2019
+++ src/sys/dev/pci/pucdata.c	Thu Nov 14 08:49:48 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pucdata.c,v 1.104 2019/05/02 21:33:12 jdolecek Exp $	*/
+/*	$NetBSD: pucdata.c,v 1.105 2019/11/14 08:49:48 hauke Exp $	*/
 
 /*
  * Copyright (c) 1998, 1999 Christopher G. Demetriou.  All rights reserved.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pucdata.c,v 1.104 2019/05/02 21:33:12 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pucdata.c,v 1.105 2019/11/14 08:49:48 hauke Exp $");
 
 #include 
 #include 
@@ -2883,10 +2883,10 @@ const struct puc_device_description puc_
 	{	PCI_VENDOR_SYSTEMBASE, PCI_PRODUCT_SYSTEMBASE_SB16C1054, 0, 0 },
 	{	0x,	0x,		 0, 0 },
 	{
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x00, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x08, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x10, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x18, COM_FREQ },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x00, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x08, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x10, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x18, COM_FREQ * 8 },
 	},
 	},
 
@@ -2895,14 +2895,14 @@ const struct puc_device_description puc_
 	{   PCI_VENDOR_SYSTEMBASE, PCI_PRODUCT_SYSTEMBASE_SB16C1058, 0, 0 },
 	{	0x,	0x,		 0, 0 },
 	{
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x00, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x08, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x10, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x18, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x20, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x28, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x30, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x38, COM_FREQ },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x00, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x08, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x10, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x18, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x20, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x28, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x30, COM_FREQ * 8 },
+		{ PUC_PORT_TYPE_COM, PCI_BAR0, 0x38, COM_FREQ * 8 },
 	},
 	},
 



CVS commit: src/sys/external/bsd/drm/dist/shared-core

2019-10-22 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Oct 22 13:19:47 UTC 2019

Modified Files:
src/sys/external/bsd/drm/dist/shared-core: r128_drv.h

Log Message:
When building r128drm(4), gcc objects to shifting into bit 31 of a
(signed) int. Make sure we are shifting an unsigned in those cases.

See also .

XXX There are probably more of these in the header.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm/dist/shared-core/r128_drv.h

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

Modified files:

Index: src/sys/external/bsd/drm/dist/shared-core/r128_drv.h
diff -u src/sys/external/bsd/drm/dist/shared-core/r128_drv.h:1.2 src/sys/external/bsd/drm/dist/shared-core/r128_drv.h:1.3
--- src/sys/external/bsd/drm/dist/shared-core/r128_drv.h:1.2	Thu Feb 24 07:59:44 2011
+++ src/sys/external/bsd/drm/dist/shared-core/r128_drv.h	Tue Oct 22 13:19:47 2019
@@ -277,7 +277,7 @@ extern long r128_compat_ioctl(struct fil
  */
 #define R128_PM4_BUFFER_OFFSET		0x0700
 #define R128_PM4_BUFFER_CNTL		0x0704
-#	define R128_PM4_MASK			(15 << 28)
+#	define R128_PM4_MASK			(15u << 28)
 #	define R128_PM4_NONPM4			(0  << 28)
 #	define R128_PM4_192PIO			(1  << 28)
 #	define R128_PM4_192BM			(2  << 28)
@@ -286,8 +286,8 @@ extern long r128_compat_ioctl(struct fil
 #	define R128_PM4_64PIO_128INDBM		(5  << 28)
 #	define R128_PM4_64BM_128INDBM		(6  << 28)
 #	define R128_PM4_64PIO_64VCBM_64INDBM	(7  << 28)
-#	define R128_PM4_64BM_64VCBM_64INDBM	(8  << 28)
-#	define R128_PM4_64PIO_64VCPIO_64INDPIO	(15 << 28)
+#	define R128_PM4_64BM_64VCBM_64INDBM	(8u  << 28)
+#	define R128_PM4_64PIO_64VCPIO_64INDPIO	(15u << 28)
 #	define R128_PM4_BUFFER_CNTL_NOUPDATE	(1  << 27)
 
 #define R128_PM4_BUFFER_WM_CNTL		0x0708



CVS commit: src/sys/external/bsd/drm/dist/shared-core

2019-10-22 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Tue Oct 22 13:19:47 UTC 2019

Modified Files:
src/sys/external/bsd/drm/dist/shared-core: r128_drv.h

Log Message:
When building r128drm(4), gcc objects to shifting into bit 31 of a
(signed) int. Make sure we are shifting an unsigned in those cases.

See also .

XXX There are probably more of these in the header.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm/dist/shared-core/r128_drv.h

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



CVS commit: src/sys/external/bsd/drm/dist/shared-core

2019-08-02 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Fri Aug  2 14:55:57 UTC 2019

Modified Files:
src/sys/external/bsd/drm/dist/shared-core: savage_state.c

Log Message:
Deal with gcc's "warning: this statement may fall through
[-Wimplicit-fallthrough=]" by adding the missing KNF FALLTHROUGH
comments.

christos@ approved.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/drm/dist/shared-core/savage_state.c

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



CVS commit: src/sys/external/bsd/drm/dist/shared-core

2019-08-02 Thread Hauke Fath
Module Name:src
Committed By:   hauke
Date:   Fri Aug  2 14:55:57 UTC 2019

Modified Files:
src/sys/external/bsd/drm/dist/shared-core: savage_state.c

Log Message:
Deal with gcc's "warning: this statement may fall through
[-Wimplicit-fallthrough=]" by adding the missing KNF FALLTHROUGH
comments.

christos@ approved.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/external/bsd/drm/dist/shared-core/savage_state.c

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

Modified files:

Index: src/sys/external/bsd/drm/dist/shared-core/savage_state.c
diff -u src/sys/external/bsd/drm/dist/shared-core/savage_state.c:1.4 src/sys/external/bsd/drm/dist/shared-core/savage_state.c:1.5
--- src/sys/external/bsd/drm/dist/shared-core/savage_state.c:1.4	Tue Jun 23 04:42:01 2009
+++ src/sys/external/bsd/drm/dist/shared-core/savage_state.c	Fri Aug  2 14:55:57 2019
@@ -297,6 +297,7 @@ static int savage_dispatch_dma_prim(drm_
 	case SAVAGE_PRIM_TRILIST_201:
 		reorder = 1;
 		prim = SAVAGE_PRIM_TRILIST;
+		/* FALLTHROUGH */
 	case SAVAGE_PRIM_TRILIST:
 		if (n % 3 != 0) {
 			DRM_ERROR("wrong number of vertices %u in TRILIST\n",
@@ -434,6 +435,7 @@ static int savage_dispatch_vb_prim(drm_s
 	case SAVAGE_PRIM_TRILIST_201:
 		reorder = 1;
 		prim = SAVAGE_PRIM_TRILIST;
+		/* FALLTHROUGH */
 	case SAVAGE_PRIM_TRILIST:
 		if (n % 3 != 0) {
 			DRM_ERROR("wrong number of vertices %u in TRILIST\n",
@@ -555,6 +557,7 @@ static int savage_dispatch_dma_idx(drm_s
 	case SAVAGE_PRIM_TRILIST_201:
 		reorder = 1;
 		prim = SAVAGE_PRIM_TRILIST;
+		/* FALLTHROUGH */
 	case SAVAGE_PRIM_TRILIST:
 		if (n % 3 != 0) {
 			DRM_ERROR("wrong number of indices %u in TRILIST\n", n);
@@ -693,6 +696,7 @@ static int savage_dispatch_vb_idx(drm_sa
 	case SAVAGE_PRIM_TRILIST_201:
 		reorder = 1;
 		prim = SAVAGE_PRIM_TRILIST;
+		/* FALLTHROUGH */
 	case SAVAGE_PRIM_TRILIST:
 		if (n % 3 != 0) {
 			DRM_ERROR("wrong number of indices %u in TRILIST\n", n);
@@ -1060,7 +1064,7 @@ int savage_bci_cmdbuf(struct drm_device 
 DMA_FLUSH();
 return -EINVAL;
 			}
-			/* fall through */
+			/* FALLTHROUGH */
 		case SAVAGE_CMD_DMA_PRIM:
 		case SAVAGE_CMD_VB_PRIM:
 			if (!first_draw_cmd)



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

2017-05-21 Thread Hauke Fath
On Sun, 21 May 2017 08:08:34 +0900 (JST), Takahiro Kambe wrote:
> By comparing code with current, one line seems to missing.
> 
> Index: sys/net/npf/npf_inet.c
> ===
> RCS file: /cvsroot/src/sys/net/npf/npf_inet.c,v
> retrieving revision 1.32.2.1
> diff -u -r1.32.2.1 npf_inet.c
> --- sys/net/npf/npf_inet.c12 May 2017 05:32:12 -  1.32.2.1
> +++ sys/net/npf/npf_inet.c20 May 2017 23:06:17 -
> @@ -51,6 +51,7 @@
>  
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 

Confirmed.

hauke

-- 
Hauke Fath<ha...@espresso.rhein-neckar.de>
Ernst-Ludwig-Straße 15
64625 Bensheim
Germany


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

2017-05-17 Thread Hauke Fath
[properly re-sent to source-changes-d -- it was cribbed from the web 
list archive]



The pull-up


Pull up following revision(s) (requested by jnemeth in ticket #1394):
sys/net/npf/npf_inet.c: revisions 1.34, 1.35 via patch
sys/net/npf/npf_mbuf.c: revision 1.16
sys/net/npf/npf_nat.c: revision 1.40
minimal changes necessary to link into an INET6-less kernel.
--
fixup misplaced #endif


leads to

[...]
--- npf_nat.o ---
/u/netbsd-builds/7/amd64/tools/bin/x86_64--netbsd-gcc -mcmodel=kernel 
-mno-red-zone -mno-mmx -mno-sse -mno-avx -msoft-float -ffreestanding 
-fno-zero-initialized-in-bss -O2 -fno-omit-frame-pointer 
-fstack-protector -Wstack-protector --param ssp-buffer-size=1 
-fno-strict-aliasing -fno-common -std=gnu99 -Werror -Wall -Wno-main 
-Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes 
-Wstrict-prototypes -Wold-style-definition -Wswitch -Wshadow -Wcast-qual 
-Wwrite-strings -Wno-unreachable-code -Wno-pointer-sign -Wno-attributes 
-Wextra -Wno-unused-parameter -Wold-style-definition -Wno-sign-compare 
--sysroot=/u/netbsd-builds/7/amd64/destdir -Damd64 -Dx86_64 -I. 
-I/public/netbsd-7/sys/../common/include -I/public/netbsd-7/sys/arch 
-I/public/netbsd-7/sys -nostdinc -DCHILD_MAX=1024 -DOPEN_MAX=1024 
-DIPSEC_ESP -DIPSEC_NAT_T -DMAXUSERS=64 -D_KERNEL -D_KERNEL_OPT 
-std=gnu99 
-I/public/netbsd-7/sys/lib/libkern/../../../common/lib/libc/quad 
-I/public/netbsd-7/sys/lib/libkern/../../../common/lib/libc/string 
-I/public/netbsd-7/sys/lib/libkern/../../../common/lib/libc/arch/x86_64/string 
-D_FORTIFY_SOURCE=2 -I/public/netbsd-7/sys/../common/include 
-I/public/netbsd-7/sys/external/bsd/acpica/dist/include -c 
/public/netbsd-7/sys/net/npf/npf_nat.c

--- npf_inet.o ---
/public/netbsd-7/sys/net/npf/npf_inet.c: In function 'npf_addr_dump':
/public/netbsd-7/sys/net/npf/npf_inet.c:759:2: error: implicit 
declaration of function 'ip6_sprintf' 
[-Werror=implicit-function-declaration]

  return ip6_sprintf(addr);
  ^
/public/netbsd-7/sys/net/npf/npf_inet.c:759:2: error: return makes 
pointer from integer without a cast [-Werror]

cc1: all warnings being treated as errors
*** [npf_inet.o] Error code 1


which, I guess, didn't show up in a build because we do not have a 
(standard) kernel config file that includes npf(4).


Any reason why -current should not default GENERIC to npf?

Cheerio,
hauke

--
 The ASCII Ribbon CampaignHauke Fath
() No HTML/RTF in email Institut für Nachrichtentechnik
/\ No Word docs in email TU Darmstadt
 Respect for open standards  Ruf +49-6151-16-21344


Re: CVS commit: src/sys

2011-05-17 Thread Hauke Fath
[Due to loss of connectivity, my home email is high-latency 'uucp via
macbook on bicycle'. So this is probably late.]

At 9:35 Uhr +0200 17.05.2011, Martin Husemann wrote:
On Mon, May 16, 2011 at 08:29:03PM +0200, Martin S. Weber wrote:
 or just hack it brutally

 ( cvs rdiff -u -r1.308 -r1.309 src/sys/arch/sparc/sparc/machdep.c )

Well, anything happening during this early startup phase is hackish,
and this one is not evil.

OTOH, declaring something 'const' is somewhere between of limited value and
downright miseading, when you have to suspect that something somewhere in
the tree won't care and write to it anyway.

Nevertheless, thanks for the fix.

hauke

-- 
 The ASCII Ribbon CampaignHauke Fath
() No HTML/RTF in emailInstitut für Nachrichtentechnik
/\ No Word docs in email TU Darmstadt
 Respect for open standards  Ruf +49-6151-16-3281


Re: CVS commit: src/sys

2011-05-16 Thread Hauke Fath
Module Name:src
Committed By:   rmind
Date:   Sat May 14 17:57:05 UTC 2011

Modified Files:
src/sys/kern: kern_resource.c
src/sys/sys: resource.h resourcevar.h

Log Message:
- Sprinkle __read_mostly, consitify maxdmap and maxsmap.


This breaks the sparc build, which sets 'maxdmap', see
http://nxr.netbsd.org/search?q=project=srcdefs=refs=maxdmappath=hist=.

hauke

-- 
 The ASCII Ribbon CampaignHauke Fath
() No HTML/RTF in emailInstitut für Nachrichtentechnik
/\ No Word docs in email TU Darmstadt
 Respect for open standards  Ruf +49-6151-16-3281