Module Name: src
Committed By: scw
Date: Sat Apr 11 11:01:47 UTC 2009
Modified Files:
src/sys/arch/mvme68k/dev: zs.c
Log Message:
Invoke zs_lock_init() _after_ copying console state to avoid a later
lock-related panic.
To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/mvme68k/dev/zs.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/mvme68k/dev/zs.c
diff -u src/sys/arch/mvme68k/dev/zs.c:1.41 src/sys/arch/mvme68k/dev/zs.c:1.42
--- src/sys/arch/mvme68k/dev/zs.c:1.41 Fri Jun 13 12:26:02 2008
+++ src/sys/arch/mvme68k/dev/zs.c Sat Apr 11 11:01:47 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: zs.c,v 1.41 2008/06/13 12:26:02 cegger Exp $ */
+/* $NetBSD: zs.c,v 1.42 2009/04/11 11:01:47 scw Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.41 2008/06/13 12:26:02 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.42 2009/04/11 11:01:47 scw Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -143,7 +143,6 @@
zsc_args.hwflags = zs_hwflags[zsc_unit][channel];
cs = &zsc->zsc_cs_store[channel];
zsc->zsc_cs[channel] = cs;
- zs_lock_init(cs);
/*
* If we're the console, copy the channel state, and
@@ -161,6 +160,7 @@
cs->cs_defspeed = zs_defspeed[zsc_unit][channel];
}
+ zs_lock_init(cs);
cs->cs_brg_clk = pclk / 16;
cs->cs_creg[2] = cs->cs_preg[2] = vector;
zs_set_speed(cs, cs->cs_defspeed);