Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Mar 2006 22:00:51 GMT
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 94213 for review
Message-ID:  <200603282200.k2SM0p10069685@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=94213

Change 94213 by marcel@marcel_nfs on 2006/03/28 22:00:49

	Perform a reset external/status interrupt before reading RR0.
	Any status that triggers XSI will be latched and we may not
	read the current status for them.

Affected files ...

.. //depot/projects/uart/dev/scc/scc_dev_z8530.c#6 edit

Differences ...

==== //depot/projects/uart/dev/scc/scc_dev_z8530.c#6 (text+ko) ====

@@ -114,7 +114,7 @@
 		scc_getreg(bas, c + REG_DATA);
 		scc_barrier(bas);
 	}
-	if (ch->ch_ipend & SER_INT_SIGCHG) {
+	if (ch->ch_ipend & (SER_INT_SIGCHG|SER_INT_BREAK)) {
 		scc_setreg(bas, c + REG_CTRL, CR_RSTXSI);
 		scc_barrier(bas);
 	}
@@ -156,7 +156,9 @@
 	if (ip & IP_TIB)
 		ch[1]->ch_ipend |= SER_INT_TXIDLE;
 	if (ip & IP_SIA) {
-		bes = scc_getreg(bas, CHAN_A + RR_BES);
+		scc_setreg(bas, CHAN_A + REG_CTRL, CR_RSTXSI);
+		scc_barrier(bas);
+		bes = scc_getreg(bas, CHAN_A + REG_CTRL);
 		if (bes & BES_BRK)
 			ch[0]->ch_ipend |= SER_INT_BREAK;
 		sig = ch[0]->ch_hwsig;
@@ -172,7 +174,9 @@
 			ch[0]->ch_ipend |= SER_INT_OVERRUN;
 	}
 	if (ip & IP_SIB) {
-		bes = scc_getreg(bas, CHAN_B + RR_BES);
+		scc_setreg(bas, CHAN_B + REG_CTRL, CR_RSTXSI);
+		scc_barrier(bas);
+		bes = scc_getreg(bas, CHAN_B + REG_CTRL);
 		if (bes & BES_BRK)
 			ch[1]->ch_ipend |= SER_INT_BREAK;
 		sig = ch[1]->ch_hwsig;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603282200.k2SM0p10069685>