Subject: Re: zstty overflows
To: Gandhi woulda smacked you <greywolf@starwolf.com>
From: Eduardo E. Horvath <eeh@one-o.com>
List: port-sparc
Date: 09/04/1999 15:33:38
On Fri, 3 Sep 1999, Gandhi woulda smacked you wrote:

> Heyya.
> 
> Just updated to 1.4K (ELF format) in preparation for the next release.
> 
> Looks like the zs driver needs tweaking again -- at 38400 I get the
> message:
> 
> Sep  3 20:55:54 starwolf /netbsd: zstty0: 1 silo overflow, 0 ibuf floods
> 
> while connected to my ISP.  They stop when the modem drops carrier,
> so I can only assume it's ttya that's dropping the ball.

This is probably due to interrupts being masked too long again.  Here's a
snippet of code you could try adding to sys/arch/sparc/dev/zs.c to
determine the cause.  It prints the address where the interrupt occurred.
You will then need to use DDB or gdb to determine what that address maps
to.  (It may require a bit of tweaking to compile since this was from a
sparc64 kernel.)

*** zs.c        1999/05/23 02:45:19     1.12
--- zs.c        1999/09/04 22:28:10
***************
*** 631,636 ****
--- 631,648 ----
                if (zsc == NULL)
                        continue;
                (void)zsc_intr_soft(zsc);
+ #ifdef TTY_DEBUG
+               {
+                       struct zstty_softc *zst0 =
zsc->zsc_cs[0]->cs_private;
+                       struct zstty_softc *zst1 =
zsc->zsc_cs[1]->cs_private;
+                       if (zst0->zst_overflows || zst1->zst_overflows ) {
+                               struct clockframe *frame = (struct
clockframe *)arg;
+ 
+                               printf("zs silo overflow from %p\n",
+                                      (long)frame->pc);
+                       }
+               }
+ #endif
        }
        splx(s);
        return (1);


=========================================================================
Eduardo Horvath				eeh@one-o.com
	"I need to find a pithy new quote." -- me