Re: Back to FIFO overflows

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 09 January 2003 04:50 pm, John Conner wrote:
> Attached is a modified version of the Demo program
> cmd.c that exibits the problem. After starting the program
> will abort with a comedi0; cb_pcidas: fifo overflow
> some time in less than six hours (that is the longest
> I've ever had it run). Usually it is only a few minutes
> to an hour. Output of the data read is not displayed.
> The problem appears on both of the PCI-DAS1602 boards
> I have and on two different computers (850 MHz P4 and
> 450 MHz Athalon).
>
> I'd like to know if anyone else can reproduce the problem.
> I'm using comedi-0.7.66 and comedilib-0.7.19 and have an
> RTAI installed in a 2.4.17 kernal. Not really using the
> RTAI stuff at the moment.
>

I have heard at least one other report of similar problems.  I took
a peek at Warren Jasper's driver, and his interrupt handler clears
the amcc s5933 interrupt in a slightly different order than I do.  
Would you try the patch below (it is against the current cvs)?
Also, a test of comedi_calibrate using the current cvs of comedi
and comedilib would be appreciated if you are interested in the
board's autocalibration features.

It might not be a driver problem though, since the board has
a relatively small fifo with no DMA, and there are no guarantees 
on interrupt latency in vanilla Linux.


Index: cb_pcidas.c
===================================================================
RCS file: /var/cvs/comedi/comedi/drivers/cb_pcidas.c,v
retrieving revision 1.72
diff -u -r1.72 cb_pcidas.c
- --- cb_pcidas.c	1 Jan 2003 23:57:20 -0000	1.72
+++ cb_pcidas.c	11 Jan 2003 04:08:48 -0000
_at__at_ -1520,13 +1520,13 _at__at_
 	rt_printk("mbef 0x%x\n", inl(devpriv->s5933_config + AMCC_OP_REG_MBEF));
 #endif
 
- -	if(INTCSR_INTR_ASSERTED & s5933_status)
- -	{
- -		// clear interrupt on amcc s5933
- -		outl(devpriv->s5933_intcsr_bits | INTCSR_INBOX_INTR_STATUS, devpriv->s5933_config + AMCC_OP_REG_INTCSR);
- -		// make sure mailbox 4 is empty
- -		inl(devpriv->s5933_config + AMCC_OP_REG_IMB4);
- -	}
+	if( ( INTCSR_INTR_ASSERTED & s5933_status ) == 0 )
+		return;
+
+	// make sure mailbox 4 is empty
+	inl(devpriv->s5933_config + AMCC_OP_REG_IMB4);
+	// clear interrupt on amcc s5933
+	outl(devpriv->s5933_intcsr_bits | INTCSR_INBOX_INTR_STATUS, devpriv->s5933_config + AMCC_OP_REG_INTCSR);
 
 	status = inw(devpriv->control_status + INT_ADCFIFO);
 #ifdef CB_PCIDAS_DEBUG



- -- 
Frank

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE+H5vt5vihyNWuA4URAqhPAKC/b8Q7ur5k7SYAlusjLKxXnkn6LwCfUki8
D/qscjCN0dRFqF15p95m76Y=
=NEgZ
-----END PGP SIGNATURE-----

Received on 2003-01-11Z04:22:03