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

2017-12-20 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Dec 21 06:49:26 UTC 2017

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixv.c

Log Message:
 Fix panic when only link interrupt can't be established.


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.76 -r1.77 src/sys/dev/pci/ixgbe/ixv.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/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.116 src/sys/dev/pci/ixgbe/ixgbe.c:1.117
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.116	Wed Dec 20 08:51:42 2017
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Thu Dec 21 06:49:26 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.116 2017/12/20 08:51:42 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.117 2017/12/21 06:49:26 msaitoh Exp $ */
 
 /**
 
@@ -5886,6 +5886,7 @@ ixgbe_allocate_msix(struct adapter *adap
 	/* and Link */
 	cpu_id++;
 	snprintf(intr_xname, sizeof(intr_xname), "%s link", device_xname(dev));
+	adapter->vector = vector;
 	intrstr = pci_intr_string(pc, adapter->osdep.intrs[vector], intrbuf,
 	sizeof(intrbuf));
 #ifdef IXGBE_MPSAFE
@@ -5914,7 +5915,6 @@ ixgbe_allocate_msix(struct adapter *adap
 	else
 		aprint_normal("\n");
 
-	adapter->vector = vector;
 	/* Tasklets for Link, SFP and Multispeed Fiber */
 	adapter->link_si = softint_establish(SOFTINT_NET |IXGBE_SOFTINFT_FLAGS,
 	ixgbe_handle_link, adapter);

Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.76 src/sys/dev/pci/ixgbe/ixv.c:1.77
--- src/sys/dev/pci/ixgbe/ixv.c:1.76	Thu Dec 21 06:43:17 2017
+++ src/sys/dev/pci/ixgbe/ixv.c	Thu Dec 21 06:49:26 2017
@@ -1,4 +1,4 @@
-/*$NetBSD: ixv.c,v 1.76 2017/12/21 06:43:17 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.77 2017/12/21 06:49:26 msaitoh Exp $*/
 
 /**
 
@@ -2696,6 +2696,7 @@ ixv_allocate_msix(struct adapter *adapte
 	/* and Mailbox */
 	cpu_id++;
 	snprintf(intr_xname, sizeof(intr_xname), "%s link", device_xname(dev));
+	adapter->vector = vector;
 	intrstr = pci_intr_string(pc, adapter->osdep.intrs[vector], intrbuf,
 	sizeof(intrbuf));
 #ifdef IXGBE_MPSAFE
@@ -2724,7 +2725,6 @@ ixv_allocate_msix(struct adapter *adapte
 	else
 		aprint_normal("\n");
 
-	adapter->vector = vector;
 	/* Tasklets for Mailbox */
 	adapter->link_si = softint_establish(SOFTINT_NET |IXGBE_SOFTINFT_FLAGS,
 	ixv_handle_link, adapter);



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

2017-12-20 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Dec 21 06:43:17 UTC 2017

Modified Files:
src/sys/dev/pci/ixgbe: ixv.c

Log Message:
 Don't panic when resource shortage occured. Like ixgbe.c rev. 1.116.
 - Move location of {ixgbe,ixv}_setup_interface() call at a position that
   any error don't occur. One of the reason is that it should be. Another
   reason is that it's hard to call ether_ifdetach() and if_detach() when
   cold == 1 (because of pserialize_perform, xc_wait, timing of domaininit
   and maybe more).


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/dev/pci/ixgbe/ixv.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/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.75 src/sys/dev/pci/ixgbe/ixv.c:1.76
--- src/sys/dev/pci/ixgbe/ixv.c:1.75	Wed Dec  6 04:08:50 2017
+++ src/sys/dev/pci/ixgbe/ixv.c	Thu Dec 21 06:43:17 2017
@@ -1,4 +1,4 @@
-/*$NetBSD: ixv.c,v 1.75 2017/12/06 04:08:50 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.76 2017/12/21 06:43:17 msaitoh Exp $*/
 
 /**
 
@@ -496,6 +496,12 @@ ixv_attach(device_t parent, device_t dev
 	/* hw.ix defaults init */
 	adapter->enable_aim = ixv_enable_aim;
 
+	error = ixv_allocate_msix(adapter, pa);
+	if (error) {
+		device_printf(dev, "ixv_allocate_msix() failed!\n");
+		goto err_late;
+	}
+
 	/* Setup OS specific network interface */
 	error = ixv_setup_interface(dev, adapter);
 	if (error != 0) {
@@ -503,12 +509,6 @@ ixv_attach(device_t parent, device_t dev
 		goto err_late;
 	}
 
-	error = ixv_allocate_msix(adapter, pa);
-	if (error) {
-		device_printf(dev, "ixv_allocate_msix() failed!\n");
-		goto err_late;
-	}
-
 	/* Do the stats setup */
 	ixv_save_stats(adapter);
 	ixv_init_stats(adapter);



CVS commit: src/tests/lib/libc/gen/posix_spawn

2017-12-20 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Dec 21 03:31:43 UTC 2017

Modified Files:
src/tests/lib/libc/gen/posix_spawn: t_spawnattr.c

Log Message:
Fix broken test: we can't assume that the current schedule priority range
will overlap with the requested scheduler range, so get the new scheduler
range, and then try to find a different priority. If that fails (to find
a different scheduling range), give up here.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/gen/posix_spawn/t_spawnattr.c

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

Modified files:

Index: src/tests/lib/libc/gen/posix_spawn/t_spawnattr.c
diff -u src/tests/lib/libc/gen/posix_spawn/t_spawnattr.c:1.2 src/tests/lib/libc/gen/posix_spawn/t_spawnattr.c:1.3
--- src/tests/lib/libc/gen/posix_spawn/t_spawnattr.c:1.2	Mon Dec 18 08:18:23 2017
+++ src/tests/lib/libc/gen/posix_spawn/t_spawnattr.c	Wed Dec 20 22:31:43 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: t_spawnattr.c,v 1.2 2017/12/18 13:18:23 christos Exp $ */
+/* $NetBSD: t_spawnattr.c,v 1.3 2017/12/21 03:31:43 christos Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -45,11 +45,8 @@
 #define MAX(a, b)	(a) > (b) ? (a) : (b)
 #define MIN(a, b)	(a) > (b) ? (b) : (a)
 
-static int get_different_scheduler(void);
-static int get_different_priority(void);
-
 static int
-get_different_scheduler()
+get_different_scheduler(void)
 {
 	/*
 	 * We don't want to use SCHED_OTHER because it does not have
@@ -69,14 +66,12 @@ get_different_scheduler()
 }
 
 static int
-get_different_priority()
+get_different_priority(int scheduler)
 {
-	int scheduler, max, min, new, priority;
+	int min, max, new, priority;
 	struct sched_param param;
 
-	/* get current schedule policy */
-	scheduler = sched_getscheduler(0);
-
+	/* Get the priority range for the new scheduler */
 	max = sched_get_priority_max(scheduler);
 	min = sched_get_priority_min(scheduler);
 
@@ -84,10 +79,13 @@ get_different_priority()
 	priority = param.sched_priority;
 	
 	/* new schedule policy */
-	new = (priority + 1);
-	if (new > max)
-		new = min;
+	for (new = min; new <= max; new++)
+		if (priority != new)
+			break;
 	
+	ATF_REQUIRE_MSG(priority != new, "could not find different priority");
+	printf("min %d max %d for scheduler %d, returning %d\n",
+	min, max, scheduler, new);
 	return new;
 }
 
@@ -120,8 +118,9 @@ ATF_TC_BODY(t_spawnattr, tc)
 	posix_spawnattr_init();
 
 	scheduler = get_different_scheduler();
-	priority = get_different_priority();
+	priority = get_different_priority(scheduler);
 	sp.sched_priority = priority;
+	printf("using scheduler %d, priority %d\n", scheduler, priority);
 	
 	sigemptyset();
 	sigaddset(, SIGUSR1);



CVS commit: xsrc/external/mit/libXfont/dist/src/fc

2017-12-20 Thread Rin Okuyama
Module Name:xsrc
Committed By:   rin
Date:   Wed Dec 20 23:07:30 UTC 2017

Modified Files:
xsrc/external/mit/libXfont/dist/src/fc: fserve.c

Log Message:
Fix debug build with LLVM for ILP32 archs.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/libXfont/dist/src/fc/fserve.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/libXfont/dist/src/fc/fserve.c
diff -u xsrc/external/mit/libXfont/dist/src/fc/fserve.c:1.6 xsrc/external/mit/libXfont/dist/src/fc/fserve.c:1.7
--- xsrc/external/mit/libXfont/dist/src/fc/fserve.c:1.6	Sun Mar  5 01:07:05 2017
+++ xsrc/external/mit/libXfont/dist/src/fc/fserve.c	Wed Dec 20 23:07:30 2017
@@ -1054,7 +1054,7 @@ fs_read_extent_info(FontPathElementPtr f
 if (numInfos >= (INT_MAX / sizeof(CharInfoRec))) {
 #ifdef DEBUG
 	fprintf(stderr,
-		"fsQueryXExtents16: numInfos (%d) >= %ld\n",
+		"fsQueryXExtents16: numInfos (%d) >= %zu\n",
 		numInfos, (INT_MAX / sizeof(CharInfoRec)));
 #endif
 	pCI = NULL;



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

2017-12-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Dec 20 15:22:14 UTC 2017

Modified Files:
src/sys/arch/arm/include: armreg.h

Log Message:
One copy of the generic timer register defines is enough for anyone.  The
ARM_ prefixed copies are prefered (at this point) and the comments from
the non-ARM_ prefixed versions are copied over.


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/sys/arch/arm/include/armreg.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/arch/arm/include/armreg.h
diff -u src/sys/arch/arm/include/armreg.h:1.115 src/sys/arch/arm/include/armreg.h:1.116
--- src/sys/arch/arm/include/armreg.h:1.115	Wed Dec 20 15:12:04 2017
+++ src/sys/arch/arm/include/armreg.h	Wed Dec 20 15:22:14 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: armreg.h,v 1.115 2017/12/20 15:12:04 skrll Exp $	*/
+/*	$NetBSD: armreg.h,v 1.116 2017/12/20 15:22:14 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Ben Harris
@@ -528,19 +528,6 @@
 #define	CPU_CSSR_L1		0x
 #define	CPU_CSSR_InD		0x0001
 
-/* ARMv7A CP15 Global Timer definitions */
-#define	CNTKCTL_PL0PTEN		0x0200	/* PL0 Physical Timer Enable */
-#define	CNTKCTL_PL0VTEN		0x0100	/* PL0 Virtual Timer Enable */
-#define	CNTKCTL_EVNTI		0x00f0	/* CNTVCT Event Bit Select */
-#define	CNTKCTL_EVNTDIR		0x0008	/* CNTVCT Event Dir (1->0) */
-#define	CNTKCTL_EVNTEN		0x0004	/* CNTVCT Event Enable */
-#define	CNTKCTL_PL0PCTEN	0x0200	/* PL0 Physical Counter Enable */
-#define	CNTKCTL_PL0VCTEN	0x0100	/* PL0 Virtual Counter Enable */
-
-#define	CNT_CTL_ISTATUS		0x0004	/* Timer is asserted */
-#define	CNT_CTL_IMASK		0x0002	/* Timer output is masked */
-#define	CNT_CTL_ENABLE		0x0001	/* Timer is enabled */
-
 /* Fault status register definitions */
 
 #define FAULT_TYPE_MASK 0x0f
@@ -734,23 +721,24 @@
 #define PJ4B_MPIDR_CPUID	__BITS(0,3)	/* AFF0 = core id */
 
 /* Defines for ARM Generic Timer */
-#define ARM_CNTCTL_ENABLE		__BIT(0) // Timer Enabled
-#define ARM_CNTCTL_IMASK		__BIT(1) // Mask Interrupt
-#define ARM_CNTCTL_ISTATUS		__BIT(2) // Interrupt is pending
-
-#define ARM_CNTKCTL_PL0PTEN		__BIT(9)
-#define ARM_CNTKCTL_PL0VTEN		__BIT(8)
-#define ARM_CNTKCTL_EVNTI		__BITS(7,4)
-#define ARM_CNTKCTL_EVNTDIR		__BIT(3)
-#define ARM_CNTKCTL_EVNTEN		__BIT(2)
-#define ARM_CNTKCTL_PL0VCTEN		__BIT(1)
-#define ARM_CNTKCTL_PL0PCTEN		__BIT(0)
-
-#define ARM_CNTHCTL_EVNTI		__BITS(7,4)
-#define ARM_CNTHCTL_EVNTDIR		__BIT(3)
-#define ARM_CNTHCTL_EVNTEN		__BIT(2)
-#define ARM_CNTHCTL_PL1PCTEN		__BIT(1)
-#define ARM_CNTHCTL_PL1VCTEN		__BIT(0)
+#define ARM_CNTCTL_ISTATUS	__BIT(2)	// Interrupt is pending
+#define ARM_CNTCTL_IMASK	__BIT(1)	// Mask Interrupt
+#define ARM_CNTCTL_ENABLE	__BIT(0)	// Timer Enabled
+
+#define ARM_CNTKCTL_PL0PTEN	__BIT(9)	/* PL0 Physical Timer Enable */
+#define ARM_CNTKCTL_PL0VTEN	__BIT(8)	/* PL0 Virtual Timer Enable */
+#define ARM_CNTKCTL_EVNTI	__BITS(7,4)	/* CNTVCT Event Bit Select */
+#define ARM_CNTKCTL_EVNTDIR	__BIT(3)	/* CNTVCT Event Dir (1->0) */
+#define ARM_CNTKCTL_EVNTEN	__BIT(2)	/* CNTVCT Event Enable */
+#define ARM_CNTKCTL_PL0VCTEN	__BIT(1)	/* PL0 Virtual Counter Enable */
+#define ARM_CNTKCTL_PL0PCTEN	__BIT(0)	/* PL0 Physical Counter Enable */
+
+/* CNCHCTL, Timer PL2 Control register, Virtualization Extensions */
+#define ARM_CNTHCTL_EVNTI	__BITS(7,4)
+#define ARM_CNTHCTL_EVNTDIR	__BIT(3)
+#define ARM_CNTHCTL_EVNTEN	__BIT(2)
+#define ARM_CNTHCTL_PL1PCEN	__BIT(1)
+#define ARM_CNTHCTL_PL1PCTEN	__BIT(0)
 
 #define ARM_A5_TLBDATA_DOM		__BITS(62,59)
 #define ARM_A5_TLBDATA_AP		__BITS(58,56)



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

2017-12-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Dec 20 15:12:04 UTC 2017

Modified Files:
src/sys/arch/arm/include: armreg.h

Log Message:
Correct ARM_CNTKCTL_PL0[VP]CTEN values.  NFC as nothing uses them.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/arch/arm/include/armreg.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/arch/arm/include/armreg.h
diff -u src/sys/arch/arm/include/armreg.h:1.114 src/sys/arch/arm/include/armreg.h:1.115
--- src/sys/arch/arm/include/armreg.h:1.114	Sun Dec 17 09:39:00 2017
+++ src/sys/arch/arm/include/armreg.h	Wed Dec 20 15:12:04 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: armreg.h,v 1.114 2017/12/17 09:39:00 skrll Exp $	*/
+/*	$NetBSD: armreg.h,v 1.115 2017/12/20 15:12:04 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Ben Harris
@@ -743,8 +743,8 @@
 #define ARM_CNTKCTL_EVNTI		__BITS(7,4)
 #define ARM_CNTKCTL_EVNTDIR		__BIT(3)
 #define ARM_CNTKCTL_EVNTEN		__BIT(2)
-#define ARM_CNTKCTL_PL0PCTEN		__BIT(1)
-#define ARM_CNTKCTL_PL0VCTEN		__BIT(0)
+#define ARM_CNTKCTL_PL0VCTEN		__BIT(1)
+#define ARM_CNTKCTL_PL0PCTEN		__BIT(0)
 
 #define ARM_CNTHCTL_EVNTI		__BITS(7,4)
 #define ARM_CNTHCTL_EVNTDIR		__BIT(3)



CVS commit: src/sys/arch/aarch64/include

2017-12-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Dec 20 14:58:08 UTC 2017

Modified Files:
src/sys/arch/aarch64/include: armreg.h

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/aarch64/include/armreg.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/arch/aarch64/include/armreg.h
diff -u src/sys/arch/aarch64/include/armreg.h:1.2 src/sys/arch/aarch64/include/armreg.h:1.3
--- src/sys/arch/aarch64/include/armreg.h:1.2	Mon Apr 27 06:54:12 2015
+++ src/sys/arch/aarch64/include/armreg.h	Wed Dec 20 14:58:08 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: armreg.h,v 1.2 2015/04/27 06:54:12 skrll Exp $ */
+/* $NetBSD: armreg.h,v 1.3 2017/12/20 14:58:08 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@ AARCH64REG_READ_INLINE(nzcv)		// conditi
 AARCH64REG_WRITE_INLINE(nzcv)
 
 static const uintmax_t
-NZCV_N = __BIT(31), // Negative 
+NZCV_N = __BIT(31), // Negative
 NZCV_Z = __BIT(30), // Zero
 NZCV_C = __BIT(29), // Carry
 NZCV_V = __BIT(28); // Overflow
@@ -141,7 +141,7 @@ static const uintmax_t
 AARCH64REG_READ_INLINE(tpidr_el0)	// Thread Pointer ID Register (RW)
 AARCH64REG_WRITE_INLINE(tpidr_el0)
 
-/* 
+/*
  * From here on, these can only be accessed at EL1 (kernel)
  */
 
@@ -290,7 +290,7 @@ AARCH64REG_WRITE_INLINE(spsr_el1)
 
 static const uintmax_t
 SPSR_NZCV	  = __BITS(31,28),	// mask of N Z C V
- SPSR_N	  = __BIT(31),		// Negative 
+ SPSR_N	  = __BIT(31),		// Negative
  SPSR_Z	  = __BIT(30),		// Zero
  SPSR_C	  = __BIT(29),		// Carry
  SPSR_V	  = __BIT(28),		// oVerflow



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

2017-12-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Dec 20 14:51:40 UTC 2017

Removed Files:
src/sys/arch/arm/broadcom: bcm2835_pm.c bcm2835_pmvar.h

Log Message:
G/C


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r0 src/sys/arch/arm/broadcom/bcm2835_pm.c
cvs rdiff -u -r1.2 -r0 src/sys/arch/arm/broadcom/bcm2835_pmvar.h

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



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

2017-12-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Dec 20 14:35:12 UTC 2017

Modified Files:
src/sys/arch/arm/broadcom: bcm283x_platform.c

Log Message:
G/C


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/broadcom/bcm283x_platform.c

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

Modified files:

Index: src/sys/arch/arm/broadcom/bcm283x_platform.c
diff -u src/sys/arch/arm/broadcom/bcm283x_platform.c:1.1 src/sys/arch/arm/broadcom/bcm283x_platform.c:1.2
--- src/sys/arch/arm/broadcom/bcm283x_platform.c:1.1	Sun Dec 10 21:38:26 2017
+++ src/sys/arch/arm/broadcom/bcm283x_platform.c	Wed Dec 20 14:35:12 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm283x_platform.c,v 1.1 2017/12/10 21:38:26 skrll Exp $	*/
+/*	$NetBSD: bcm283x_platform.c,v 1.2 2017/12/20 14:35:12 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2017 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcm283x_platform.c,v 1.1 2017/12/10 21:38:26 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm283x_platform.c,v 1.2 2017/12/20 14:35:12 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_bcm283x.h"
@@ -130,14 +130,6 @@ bs_protos(generic_armv4);
 bs_protos(a4x);
 bs_protos(bs_notimpl);
 
-#if 0
-#if __ARMEB__
-#define NSWAP(n)	n ## _swap
-#else
-#define NSWAP(n)	n
-#endif
-#endif
-
 struct arm32_dma_range bcm2835_dma_ranges[] = {
 	[0] = {
 		.dr_sysbase = 0,



CVS commit: src/share/man/man9

2017-12-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Dec 20 10:01:38 UTC 2017

Modified Files:
src/share/man/man9: module.9

Log Message:
Fix xref. Remove unnecessary Tn.


To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/share/man/man9/module.9

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

Modified files:

Index: src/share/man/man9/module.9
diff -u src/share/man/man9/module.9:1.41 src/share/man/man9/module.9:1.42
--- src/share/man/man9/module.9:1.41	Wed Dec 20 03:24:56 2017
+++ src/share/man/man9/module.9	Wed Dec 20 10:01:38 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: module.9,v 1.41 2017/12/20 03:24:56 pgoyette Exp $
+.\"	$NetBSD: module.9,v 1.42 2017/12/20 10:01:38 wiz Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -114,7 +114,7 @@ The module is a device driver - see
 The module provides an alternate execution environment - see the various
 .Dv COMPAT_xxx
 options in
-.Xr options 9
+.Xr options 4
 .It Dv MODULE_CLASS_SECMODEL
 The module provides a security model - see
 .Xr secmodel 9
@@ -509,7 +509,7 @@ is for finding modules passed in by the 
 The kernel module subsystem first appeared in
 .Nx 5.0 .
 It replaces the
-.Dq Tn LKM
+.Dq LKM
 subsystem from earlier releases.
 .Sh AUTHORS
 .An -nosplit



CVS commit: src/share/man/man4

2017-12-20 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Dec 20 09:58:36 UTC 2017

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

Log Message:
Fix xref, remove trailing comma and whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/intro.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/intro.4
diff -u src/share/man/man4/intro.4:1.2 src/share/man/man4/intro.4:1.3
--- src/share/man/man4/intro.4:1.2	Tue Dec 19 01:59:48 2017
+++ src/share/man/man4/intro.4	Wed Dec 20 09:58:36 2017
@@ -1,4 +1,4 @@
-.\" $NetBSD: intro.4,v 1.2 2017/12/19 01:59:48 christos Exp $
+.\" $NetBSD: intro.4,v 1.3 2017/12/20 09:58:36 wiz Exp $
 .\"
 .\" Copyright (c) 1996 David E. O'Brien, Joerg Wunsch
 .\"
@@ -147,7 +147,7 @@ For each kernel, there is a configuratio
 to select the facilities and drivers for that kernel, and to tune
 several options.
 See
-.Xr config 8
+.Xr config 1
 for a detailed description of the files involved.
 The individual manual pages in this section provide a sample line for the
 configuration file in their synopsis portion.
@@ -167,10 +167,10 @@ architecture).
 .Xr socket 2 ,
 .Xr write 2 ,
 .\" .Xr devfs 5 ,
-.Xr hier 7 ,
+.Xr hier 7
 .Sh HISTORY
 This manual page first appeared in
-.Fx 2.1 
+.Fx 2.1
 and
 .Nx 9 .
 .Sh AUTHORS



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

2017-12-20 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Dec 20 08:51:43 UTC 2017

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

Log Message:
 Don't panic when resource shortage occured. Fixes PR#52820 reported by
kardel@:
 - Don't use if_free() because ixgbe(4) don't use if_alloc().
 - Move location of {ixgbe,ixv}_setup_interface() call at a position that
   any error don't occur. One of the reason is that it should be. Another
   reason is that it's hard to call ether_ifdetach() and if_detach() when
   cold == 1 (because of pserialize_perform, xc_wait, timing of domaininit
   and maybe more).


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/sys/dev/pci/ixgbe/ixgbe.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/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.115 src/sys/dev/pci/ixgbe/ixgbe.c:1.116
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.115	Wed Dec  6 04:08:50 2017
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Wed Dec 20 08:51:42 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.115 2017/12/06 04:08:50 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.116 2017/12/20 08:51:42 msaitoh Exp $ */
 
 /**
 
@@ -1043,10 +1043,6 @@ ixgbe_attach(device_t parent, device_t d
 	hw->eeprom.ops.read(hw, IXGBE_ETRACKID_L, );
 	aprint_normal(" ETrackID %08x\n", ((uint32_t)high << 16) | low);
 
-	/* Setup OS specific network interface */
-	if (ixgbe_setup_interface(dev, adapter) != 0)
-		goto err_late;
-
 	if (adapter->feat_en & IXGBE_FEATURE_MSIX)
 		error = ixgbe_allocate_msix(adapter, pa);
 	else
@@ -1074,6 +1070,10 @@ ixgbe_attach(device_t parent, device_t d
 		break;
 	}
 
+	/* Setup OS specific network interface */
+	if (ixgbe_setup_interface(dev, adapter) != 0)
+		goto err_late;
+
 	/*
 	 *  Print PHY ID only for copper PHY. On device which has SFP(+) cage
 	 * and a module is inserted, phy.id is not MII PHY id but SFF 8024 ID.
@@ -1155,8 +1155,6 @@ err_late:
 	ixgbe_free_receive_structures(adapter);
 	free(adapter->queues, M_DEVBUF);
 err_out:
-	if (adapter->ifp != NULL)
-		if_free(adapter->ifp);
 	ctrl_ext = IXGBE_READ_REG(>hw, IXGBE_CTRL_EXT);
 	ctrl_ext &= ~IXGBE_CTRL_EXT_DRV_LOAD;
 	IXGBE_WRITE_REG(>hw, IXGBE_CTRL_EXT, ctrl_ext);



CVS commit: src/sys/dev/usb

2017-12-20 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Dec 20 08:21:11 UTC 2017

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

Log Message:
Fix the logic around TT Hub Slot ID, TT Port Number and Multi-TT in
xhci_setup_tthub.  TT Hub/Port need to reference the upstream HS hub and
Multi-TT needs to reflect the capabilities of a HS hub itself or the same
upstream HS hub.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/dev/usb/xhci.c

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

Modified files:

Index: src/sys/dev/usb/xhci.c
diff -u src/sys/dev/usb/xhci.c:1.82 src/sys/dev/usb/xhci.c:1.83
--- src/sys/dev/usb/xhci.c:1.82	Tue Dec 19 16:04:27 2017
+++ src/sys/dev/usb/xhci.c	Wed Dec 20 08:21:11 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: xhci.c,v 1.82 2017/12/19 16:04:27 skrll Exp $	*/
+/*	$NetBSD: xhci.c,v 1.83 2017/12/20 08:21:11 skrll Exp $	*/
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.82 2017/12/19 16:04:27 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.83 2017/12/20 08:21:11 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -3134,10 +3134,10 @@ static void
 xhci_setup_tthub(struct usbd_pipe *pipe, uint32_t *cp)
 {
 	struct usbd_device *dev = pipe->up_dev;
-	struct usbd_device *myhub = dev->ud_myhub;
 	struct usbd_port *myhsport = dev->ud_myhsport;
 	usb_device_descriptor_t * const dd = >ud_ddesc;
 	uint32_t speed = dev->ud_speed;
+	uint8_t rhaddr = dev->ud_bus->ub_rhaddr;
 	uint8_t tthubslot, ttportnum;
 	bool ishub;
 	bool usemtt;
@@ -3159,8 +3159,8 @@ xhci_setup_tthub(struct usbd_pipe *pipe,
 	 *   parent hub is not HS hub ||
 	 *   attached to root hub.
 	 */
-	if (myhsport && myhub && myhub->ud_depth &&
-	myhub->ud_speed == USB_SPEED_HIGH &&
+	if (myhsport &&
+	myhsport->up_parent->ud_addr != rhaddr &&
 	(speed == USB_SPEED_LOW || speed == USB_SPEED_FULL)) {
 		ttportnum = myhsport->up_portno;
 		tthubslot = myhsport->up_parent->ud_addr;
@@ -3185,29 +3185,30 @@ xhci_setup_tthub(struct usbd_pipe *pipe,
 		DPRINTFN(4, "nports=%jd ttt=%jd", hd->bNbrPorts, ttt, 0, 0);
 	}
 
-#define IS_TTHUB(dd) \
-((dd)->bDeviceProtocol == UDPROTO_HSHUBSTT || \
- (dd)->bDeviceProtocol == UDPROTO_HSHUBMTT)
+#define IS_MTTHUB(dd) \
+ ((dd)->bDeviceProtocol == UDPROTO_HSHUBMTT)
 
 	/*
 	 * MTT flag is set if
-	 * 1. this is HS hub && MTT is enabled
-	 *  or
-	 * 2. this is not hub && this is LS or FS device &&
-	 *MTT of parent HS hub (and its parent, too) is enabled
+	 * 1. this is HS hub && MTTs are supported and enabled;  or
+	 * 2. this is LS or FS device && there is a parent HS hub where MTTs
+	 *are supported and enabled.
+	 *
+	 * XXX enabled is not tested yet
 	 */
-	if (ishub && speed == USB_SPEED_HIGH && IS_TTHUB(dd))
+	if (ishub && speed == USB_SPEED_HIGH && IS_MTTHUB(dd))
 		usemtt = true;
-	else if (!ishub && (speed == USB_SPEED_LOW || speed == USB_SPEED_FULL) &&
-	 myhub && myhub->ud_depth && myhub->ud_speed == USB_SPEED_HIGH &&
-	 myhsport && IS_TTHUB(>up_parent->ud_ddesc))
+	else if ((speed == USB_SPEED_LOW || speed == USB_SPEED_FULL) &&
+	myhsport &&
+	myhsport->up_parent->ud_addr != rhaddr &&
+	IS_MTTHUB(>up_parent->ud_ddesc))
 		usemtt = true;
 	else
 		usemtt = false;
 	DPRINTFN(4, "class %ju proto %ju ishub %jd usemtt %jd",
 	dd->bDeviceClass, dd->bDeviceProtocol, ishub, usemtt);
 
-#undef IS_TTHUB
+#undef IS_MTTHUB
 
 	cp[0] |=
 	XHCI_SCTX_0_HUB_SET(ishub ? 1 : 0) |



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

2017-12-20 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Dec 20 08:10:13 UTC 2017

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

Log Message:
Disable compat stuffs that are accidentally accidentally added to rev 1.33.
Now INSTALL kernel fits within 5MB again.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/zaurus/conf/INSTALL

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/INSTALL
diff -u src/sys/arch/zaurus/conf/INSTALL:1.33 src/sys/arch/zaurus/conf/INSTALL:1.34
--- src/sys/arch/zaurus/conf/INSTALL:1.33	Thu Sep 14 07:58:44 2017
+++ src/sys/arch/zaurus/conf/INSTALL	Wed Dec 20 08:10:13 2017
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.33 2017/09/14 07:58:44 mrg Exp $
+# $NetBSD: INSTALL,v 1.34 2017/12/20 08:10:13 rin Exp $
 #
 # INSTALL config file (GENERIC with memory disk root)
 #
@@ -35,8 +35,10 @@ no file-system		TMPFS
 
 no options 		WAPBL
 
-include 		"conf/compat_netbsd14.config"
 no options 		COMPAT_NETBSD32
+no options 		COMPAT_13
+no options 		COMPAT_43
+no options 		COMPAT_44
 
 no options 		COMPAT_OSSAUDIO