[Midnightbsd-cvs] src [10123] trunk/sys/dev: update cx and ctau

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun May 27 20:20:56 EDT 2018


Revision: 10123
          http://svnweb.midnightbsd.org/src/?rev=10123
Author:   laffer1
Date:     2018-05-27 20:20:56 -0400 (Sun, 27 May 2018)
Log Message:
-----------
update cx and ctau

Modified Paths:
--------------
    trunk/sys/dev/coretemp/coretemp.c
    trunk/sys/dev/cp/cpddk.c
    trunk/sys/dev/cp/cpddk.h
    trunk/sys/dev/cp/if_cp.c
    trunk/sys/dev/cp/ng_cp.h
    trunk/sys/dev/cpuctl/cpuctl.c
    trunk/sys/dev/cpufreq/ichss.c
    trunk/sys/dev/cs/if_cs.c
    trunk/sys/dev/cs/if_cs_isa.c
    trunk/sys/dev/cs/if_cs_pccard.c
    trunk/sys/dev/cs/if_csreg.h
    trunk/sys/dev/cs/if_csvar.h
    trunk/sys/dev/ct/bshw_machdep.c
    trunk/sys/dev/ct/bshwvar.h
    trunk/sys/dev/ct/ct.c
    trunk/sys/dev/ct/ct_isa.c
    trunk/sys/dev/ct/ct_machdep.h
    trunk/sys/dev/ct/ctvar.h
    trunk/sys/dev/ctau/am8530.h
    trunk/sys/dev/ctau/ctau.c
    trunk/sys/dev/ctau/ctau2fw.h
    trunk/sys/dev/ctau/ctaue1fw.h
    trunk/sys/dev/ctau/ctaufw.h
    trunk/sys/dev/ctau/ctaug7fw.h
    trunk/sys/dev/ctau/ctaureg.h
    trunk/sys/dev/ctau/ctddk.c
    trunk/sys/dev/ctau/ctddk.h
    trunk/sys/dev/ctau/ds2153.h
    trunk/sys/dev/ctau/hdc64570.h
    trunk/sys/dev/ctau/if_ct.c
    trunk/sys/dev/ctau/lxt318.h
    trunk/sys/dev/ctau/ng_ct.h
    trunk/sys/dev/cx/cronyxfw.h
    trunk/sys/dev/cx/csigma.c
    trunk/sys/dev/cx/csigmafw.h
    trunk/sys/dev/cx/cxddk.c
    trunk/sys/dev/cx/cxddk.h
    trunk/sys/dev/cx/cxreg.h
    trunk/sys/dev/cx/if_cx.c
    trunk/sys/dev/cx/machdep.h
    trunk/sys/dev/cx/ng_cx.h

Modified: trunk/sys/dev/coretemp/coretemp.c
===================================================================
--- trunk/sys/dev/coretemp/coretemp.c	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/coretemp/coretemp.c	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 2007, 2008 Rui Paulo <rpaulo at FreeBSD.org>
  * All rights reserved.
@@ -30,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/coretemp/coretemp.c 246951 2013-02-18 22:47:16Z markj $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -48,7 +49,7 @@
 #include <machine/cputypes.h>
 #include <machine/md_var.h>
 
-#define	TZ_ZEROC			2731
+#define	TZ_ZEROC			2732
 
 #define	THERM_STATUS_LOG		0x02
 #define	THERM_STATUS			0x01
@@ -85,7 +86,7 @@
 	DEVMETHOD(device_attach,	coretemp_attach),
 	DEVMETHOD(device_detach,	coretemp_detach),
 
