mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-13 14:40:22 +00:00
aic7xxx.seq:
Fix support for the aic7850 by looking only at the relavent bits of the QINCNT. The 7850 puts random garbage in the high bits and all my attempts to determine the cause of this failed. This approach does seem to work around the problem. Don't trust SCSIPERR to tell us when there is a parity error. On some revs of the 7870 and the 7880, this bit follows the parity of the current byte. Instead of using a SEQINT to tell the kernel, re-enable the standard parity error interrupt since it seems to pause the sequencer right at the time of the error which is the effect we were looking for anyway. aic7xxx_reg.h: Remove PARITY_ERROR seqeuncer interrupt type, its no longer used. Define QCOUNTMASK as the SRAM location for the mask to use on the QINCNT register. QCOUNTMASK is determined by the number of SCBs supported by the device we're working on. aic7xxx_asm.c Properly check the return value of fopen, and define the arg list in getopt correctly. Submitted by: Pete Bentley <pete@demon.net>
This commit is contained in:
parent
bbb209f10c
commit
c2c5fd345d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=14934
@ -41,7 +41,7 @@
|
||||
*
|
||||
*-M************************************************************************/
|
||||
|
||||
VERSION AIC7XXX_SEQ_VER "$Id: aic7xxx.seq,v 1.30 1996/01/29 03:12:02 gibbs Exp $"
|
||||
VERSION AIC7XXX_SEQ_VER "$Id: aic7xxx.seq,v 1.31 1996/03/10 07:02:31 gibbs Exp $"
|
||||
|
||||
#include "../../dev/aic7xxx/aic7xxx_reg.h"
|
||||
|
||||
@ -94,7 +94,8 @@ poll_for_work:
|
||||
start2:
|
||||
test SSTAT0,SELDI jnz reselect
|
||||
cmp WAITING_SCBH,SCB_LIST_NULL jne start_waiting
|
||||
test QINCNT,0xff jz poll_for_work
|
||||
mov A, QCNTMASK
|
||||
test QINCNT,A jz poll_for_work
|
||||
|
||||
/*
|
||||
* We have at least one queued SCB now and we don't have any
|
||||
@ -273,15 +274,6 @@ ITloop:
|
||||
test SSTAT1,BUSFREE jnz p_busfree
|
||||
test SSTAT1,REQINIT jz ITloop
|
||||
|
||||
/*
|
||||
* If we've had a parity error, let the driver know before
|
||||
* we overwrite LASTPHASE.
|
||||
*/
|
||||
test SSTAT1, SCSIPERR jz parity_okay
|
||||
or CLRSINT1, CLRSCSIPERR
|
||||
mvi INTSTAT, PARITY_ERROR
|
||||
|
||||
parity_okay:
|
||||
and A,PHASE_MASK,SCSISIGI
|
||||
mov LASTPHASE,A
|
||||
mov SCSISIGO,A
|
||||
|
@ -43,7 +43,7 @@
|
||||
* are token separators.
|
||||
*
|
||||
*-M*************************************************************************/
|
||||
static char id[] = "$Id: aic7xxx_asm.c,v 1.10 1996/01/03 06:25:31 gibbs Exp $";
|
||||
static char id[] = "$Id: aic7xxx_asm.c,v 1.11 1996/01/05 01:48:07 gibbs Exp $";
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@ -585,7 +585,7 @@ main(int argc, char **argv)
|
||||
int fd[2];
|
||||
|
||||
ofile = NULL;
|
||||
while ((c = getopt(argc, argv, "dho:vD")) != EOF) {
|
||||
while ((c = getopt(argc, argv, "dho:vD:")) != EOF) {
|
||||
switch (c) {
|
||||
case 'd':
|
||||
debug = !0;
|
||||
@ -603,7 +603,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
case 'o':
|
||||
|
||||
if ((ofile = fopen(optarg, "w")) < 0) {
|
||||
if ((ofile = fopen(optarg, "w")) == NULL) {
|
||||
perror(optarg);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
@ -636,7 +636,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
if (!ofile) {
|
||||
if ((ofile = fopen(ADOTOUT, "w")) < 0) {
|
||||
if ((ofile = fopen(ADOTOUT, "w")) == NULL) {
|
||||
perror(ADOTOUT);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
@ -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.5 1996/01/29 03:12:06 gibbs Exp $
|
||||
* $Id: aic7xxx_reg.h,v 1.6 1996/03/10 07:02:32 gibbs Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -424,10 +424,6 @@
|
||||
* when we were expecting
|
||||
* another msgin byte.
|
||||
*/
|
||||
#define PARITY_ERROR 0xe1 /*
|
||||
* Sequencer detected a parity
|
||||
* error.
|
||||
*/
|
||||
#define BRKADRINT 0x08
|
||||
#define SCSIINT 0x04
|
||||
#define CMDCMPLT 0x02
|
||||
@ -705,9 +701,11 @@
|
||||
* head of list of SCBs awaiting
|
||||
* selection
|
||||
*/
|
||||
#define WAITING_SCBT 0x058 /*
|
||||
* tail of list of SCBs awaiting
|
||||
* selection
|
||||
#define QCNTMASK 0x058 /*
|
||||
* Mask of bits to test against
|
||||
* when looking at the Queue Count
|
||||
* registers. Works around a bug
|
||||
* on aic7850 chips.
|
||||
*/
|
||||
#define COMP_SCBCOUNT 0x059
|
||||
#define SCB_LIST_NULL 0xff
|
||||
|
@ -43,7 +43,7 @@
|
||||
* are token separators.
|
||||
*
|
||||
*-M*************************************************************************/
|
||||
static char id[] = "$Id: aic7xxx_asm.c,v 1.10 1996/01/03 06:25:31 gibbs Exp $";
|
||||
static char id[] = "$Id: aic7xxx_asm.c,v 1.11 1996/01/05 01:48:07 gibbs Exp $";
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@ -585,7 +585,7 @@ main(int argc, char **argv)
|
||||
int fd[2];
|
||||
|
||||
ofile = NULL;
|
||||
while ((c = getopt(argc, argv, "dho:vD")) != EOF) {
|
||||
while ((c = getopt(argc, argv, "dho:vD:")) != EOF) {
|
||||
switch (c) {
|
||||
case 'd':
|
||||
debug = !0;
|
||||
@ -603,7 +603,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
case 'o':
|
||||
|
||||
if ((ofile = fopen(optarg, "w")) < 0) {
|
||||
if ((ofile = fopen(optarg, "w")) == NULL) {
|
||||
perror(optarg);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
@ -636,7 +636,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
if (!ofile) {
|
||||
if ((ofile = fopen(ADOTOUT, "w")) < 0) {
|
||||
if ((ofile = fopen(ADOTOUT, "w")) == NULL) {
|
||||
perror(ADOTOUT);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@
|
||||
* are token separators.
|
||||
*
|
||||
*-M*************************************************************************/
|
||||
static char id[] = "$Id: aic7xxx_asm.c,v 1.10 1996/01/03 06:25:31 gibbs Exp $";
|
||||
static char id[] = "$Id: aic7xxx_asm.c,v 1.11 1996/01/05 01:48:07 gibbs Exp $";
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@ -585,7 +585,7 @@ main(int argc, char **argv)
|
||||
int fd[2];
|
||||
|
||||
ofile = NULL;
|
||||
while ((c = getopt(argc, argv, "dho:vD")) != EOF) {
|
||||
while ((c = getopt(argc, argv, "dho:vD:")) != EOF) {
|
||||
switch (c) {
|
||||
case 'd':
|
||||
debug = !0;
|
||||
@ -603,7 +603,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
case 'o':
|
||||
|
||||
if ((ofile = fopen(optarg, "w")) < 0) {
|
||||
if ((ofile = fopen(optarg, "w")) == NULL) {
|
||||
perror(optarg);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
@ -636,7 +636,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
if (!ofile) {
|
||||
if ((ofile = fopen(ADOTOUT, "w")) < 0) {
|
||||
if ((ofile = fopen(ADOTOUT, "w")) == NULL) {
|
||||
perror(ADOTOUT);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user