opnsense-src/sys
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
..
alpha Do the first and mostly mechanical step of adding mutex support to the 2003-06-27 08:31:48 +00:00
amd64 Turn ips back on. 2003-06-27 23:11:22 +00:00
arm sys/sys/limits.h: 2003-05-19 20:29:07 +00:00
boot Build on amd64. Yes, I know this isn't particularly nice. 2003-06-26 03:51:57 +00:00
cam Merge common XPT_CALC_GEOMETRY functions into a single convenience function. 2003-06-14 22:17:41 +00:00
coda Remove in toto coda_strategy which incorrectly implemented vop_panic(); 2003-06-15 18:45:15 +00:00
compat Add a f_vnode field to struct file. 2003-06-22 08:41:43 +00:00
conf Tidy up leftover lazy_switch instrumentation that is no longer needed. 2003-06-27 22:39:14 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r116801, 2003-06-25 06:06:52 +00:00
crypto Use __FBSDID(). 2003-06-10 21:44:29 +00:00
ddb Rename P_THREADED to P_SA. P_SA means a process is using scheduler 2003-06-15 00:31:24 +00:00
dev Fix a race condition in the flushing of commands that 2003-06-28 04:46:54 +00:00
fs Fix a bug where a truncate operation involving truncate() or ftruncate() on 2003-06-27 15:46:38 +00:00
geom Sleep on "-" in our normal state to simplify debugging. 2003-06-18 10:33:09 +00:00
gnu Add the same KASSERT to all VOP_STRATEGY and VOP_SPECSTRATEGY implementations 2003-06-15 18:53:00 +00:00
i4b Use __FBSDID(). 2003-06-11 00:01:05 +00:00
i386 Tidy up leftover lazy_switch instrumentation that is no longer needed. 2003-06-27 22:39:14 +00:00
ia64 Do the first and mostly mechanical step of adding mutex support to the 2003-06-27 08:31:48 +00:00
isa Force media autodetection if the device has lost its parameter table. 2003-06-16 08:42:20 +00:00
isofs/cd9660 change dev_t to struct cdev * to match ufs. This fixes fstat for cd9660 2003-06-24 22:11:20 +00:00
kern Tidy up leftover lazy_switch instrumentation that is no longer needed. 2003-06-27 22:39:14 +00:00
libkern Use __FBSDID(). 2003-06-11 05:37:42 +00:00
modules Attach the "null" module to the LINT build. 2003-06-26 08:06:31 +00:00
net add "autoselect" mode and "auto" alias: these let you reset the 2003-06-25 15:03:05 +00:00
net80211 revise copyright notices per discussion with Atsushi Onoe <onoe@sm.sony.co.jp> 2003-06-27 05:13:52 +00:00
netatalk - Use if_broadcastaddr from struct ifnet rather than relying on 2003-03-21 17:53:16 +00:00
netatm Use __FBSDID(). 2003-06-11 07:22:30 +00:00
netgraph Fix a comment 2003-06-25 20:58:35 +00:00
netinet remove unused file (ipfw2 is the default in RELENG_5 and above; the old 2003-06-24 07:12:11 +00:00
netinet6 Do not attempt to access to inp_socket fields if the socket is in the TIME_WAIT 2003-06-17 00:31:30 +00:00
netipsec Check crypto driver capabilities and if the driver operates synchronously 2003-06-27 20:10:03 +00:00
netipx Use __FBSDID(). 2003-06-11 05:37:42 +00:00
netkey Use __FBSDID(). 2003-06-11 05:37:42 +00:00
netnatm Use __FBSDID(). 2003-06-11 05:37:42 +00:00
netncp Use __FBSDID(). 2003-06-11 05:37:42 +00:00
netsmb Add a f_vnode field to struct file. 2003-06-22 08:41:43 +00:00
nfs Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
nfsclient Lock the vm object when freeing a page. 2003-06-17 05:17:00 +00:00
nfsserver Fix a bug in nfsrv_read() that caused the replies to certain NFSv3 2003-06-24 19:04:26 +00:00
opencrypto Add support to eliminate a context switch per crypto op when using the 2003-06-27 20:07:10 +00:00
pc98 Replace evil abuse of geteblk() with malloc(9). 2003-06-16 07:41:47 +00:00
pccard OLDCARD is OBSOLETE_IN_6. Tag it as such. 2003-06-12 04:46:43 +00:00
pci Sort the list of PCI ID's in numerical order and fix a whitespace bogon. 2003-06-27 18:17:06 +00:00
posix4 Use __FBSDID(). 2003-06-11 06:34:30 +00:00
powerpc Do the first and mostly mechanical step of adding mutex support to the 2003-06-27 08:31:48 +00:00
rpc Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) and 2001-03-19 12:50:13 +00:00
security Redesign the externalization APIs from the MAC Framework to 2003-06-23 01:26:34 +00:00
sparc64 remove unnecessary comment. We do what the comments says we need to. 2003-06-24 21:37:49 +00:00
sys Remove an '_' which was surplus to requirements. 2003-06-25 08:30:45 +00:00
tools Don't check the state of the vnode interlock if the specification says 2003-06-22 21:20:06 +00:00
ufs Lock the vm object when freeing pages. 2003-06-15 21:50:38 +00:00
vm Simple read-modify-write operations on a vm object's flags, ref_count, and 2003-06-27 18:52:49 +00:00
Makefile Revert exclusion for amd64 that stopped boot/ being built. 2003-06-26 03:52:48 +00:00