Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sh3/dev clear the ER bit of the SCSSR2 reg.



details:   https://anonhg.NetBSD.org/src/rev/db8711d93a20
branches:  trunk
changeset: 488133:db8711d93a20
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Jun 19 09:30:35 2000 +0000

description:
clear the ER bit of the SCSSR2 reg.
(This bit isn't cleared automatically)

diffstat:

 sys/arch/sh3/dev/scif.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r 9fa4ba4f1121 -r db8711d93a20 sys/arch/sh3/dev/scif.c
--- a/sys/arch/sh3/dev/scif.c   Mon Jun 19 04:22:14 2000 +0000
+++ b/sys/arch/sh3/dev/scif.c   Mon Jun 19 09:30:35 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scif.c,v 1.9 2000/03/27 16:24:08 msaitoh Exp $ */
+/* $NetBSD: scif.c,v 1.10 2000/06/19 09:30:35 msaitoh Exp $ */
 
 /*-
  * Copyright (C) 1999 T.Horiuchi and SAITOH Masanobu.  All rights reserved.
@@ -422,12 +422,14 @@
        while (((err_c = SHREG_SCSSR2)
                & (SCSSR2_RDF | SCSSR2_ER | SCSSR2_FER | SCSSR2_PER | SCSSR2_DR)) == 0)
                ;
-       if ((err_c & (SCSSR2_ER | SCSSR2_FER | SCSSR2_PER)) != 0)
+       if ((err_c & (SCSSR2_ER | SCSSR2_FER | SCSSR2_PER)) != 0) {
+               SHREG_SCSSR2 &= ~SCSSR2_ER;
                return(err_c |= 0x80);
+       }
 
        c = SHREG_SCFRDR2;
 
-       SHREG_SCSSR2 &= ~(SCSSR2_RDF | SCSSR2_DR);
+       SHREG_SCSSR2 &= ~(SCSSR2_ER | SCSSR2_RDF | SCSSR2_DR);
 
        return(c);
 }
@@ -1369,7 +1371,7 @@
                        put[0] = SHREG_SCFRDR2;
                        put[1] = (u_char)(SHREG_SCSSR2 & 0x00ff);
 
-                       SHREG_SCSSR2 &= ~(SCSSR2_RDF | SCSSR2_DR);
+                       SHREG_SCSSR2 &= ~(SCSSR2_ER | SCSSR2_RDF | SCSSR2_DR);
 
                        put += 2;
                        if (put >= end)



Home | Main Index | Thread Index | Old Index