-	{0, 0}
+	DEVMETHOD_END
 };
 
 static driver_t coretemp_driver = {

Modified: trunk/sys/dev/cp/cpddk.c
===================================================================
--- trunk/sys/dev/cp/cpddk.c	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/cp/cpddk.c	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/cp/cpddk.c,v 1.2 2008/12/02 02:24:39 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*-
  * Low-level subroutines for Cronyx Tau-PCI adapter.
  *
@@ -19,7 +19,7 @@
  * $Cronyx: cpddk.c,v 1.13.4.37 2004/12/11 16:14:39 rik Exp $
  */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/cp/cpddk.c 153495 2005-12-17 07:09:17Z obrien $");
 
 #include <dev/cx/machdep.h>
 

Modified: trunk/sys/dev/cp/cpddk.h
===================================================================
--- trunk/sys/dev/cp/cpddk.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/cp/cpddk.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/cp/cpddk.h,v 1.2 2008/12/02 02:24:39 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*-
  * Cronyx Tau-PCI DDK definitions.
  *
@@ -17,7 +17,7 @@
  * works or modified versions.
  *
  * $Cronyx: cpddk.h,v 1.8.4.20 2004/12/06 16:21:06 rik Exp $
- * $FreeBSD$
+ * $FreeBSD: stable/10/sys/dev/cp/cpddk.h 180132 2008-06-30 21:18:27Z rik $
  */
 #define NBRD		6	/* the maximum number of installed boards */
 #define NCHAN		4	/* the number of channels on the board */

Modified: trunk/sys/dev/cp/if_cp.c
===================================================================
--- trunk/sys/dev/cp/if_cp.c	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/cp/if_cp.c	2018-05-28 00:20:56 UTC (rev 10123)
@@ -2,7 +2,7 @@
 /*-
  * Cronyx-Tau-PCI adapter driver for FreeBSD.
  * Supports PPP/HDLC, Cisco/HDLC and FrameRelay protocol in synchronous mode,
- * and asyncronous channels with full modem control.
+ * and asynchronous channels with full modem control.
  * Keepalive protocol implemented in both Cisco and PPP modes.
  *
  * Copyright (C) 1999-2004 Cronyx Engineering.
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/cp/if_cp.c 314667 2017-03-04 13:03:31Z avg $");
 
 #include <sys/param.h>
 #include <sys/ucred.h>
@@ -94,7 +94,7 @@
 	DEVMETHOD(device_attach,	cp_attach),
 	DEVMETHOD(device_detach,	cp_detach),
 
-	{0, 0}
+	DEVMETHOD_END
 };
 
 typedef struct _cp_dma_mem_t {
@@ -462,7 +462,7 @@
 		splx (s);
 		return (ENXIO);
 	}
-	callout_init (&led_timo[unit], CALLOUT_MPSAFE);
+	callout_init (&led_timo[unit], 1);
 	error  = bus_setup_intr (dev, bd->cp_irq,
 				INTR_TYPE_NET|INTR_MPSAFE,
 				NULL, cp_intr, bd, &bd->cp_intrhand);
@@ -491,7 +491,7 @@
 		d->board = b;
 		d->chan = c;
 		c->sys = d;
-		callout_init (&d->timeout_handle, CALLOUT_MPSAFE);
+		callout_init (&d->timeout_handle, 1);
 #ifdef NETGRAPH
 		if (ng_make_node_common (&typestruct, &d->node) != 0) {
 			printf ("%s: cannot make common node\n", d->name);
@@ -2241,7 +2241,7 @@
 			printf ("Failed to register ng_cp\n");
 #endif
 		++load_count;
-		callout_init (&timeout_handle, CALLOUT_MPSAFE);
+		callout_init (&timeout_handle, 1);
 		callout_reset (&timeout_handle, hz*5, cp_timeout, 0);
 		break;
 	case MOD_UNLOAD:

Modified: trunk/sys/dev/cp/ng_cp.h
===================================================================
--- trunk/sys/dev/cp/ng_cp.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/cp/ng_cp.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/cp/ng_cp.h,v 1.2 2008/12/02 02:24:39 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*-
  * Defines for Cronyx-Tau-PCI adapter driver.
  *
@@ -14,7 +14,7 @@
  * works or modified versions.
  *
  * $Cronyx: ng_cp.h,v 1.1.2.4 2004/01/27 14:39:11 rik Exp $
- * $FreeBSD$
+ * $FreeBSD: stable/10/sys/dev/cp/ng_cp.h 139749 2005-01-06 01:43:34Z imp $
  */
 
 #ifdef NETGRAPH

Modified: trunk/sys/dev/cpuctl/cpuctl.c
===================================================================
--- trunk/sys/dev/cpuctl/cpuctl.c	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/cpuctl/cpuctl.c	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 2006-2008 Stanislav Sedov <stas at FreeBSD.org>
  * All rights reserved.
@@ -26,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/cpuctl/cpuctl.c 315972 2017-03-26 01:10:59Z kib $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -57,18 +58,20 @@
 
 #define	CPUCTL_VERSION 1
 
-#ifdef DEBUG
+#ifdef CPUCTL_DEBUG
 # define	DPRINTF(format,...) printf(format, __VA_ARGS__);
 #else
 # define	DPRINTF(...)
 #endif
 
-#define	UCODE_SIZE_MAX	(10 * 1024)
+#define	UCODE_SIZE_MAX	(4 * 1024 * 1024)
 
 static int cpuctl_do_msr(int cpu, cpuctl_msr_args_t *data, u_long cmd,
     struct thread *td);
 static int cpuctl_do_cpuid(int cpu, cpuctl_cpuid_args_t *data,
     struct thread *td);
+static int cpuctl_do_cpuid_count(int cpu, cpuctl_cpuid_count_args_t *data,
+    struct thread *td);
 static int cpuctl_do_update(int cpu, cpuctl_update_args_t *data,
     struct thread *td);
 static int update_intel(int cpu, cpuctl_update_args_t *args,
@@ -153,8 +156,9 @@
 		return (ENXIO);
 	}
 	/* Require write flag for "write" requests. */
-	if ((cmd == CPUCTL_WRMSR || cmd == CPUCTL_UPDATE) &&
-	    ((flags & FWRITE) == 0))
+	if ((cmd == CPUCTL_MSRCBIT || cmd == CPUCTL_MSRSBIT ||
+	    cmd == CPUCTL_UPDATE || cmd == CPUCTL_WRMSR) &&
+	    (flags & FWRITE) == 0)
 		return (EPERM);
 	switch (cmd) {
 	case CPUCTL_RDMSR:
@@ -177,6 +181,10 @@
 			goto fail;
 		ret = cpuctl_do_update(cpu, (cpuctl_update_args_t *)data, td);
 		break;
+	case CPUCTL_CPUID_COUNT:
+		ret = cpuctl_do_cpuid_count(cpu,
+		    (cpuctl_cpuid_count_args_t *)data, td);
+		break;
 	default:
 		ret = EINVAL;
 		break;
@@ -189,7 +197,8 @@
  * Actually perform cpuid operation.
  */
 static int
-cpuctl_do_cpuid(int cpu, cpuctl_cpuid_args_t *data, struct thread *td)
+cpuctl_do_cpuid_count(int cpu, cpuctl_cpuid_count_args_t *data,
+    struct thread *td)
 {
 	int is_bound = 0;
 	int oldcpu;
@@ -199,16 +208,34 @@
 
 	/* Explicitly clear cpuid data to avoid returning stale info. */
 	bzero(data->data, sizeof(data->data));
-	DPRINTF("[cpuctl,%d]: retriving cpuid level %#0x for %d cpu\n",
-	    __LINE__, data->level, cpu);
+	DPRINTF("[cpuctl,%d]: retrieving cpuid lev %#0x type %#0x for %d cpu\n",
+	    __LINE__, data->level, data->level_type, cpu);
+#ifdef __i386__
+	if (cpu_id == 0)
+		return (ENODEV);
+#endif
 	oldcpu = td->td_oncpu;
 	is_bound = cpu_sched_is_bound(td);
 	set_cpu(cpu, td);
-	cpuid_count(data->level, 0, data->data);
+	cpuid_count(data->level, data->level_type, data->data);
 	restore_cpu(oldcpu, is_bound, td);
 	return (0);
 }
 
+static int
+cpuctl_do_cpuid(int cpu, cpuctl_cpuid_args_t *data, struct thread *td)
+{
+	cpuctl_cpuid_count_args_t cdata;
+	int error;
+
+	cdata.level = data->level;
+	/* Override the level type. */
+	cdata.level_type = 0;
+	error = cpuctl_do_cpuid_count(cpu, &cdata, td);
+	bcopy(cdata.data, data->data, sizeof(data->data)); /* Ignore error */
+	return (error);
+}
+
 /*
  * Actually perform MSR operations.
  */
@@ -229,6 +256,10 @@
 	 */
 	DPRINTF("[cpuctl,%d]: operating on MSR %#0x for %d cpu\n", __LINE__,
 	    data->msr, cpu);
+#ifdef __i386__
+	if ((cpu_feature & CPUID_MSR) == 0)
+		return (ENODEV);
+#endif
 	oldcpu = td->td_oncpu;
 	is_bound = cpu_sched_is_bound(td);
 	set_cpu(cpu, td);
@@ -272,11 +303,8 @@
 	DPRINTF("[cpuctl,%d]: XXX %d", __LINE__, cpu);
 
 	ret = cpuctl_do_cpuid(cpu, &args, td);
-	if (ret != 0) {
-		DPRINTF("[cpuctl,%d]: cannot retrive cpuid info for cpu %d",
-		    __LINE__, cpu);
-		return (ENXIO);
-	}
+	if (ret != 0)
+		return (ret);
 	((uint32_t *)vendor)[0] = args.data[1];
 	((uint32_t *)vendor)[1] = args.data[3];
 	((uint32_t *)vendor)[2] = args.data[2];
@@ -295,10 +323,10 @@
 static int
 update_intel(int cpu, cpuctl_update_args_t *args, struct thread *td)
 {
-	void *ptr = NULL;
+	void *ptr;
 	uint64_t rev0, rev1;
 	uint32_t tmp[4];
-	int is_bound = 0;
+	int is_bound;
 	int oldcpu;
 	int ret;
 
@@ -312,10 +340,11 @@
 	}
 
 	/*
-	 * 16 byte alignment required.
+	 * 16 byte alignment required.  Rely on the fact that
+	 * malloc(9) always returns the pointer aligned at least on
+	 * the size of the allocation.
 	 */
 	ptr = malloc(args->size + 16, M_CPUCTL, M_WAITOK);
-	ptr = (void *)(16 + ((intptr_t)ptr & ~0xf));
 	if (copyin(args->data, ptr, args->size) != 0) {
 		DPRINTF("[cpuctl,%d]: copyin %p->%p of %zd bytes failed",
 		    __LINE__, args->data, ptr, args->size);
@@ -326,7 +355,7 @@
 	is_bound = cpu_sched_is_bound(td);
 	set_cpu(cpu, td);
 	critical_enter();
-	rdmsr_safe(MSR_BIOS_SIGN, &rev0); /* Get current micorcode revision. */
+	rdmsr_safe(MSR_BIOS_SIGN, &rev0); /* Get current microcode revision. */
 
 	/*
 	 * Perform update.
@@ -339,7 +368,7 @@
 	 */
 	do_cpuid(0, tmp);
 	critical_exit();
-	rdmsr_safe(MSR_BIOS_SIGN, &rev1); /* Get new micorcode revision. */
+	rdmsr_safe(MSR_BIOS_SIGN, &rev1); /* Get new microcode revision. */
 	restore_cpu(oldcpu, is_bound, td);
 	if (rev1 > rev0)
 		ret = 0;
@@ -346,18 +375,28 @@
 	else
 		ret = EEXIST;
 fail:
-	if (ptr != NULL)
-		contigfree(ptr, args->size, M_CPUCTL);
+	free(ptr, M_CPUCTL);
 	return (ret);
 }
 
+/*
+ * NB: MSR 0xc0010020, MSR_K8_UCODE_UPDATE, is not documented by AMD.
+ * Coreboot, illumos and Linux source code was used to understand
+ * its workings.
+ */
+static void
+amd_ucode_wrmsr(void *ucode_ptr)
+{
+	uint32_t tmp[4];
+
+	wrmsr_safe(MSR_K8_UCODE_UPDATE, (uintptr_t)ucode_ptr);
+	do_cpuid(0, tmp);
+}
+
 static int
 update_amd(int cpu, cpuctl_update_args_t *args, struct thread *td)
 {
-	void *ptr = NULL;
-	uint32_t tmp[4];
-	int is_bound = 0;
-	int oldcpu;
+	void *ptr;
 	int ret;
 
 	if (args->size == 0 || args->data == NULL) {
@@ -368,15 +407,13 @@
 		DPRINTF("[cpuctl,%d]: firmware image too large", __LINE__);
 		return (EINVAL);
 	}
+
 	/*
-	 * XXX Might not require contignous address space - needs check
+	 * 16 byte alignment required.  Rely on the fact that
+	 * malloc(9) always returns the pointer aligned at least on
+	 * the size of the allocation.
 	 */
-	ptr = contigmalloc(args->size, M_CPUCTL, 0, 0, 0xffffffff, 16, 0);
-	if (ptr == NULL) {
-		DPRINTF("[cpuctl,%d]: cannot allocate %zd bytes of memory",
-		    __LINE__, args->size);
-		return (ENOMEM);
-	}
+	ptr = malloc(args->size + 16, M_CPUCTL, M_ZERO | M_WAITOK);
 	if (copyin(args->data, ptr, args->size) != 0) {
 		DPRINTF("[cpuctl,%d]: copyin %p->%p of %zd bytes failed",
 		    __LINE__, args->data, ptr, args->size);
@@ -383,26 +420,10 @@
 		ret = EFAULT;
 		goto fail;
 	}
-	oldcpu = td->td_oncpu;
-	is_bound = cpu_sched_is_bound(td);
-	set_cpu(cpu, td);
-	critical_enter();
-
-	/*
-	 * Perform update.
-	 */
-	wrmsr_safe(MSR_K8_UCODE_UPDATE, (uintptr_t)ptr);
-
-	/*
-	 * Serialize instruction flow.
-	 */
-	do_cpuid(0, tmp);
-	critical_exit();
-	restore_cpu(oldcpu, is_bound, td);
+	smp_rendezvous(NULL, amd_ucode_wrmsr, NULL, ptr);
 	ret = 0;
 fail:
-	if (ptr != NULL)
-		contigfree(ptr, args->size, M_CPUCTL);
+	free(ptr, M_CPUCTL);
 	return (ret);
 }
 
@@ -409,10 +430,10 @@
 static int
 update_via(int cpu, cpuctl_update_args_t *args, struct thread *td)
 {
-	void *ptr = NULL;
+	void *ptr;
 	uint64_t rev0, rev1, res;
 	uint32_t tmp[4];
-	int is_bound = 0;
+	int is_bound;
 	int oldcpu;
 	int ret;
 
@@ -428,8 +449,7 @@
 	/*
 	 * 4 byte alignment required.
 	 */
-	ptr = malloc(args->size + 16, M_CPUCTL, M_WAITOK);
-	ptr = (void *)(16 + ((intptr_t)ptr & ~0xf));
+	ptr = malloc(args->size, M_CPUCTL, M_WAITOK);
 	if (copyin(args->data, ptr, args->size) != 0) {
 		DPRINTF("[cpuctl,%d]: copyin %p->%p of %zd bytes failed",
 		    __LINE__, args->data, ptr, args->size);
@@ -440,7 +460,7 @@
 	is_bound = cpu_sched_is_bound(td);
 	set_cpu(cpu, td);
 	critical_enter();
-	rdmsr_safe(MSR_BIOS_SIGN, &rev0); /* Get current micorcode revision. */
+	rdmsr_safe(MSR_BIOS_SIGN, &rev0); /* Get current microcode revision. */
 
 	/*
 	 * Perform update.
@@ -476,8 +496,7 @@
 	else
 		ret = 0;
 fail:
-	if (ptr != NULL)
-		contigfree(ptr, args->size, M_CPUCTL);
+	free(ptr, M_CPUCTL);
 	return (ret);
 }
 
@@ -505,20 +524,10 @@
 
 	switch(type) {
 	case MOD_LOAD:
-		if ((cpu_feature & CPUID_MSR) == 0) {
-			if (bootverbose)
-				printf("cpuctl: not available.\n");
-			return (ENODEV);
-		}
 		if (bootverbose)
 			printf("cpuctl: access to MSR registers/cpuid info.\n");
-		cpuctl_devs = (struct cdev **)malloc(sizeof(void *) * mp_ncpus,
-		    M_CPUCTL, M_WAITOK | M_ZERO);
-		if (cpuctl_devs == NULL) {
-			DPRINTF("[cpuctl,%d]: cannot allocate memory\n",
-			    __LINE__);
-			return (ENOMEM);
-		}
+		cpuctl_devs = malloc(sizeof(*cpuctl_devs) * mp_ncpus, M_CPUCTL,
+		    M_WAITOK | M_ZERO);
 		for (cpu = 0; cpu < mp_ncpus; cpu++)
 			if (cpu_enabled(cpu))
 				cpuctl_devs[cpu] = make_dev(&cpuctl_cdevsw, cpu,

Modified: trunk/sys/dev/cpufreq/ichss.c
===================================================================
--- trunk/sys/dev/cpufreq/ichss.c	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/cpufreq/ichss.c	2018-05-28 00:20:56 UTC (rev 10123)
@@ -26,6 +26,7 @@
  */
 
 #include <sys/cdefs.h>
+__FBSDID("$FreeBSD: stable/10/sys/dev/cpufreq/ichss.c 247332 2013-02-26 18:30:47Z jhb $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -113,7 +114,7 @@
 	DEVMETHOD(cpufreq_drv_get,	ichss_get),
 	DEVMETHOD(cpufreq_drv_type,	ichss_type),
 	DEVMETHOD(cpufreq_drv_settings,	ichss_settings),
-	{0, 0}
+	DEVMETHOD_END
 };
 static driver_t ichss_driver = {
 	"ichss", ichss_methods, sizeof(struct ichss_softc)

Modified: trunk/sys/dev/cs/if_cs.c
===================================================================
--- trunk/sys/dev/cs/if_cs.c	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/cs/if_cs.c	2018-05-28 00:20:56 UTC (rev 10123)
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/cs/if_cs.c 243857 2012-12-04 09:32:43Z glebius $");
 
 /*
  *

Modified: trunk/sys/dev/cs/if_cs_isa.c
===================================================================
--- trunk/sys/dev/cs/if_cs_isa.c	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/cs/if_cs_isa.c	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/cs/if_cs_isa.c,v 1.2 2008/12/02 02:24:39 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1997,1998 Maxim Bolotin and Oleg Sharoiko.
  * All rights reserved.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/cs/if_cs_isa.c 179618 2008-06-06 16:10:10Z imp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>

Modified: trunk/sys/dev/cs/if_cs_pccard.c
===================================================================
--- trunk/sys/dev/cs/if_cs_pccard.c	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/cs/if_cs_pccard.c	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/cs/if_cs_pccard.c,v 1.2 2008/12/02 02:24:39 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1999 M. Warner Losh <imp at village.org> 
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/cs/if_cs_pccard.c 179618 2008-06-06 16:10:10Z imp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>

Modified: trunk/sys/dev/cs/if_csreg.h
===================================================================
--- trunk/sys/dev/cs/if_csreg.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/cs/if_csreg.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/cs/if_csreg.h,v 1.2 2008/12/02 02:24:39 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1997,1998 Maxim Bolotin and Oleg Sharoiko.
  * All rights reserved.
@@ -28,7 +28,7 @@
  */
 
 /*
- * $FreeBSD$
+ * $FreeBSD: stable/10/sys/dev/cs/if_csreg.h 218055 2011-01-29 00:53:58Z andrew $
  */
 
 #include <sys/rman.h>

Modified: trunk/sys/dev/cs/if_csvar.h
===================================================================
--- trunk/sys/dev/cs/if_csvar.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/cs/if_csvar.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/cs/if_csvar.h,v 1.2 2008/12/02 02:24:39 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1999 M. Warner Losh <imp at village.org> 
  * All rights reserved.
@@ -23,7 +23,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD$
+ * $FreeBSD: stable/10/sys/dev/cs/if_csvar.h 218055 2011-01-29 00:53:58Z andrew $
  */
 
 #ifndef _IF_CSVAR_H

Modified: trunk/sys/dev/ct/bshw_machdep.c
===================================================================
--- trunk/sys/dev/ct/bshw_machdep.c	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/ct/bshw_machdep.c	2018-05-28 00:20:56 UTC (rev 10123)
@@ -2,7 +2,7 @@
 /*	$NecBSD: bshw_machdep.c,v 1.8.12.6 2001/06/29 06:28:05 honda Exp $	*/
 
 #include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/ct/bshw_machdep.c 242871 2012-11-10 14:58:06Z nyan $");
 /*	$NetBSD$	*/
 
 /*-
@@ -42,9 +42,7 @@
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
-#if defined(__FreeBSD__) && __FreeBSD_version > 500001
 #include <sys/bio.h>
-#endif	/* __ FreeBSD__ */
 #include <sys/buf.h>
 #include <sys/queue.h>
 #include <sys/malloc.h>
@@ -52,34 +50,10 @@
 
 #include <vm/vm.h>
 
-#ifdef __NetBSD__
-#include <sys/device.h>
-
 #include <machine/bus.h>
-#include <machine/intr.h>
-
-#include <dev/scsipi/scsi_all.h>
-#include <dev/scsipi/scsipi_all.h>
-#include <dev/scsipi/scsiconf.h>
-#include <dev/scsipi/scsi_disk.h>
-
-#include <machine/dvcfg.h>
-#include <machine/physio_proc.h>
-
-#include <i386/Cbus/dev/scsi_low.h>
-
-#include <dev/ic/wd33c93reg.h>
-#include <i386/Cbus/dev/ct/ctvar.h>
-#include <i386/Cbus/dev/ct/ct_machdep.h>
-#include <i386/Cbus/dev/ct/bshwvar.h>
-#endif /* __NetBSD__ */
-
-#ifdef __FreeBSD__
-#include <machine/bus.h>
 #include <machine/md_var.h>
 
 #include <compat/netbsd/dvcfg.h>
-#include <compat/netbsd/physio_proc.h>
 
 #include <cam/scsi/scsi_low.h>
 
@@ -89,7 +63,6 @@
 #include <dev/ct/bshwvar.h>
 
 #include <vm/pmap.h>
-#endif /* __FreeBSD__ */
 
 #define	BSHW_IO_CONTROL_FLAGS	0
 
@@ -100,14 +73,7 @@
 /*********************************************************
  * OS dep part
  *********************************************************/
-#ifdef	__NetBSD__
-#define	BSHW_PAGE_SIZE NBPG
-#endif	/* __NetBSD__ */
-
-#ifdef	__FreeBSD__
-#define	BSHW_PAGE_SIZE PAGE_SIZE
 typedef	unsigned long vaddr_t;
-#endif /* __FreeBSD__ */
 
 /*********************************************************
  * GENERIC MACHDEP FUNCTIONS
@@ -145,8 +111,9 @@
 	/* open hardware busmaster mode */
 	if (hw->hw_dma_init != NULL && ((*hw->hw_dma_init)(ct)) != 0)
 	{
-		printf("%s: change mode using external DMA (%x)\n",
-		    slp->sl_xname, (u_int)ct_cr_read_1(chp, 0x37));
+		device_printf(slp->sl_dev,
+		    "change mode using external DMA (%x)\n",
+		    (u_int)ct_cr_read_1(chp, 0x37));
 	}
 
 	/* clear hardware synch registers */
@@ -167,7 +134,7 @@
 	regv &= ~MBR_IEN;
 	ct_cr_write_1(chp, wd3s_mbank, regv);
 
-	SCSI_LOW_DELAY(500000);
+	DELAY(500000);
 
 	/* reset signal off */
 	regv &= ~MBR_RST;
@@ -262,7 +229,7 @@
 		}
 	}
 
-	printf("%s: SMIT fifo status timeout\n", ct->sc_sclow.sl_xname);
+	device_printf(ct->sc_sclow.sl_dev, "SMIT fifo status timeout\n");
 	return EIO;
 }
 
@@ -300,7 +267,8 @@
 		else if (count > bs->sc_sdatalen)
 		{
 bad:
-			printf("%s: smit_xfer_end: cnt error\n", slp->sl_xname);
+			device_printf(slp->sl_dev,
+			    "smit_xfer_end: cnt error\n");
 			slp->sl_error |= PDMAERR;
 		}
 		scsi_low_data_finish(slp);
@@ -307,7 +275,7 @@
 	}
 	else
 	{
-		printf("%s: smit_xfer_end: phase miss\n", slp->sl_xname);
+		device_printf(slp->sl_dev, "smit_xfer_end: phase miss\n");
 		slp->sl_error |= PDMAERR;
 	}
 }
