Subject: Possible com/tty issue (SMP)?
To: None <tech-kern@NetBSD.org>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-kern
Date: 10/17/2004 15:36:23
Hi,

Shouldn't sc->sc_rbget be frobbed only inside COM_LOCK()/COM_UNLOCK()?


Index: sys/dev/ic/com.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/com.c,v
retrieving revision 1.231
diff -u -r1.231 com.c
--- sys/dev/ic/com.c	9 Aug 2004 16:57:14 -0000	1.231
+++ sys/dev/ic/com.c	17 Oct 2004 20:27:27 -0000
@@ -1893,10 +1893,10 @@
  	}

  	if (cc != scc) {
-		sc->sc_rbget = get;
  		s = splserial();
  		COM_LOCK(sc);

+		sc->sc_rbget = get;
  		cc = sc->sc_rbavail += scc - cc;
  		/* Buffers should be ok again, release possible block. */
  		if (cc >= sc->sc_r_lowat) {


Could this account for some hard freezes I've been seeing on a dual MP 
host when used as a console for another machine?  It's mainly only 
when running a command with voluminous output, and not much or at all 
with the serial port unused, so it really feels serial port related, 
plus I haven't seen it yet with the patch.


Frederick