From 6d6e392cf28cf398fcc11e2cae9090eb7ffc0dda Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sat, 17 Jul 2004 21:27:31 +0000 Subject: Wait for output to be drained when sabtty is the console output port; produces nicer (correct) kernel output upon bootup. Reported in NetBSD PR #26226; tested by dlg@ and I. --- sys/arch/sparc64/dev/sab.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sys/arch/sparc64/dev') diff --git a/sys/arch/sparc64/dev/sab.c b/sys/arch/sparc64/dev/sab.c index 0415c2a1fbc..7cbc73ab142 100644 --- a/sys/arch/sparc64/dev/sab.c +++ b/sys/arch/sparc64/dev/sab.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sab.c,v 1.16 2003/12/16 15:08:50 jason Exp $ */ +/* $OpenBSD: sab.c,v 1.17 2004/07/17 21:27:30 miod Exp $ */ /* * Copyright (c) 2001 Jason L. Wright (jason@thought.net) @@ -426,7 +426,12 @@ sabtty_attach(parent, self, aux) break; } - t.c_ispeed= 0; + if (sc->sc_flags & SABTTYF_CONS_OUT) { + /* Let current output drain */ + DELAY(100000); + } + + t.c_ispeed = 0; t.c_ospeed = 9600; t.c_cflag = CREAD | CS8 | HUPCL; sc->sc_tty->t_ospeed = 0; -- cgit v1.2.3