@@ -452,7 +420,7 @@
 		endva = (vaddr_t) round_page((vaddr_t) sp->scp_data + sp->scp_datalen);
 		for (va = (vaddr_t) sp->scp_data; ; phys = nphys)
 		{
-			if ((va += BSHW_PAGE_SIZE) >= endva)
+			if ((va += PAGE_SIZE) >= endva)
 			{
 				bs->sc_seglen = sp->scp_datalen;
 				break;
@@ -459,7 +427,7 @@
 			}
 
 			nphys = vtophys(va);
-			if (phys + BSHW_PAGE_SIZE != nphys || nphys >= bs->sc_minphys)
+			if (phys + PAGE_SIZE != nphys || nphys >= bs->sc_minphys)
 			{
 				bs->sc_seglen =
 				    (u_int8_t *) trunc_page(va) - sp->scp_data;
@@ -506,8 +474,9 @@
 		}
 		else if (count > (u_int) bs->sc_seglen)
 		{
-			printf("%s: port data %x != seglen %x\n",
-				slp->sl_xname, count, bs->sc_seglen);
+			device_printf(slp->sl_dev,
+			    "port data %x != seglen %x\n",
+			    count, bs->sc_seglen);
 			slp->sl_error |= PDMAERR;
 		}
 
@@ -515,7 +484,7 @@
 	}
 	else
 	{
-		printf("%s: extra DMA interrupt\n", slp->sl_xname);
+		device_printf(slp->sl_dev, "extra DMA interrupt\n");
 		slp->sl_error |= PDMAERR;
 	}
 

