Subject: Re: too many interrupts
To: C Kane <>
From: Bill Sommerfeld <>
List: current-users
Date: 07/07/2000 07:07:18
> Here's a brief bit of a kernel backtrace I got once while the interrupts
> were happening:
>   cpu_Debugger()
>   internal_command()
>   wskbd_translate()
>   wskbd_input()
>   pckbd_input()
>   pckbcintr()
>   Xintr1() at Xintr+0x70
>   --interrupt--
>   Xdoreti() at Xdoreti+0xe
>   --interrupt--
>   Xdoreti() at Xdoreti+0x3
>      [ 17 more --interrupt-- frames like these ]

[ouch.  interrupt frames really shouldn't be nested like this.]

>   --interrupt--
>   Xspllower(c08c4400,f04,89,c08c0089,c08c4400) at Xspllower+0xe
>   dp8390_read(c08c4400,f04,89,c04c4400,c0101f70) at dp8930_read+0x1d
>   dp8390_rint(c08c4400) at dp8390+rint+0x1ea
>   we_recv_int(c08c4400,c08b9d10,c0101f70,7fffffff,33) at we_recv_int+0x7a
>   dp8390_intr(c08c4400) at dp8390+intr+0x43c
>   Xintr7() at Xintr7+0x70
>   --interrupt--
>   Xspllower(c036cb64,1,c0231e28,0,7fffffff) at Xspllower+0xe
>   nfs_timer(0) at nfs_timer+0x33e
>   softclock(d2a00010,10,d29fa5f0,d29fa5f0,d2a0bf30) at softclock+0x121
>   Bad frame pointer: 0xd2a0bebc

> Does anyone have any suggestions to debug it?

From a quick look, the driver looks like it it's in need of a rewrite.

I don't have either the hardware or the docs for the hardware, but..

What i'd look at:

In sys/dev/ic/cy.c, there's some code which skips a bunch of rx
processing if the tty isn't open:

			if (cy->cy_tty == NULL ||
			    !ISSET(cy->cy_tty->t_state, TS_ISOPEN))
				goto end_rx_serv;

I'd be willing to bet that the board is re-interrupting if characters
aren't actually read out of its buffers.  

In this case, I'd have it go through the motions of reading
CD1400_RDCR and CD1400_RDSR to pull characters out of the board.

an aside:

> I do not believe there is an 8390 device in the system.  It has an SMC
> combo 16 card:
>   we0 at isa0 port 0x280-0x29f iomem 0xcc000-0xcffff irq 7
>   we0: SMC8216/SMC8216C Ethernet (16-bit)
>   we0: Ethernet address 00:00:c0:4c:cb:01

this is a red herring.  The "we" driver has a bunch of routines named
"dp8390" after one of of the IC's used in some models driven by the
card.  sort of how the guts of the fxp driver is in
sys/dev/ic/i82557.c, and drives '557, '558, and '559-based cards.

				- Bill