Interesting anomoly with a 2940UW

Justin T. Gibbs gibbs at plutotech.com
Tue Sep 9 18:16:08 PDT 1997


>To be quite honest, I think most of the races you have mentioned in 
>relation to my usage of the CMDOUTCNT variable exist not only in my code, 
>but in yours as well.

Nope.  Since I only drop the count to 0 once I'm sure that the sequencer
has put fifodepth commands into the QOUTFIFO (as I have removed that many
from the FIFO), I'm guaranteed that CMDOUTCNT is equal to fifodepth.  This
means that the sequencer is either in the spin lock or executing before
reaching the lock.  This ensures that when I set CMDOUTCNT to 0, the FIFO
is truely empty and that the sequencer will increment CMDOUTCNT before it
places another entry in the FIFO.

>Does that sound any more efficient (and race protected) to you?

It would be unacceptable to me to run with interrupts disabled for any
length of time in a disk driver especially when it isn't necessary.

--
Justin T. Gibbs
===========================================
  FreeBSD: Turning PCs into workstations
===========================================





More information about the aic7xxx mailing list