freebsd-dev/sys/dev/aic7xxx
Justin T. Gibbs dcc9985adf Fix a race condition in the flushing of commands that
have completed across the bus but not to the host before
processing of an exception condition (busfree, bus reset,
etc.).  When flushing the controller of completed commands,
we also look for packetized commands that have completed
with good status and are stored in the "good status fifo".
The hardware will post to the good status fifo even if
data for that command is still active in a FIFO.  In
one particular failure case, a command outstanding on the
bus reconnected, transferred data into a FIFO, and provided
good status while the host driver was processing an expected
busfree event (PPR message negotiation).  This resulted in
an entry in the good status fifo that we completed, but
since the sequencer was paused, the data in the data FIFO
for this command had never been transferred to the host.
Once the busfree processing was complete, the sequencer
was unpaused, and the data completed its transfer to the
host.  In some instances, the client for the data was notified
of the completion and attempted to view the data before
it arrived.  This case only occurred during FreeBSD's
multi-target probe of the SCSI bus while some devices are
negotiating to go packetized and some devices are already
running in packetized.

The fix is to run and FIFOs active with a context in the
good status fifo to completion before completing the command
to the SCSI layer.  This requies duplicating the FIFO rundown
operations in the host driver that would usually be handled
by the firmware, but there is no other alternative.

Don't blindly shutdown the SCB dma engine when restarting
the sequencer.  We may be killing an operation that is
not supposed to be cancelled.  The cases where we need to
shutdown these dma engines are already handled elsewhere in
the driver.

Fix a few more ahd_in?() -> ahd_in?_scbram() instances.
2003-06-28 04:46:54 +00:00
..
aicasm Allow constants to be complex expressions so long as those 2003-01-20 18:02:11 +00:00
ahc_eisa.c hc_eisa.c: 2003-05-03 23:27:57 +00:00
ahc_pci.c hc_eisa.c: 2003-05-03 23:27:57 +00:00
ahd_pci.c hc_eisa.c: 2003-05-03 23:27:57 +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 Correct/Simplify ignore wide residue message handling 2003-05-26 21:24:01 +00:00
aic7xxx_osm.c Merge common XPT_CALC_GEOMETRY functions into a single convenience function. 2003-06-14 22:17:41 +00:00
aic7xxx_osm.h Sync perforce IDs. 2003-06-10 03:25:24 +00:00
aic7xxx_pci.c Clear stale PCI errors during our test for 2003-06-06 23:52:34 +00:00
aic7xxx.c When single stepping, only leave ENBUSFREE enabled 2003-06-06 23:53:39 +00:00
aic7xxx.h aic7770.c: 2003-06-06 23:48:19 +00:00
aic7xxx.reg Correct/Simplify ignore wide residue message handling 2003-05-26 21:24:01 +00:00
aic7xxx.seq FIFOEMP can lag LAST_SEG_DONE in the Ultra2 and U160 2003-05-26 21:24:55 +00:00
aic79xx_inline.h Implement ahd_inq_scbram() and change the implemention 2003-06-28 04:43:19 +00:00
aic79xx_osm.c Merge common XPT_CALC_GEOMETRY functions into a single convenience function. 2003-06-14 22:17:41 +00:00
aic79xx_osm.h Sync perforce IDs. 2003-06-10 03:25:24 +00:00
aic79xx_pci.c aic79xx.h: 2003-06-28 04:39:49 +00:00
aic79xx.c Fix a race condition in the flushing of commands that 2003-06-28 04:46:54 +00:00
aic79xx.h aic79xx.h: 2003-06-28 04:45:25 +00:00
aic79xx.reg Sync perforce IDs. 2003-06-10 03:25:24 +00:00
aic79xx.seq Use clr instead of an explicit mov from ALLZEROS 2003-06-28 04:44:10 +00:00
aic7770.c aic7770.c: 2003-06-06 23:48:19 +00:00