From d2c8692ad0b13a03f1039915911479313a73b1eb Mon Sep 17 00:00:00 2001 From: "Justin T. Gibbs" Date: Thu, 11 Jan 1996 06:17:49 +0000 Subject: [PATCH] Take a different approach to the SPIORDY race condition. Simply clear SPIORDY just before we ack on the bus so that there is no chance to see SPIORDY for the same byte twice. Make some small modifications so that the Linux aic7xxx driver can use our sequencer and register definition files verbatum. --- sys/dev/aic7xxx/aic7xxx.seq | 8 +++++--- sys/dev/aic7xxx/aic7xxx_reg.h | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/sys/dev/aic7xxx/aic7xxx.seq b/sys/dev/aic7xxx/aic7xxx.seq index 357ec1b67790..e34ca44c4a37 100644 --- a/sys/dev/aic7xxx/aic7xxx.seq +++ b/sys/dev/aic7xxx/aic7xxx.seq @@ -41,7 +41,7 @@ * *-M************************************************************************/ -VERSION AIC7XXX_SEQ_VER "$Id: aic7xxx.seq,v 1.26 1996/01/05 16:11:49 gibbs Exp $" +VERSION AIC7XXX_SEQ_VER "$Id: aic7xxx.seq,v 1.28 1996/01/09 16:14:03 gibbs Exp $" #include "../../dev/aic7xxx/aic7xxx_reg.h" @@ -419,11 +419,12 @@ sg_load: * }; */ + mvi DINDEX,HADDR /* * For Linux, we must throw away four bytes since there is a 32bit gap * in the middle of a struct scatterlist */ -#ifdef LINUX +#ifdef linux call bcopy_4_dfdat mov NONE,DFDAT mov NONE,DFDAT @@ -434,7 +435,6 @@ sg_load: /* * For FreeBSD, just copy it wholesale */ - mvi DINDEX,HADDR call bcopy_7_dfdat #endif @@ -513,6 +513,7 @@ p_mesgout_loop: mvi CLRSINT1,CLRATNO /* drop ATN */ p_mesgout_outb: dec DINDEX + or CLRSINT0, CLRSPIORDY mov SCSIDATL,SINDIR p_mesgout4: @@ -881,6 +882,7 @@ mk_mesg1: */ inb_next: + or CLRSINT0, CLRSPIORDY mov NONE,SCSIDATL /*dummy read from latch to ACK*/ inb_next_wait: test SSTAT1,PHASEMIS jnz mesgin_phasemis diff --git a/sys/dev/aic7xxx/aic7xxx_reg.h b/sys/dev/aic7xxx/aic7xxx_reg.h index bbe2b5afb2d8..8b8d108534e2 100644 --- a/sys/dev/aic7xxx/aic7xxx_reg.h +++ b/sys/dev/aic7xxx/aic7xxx_reg.h @@ -18,7 +18,7 @@ * 4. Modifications may be freely made to this file if the above conditions * are met. * - * $Id: aic7xxx_reg.h,v 1.2 1996/01/03 06:25:32 gibbs Exp $ + * $Id: aic7xxx_reg.h,v 1.3 1996/01/07 19:18:28 gibbs Exp $ */ /* @@ -573,6 +573,20 @@ #endif #define SCB_SIZEOF 0x1a /* sizeof SCB to DMA */ +/* --------------------- AHA-2840-only definitions -------------------- */ + +#define SEECTL_2840 0xcc0 +/* UNUSED 0xf8 */ +#define CS_2840 0x04 +#define CK_2840 0x02 +#define DO_2840 0x01 + +#define STATUS_2840 0xcc1 +#define EEPROM_TF 0x80 +#define BIOS_SEL 0x60 +#define ADSEL 0x1e +#define DI_2840 0x01 + /* --------------------- AIC-7870-only definitions -------------------- */ #define DSPCISTATUS 0x086