Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbarm/dev Don't busy wait for a character in plcom...
details: https://anonhg.NetBSD.org/src/rev/1fb11d9de60e
branches: trunk
changeset: 462022:1fb11d9de60e
user: skrll <skrll%NetBSD.org@localhost>
date: Tue Jul 23 12:13:47 2019 +0000
description:
Don't busy wait for a character in plcom_common_getc, but instead
return -1 if there are no characters available.
Fixes WSDISPLAY_MULTICONS for RaspberryPI and GENERIC.
Thanks to jmcneill@ for the hint
diffstat:
sys/arch/evbarm/dev/plcom.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (41 lines):
diff -r f77907c8babc -r 1fb11d9de60e sys/arch/evbarm/dev/plcom.c
--- a/sys/arch/evbarm/dev/plcom.c Tue Jul 23 12:10:38 2019 +0000
+++ b/sys/arch/evbarm/dev/plcom.c Tue Jul 23 12:13:47 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: plcom.c,v 1.57 2019/07/23 12:10:38 skrll Exp $ */
+/* $NetBSD: plcom.c,v 1.58 2019/07/23 12:13:47 skrll Exp $ */
/*-
* Copyright (c) 2001 ARM Ltd
@@ -94,7 +94,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: plcom.c,v 1.57 2019/07/23 12:10:38 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: plcom.c,v 1.58 2019/07/23 12:13:47 skrll Exp $");
#include "opt_plcom.h"
#include "opt_ddb.h"
@@ -2275,7 +2275,7 @@
plcom_common_getc(dev_t dev, struct plcom_instance *pi)
{
int s = splserial();
- u_char stat, c;
+ u_char c;
/* got a character from reading things earlier */
if (plcom_readaheadcount > 0) {
@@ -2290,9 +2290,10 @@
return c;
}
- /* block until a character becomes available */
- while (ISSET(stat = PREAD1(pi, PL01XCOM_FR), PL01X_FR_RXFE))
- ;
+ if (ISSET(PREAD1(pi, PL01XCOM_FR), PL01X_FR_RXFE)) {
+ splx(s);
+ return -1;
+ }
c = PREAD1(pi, PL01XCOM_DR);
{
Home |
Main Index |
Thread Index |
Old Index