freebsd-skq/sys/dev/aic7xxx
Justin T. Gibbs 3f293aaf2c Identify the AIC7901A as such instead of an AIC7902.
Push protocol violation handler to its own routine.  We now
properly detect and recovery from the following target induced
protocol violations:
	o Unexpected or invalid non-packetized Relesection
	o Command complete with no status message
	o Good Status after incomplete cdb transfer

Add an SCB collision avoidance algorithm that allows us to
use all 512 SCBs for non-packetized operations.  There is
still the possibility of running out of SCBs with non-colliding
tag identifiers, but the algorithm ensures that the stall will
be rare and short lived.

Convert to a read-only algorithm for validing entries in the
qoufifo.  The sequencer now toggles the high bit of the SCB
identifier on each wrap around of the qinfifo.  If the high
bit doesn't match the expected value for this pass of the
qoufifo, the entry is not valid.  This has the benefit of
working on machines that have large granularity cache write
back semantics without requiring any additional memory.

Remove lots of code related to untagged SCB queues.  Since
these controllers can keep a fully busy target table, we
will never have untagged SCB queues.

Lots of improvements to diagnostic logging.

Clarify some comments.

Don't clear BUSFREE interrupt enable in SIMODE1 in the SELTO
handler.  Just clearing the interrupt status is sufficient and
this avoids the chance of disabling busfree detection in connection
that occurs while we are handling the busfree interrupt.

Clear all possible interrupt sources when handling a busfree
interrupt.  The hardware clears some but not all of them.

Don't panic if we get into the default SCSIINT handler.
Dump the card state and clear all interrupt sources in the
hope that we can continue.

LASTPHASE != PREVPHASE.  Use the correct PREVPHASE for testing
against values in the PERRDIAG register.

According to SPI4, the bus free that is required after certain
PPR negotiations will only occur at the end of all message phases.
Handle the bus free if it occurs after a transaction in either
the message-in or message-out phases.  The busfree can also occur
if the status of IU_REQ changes due to a WDTR or SDTR message.
We now set the expect busfree flag in ahd_set_syncrate so that
it works regardless of message type.

Correct a problem with missing certain busfree events.  The
chip supports single-stepping even if a SCSIINT is pending.
This obviates the need to clear all of the SCSI interrupt enables
prior to single stepping.  Since ENBUSFREE can only be disabled
manually and not re-enabled, avoiding touching this bit in the
single-step case yields reliable bus free detection.

Enhance ahd_clear_intstat to clear all SCSIINT sources.

Only use ahd_update_pending_scbs() if we are active on the
bus.  We cannot modify the "MK_MESSAGE" bits on SCBs in the
execution queue if a selection might be in process since
the sequencer uses this bit to detect PPR negotiation to
a target with an outstanding IU_REQ agreement.

Allocate the SCB delivery mechansim's sentinal SCB specially
so we don't waste a valid SCB for this task.

Move tranceive state settle logic to ahd_chip_init() since
this needs to occur after every chip reset, not just the
chip reset that happens during primary driver initialization.

Correct a bug with transmitting lun information in packetized
connections.

Restrict busy target table operations to the range of luns
that can be used for non-packetized connections.  Larger luns
can only be accessed in packetized mode.

Correct a busy target table addressing bug.

Be more careful about how we shutdown the DMA engines during
bus reset events.

Only freeze the SIMQ once regardless of the number of bus
reset events that occur while we are polling for the resets
to stop.

Don't rely on the sequencer remaining paused() during our
reset poll.  It is safe for the sequencer to run during this
time, and many callers to the bus reset code would need to
be modified to make this assumption universally true.

Even if we are not going to clobber SCB state when an auto-request
sense SCB has a check condition, we must still unfreeze the queue.
Re-arrange the BAD STATUS handler to handle this case appropriately.

Modify the SCB download size depending on whether long luns are
being stored in the SCB.

Add ahd_print_register() for pretty printing register diagnostics.

Don't trust that the flexport logic to detect the presence of
a seeprom is available.  It may not be on some motherboard
implementations.

"the the" -> "the"
2002-08-31 06:48:14 +00:00
..
aicasm Update assembler syntax and assembler to allow generation of register 2002-08-31 06:39:41 +00:00
ahc_eisa.c Allow the ahc and ahd drivers to be built as modules. This also 2002-08-01 01:36:39 +00:00
ahc_pci.c Tell the user about a failed IRQ mapping rather than fail silently. 2002-08-31 03:04:08 +00:00
ahd_pci.c Hook up the ahd driver. 2002-06-06 16:35:58 +00:00
aic7xxx_93cx6.c Update Perforce Ids. 2002-08-31 06:45:28 +00:00
aic7xxx_93cx6.h Update Perforce Ids. 2002-08-31 06:45:28 +00:00
aic7xxx_inline.h If interrupts are disabled on the card, don't bother running 2002-08-31 06:46:37 +00:00
aic7xxx_osm.c Enable card interrupts from the OSM. 2002-08-31 06:43:55 +00:00
aic7xxx_osm.h Cleanup endian macros. 2002-08-31 06:44:20 +00:00
aic7xxx_pci.c Move interrupt enable into the OSM. 2002-08-31 06:44:56 +00:00
aic7xxx.c Add ahc_print_devinfo() to simplify some diagnostic output. 2002-08-31 06:41:37 +00:00
aic7xxx.h Drop the bus reset hold delay back down to 25us. The 250us 2002-08-31 06:42:10 +00:00
aic7xxx.reg Convert to new assembler field syntax. 2002-08-31 06:42:38 +00:00
aic7xxx.seq Add a prefix to be used for assembler generated tables and 2002-08-31 06:43:15 +00:00
aic79xx_inline.h Hook up the ahd driver. 2002-06-06 16:35:58 +00:00
aic79xx_osm.c Hook up the ahd driver. 2002-06-06 16:35:58 +00:00
aic79xx_osm.h Minimal tweak to not depend on NPCI, but still maintain portability 2002-07-23 06:31:45 +00:00
aic79xx_pci.c Hook up the ahd driver. 2002-06-06 16:35:58 +00:00
aic79xx.c Identify the AIC7901A as such instead of an AIC7902. 2002-08-31 06:48:14 +00:00
aic79xx.h Hook up the ahd driver. 2002-06-06 16:35:58 +00:00
aic79xx.reg Enter the ahd driver which supports the Adaptec AIC7902 Ultra320, PCI-X 2002-06-05 19:52:45 +00:00
aic79xx.seq Enter the ahd driver which supports the Adaptec AIC7902 Ultra320, PCI-X 2002-06-05 19:52:45 +00:00
aic7770.c Pass unparsed serial eeprom information into the driver core. 2002-08-31 06:40:32 +00:00