summaryrefslogtreecommitdiffstats
path: root/sys/dev/aic7xxx
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1997-08-13 17:02:47 +0000
committergibbs <gibbs@FreeBSD.org>1997-08-13 17:02:47 +0000
commit6bb904da802784134c7c18b540d4d04f4f1d568f (patch)
treea22ad73750d380c388f1b635b3afee6e5146f972 /sys/dev/aic7xxx
parent9d8aeece346cc788f59537025b77d57d88c4701f (diff)
downloadFreeBSD-src-6bb904da802784134c7c18b540d4d04f4f1d568f.zip
FreeBSD-src-6bb904da802784134c7c18b540d4d04f4f1d568f.tar.gz
Add a spin lock that prevents the sequencer from attempting to add an
entry to the QOUTFIFO when it is full. This should eliminate the "Timed out while idle" problems that many have reported. In truth, this is somewhat of a hack. Although are interrupt latency is low enough that we should be able to always service the queue in time, since each entry must be passed up to the higher SCSI layer for what can be a large amount of processing (perhaps even resulting in a new command being queued) with interrupts disabled, we need this mechanism to avoid overflow. In the future, these additional tasks will be offloaded to a software interrupt handler which should make this hack unnecessary.
Diffstat (limited to 'sys/dev/aic7xxx')
-rw-r--r--sys/dev/aic7xxx/aic7xxx.reg17
-rw-r--r--sys/dev/aic7xxx/aic7xxx.seq11
2 files changed, 26 insertions, 2 deletions
diff --git a/sys/dev/aic7xxx/aic7xxx.reg b/sys/dev/aic7xxx/aic7xxx.reg
index fabef19..6ecae3b 100644
--- a/sys/dev/aic7xxx/aic7xxx.reg
+++ b/sys/dev/aic7xxx/aic7xxx.reg
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: aic7xxx.reg,v 1.3 1997/04/24 16:52:16 gibbs Exp $
+ * $Id: aic7xxx.reg,v 1.4 1997/06/27 19:38:39 gibbs Exp $
*/
/*
@@ -1079,6 +1079,21 @@ scratch_ram {
CUR_SCBID {
size 1
}
+ /*
+ * Running count of commands placed in
+ * the QOUTFIFO. This is cleared by the
+ * kernel driver every FIFODEPTH commands.
+ */
+ CMDOUTCNT {
+ size 1
+ }
+ /*
+ * Maximum number of entries allowed in
+ * the QOUT/INFIFO.
+ */
+ FIFODEPTH {
+ size 1
+ }
ARG_1 {
size 1
mask SEND_MSG 0x80
diff --git a/sys/dev/aic7xxx/aic7xxx.seq b/sys/dev/aic7xxx/aic7xxx.seq
index 3c2d89c..d6b6a04 100644
--- a/sys/dev/aic7xxx/aic7xxx.seq
+++ b/sys/dev/aic7xxx/aic7xxx.seq
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: aic7xxx.seq,v 1.73 1997/04/24 16:52:18 gibbs Exp $
+ * $Id: aic7xxx.seq,v 1.74 1997/06/27 19:38:42 gibbs Exp $
*/
#include <dev/aic7xxx/aic7xxx.reg>
@@ -643,6 +643,15 @@ status_ok:
complete:
/* Post the SCB and issue an interrupt */
+.if ( SCB_PAGING )
+ /*
+ * Spin loop until there is space
+ * in the QOUTFIFO.
+ */
+ mov A, FIFODEPTH;
+ cmp CMDOUTCNT, A je .;
+ inc CMDOUTCNT;
+.endif
mov QOUTFIFO,SCB_TAG;
mvi INTSTAT,CMDCMPLT;
test SCB_CONTROL, ABORT_SCB jz dma_next_scb;
OpenPOWER on IntegriCloud