summaryrefslogtreecommitdiffstats
path: root/sys/dev/aic7xxx
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1997-02-18 20:22:52 +0000
committergibbs <gibbs@FreeBSD.org>1997-02-18 20:22:52 +0000
commit5e400d31415941a79eeca8e0326f0bd3f21b60f4 (patch)
treec93dfe0735c10555ba741f062cb30e743c4a75ae /sys/dev/aic7xxx
parentadc9806068502a292e26462964a5ce55d2a8ad03 (diff)
downloadFreeBSD-src-5e400d31415941a79eeca8e0326f0bd3f21b60f4.zip
FreeBSD-src-5e400d31415941a79eeca8e0326f0bd3f21b60f4.tar.gz
Enlarge the message out buffer from 6 to 8 bytes. Now that sync and wide
negotiation messages may be tagged, we were overrunning the old buffer. The variable that was getting squashed is updated before the message goes out, causing corrupted SDTR or WDTR messages. Depending on the phases traversed before message out, this could cause the wrong offset to be negotiated allowing data overruns to occur. The problem is easier to detect with wide targets on the chain since the allowed offset is smaller. Also removed the unnecessary clearing of SPIORDY during the message out phase. We don't rely on SPIORDY any more.
Diffstat (limited to 'sys/dev/aic7xxx')
-rw-r--r--sys/dev/aic7xxx/aic7xxx.seq1
-rw-r--r--sys/dev/aic7xxx/aic7xxx_reg.h28
2 files changed, 11 insertions, 18 deletions
diff --git a/sys/dev/aic7xxx/aic7xxx.seq b/sys/dev/aic7xxx/aic7xxx.seq
index 4571996..bc71319 100644
--- a/sys/dev/aic7xxx/aic7xxx.seq
+++ b/sys/dev/aic7xxx/aic7xxx.seq
@@ -564,7 +564,6 @@ p_mesgout_dropatn:
mvi CLRSINT1,CLRATNO /* drop ATN */
p_mesgout_outb:
dec DINDEX
- mvi CLRSINT0, CLRSPIORDY
mov SCSIDATL,SINDIR
jmp p_mesgout_loop
diff --git a/sys/dev/aic7xxx/aic7xxx_reg.h b/sys/dev/aic7xxx/aic7xxx_reg.h
index 1d8c3ef..520b677 100644
--- a/sys/dev/aic7xxx/aic7xxx_reg.h
+++ b/sys/dev/aic7xxx/aic7xxx_reg.h
@@ -657,11 +657,8 @@
* we can see what is getting thrown away.
*/
#define REJBYTE 0x030
-/*
- * Since the sequencer cannot read QOUTCNT, we use this memory location
- * to make sure that we don't overflow the QOUTFIFO when doing SCB Paging.
- */
-#define QOUTQCNT 0x031
+#define LASTPHASE 0x031
+#define P_BUSFREE 0x01
/*
* Bit vector of targets that have disconnection disabled.
@@ -675,7 +672,7 @@
*/
#define MSG_LEN 0x034
-/* We reserve 6bytes to store outgoing messages */
+/* We reserve 8bytes to store outgoing messages */
#define MSG0 0x035
#define COMP_MSG0 0xcb /* 2's complement of MSG0 */
#define MSG1 0x036
@@ -683,16 +680,8 @@
#define MSG3 0x038
#define MSG4 0x039
#define MSG5 0x03a
-
-#define LASTPHASE 0x03b
-#define P_BUSFREE 0x01
-
-#define ARG_1 0x03c
-#define RETURN_1 0x03c
-#define SEND_MSG 0x80
-#define SEND_SENSE 0x40
-#define SEND_REJ 0x20
-#define SCB_PAGEDIN 0x10
+#define MSG6 0x03b
+#define MSG7 0x03c
#define DMAPARAMS 0x03d /* Parameters for DMA Logic */
@@ -774,7 +763,12 @@
#define HSCB_ADDR3 0x057
#define CUR_SCBID 0x058
-#define QFULLCNT 0x059
+#define ARG_1 0x059
+#define RETURN_1 0x059
+#define SEND_MSG 0x80
+#define SEND_SENSE 0x40
+#define SEND_REJ 0x20
+#define SCB_PAGEDIN 0x10
#define SCB_LIST_NULL 0xff
OpenPOWER on IntegriCloud