Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sh5/dev In scif_getc(), check SCIF_SCFSR2_RDF in ad...



details:   https://anonhg.NetBSD.org/src/rev/5c805568c7d3
branches:  trunk
changeset: 544160:5c805568c7d3
user:      scw <scw%NetBSD.org@localhost>
date:      Thu Mar 13 13:19:01 2003 +0000

description:
In scif_getc(), check SCIF_SCFSR2_RDF in addition to SCIF_SCFSR2_DR to
detect waiting Rx data. This fixes an occasional console lockup when
when pasting text at the ddb prompt.

diffstat:

 sys/arch/sh5/dev/scif.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r 597bfcae1b6d -r 5c805568c7d3 sys/arch/sh5/dev/scif.c
--- a/sys/arch/sh5/dev/scif.c   Thu Mar 13 12:44:48 2003 +0000
+++ b/sys/arch/sh5/dev/scif.c   Thu Mar 13 13:19:01 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scif.c,v 1.9 2002/10/23 09:11:59 jdolecek Exp $        */
+/*     $NetBSD: scif.c,v 1.10 2003/03/13 13:19:01 scw Exp $    */
 
 /*-
  * Copyright (C) 1999 T.Horiuchi and SAITOH Masanobu.  All rights reserved.
@@ -449,7 +449,8 @@
 #else
        unsigned char c;
 
-       while (!(bus_space_read_2(bt, bh, SCIF_REG_SCFSR2) & SCIF_SCFSR2_DR))
+       while (!(bus_space_read_2(bt, bh, SCIF_REG_SCFSR2) &
+           (SCIF_SCFSR2_DR | SCIF_SCFSR2_RDF)))
                ;
 
        c = bus_space_read_1(bt, bh, SCIF_REG_SCFRD2);



Home | Main Index | Thread Index | Old Index