Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys For a polled console incoming characters are buffered on...
details: https://anonhg.NetBSD.org/src/rev/82bdc32aa265
branches: trunk
changeset: 786542:82bdc32aa265
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Wed May 01 07:38:00 2013 +0000
description:
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:
sys/arch/arm/imx/imxuart.c | 6 ++++--
sys/arch/arm/s3c2xx0/sscom.c | 5 +++--
sys/arch/evbarm/dev/plcom.c | 5 +++--
sys/dev/ic/com.c | 5 +++--
4 files changed, 13 insertions(+), 8 deletions(-)
diffs (105 lines):
diff -r 9cd85c92a6df -r 82bdc32aa265 sys/arch/arm/imx/imxuart.c
--- a/sys/arch/arm/imx/imxuart.c Wed May 01 07:33:24 2013 +0000
+++ b/sys/arch/arm/imx/imxuart.c Wed May 01 07:38:00 2013 +0000
@@ -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 @@
imxucnpollc(dev_t dev, int on)
{
+ imxuart_readahead_in = 0;
+ imxuart_readahead_out = 0;
}
#endif /* IMXUARTCONSOLE */
diff -r 9cd85c92a6df -r 82bdc32aa265 sys/arch/arm/s3c2xx0/sscom.c
--- a/sys/arch/arm/s3c2xx0/sscom.c Wed May 01 07:33:24 2013 +0000
+++ b/sys/arch/arm/s3c2xx0/sscom.c Wed May 01 07:38:00 2013 +0000
@@ -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 @@
sscomcnpollc(dev_t dev, int on)
{
+ sscom_readaheadcount = 0;
}
#endif /* SSCOM0CONSOLE||SSCOM1CONSOLE */
diff -r 9cd85c92a6df -r 82bdc32aa265 sys/arch/evbarm/dev/plcom.c
--- a/sys/arch/evbarm/dev/plcom.c Wed May 01 07:33:24 2013 +0000
+++ b/sys/arch/evbarm/dev/plcom.c Wed May 01 07:38:00 2013 +0000
@@ -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 @@
plcomcnpollc(dev_t dev, int on)
{
+ plcom_readaheadcount = 0;
}
#ifdef KGDB
diff -r 9cd85c92a6df -r 82bdc32aa265 sys/dev/ic/com.c
--- a/sys/dev/ic/com.c Wed May 01 07:33:24 2013 +0000
+++ b/sys/dev/ic/com.c Wed May 01 07:38:00 2013 +0000
@@ -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 @@
comcnpollc(dev_t dev, int on)
{
+ com_readaheadcount = 0;
}
#ifdef KGDB
Home |
Main Index |
Thread Index |
Old Index