summaryrefslogtreecommitdiff
path: root/sys/arch/hp300/dev/dca.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-12-30 18:14:13 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-12-30 18:14:13 +0000
commite4021e01bb99e4567a9194ab990184de4e823e19 (patch)
tree4e378caab8b64f13b58cee9985719e5a1352b0a7 /sys/arch/hp300/dev/dca.c
parent5a5e42585277e6f9ae298508b0289638b926af16 (diff)
Kill conforced, and have console devices use CN_FORCED priority instead.
This means we are no longer aborting the console scans even if the final console has been found, but on the other hand makes some logic simpler; plus it will be necessary for upcoming scode vs device loop order reversal. No user-visible change.
Diffstat (limited to 'sys/arch/hp300/dev/dca.c')
-rw-r--r--sys/arch/hp300/dev/dca.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/sys/arch/hp300/dev/dca.c b/sys/arch/hp300/dev/dca.c
index c8e1364cea9..69dfd03f2d5 100644
--- a/sys/arch/hp300/dev/dca.c
+++ b/sys/arch/hp300/dev/dca.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dca.c,v 1.28 2005/12/30 18:03:33 miod Exp $ */
+/* $OpenBSD: dca.c,v 1.29 2005/12/30 18:14:09 miod Exp $ */
/* $NetBSD: dca.c,v 1.35 1997/05/05 20:58:18 thorpej Exp $ */
/*
@@ -991,7 +991,7 @@ dca_console_scan(scode, va, arg)
{
struct dcadevice *dca = (struct dcadevice *)va;
struct consdev *cp = arg;
- int force = 0, pri;
+ u_int pri;
switch (dca->dca_id) {
case DCAID0:
@@ -1012,10 +1012,8 @@ dca_console_scan(scode, va, arg)
/*
* Raise our priority, if appropriate.
*/
- if (scode == CONSCODE) {
- pri = CN_REMOTE;
- force = conforced = 1;
- }
+ if (scode == CONSCODE)
+ pri = CN_FORCED;
#endif
/* Only raise priority. */
@@ -1026,7 +1024,7 @@ dca_console_scan(scode, va, arg)
* If our priority is higher than the currently-remembered
* console, stash our priority, for the benefit of dcacninit().
*/
- if (((cn_tab == NULL) || (cp->cn_pri > cn_tab->cn_pri)) || force) {
+ if (cn_tab == NULL || cp->cn_pri > cn_tab->cn_pri) {
cn_tab = cp;
conscode = scode;
return (DIO_SIZE(scode, va));
@@ -1048,10 +1046,6 @@ dcacnprobe(cp)
cp->cn_dev = makedev(dcamajor, 0); /* XXX */
cp->cn_pri = CN_DEAD;
- /* Abort early if console is already forced. */
- if (conforced)
- return;
-
console_scan(dca_console_scan, cp, HP300_BUS_DIO);
#ifdef KGDB