Modified: trunk/sys/dev/ct/bshwvar.h
===================================================================
--- trunk/sys/dev/ct/bshwvar.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/ct/bshwvar.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,5 +1,5 @@
 /* $MidnightBSD$ */
-/* $FreeBSD: src/sys/dev/ct/bshwvar.h,v 1.4 2005/01/06 01:42:33 imp Exp $ */
+/* $FreeBSD: stable/10/sys/dev/ct/bshwvar.h 139749 2005-01-06 01:43:34Z imp $ */
 /*	$NecBSD: bshwvar.h,v 1.3.14.3 2001/06/21 04:07:37 honda Exp $	*/
 /*	$NetBSD$	*/
 

Modified: trunk/sys/dev/ct/ct.c
===================================================================
--- trunk/sys/dev/ct/ct.c	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/ct/ct.c	2018-05-28 00:20:56 UTC (rev 10123)
@@ -2,7 +2,7 @@
 /*	$NecBSD: ct.c,v 1.13.12.5 2001/06/26 07:31:53 honda Exp $	*/
 
 #include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/ct/ct.c 242871 2012-11-10 14:58:06Z nyan $");
 /*	$NetBSD$	*/
 
 #define	CT_DEBUG
@@ -43,47 +43,19 @@
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
-#if defined(__FreeBSD__) && __FreeBSD_version > 500001
 #include <sys/bio.h>
-#endif	/* __ FreeBSD__ */
 #include <sys/buf.h>
 #include <sys/queue.h>
 #include <sys/malloc.h>
 #include <sys/errno.h>
 
-#ifdef __NetBSD__
-#include <sys/device.h>
-
 #include <machine/bus.h>
-#include <machine/intr.h>
 
-#include <dev/scsipi/scsi_all.h>
-#include <dev/scsipi/scsipi_all.h>
-#include <dev/scsipi/scsiconf.h>
-#include <dev/scsipi/scsi_disk.h>
-
-#include <machine/dvcfg.h>
-#include <machine/physio_proc.h>
-
-#include <i386/Cbus/dev/scsi_low.h>
-
-#include <dev/ic/wd33c93reg.h>
-#include <i386/Cbus/dev/ct/ctvar.h>
-#include <i386/Cbus/dev/ct/ct_machdep.h>
-#endif /* __NetBSD__ */
-
-#ifdef __FreeBSD__
-#include <machine/bus.h>
-
-#include <compat/netbsd/dvcfg.h>
-#include <compat/netbsd/physio_proc.h>
-
 #include <cam/scsi/scsi_low.h>
 
 #include <dev/ic/wd33c93reg.h>
 #include <dev/ct/ctvar.h>
 #include <dev/ct/ct_machdep.h>
-#endif /* __FreeBSD__ */
 
 #define	CT_NTARGETS		8
 #define	CT_NLUNS		8
@@ -223,7 +195,7 @@
 
 	/* issue abort cmd */
 	ct_cr_write_1(chp, wd3s_cmd, WD3S_ABORT);
-	SCSI_LOW_DELAY(1000);	/* 1ms wait */
+	DELAY(1000);	/* 1ms wait */
 	(void) ct_stat_read_1(chp);
 	(void) ct_cr_read_1(chp, wd3s_stat);
 
