mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-29 04:21:26 +01:00
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.
This commit is contained in:
parent
edf18f6773
commit
1e4dbad756
@ -41,7 +41,7 @@
|
|||||||
*
|
*
|
||||||
*-M************************************************************************/
|
*-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"
|
#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
|
* For Linux, we must throw away four bytes since there is a 32bit gap
|
||||||
* in the middle of a struct scatterlist
|
* in the middle of a struct scatterlist
|
||||||
*/
|
*/
|
||||||
#ifdef LINUX
|
#ifdef linux
|
||||||
call bcopy_4_dfdat
|
call bcopy_4_dfdat
|
||||||
mov NONE,DFDAT
|
mov NONE,DFDAT
|
||||||
mov NONE,DFDAT
|
mov NONE,DFDAT
|
||||||
@ -434,7 +435,6 @@ sg_load:
|
|||||||
/*
|
/*
|
||||||
* For FreeBSD, just copy it wholesale
|
* For FreeBSD, just copy it wholesale
|
||||||
*/
|
*/
|
||||||
mvi DINDEX,HADDR
|
|
||||||
call bcopy_7_dfdat
|
call bcopy_7_dfdat
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -513,6 +513,7 @@ p_mesgout_loop:
|
|||||||
mvi CLRSINT1,CLRATNO /* drop ATN */
|
mvi CLRSINT1,CLRATNO /* drop ATN */
|
||||||
p_mesgout_outb:
|
p_mesgout_outb:
|
||||||
dec DINDEX
|
dec DINDEX
|
||||||
|
or CLRSINT0, CLRSPIORDY
|
||||||
mov SCSIDATL,SINDIR
|
mov SCSIDATL,SINDIR
|
||||||
|
|
||||||
p_mesgout4:
|
p_mesgout4:
|
||||||
@ -881,6 +882,7 @@ mk_mesg1:
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
inb_next:
|
inb_next:
|
||||||
|
or CLRSINT0, CLRSPIORDY
|
||||||
mov NONE,SCSIDATL /*dummy read from latch to ACK*/
|
mov NONE,SCSIDATL /*dummy read from latch to ACK*/
|
||||||
inb_next_wait:
|
inb_next_wait:
|
||||||
test SSTAT1,PHASEMIS jnz mesgin_phasemis
|
test SSTAT1,PHASEMIS jnz mesgin_phasemis
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
* 4. Modifications may be freely made to this file if the above conditions
|
* 4. Modifications may be freely made to this file if the above conditions
|
||||||
* are met.
|
* 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
|
#endif
|
||||||
#define SCB_SIZEOF 0x1a /* sizeof SCB to DMA */
|
#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 -------------------- */
|
/* --------------------- AIC-7870-only definitions -------------------- */
|
||||||
|
|
||||||
#define DSPCISTATUS 0x086
|
#define DSPCISTATUS 0x086
|
||||||
|
Loading…
Reference in New Issue
Block a user