Commit Graph

10 Commits

Author SHA1 Message Date
bouyer 83478e12f3 when an unexpected disconnect occurs only compute the resid; do the
real save data pointers when we get the message (or rather, at disconnect
time following the message).
Factor out code to do this, and to deal with xs->resid, in siop_common.c.
2004-05-17 18:37:02 +00:00
bouyer 76fa396c1d Properly compute xs->resid, instead of assuming it'll always be 0 when
a command is done.
2004-05-17 11:10:24 +00:00
wiz c5670263e0 Fix some typos. From Tom Cosgrove via jmc@openbsd. 2003-11-02 11:07:44 +00:00
bouyer eea7ef4c53 Use a u_int32_t in script RAM instead of the SEM bit in ISTAT to pass flags
between script and driver. This allows more than one flag, and is easier to
manage (we almost can't read/write istat outside of the irq handler).
2002-04-27 18:46:49 +00:00
bouyer 5387f035d3 Implement a ring for the completed commands. This avoid a (problematic only
if error occurs after status is collected) race condition
when using the status byte to detect completed commands (a command descriptor
could be recycled before the device disconnected), and make the
interrupt routine handling completed commands more efficient (no need to
scan target * lun * tag array any more).
2002-04-27 17:39:51 +00:00
bouyer f66f6c27a6 - We can't share the per-lun DSA entry for untagged and tag table DSA;
there may be tagged commands still running when we queue a request sense
  command.
  Solve this by using 2 DSA entry per LUN
- Now that we have the command DSA before select, we can load T/L/Q in
  SCRATCHC. This makes the selection timeout handler simpler.
- Avoid a race condition when setting the free flag in the cmd ring (see
  comment in the script)
- don't forget to update the ID in the head of LUN table after a sync/wide
  negotiation. This fixes the command timeout at the first data command
  after negotiation (the bus reset handler did update the ID properly,
  so subsequent commands were OK).
- for DMA interrupts, clear fifo if it's not empty. Leaving the fifo dirty
  would prevent subsequent interrupts from coming in.
- Various improvements in debug messages
- misc cleanups.
2002-04-25 19:34:02 +00:00
bouyer b46922a07a For a new command, use the id in the command table and get rid of the ID in the
scheduler slot. This costs a few more instructions but divide the size of the
scheduler ring by 2, saving 1k of onboard RAM (a bus with 15 devices would
overflow the on-board RAM by 128 bytes).
2002-04-24 09:43:14 +00:00
bouyer cd3578d7ef More copyright fixes, pointed out by Thomas. Thanks ! 2002-04-23 20:41:13 +00:00
bouyer 4cda08fb6e Add support for tagged queuing to esiop (256 tags per device).
For this add another indirecton: the DSA in the LUN table points to
a table of DSA indexed by the tag number when tagged command is in use.
For non tagged command, the LUN DSA still points to the tables describing the
xfer directly.
2002-04-22 15:53:39 +00:00
bouyer 8cfc41f9ed First cut at a esiop driver (enhanced siop). Doesn't implement tagged queuing
yet.
If is restricted to SIOP which implement the load/store instruction, and
has 10 scratch registers (basically, 825 and newer, possibly 770).
It implements a different interface between host and script, using a real
ring for command starts, and improved support for reconnect which will allow
256 tag per device. It uses interrupt on the fly to signal complete command,
which allows several commands to be serviced per interrupt and doesn't require
the script to stop to signal command completion.
2002-04-21 22:52:05 +00:00