@@ -270,7 +242,7 @@
 
 			ct_cr_write_1(chp, wd3s_cmd, WD3S_RESET);
 		}
-		SCSI_LOW_DELAY(1);
+		DELAY(1);
 	}
 	if (wc == 0)
 		return ENXIO;
@@ -365,17 +337,6 @@
 	return 1;
 }
 
-int
-ctprint(aux, name)
-	void *aux;
-	const char *name;
-{
-
-	if (name != NULL)
-		printf("%s: scsibus ", name);
-	return UNCONF;
-}
-
 void
 ctattachsubr(struct ct_softc *ct)
 {
@@ -401,7 +362,7 @@
 		return;
 
 	ct_cr_write_1(chp, wd3s_cmd, WD3S_ASSERT_ATN);
-	SCSI_LOW_DELAY(10);
+	DELAY(10);
 	if ((ct_stat_read_1(chp) & STR_LCI) == 0)
 		ct->sc_atten = 0;
 	ct_unbusy(ct);
@@ -489,7 +450,6 @@
 	scsi_low_bus_reset(slp);
 	cthw_chip_reset(chp, NULL, ct->sc_chipclk, slp->sl_hostid);
 
-	SOFT_INTR_REQUIRED(slp);
 	return 0;
 }
 
@@ -665,7 +625,7 @@
 		}
 		else
 		{
-			SCSI_LOW_DELAY(1);
+			DELAY(1);
 		}
 
 		/* check phase miss */
@@ -696,7 +656,7 @@
 		slp->sl_error |= PDMAERR;
 
 		if (slp->sl_scp.scp_direction == SCSI_LOW_WRITE)
-			SCSI_LOW_BZERO(pbuf, CT_PADDING_BUF_SIZE);
+			bzero(pbuf, CT_PADDING_BUF_SIZE);
 		ct_xfer(ct, pbuf, CT_PADDING_BUF_SIZE, 
 			sp->scp_direction, &stat);
 	}
@@ -758,8 +718,8 @@
 
 		if (pep->pe_msg != NULL)
 		{
-			printf("%s: phase error: %s",
-				slp->sl_xname, pep->pe_msg);
+			device_printf(slp->sl_dev, "phase error: %s",
+			    pep->pe_msg);
 			scsi_low_print(slp, slp->sl_Tnexus);
 		}
 
@@ -892,10 +852,10 @@
 		if (regv == (u_int8_t) -1)
 			return EIO;
 
-		SCSI_LOW_DELAY(CT_DELAY_INTERVAL);
+		DELAY(CT_DELAY_INTERVAL);
 	}
 
-	printf("%s: unbusy timeout\n", slp->sl_xname);
+	device_printf(slp->sl_dev, "unbusy timeout\n");
 	return EBUSY;
 }
 	
@@ -912,7 +872,7 @@
 		if ((regv & (STR_INT | STR_BSY | STR_CIP)) == STR_INT)
 			return 0;
 
-		SCSI_LOW_DELAY(CT_DELAY_INTERVAL);
+		DELAY(CT_DELAY_INTERVAL);
 	}
 	return EJUSTRETURN;
 }
@@ -924,7 +884,6 @@
 	struct scsi_low_softc *slp = &ct->sc_sclow;
 	struct ct_bus_access_handle *chp = &ct->sc_ch;
 	struct targ_info *ti;
-	struct physio_proc *pp;
 	struct buf *bp;
 	u_int derror, flags;
 	int len, satgo, error;
