summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authormlelstv <mlelstv@NetBSD.org>2013-05-01 07:38:00 +0000
committermlelstv <mlelstv@NetBSD.org>2013-05-01 07:38:00 +0000
commit45734347bc659049cda0c19fba0e3c0dbf717437 (patch)
tree898c86928f50852f18cc7114639fddd574fafdbe /sys
parent5070bd3758452812968f53142347f23d91999b49 (diff)
For a polled console incoming characters are buffered on output.
The buffer is never passed to the regular tty routines and can survive from early boot to halt where it is read by the "press any continue to reboot" loops. As a workaround, just kill the read-ahead buffer when switching from and to polled mode.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/arm/imx/imxuart.c6
-rw-r--r--sys/arch/arm/s3c2xx0/sscom.c5
-rw-r--r--sys/arch/evbarm/dev/plcom.c5
-rw-r--r--sys/dev/ic/com.c5
4 files changed, 13 insertions, 8 deletions
diff --git a/sys/arch/arm/imx/imxuart.c b/sys/arch/arm/imx/imxuart.c
index e981eb16f1c..14dbfcae66b 100644
--- a/sys/arch/arm/imx/imxuart.c
+++ b/sys/arch/arm/imx/imxuart.c
@@ -1,4 +1,4 @@
-/* $NetBSD: imxuart.c,v 1.9 2012/02/02 19:42:58 tls Exp $ */
+/* $NetBSD: imxuart.c,v 1.10 2013/05/01 07:38:01 mlelstv Exp $ */
/*
* Copyright (c) 2009, 2010 Genetec Corporation. All rights reserved.
@@ -96,7 +96,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imxuart.c,v 1.9 2012/02/02 19:42:58 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imxuart.c,v 1.10 2013/05/01 07:38:01 mlelstv Exp $");
#include "opt_imxuart.h"
#include "opt_ddb.h"
@@ -2372,6 +2372,8 @@ void
imxucnpollc(dev_t dev, int on)
{
+ imxuart_readahead_in = 0;
+ imxuart_readahead_out = 0;
}
#endif /* IMXUARTCONSOLE */
diff --git a/sys/arch/arm/s3c2xx0/sscom.c b/sys/arch/arm/s3c2xx0/sscom.c
index e9228ce9714..7280df33b24 100644
--- a/sys/arch/arm/s3c2xx0/sscom.c
+++ b/sys/arch/arm/s3c2xx0/sscom.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sscom.c,v 1.38 2012/10/27 17:17:40 chs Exp $ */
+/* $NetBSD: sscom.c,v 1.39 2013/05/01 07:38:01 mlelstv Exp $ */
/*
* Copyright (c) 2002, 2003 Fujitsu Component Limited
@@ -98,7 +98,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sscom.c,v 1.38 2012/10/27 17:17:40 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sscom.c,v 1.39 2013/05/01 07:38:01 mlelstv Exp $");
#include "opt_sscom.h"
#include "opt_ddb.h"
@@ -1977,6 +1977,7 @@ void
sscomcnpollc(dev_t dev, int on)
{
+ sscom_readaheadcount = 0;
}
#endif /* SSCOM0CONSOLE||SSCOM1CONSOLE */
diff --git a/sys/arch/evbarm/dev/plcom.c b/sys/arch/evbarm/dev/plcom.c
index 3376ebb2ce3..c4dd8ce0194 100644
--- a/sys/arch/evbarm/dev/plcom.c
+++ b/sys/arch/evbarm/dev/plcom.c
@@ -1,4 +1,4 @@
-/* $NetBSD: plcom.c,v 1.44 2013/03/03 10:26:18 mlelstv Exp $ */
+/* $NetBSD: plcom.c,v 1.45 2013/05/01 07:38:01 mlelstv Exp $ */
/*-
* Copyright (c) 2001 ARM Ltd
@@ -94,7 +94,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: plcom.c,v 1.44 2013/03/03 10:26:18 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: plcom.c,v 1.45 2013/05/01 07:38:01 mlelstv Exp $");
#include "opt_plcom.h"
#include "opt_ddb.h"
@@ -2450,6 +2450,7 @@ void
plcomcnpollc(dev_t dev, int on)
{
+ plcom_readaheadcount = 0;
}
#ifdef KGDB
diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c
index 8b2478169a1..4ab71723bee 100644
--- a/sys/dev/ic/com.c
+++ b/sys/dev/ic/com.c
@@ -1,4 +1,4 @@
-/* $NetBSD: com.c,v 1.309 2013/04/20 11:52:40 rkujawa Exp $ */
+/* $NetBSD: com.c,v 1.310 2013/05/01 07:38:00 mlelstv Exp $ */
/*-
* Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.309 2013/04/20 11:52:40 rkujawa Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.310 2013/05/01 07:38:00 mlelstv Exp $");
#include "opt_com.h"
#include "opt_ddb.h"
@@ -2352,6 +2352,7 @@ void
comcnpollc(dev_t dev, int on)
{
+ com_readaheadcount = 0;
}
#ifdef KGDB