Change #ifdef linux to #ifdef __linux__
aic7xxx_reg.h:
Remove unneeded BOFF_60BCLOCKS
define CHIPRSTACK to be the same as CHIPRST
define RESET_SCSI and CHANNEL_B_PRIMARY bits
All of these aer used during the setup of adapters.
aic7770 >= Rev E, aic7850, aic7860, aic7870, and ai7880 based controllers.
Make findSCB safer for non-tagged commands when tagged commands are
active on the controller. The symptoms of this problem were
"Overlapped commands attempted" messages during error recovery
attempts.
Compact scratch ram usage. This leaves 8 bytes free for future use.
Clean up some comments.
aic7xxx_reg.h:
Update my copyright.
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>
since setting up the DMA is too costly. Restructure for efficiency.
Pause the sequencer when a parity error occurs so that the kernel driver
knows during which phase the error was encountered.
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.
Add the same type of safeguards we use in the mesg_in phase to the mesg_out
phase.
aic7xxx_reg.h:
Add definitions for the DSCommand register for PCI adapters.
1) Use cpp to preprocess the sequencer code.
2) Convert all "magic numbers" to #defines shared by the sequencer and
kernel driver via the aic7xxx_reg.h file. (The assembler still needs
to be re-written in lex/yacc to allow ~|& type constructions).
3) Raise ATN on parity errors for "in" phases and send an initiator detected
error or message-in parity error message as appropriate.
4) Turn off the reselection hardware from the time or a (re)connection to
busfree. It seems that some fast targets were able to reconnect before
the sequencer was able to see busfree.
5) The message buffer is considered "in-use" when there is a positive length
count. The ACTIVE_MSG flag was unnecesary.
6) Properly set SCB_NEXT_WAITING to SCB_LIST_HEAD in scbs being added to
the waiting scb list. This is a change in how the list code works to
facilitate some planned work in the reset code.
7) The fields in the SCB have be re-arranged to be quad-word aligned.
8) The inb code has been rewritten to catch phasemisses and be more efficient.
9) Go back to "snooping the bus" to determine if the incomming identify
message will be followed by a simple queue message. Its much faster than
doing a search through the SCBs.
10) Implement better tag range checking for incomming tags.
11) Make sdtr_to_rate more accurate (use 25 instead of 24 in calculations -
must have been asleep that night).
12) Rearrange some routines to reduce code complexity and size.
13) Update comments and formatting.
14) Fixed bugs I've forgotten about??
Reviewed by: David Greenman <davidg@FreeBSD.org>