@@ -963,11 +922,11 @@
 	if (ct_debug > 0)
 	{
 		scsi_low_print(slp, NULL);
-		printf("%s: scsi_status 0x%x\n\n", slp->sl_xname, 
+		device_printf(slp->sl_dev, "scsi_status 0x%x\n\n", 
 		       (u_int) scsi_status);
 #ifdef	KDB
 		if (ct_debug > 1)
-			SCSI_LOW_DEBUGGER("ct");
+			kdb_enter(KDB_WHY_CAM, "ct");
 #endif	/* KDB */
 	}
 #endif	/* CT_DEBUG */
@@ -1068,9 +1027,7 @@
 				slp->sl_flags |= HW_PDMASTART;
 				if ((ct->sc_xmode & CT_XMODE_PIO) != 0)
 				{
-					pp = physio_proc_enter(bp);
 					error = (*ct->ct_pio_xfer_start) (ct);
-					physio_proc_leave(pp);
 					if (error == 0)
 					{
 						ct->sc_dma |= CT_DMA_PIOSTART;
@@ -1094,7 +1051,8 @@
 				{
 					if (!(slp->sl_flags & HW_READ_PADDING))
 					{
-						printf("%s: read padding required\n", slp->sl_xname);
+						device_printf(slp->sl_dev,
+						    "read padding required\n");
 						return 1;
 					}
 				}
@@ -1102,7 +1060,8 @@
 				{
 					if (!(slp->sl_flags & HW_WRITE_PADDING))
 					{
-						printf("%s: write padding required\n", slp->sl_xname);
+						device_printf(slp->sl_dev,
+						    "write padding required\n");
 						return 1;
 					}
 				}
@@ -1123,8 +1082,8 @@
 				    slp->sl_scp.scp_cmdlen,
 				    SCSI_LOW_WRITE, &derror) != 0)
 			{
-				printf("%s: scsi cmd xfer short\n",
-					slp->sl_xname);
+				device_printf(slp->sl_dev,
+				    "scsi cmd xfer short\n");
 			}
 			return 1;
 
@@ -1156,7 +1115,7 @@
 
 		case BSR_UNSPINFO0:
 		case BSR_UNSPINFO1:
-			printf("%s: illegal bus phase (0x%x)\n", slp->sl_xname,
+			device_printf(slp->sl_dev, "illegal bus phase (0x%x)\n",
 				(u_int) scsi_status);
 			scsi_low_print(slp, ti);
 			return 1;
@@ -1176,8 +1135,8 @@
 			if (ct_xfer(ct, ti->ti_msgoutstr, len, 
 				    SCSI_LOW_WRITE, &derror) != 0)
 			{
-				printf("%s: scsi msgout xfer short\n",
-					slp->sl_xname);
+				device_printf(slp->sl_dev,
+				    "scsi msgout xfer short\n");
 			}
 			SCSI_LOW_DEASSERT_ATN(slp);
 			ct->sc_atten = 0;

Modified: trunk/sys/dev/ct/ct_isa.c
===================================================================
--- trunk/sys/dev/ct/ct_isa.c	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/ct/ct_isa.c	2018-05-28 00:20:56 UTC (rev 10123)
@@ -2,7 +2,7 @@
 /*	$NecBSD: ct_isa.c,v 1.6 1999/07/26 06:32:01 honda Exp $	*/
 
 #include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/ct/ct_isa.c 281826 2015-04-21 11:27:50Z mav $");
 /*	$NetBSD$	*/
 
 /*-
@@ -43,37 +43,13 @@
 #include <sys/buf.h>
 #include <sys/queue.h>
 #include <sys/malloc.h>
-#include <sys/device_port.h>
+#include <sys/bus.h>
+#include <sys/module.h>
 #include <sys/errno.h>
 
 #include <vm/vm.h>
 
-#ifdef __NetBSD__
 #include <machine/bus.h>
-#include <machine/intr.h>
-
-#include <dev/scsipi/scsi_all.h>
-#include <dev/scsipi/scsipi_all.h>
-#include <dev/scsipi/scsiconf.h>
-#include <dev/scsipi/scsi_disk.h>
-
-#include <dev/isa/isareg.h>
-#include <dev/isa/isavar.h>
-#include <dev/isa/isadmavar.h>
-
-#include <machine/dvcfg.h>
-#include <machine/physio_proc.h>
-#include <machine/syspmgr.h>
-
-#include <i386/Cbus/dev/scsi_low.h>
-
-#include <dev/ic/wd33c93reg.h>
-#include <i386/Cbus/dev/ct/ctvar.h>
-#include <i386/Cbus/dev/ct/bshwvar.h>
-#endif /* __NetBSD__ */
-
-#ifdef __FreeBSD__
-#include <machine/bus.h>
 #include <machine/resource.h>
 #include <sys/bus.h>
 #include <sys/rman.h>
@@ -83,7 +59,6 @@
 #include <isa/isavar.h>
 
 #include <compat/netbsd/dvcfg.h>
-#include <compat/netbsd/physio_proc.h>
 
 #include <cam/scsi/scsi_low.h>
 
@@ -90,7 +65,6 @@
 #include <dev/ic/wd33c93reg.h>
 #include <dev/ct/ctvar.h>
 #include <dev/ct/bshwvar.h>
-#endif /* __FreeBSD__ */
 
 #define	BSHW_IOSZ	0x08
 #define	BSHW_IOBASE 	0xcc0
@@ -241,7 +215,7 @@
 	/* setup DMA map */
 	if (bus_dma_tag_create(NULL, 1, 0,
 			       BUS_SPACE_MAXADDR_24BIT, BUS_SPACE_MAXADDR,
-			       NULL, NULL, MAXBSIZE, 1,
+			       NULL, NULL, DFLTPHYS, 1,
 			       BUS_SPACE_MAXSIZE_32BIT,
 			       BUS_DMA_ALLOCNOW, NULL, NULL,
 			       &ct->sc_dmat) != 0) {
@@ -257,7 +231,7 @@
 		return ENXIO;
 	}
 
-	bus_dmamap_load(ct->sc_dmat, ct->sc_dmamapt, vaddr, MAXBSIZE,
+	bus_dmamap_load(ct->sc_dmat, ct->sc_dmamapt, vaddr, DFLTPHYS,
 			ct_dmamap, &addr, BUS_DMA_NOWAIT);
 
 	/* setup machdep softc */
@@ -265,7 +239,7 @@
 	bs->sc_io_control = 0;
 	bs->sc_bounce_phys = (u_int8_t *)addr;
 	bs->sc_bounce_addr = vaddr;
-	bs->sc_bounce_size = MAXBSIZE;
+	bs->sc_bounce_size = DFLTPHYS;
 	bs->sc_minphys = (1 << 24);
 	bs->sc_dmasync_before = ct_isa_dmasync_before;
 	bs->sc_dmasync_after = ct_isa_dmasync_after;
@@ -323,7 +297,6 @@
 
 	slp->sl_dev = dev;
 	slp->sl_hostid = bs->sc_hostid;
-	slp->sl_irq = isa_get_irq(dev);
 	slp->sl_cfgflags = device_get_flags(dev);
 
 	s = splcam();

Modified: trunk/sys/dev/ct/ct_machdep.h
===================================================================
--- trunk/sys/dev/ct/ct_machdep.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/ct/ct_machdep.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,5 +1,5 @@
 /* $MidnightBSD$ */
-/* $FreeBSD: src/sys/dev/ct/ct_machdep.h,v 1.6 2005/01/06 01:42:33 imp Exp $ */
+/* $FreeBSD: stable/10/sys/dev/ct/ct_machdep.h 242871 2012-11-10 14:58:06Z nyan $ */
 /*	$NecBSD: ct_machdep.h,v 1.4.12.2 2001/06/20 06:13:34 honda Exp $	*/
 /*	$NetBSD$	*/
 
@@ -194,9 +194,4 @@
 	CT_BUS_WEIGHT(chp)
 }
 
-#if	defined(__i386__) && 0
-#define	SOFT_INTR_REQUIRED(slp)	(softintr((slp)->sl_irq))
-#else	/* !__i386__ */
-#define	SOFT_INTR_REQUIRED(slp)
-#endif	/* !__i386__ */
 #endif	/* !_CT_MACHDEP_H_ */

Modified: trunk/sys/dev/ct/ctvar.h
===================================================================
--- trunk/sys/dev/ct/ctvar.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/ct/ctvar.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,5 +1,5 @@
 /* $MidnightBSD$ */
-/* $FreeBSD: src/sys/dev/ct/ctvar.h,v 1.4 2005/01/06 01:42:33 imp Exp $ */
+/* $FreeBSD: stable/10/sys/dev/ct/ctvar.h 240325 2012-09-10 18:49:49Z jhb $ */
 /*	$NecBSD: ctvar.h,v 1.4.14.3 2001/06/20 06:13:34 honda Exp $	*/
 /*	$NetBSD$	*/
 
@@ -67,13 +67,6 @@
 
 	struct ct_bus_access_handle sc_ch;	/* bus access handle */
 
-#ifdef	__NetBSD__
-	bus_dma_tag_t sc_dmat;			/* data DMA tag */
-
-	void *sc_ih;
-#endif	/* __NetBSD__ */
-
-#ifdef	__FreeBSD__
 	struct resource *port_res;
 	struct resource *mem_res;
 	struct resource *irq_res;
@@ -83,7 +76,6 @@
 	bus_dmamap_t sc_dmamapt;		/* data DMAMAP tag */
 
 	void *sc_ih;
-#endif	/* __FreeBSD__ */
 
 	int sc_chiprev;			/* chip version */	
 #define	CT_WD33C93			0x00000
@@ -141,6 +133,5 @@
  *****************************************************************/
 int ctprobesubr(struct ct_bus_access_handle *, u_int, int, u_int, int *);
 void ctattachsubr(struct ct_softc *);
-int ctprint(void *, const char *);
 int ctintr(void *);
 #endif	/* !_CTVAR_H_ */

Modified: trunk/sys/dev/ctau/am8530.h
===================================================================
--- trunk/sys/dev/ctau/am8530.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/ctau/am8530.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/ctau/am8530.h,v 1.2 2008/12/02 02:24:40 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*-
  * AMD Am83C30 serial communication controller registers.
  *
@@ -13,7 +13,7 @@
  * all derivative works or modified versions.
  *
  * Cronyx Id: am8530.h,v 1.1.2.2 2003/11/12 17:31:21 rik Exp $
- * $FreeBSD$
+ * $FreeBSD: stable/10/sys/dev/ctau/am8530.h 139749 2005-01-06 01:43:34Z imp $
  */
 
 /*

Modified: trunk/sys/dev/ctau/ctau.c
===================================================================
--- trunk/sys/dev/ctau/ctau.c	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/ctau/ctau.c	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/ctau/ctau.c,v 1.2 2008/12/02 02:24:40 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*-
  * Low-level subroutines for Cronyx-Tau adapter.
  *
@@ -18,7 +18,7 @@
  * Cronyx Id: ctau.c,v 1.1.2.4 2003/12/11 17:33:43 rik Exp $
  */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/ctau/ctau.c 218909 2011-02-21 09:01:34Z brucec $");
 
 #include <dev/cx/machdep.h>
 #include <dev/ctau/ctddk.h>

Modified: trunk/sys/dev/ctau/ctau2fw.h
===================================================================
--- trunk/sys/dev/ctau/ctau2fw.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/ctau/ctau2fw.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/ctau/ctau2fw.h,v 1.2 2008/12/02 02:24:40 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*
  * DO NOT EDIT MANUALLY!
  * This code was generated by mkfw utility
@@ -5,7 +5,7 @@
  * from the file `ctau2.dat'
  *
  * Cronyx Id: ctau2fw.h,v 1.1 2002/06/03 10:19:39 rik Exp $
- * $FreeBSD$
+ * $FreeBSD: stable/10/sys/dev/ctau/ctau2fw.h 126177 2004-02-23 20:19:00Z rik $
  */
 long ctau2_fw_len = 98448;
 

Modified: trunk/sys/dev/ctau/ctaue1fw.h
===================================================================
--- trunk/sys/dev/ctau/ctaue1fw.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/ctau/ctaue1fw.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/ctau/ctaue1fw.h,v 1.2 2008/12/02 02:24:40 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*
  * DO NOT EDIT MANUALLY!
  * This code was generated by mkfw utility
@@ -5,7 +5,7 @@
  * from the file `ctaue1.dat'
  *
  * Cronyx Id: ctaue1fw.h,v 1.1 2002/06/03 10:19:39 rik Exp $
- * $FreeBSD$
+ * $FreeBSD: stable/10/sys/dev/ctau/ctaue1fw.h 126177 2004-02-23 20:19:00Z rik $
  */
 long ctaue1_fw_len = 323982;
 

Modified: trunk/sys/dev/ctau/ctaufw.h
===================================================================
--- trunk/sys/dev/ctau/ctaufw.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/ctau/ctaufw.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/ctau/ctaufw.h,v 1.2 2008/12/02 02:24:40 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*
  * DO NOT EDIT MANUALLY!
  * This code was generated by mkfw utility
@@ -5,7 +5,7 @@
  * from the file `ctau.dat'
  *
  * Cronyx Id: ctaufw.h,v 1.1 2002/06/03 10:19:40 rik Exp $
- * $FreeBSD$
+ * $FreeBSD: stable/10/sys/dev/ctau/ctaufw.h 126177 2004-02-23 20:19:00Z rik $
  */
 long ctau_fw_len = 131234;
 

Modified: trunk/sys/dev/ctau/ctaug7fw.h
===================================================================
--- trunk/sys/dev/ctau/ctaug7fw.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/ctau/ctaug7fw.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/ctau/ctaug7fw.h,v 1.2 2008/12/02 02:24:40 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*
  * DO NOT EDIT MANUALLY!
  * This code was generated by mkfw utility
@@ -5,7 +5,7 @@
  * from the file `ctaug703.dat'
  *
  * Cronyx Id: ctaug7fw.h,v 1.1 2002/06/03 10:19:40 rik Exp $
- * $FreeBSD$
+ * $FreeBSD: stable/10/sys/dev/ctau/ctaug7fw.h 126177 2004-02-23 20:19:00Z rik $
  */
 long ctaug703_fw_len = 323982;
 

Modified: trunk/sys/dev/ctau/ctaureg.h
===================================================================
--- trunk/sys/dev/ctau/ctaureg.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/ctau/ctaureg.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/ctau/ctaureg.h,v 1.2 2008/12/02 02:24:40 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*-
  * Defines for Cronyx-Tau adapter, based on Hitachi HD64570 controller.
  *
@@ -13,7 +13,7 @@
  * all derivative works or modified versions.
  *
  * Cronyx Id: ctaureg.h,v 1.1.2.1 2003/11/12 17:16:10 rik Exp $
- * $FreeBSD$
+ * $FreeBSD: stable/10/sys/dev/ctau/ctaureg.h 139749 2005-01-06 01:43:34Z imp $
  */
 
 /*

Modified: trunk/sys/dev/ctau/ctddk.c
===================================================================
--- trunk/sys/dev/ctau/ctddk.c	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/ctau/ctddk.c	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/ctau/ctddk.c,v 1.2 2008/12/02 02:24:40 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*-
  * DDK library for Cronyx-Tau adapters.
  *
@@ -22,7 +22,7 @@
  * Cronyx Id: ctddk.c,v 1.1.2.3 2003/11/14 16:55:36 rik Exp $
  */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/ctau/ctddk.c 139749 2005-01-06 01:43:34Z imp $");
 
 #include <dev/cx/machdep.h>
 #include <dev/ctau/ctddk.h>

Modified: trunk/sys/dev/ctau/ctddk.h
===================================================================
--- trunk/sys/dev/ctau/ctddk.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/ctau/ctddk.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/ctau/ctddk.h,v 1.2 2008/12/02 02:24:40 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*-
  * Defines for Cronyx-Tau adapter driver.
  *
@@ -13,7 +13,7 @@
  * all derivative works or modified versions.
  *
  * Cronyx Id: ctddk.h,v 1.1.2.3 2003/12/11 17:33:44 rik Exp $
- * $FreeBSD$
+ * $FreeBSD: stable/10/sys/dev/ctau/ctddk.h 218909 2011-02-21 09:01:34Z brucec $
  */
 #define NBRD		3	/* the maximum number of installed boards */
 #define NPORT		32	/* the number of i/o ports per board */

Modified: trunk/sys/dev/ctau/ds2153.h
===================================================================
--- trunk/sys/dev/ctau/ds2153.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/ctau/ds2153.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/ctau/ds2153.h,v 1.2 2008/12/02 02:24:40 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*-
  * Dallas DS2153, DS21x54 single-chip E1 tranceiver registers.
  *
@@ -13,7 +13,7 @@
  * all derivative works or modified versions.
  *
  * Cronyx Id: ds2153.h,v 1.2.4.1 2003/11/12 17:22:33 rik Exp $
- * $FreeBSD$
+ * $FreeBSD: stable/10/sys/dev/ctau/ds2153.h 139749 2005-01-06 01:43:34Z imp $
  */
 
 /*

Modified: trunk/sys/dev/ctau/hdc64570.h
===================================================================
--- trunk/sys/dev/ctau/hdc64570.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/ctau/hdc64570.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/ctau/hdc64570.h,v 1.2 2008/12/02 02:24:40 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*-
  * Hitachi HD64570 serial communications adaptor registers.
  *
@@ -13,7 +13,7 @@
  * all derivative works or modified versions.
  *
  * Cronyx Id: hdc64570.h,v 1.1.2.2 2003/11/12 17:31:21 rik Exp $
- * $FreeBSD$
+ * $FreeBSD: stable/10/sys/dev/ctau/hdc64570.h 139749 2005-01-06 01:43:34Z imp $
  */
 
 /*

Modified: trunk/sys/dev/ctau/if_ct.c
===================================================================
--- trunk/sys/dev/ctau/if_ct.c	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/ctau/if_ct.c	2018-05-28 00:20:56 UTC (rev 10123)
@@ -2,7 +2,7 @@
 /*-
  * Cronyx-Tau adapter driver for FreeBSD.
  * Supports PPP/HDLC and Cisco/HDLC protocol in synchronous mode,
- * and asyncronous channels with full modem control.
+ * and asynchronous channels with full modem control.
  * Keepalive protocol implemented in both Cisco and PPP modes.
  *
  * Copyright (C) 1994-2002 Cronyx Engineering.
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/ctau/if_ct.c 314667 2017-03-04 13:03:31Z avg $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -94,7 +94,8 @@
 	DEVMETHOD(device_probe,		ct_probe),
 	DEVMETHOD(device_attach,	ct_attach),
 	DEVMETHOD(device_detach,	ct_detach),
-	{0, 0}
+
+	DEVMETHOD_END
 };
 
 typedef struct _ct_dma_mem_t {
@@ -663,7 +664,7 @@
  		return ENXIO;
 	}
 	
-	callout_init (&led_timo[unit], CALLOUT_MPSAFE);
+	callout_init (&led_timo[unit], 1);
 	s = splimp ();
 	if (bus_setup_intr (dev, bd->irq_res,
 			   INTR_TYPE_NET|INTR_MPSAFE,
@@ -702,7 +703,7 @@
 		c->sys = d;
 		channel [b->num*NCHAN + c->num] = d;
 		sprintf (d->name, "ct%d.%d", b->num, c->num);
-		callout_init (&d->timeout_handle, CALLOUT_MPSAFE);
+		callout_init (&d->timeout_handle, 1);
 
 #ifdef NETGRAPH
 		if (ng_make_node_common (&typestruct, &d->node) != 0) {
@@ -2180,7 +2181,7 @@
 			printf ("Failed to register ng_ct\n");
 #endif
 		++load_count;
-		callout_init (&timeout_handle, CALLOUT_MPSAFE);
+		callout_init (&timeout_handle, 1);
 		callout_reset (&timeout_handle, hz*5, ct_timeout, 0);
 		break;
 	case MOD_UNLOAD:

Modified: trunk/sys/dev/ctau/lxt318.h
===================================================================
--- trunk/sys/dev/ctau/lxt318.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/ctau/lxt318.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/ctau/lxt318.h,v 1.2 2008/12/02 02:24:40 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*-
  * Level One LXT318 E1 transceiver registers.
  * Crystal CS61318 E1 Line Interface Unit registers.
@@ -18,7 +18,7 @@
  * all derivative works or modified versions.
  *
  * Cronyx Id: lxt318.h,v 1.2.4.4 2003/11/14 19:08:45 rik Exp $
- * $FreeBSD$
+ * $FreeBSD: stable/10/sys/dev/ctau/lxt318.h 139749 2005-01-06 01:43:34Z imp $
  */
 
 #define LX_WRITE	0x00

Modified: trunk/sys/dev/ctau/ng_ct.h
===================================================================
--- trunk/sys/dev/ctau/ng_ct.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/ctau/ng_ct.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/sys/dev/ctau/ng_ct.h,v 1.2 2008/12/02 02:24:40 laffer1 Exp $ */
+/* $MidnightBSD$ */
 /*-
  * Defines for Cronyx-Tau adapter driver.
  *
@@ -14,7 +14,7 @@
  * works or modified versions.
  * 
  * Cronyx Id: ng_ct.h,v 1.1.2.3 2004/01/27 14:39:11 rik Exp $
- * $FreeBSD$
+ * $FreeBSD: stable/10/sys/dev/ctau/ng_ct.h 139749 2005-01-06 01:43:34Z imp $
  */
 
 #ifdef NETGRAPH

Modified: trunk/sys/dev/cx/cronyxfw.h
===================================================================
--- trunk/sys/dev/cx/cronyxfw.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/cx/cronyxfw.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Cronyx firmware definitions.
  *
@@ -12,7 +13,7 @@
  * all derivative works or modified versions.
  *
  * Cronyx Id: cronyxfw.h,v 1.1.2.1 2003/11/12 17:09:49 rik Exp $
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/dev/cx/cronyxfw.h 139749 2005-01-06 01:43:34Z imp $
  */
 #define CRONYX_DAT_MAGIC 2001107011L	/* firmware file magic */
 

Modified: trunk/sys/dev/cx/csigma.c
===================================================================
--- trunk/sys/dev/cx/csigma.c	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/cx/csigma.c	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Low-level subroutines for Cronyx-Sigma adapter.
  *
@@ -12,7 +13,7 @@
  * all derivative works or modified versions.
  *
  * Cronyx Id: csigma.c,v 1.1.2.1 2003/11/12 17:13:41 rik Exp $
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/dev/cx/csigma.c 250460 2013-05-10 16:41:26Z eadler $
  */
 #include <dev/cx/machdep.h>
 #include <dev/cx/cxddk.h>
@@ -1168,7 +1169,7 @@
 
 	switch (c->num) {
 	default:
-		/* Channels 4..7 and 12..15 in syncronous mode
+		/* Channels 4..7 and 12..15 in synchronous mode
 		 * have no DTR signal. */
 		break;
 

Modified: trunk/sys/dev/cx/csigmafw.h
===================================================================
--- trunk/sys/dev/cx/csigmafw.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/cx/csigmafw.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*
  * DO NOT EDIT MANUALLY!
  * This code was generated by mkfw utility
@@ -4,7 +5,7 @@
  * from the file `csigma.dat'
  *
  * Cronyx Id: csigmafw.h,v 1.1 2002/06/03 10:19:39 rik Exp $
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/dev/cx/csigmafw.h 123120 2003-12-03 07:29:38Z imp $
  */
 long csigma_fw_len = 131234;
 

Modified: trunk/sys/dev/cx/cxddk.c
===================================================================
--- trunk/sys/dev/cx/cxddk.c	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/cx/cxddk.c	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Cronyx-Sigma Driver Development Kit.
  *
@@ -17,7 +18,7 @@
  * Cronyx Id: cxddk.c,v 1.1.2.2 2003/11/27 14:24:50 rik Exp $
  */
 #include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/cx/cxddk.c 139749 2005-01-06 01:43:34Z imp $");
 
 #include <dev/cx/machdep.h>
 #include <dev/cx/cxddk.h>

Modified: trunk/sys/dev/cx/cxddk.h
===================================================================
--- trunk/sys/dev/cx/cxddk.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/cx/cxddk.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Defines for Cronyx-Sigma adapter driver.
  *
@@ -15,7 +16,7 @@
  * all derivative works or modified versions.
  *
  * Cronyx Id: cxddk.h,v 1.1.2.1 2003/11/12 17:13:41 rik Exp $
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/dev/cx/cxddk.h 180132 2008-06-30 21:18:27Z rik $
  */
 
 #ifndef port_t

Modified: trunk/sys/dev/cx/cxreg.h
===================================================================
--- trunk/sys/dev/cx/cxreg.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/cx/cxreg.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Defines for Cronyx-Sigma adapter, based on Cirrus Logic multiprotocol
  * controller RISC processor CL-CD2400/2401.
@@ -13,7 +14,7 @@
  * all derivative works or modified versions.
  *
  * Cronyx Id: cxreg.h,v 1.1.2.1 2003/11/12 17:13:41 rik Exp $
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/dev/cx/cxreg.h 139749 2005-01-06 01:43:34Z imp $
  */
 #define REVCL_MIN   7		/* CD2400 min. revision number G */
 #define REVCL_MAX   13		/* CD2400 max. revision number M */

Modified: trunk/sys/dev/cx/if_cx.c
===================================================================
--- trunk/sys/dev/cx/if_cx.c	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/cx/if_cx.c	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,7 +1,8 @@
+/* $MidnightBSD$ */
 /*-
  * Cronyx-Sigma adapter driver for FreeBSD.
  * Supports PPP/HDLC and Cisco/HDLC protocol in synchronous mode,
- * and asyncronous channels with full modem control.
+ * and asynchronous channels with full modem control.
  * Keepalive protocol implemented in both Cisco and PPP modes.
  *
  * Copyright (C) 1994-2002 Cronyx Engineering.
@@ -23,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__MBSDID("$MidnightBSD$");
+__FBSDID("$FreeBSD: stable/10/sys/dev/cx/if_cx.c 314667 2017-03-04 13:03:31Z avg $");
 
 #include <sys/param.h>
 
@@ -113,7 +114,8 @@
 	DEVMETHOD(device_probe,		cx_probe),
 	DEVMETHOD(device_attach,	cx_attach),
 	DEVMETHOD(device_detach,	cx_detach),
-	{0, 0}
+
+	DEVMETHOD_END
 };
 
 typedef struct _cx_dma_mem_t {
@@ -761,7 +763,7 @@
  		return ENXIO;
 	}
 	b->sys = bd;
-	callout_init (&led_timo[b->num], CALLOUT_MPSAFE);
+	callout_init (&led_timo[b->num], 1);
 	s = splhigh ();
 	if (bus_setup_intr (dev, bd->irq_res,
 			   INTR_TYPE_NET|INTR_MPSAFE,
@@ -811,7 +813,7 @@
 		case T_UNIV_RS232:
 		case T_UNIV_RS449:
 		case T_UNIV_V35:
-		callout_init (&d->timeout_handle, CALLOUT_MPSAFE);
+		callout_init (&d->timeout_handle, 1);
 #ifdef NETGRAPH
 		if (ng_make_node_common (&typestruct, &d->node) != 0) {
 			printf ("%s: cannot make common node\n", d->name);
@@ -882,7 +884,7 @@
 		ttycreate(d->tty, TS_CALLOUT, "x%r%r", b->num, c->num);
 		d->devt = make_dev (&cx_cdevsw, b->num*NCHAN + c->num + 64, UID_ROOT, GID_WHEEL, 0600, "cx%d", b->num*NCHAN + c->num);
 		d->devt->si_drv1 = d;
-		callout_init (&d->dcd_timeout_handle, CALLOUT_MPSAFE);
+		callout_init (&d->dcd_timeout_handle, 1);
 	}
 	splx (s);
 
@@ -2513,7 +2515,7 @@
 #endif
 		++load_count;
 
-		callout_init (&timeout_handle, CALLOUT_MPSAFE);
+		callout_init (&timeout_handle, 1);
 		callout_reset (&timeout_handle, hz*5, cx_timeout, 0);
 		/* Software interrupt. */
 		swi_add(&tty_intr_event, "cx", cx_softintr, NULL, SWI_TTY,

Modified: trunk/sys/dev/cx/machdep.h
===================================================================
--- trunk/sys/dev/cx/machdep.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/cx/machdep.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Cronyx DDK: platform dependent definitions.
  *
@@ -15,7 +16,7 @@
  * all derivative works or modified versions.
  *
  * Cronyx Id: machdep.h,v 1.3.4.3 2003/11/27 14:21:58 rik Exp $
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/dev/cx/machdep.h 143063 2005-03-02 21:33:29Z joerg $
  */
 
 /*

Modified: trunk/sys/dev/cx/ng_cx.h
===================================================================
--- trunk/sys/dev/cx/ng_cx.h	2018-05-28 00:20:29 UTC (rev 10122)
+++ trunk/sys/dev/cx/ng_cx.h	2018-05-28 00:20:56 UTC (rev 10123)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Defines for Cronyx-Tau adapter driver.
  *
@@ -13,7 +14,7 @@
  * works or modified versions.
  *
  * Cronyx Id: ng_cx.h,v 1.1.2.3 2004/01/27 14:39:11 rik Exp $
- * $MidnightBSD$
+ * $FreeBSD: stable/10/sys/dev/cx/ng_cx.h 139749 2005-01-06 01:43:34Z imp $
  */
 
 #ifdef NETGRAPH



More information about the Midnightbsd-cvs mailing list