freebsd-nq/sys/dev/aic7xxx
Justin T. Gibbs 957790c3e6 ahc_pci.c:
Disable "cache line streaming" for aic7890/91 Rev A chips.  I
	have never seen these chips fail using this feature, but
	some of Adaptec's regression tests have.

	Explicitly set "cache line streaming" to on for aic7896/97
	chips.  This was happening before, but this documents the
	fact that these chips will not function correctly without
	CACHETHEEN set.

aic7xxx.h:
	Add new bug types.

	Fix a typo in a comment.

aic7xxx.reg:
	Add a definition for the SHVALID bit in SSTAT3 for Ultra2/3
	chips.  This bit inicates whether the bottom most (current)
	element in the S/G fifo has exhausted its data count.

aic7xxx.seq:
	Be more careful in how we turn off the secondary DMA channel.
	Being less careful may hang the PCI bus arbitor that negotiates
	between the two DMA engines.

	Remove an unecessary and incorrect flag set operation in
	the overrun case.

	On Ultra2/3 controllers, clear the dma FIFO before starting
	to handle an overrun.  We don't want any residual bytes from
	the beginning of the overrun to cause the code that shuts
	down the DMA engine from hanging because the FIFO is not
	(and never will be) empty.

	If the data fifo is empty by the time we notice that a
	read transaction has completed, there is no need to
	hit the flush bit on aic7890/91 hardware that will not
	perform an auto-flush.  Skip some cycles by short circuiting
	the manual flush code in this case.

	When transitioning out of data phase, make sure that we
	have the next S/G element loaded for the following
	reconnect if there is more work to do.  The code
	would do this in most cases before, but there was
	a small window where the current S/G element could
	be exhausted before our fetch of the next S/G element
	completed.  Since the S/G fetch is already initiated
	at this point, it makes sense to just wait for the
	segment to arrive instead of incuring even more latency
	by canceling the fetch and initiating it later.

	Fast path the end of data phase handling for the last
	S/G segment.   In the general case, we might have
	worked ahead a bit by stuffing the S/G FIFO with
	additional segments.  If we stop before using them
	all, we need to fixup our location in the S/G stream.
	Since we can't work past the last S/G segment, no
	fixups are ever required if we stop somewhere in
	that final segment.

	Fix a little buglet in the target mode dma bug handler.
	We were employing the workaround in all cases instead
	of only for the chips that require it.

	Fix the cause of SCB timeouts and possible "lost data"
	during read operations on the aic7890.  When sending
	a data on any Ultra2/3 controller, the final segment
	must be marked as such so the FIFO will be flushed and
	cleaned up correctly when the transfer is ended.  We
	failed to do this for the CDB transfer and so, if
	the target immediately transfered from command to data
	phase without an intervening disconnection, the first
	segment transferred would be any residual bytes from
	the cdb transfer.  The Ultra160 controllers for some
	reason were not affected by this problem.

Many Thanks to Tor Egge for bringing the aic7890 problem
to my attention, providing analysis, as well as a mechanism
to reproduce the problem.
2000-07-27 23:17:52 +00:00
..
aicasm o Convert to <inttypes.h> style fixed sized types to facilitate porting to 2000-07-18 20:12:14 +00:00
93cx6.c o Convert to <inttypes.h> style fixed sized types to facilitate porting to 2000-07-18 20:12:14 +00:00
93cx6.h o Convert to <inttypes.h> style fixed sized types to facilitate porting to 2000-07-18 20:12:14 +00:00
ahc_eisa.c o Convert to <inttypes.h> style fixed sized types to facilitate porting to 2000-07-18 20:12:14 +00:00
ahc_pci.c ahc_pci.c: 2000-07-27 23:17:52 +00:00
aic7xxx_93cx6.c o Convert to <inttypes.h> style fixed sized types to facilitate porting to 2000-07-18 20:12:14 +00:00
aic7xxx_93cx6.h o Convert to <inttypes.h> style fixed sized types to facilitate porting to 2000-07-18 20:12:14 +00:00
aic7xxx.c Properly handle the case where the residual is 0, but, as the target 2000-07-25 20:40:34 +00:00
aic7xxx.h ahc_pci.c: 2000-07-27 23:17:52 +00:00
aic7xxx.reg ahc_pci.c: 2000-07-27 23:17:52 +00:00
aic7xxx.seq ahc_pci.c: 2000-07-27 23:17:52 +00:00
aicasm_gram.y o Convert to <inttypes.h> style fixed sized types to facilitate porting to 2000-07-18 20:12:14 +00:00
aicasm_insformat.h o Convert to <inttypes.h> style fixed sized types to facilitate porting to 2000-07-18 20:12:14 +00:00
aicasm_scan.l o Convert to <inttypes.h> style fixed sized types to facilitate porting to 2000-07-18 20:12:14 +00:00
aicasm_symbol.c o Convert to <inttypes.h> style fixed sized types to facilitate porting to 2000-07-18 20:12:14 +00:00
aicasm_symbol.h o Convert to <inttypes.h> style fixed sized types to facilitate porting to 2000-07-18 20:12:14 +00:00
aicasm.c o Convert to <inttypes.h> style fixed sized types to facilitate porting to 2000-07-18 20:12:14 +00:00
aicasm.h o Convert to <inttypes.h> style fixed sized types to facilitate porting to 2000-07-18 20:12:14 +00:00
Makefile Use /sys/sys/*.h over /usr/include/sys. 2000-05-27 21:35:47 +00:00