Commit Graph

84 Commits

Author SHA1 Message Date
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
bouyer 44453e12b8 Regen: save offset at disconnect after a data phase without save data pointer. 2005-11-18 23:11:38 +00:00
bouyer 98fae666e4 Some drives disconnect after the last data phase without a save data pointer
message. In such case we would not update resid with the proper value
(eventually resid would not be updated at all if there was only one data
phase). To fix this, have the script save the offset in the data tables at
disconnect time if there was a transfer, and use this to compute the resid
if the current offset is 0.
Problem reported and patch tested by edwin, Roy Bixler and YAMAMOTO Takashi.
Fix kern/31990 by YAMAMOTO Takashi.
2005-11-18 23:10:32 +00:00
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
simonb 3cebd9325e White space nit- don't put a space before/after increment/decrement
operators.
2005-02-11 06:21:21 +00:00
bouyer 1c16a590ec Regen from esiop.ss 1.18 2004-05-17 18:38:22 +00:00
bouyer e842696ec7 Regen from siop.ss 1.18 2004-05-17 18:38:02 +00:00
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 a8b77ccfc4 Regen from esiop.ss 1.17. 2004-05-17 11:11:20 +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
bouyer 7ec21dba35 Make it compile with recent compilers. 2004-05-16 22:45:51 +00:00
bouyer 7b066791c8 Remove references to University of California from my copyright notices. 2003-10-05 17:48:49 +00:00
bouyer bc45dbf125 Regen from esiop.ss 1.15. 2003-08-06 11:40:32 +00:00
bouyer 96fb3c0376 Properly handle messages that we get at reconnect time (other than
SIMPLE_Q_TAG). Some drives start sync/wide negotiation at reconnect time.
Problem reported and fix tested by Andreas Wrede.
2003-08-06 11:39:58 +00:00
lukem 9391907df1 add missing __RCSID() 2003-07-14 15:40:37 +00:00
tsutsui afa38ad0e6 Regen scripts for new oosiop. 2003-04-06 09:52:21 +00:00
tsutsui bcf0b777ce Tweak siop scripts assembler for new oosiop. 2003-04-06 09:50:29 +00:00
tsutsui 7b4697bdbe Add MI NCR/Symbios 53c700 SCSI driver.
This "oosiop" driver was originally written by Shuichiro URATA
for arc port, and then it was modified by me to make it work
also on hp700.

This driver has been tested on my NEC Express5800/240 with 53c700-66
for several months, and also tested on HP9000 735/125 with 53c700
(though current hp700 port has been broken since SA merge).
Both sync transfer and disconnect/reselect work fine,
but tagged queuing is not implemented yet.
2003-04-06 09:48:41 +00:00
bouyer b13c46b64c Fix typo in comment. 2002-08-29 15:42:49 +00:00
wiz 645df36eff Spell '[Rr]ight' correctly. From Jim Bernard. 2002-07-26 14:11:34 +00:00
wiz 5db23d2c5d enouth -> enough. 2002-07-26 01:00:39 +00:00
fredette c9bdddaac5 Regen. 2002-07-07 23:01:51 +00:00
bouyer 7de8483ff0 Regen: move a few things around to save a few JUMP. 2002-05-02 12:37:50 +00:00
bouyer 41af47376f Move a few things around, to save some JUMP. 2002-05-02 12:37:19 +00:00
bouyer 027861788c Regen: use a u_int32_t in script RAM to pass flags between script and driver. 2002-04-27 18:47:31 +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 b66175fa2b Regen: implement done command ring. 2002-04-27 17:40:19 +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 916ef37c06 Regen: 2 DSA entry per lun, load SCRATCHC before select, avoid race condition
when setting f_cmd_free.
2002-04-25 19:35:07 +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 d59eabe0a9 Regen: get rid or ID in scheduler slot, to save RAM. 2002-04-24 09:44:12 +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 c0cb853db0 Regen: bump the number of slots in the cmd ring to 256. 2002-04-24 08:00:55 +00:00
bouyer e73a1efbd9 Bump the number of slots in the command ring to 256. 2002-04-24 08:00:08 +00:00
bouyer cd3578d7ef More copyright fixes, pointed out by Thomas. Thanks ! 2002-04-23 20:41:13 +00:00
bouyer 4c8f4b94f8 Fix copyrigth. 2002-04-23 20:12:39 +00:00
bouyer 25d4f402ce Regen: bump message size to 16 octets. 2002-04-23 12:56:01 +00:00
bouyer 6d37782a49 Bump the space for SCSI messages from 8 to 16 octets, as 8 may not be
enouth for IDENTIFY + TAG + PPR.
Get rid of constants in C code by use of a offsetof macro.
2002-04-23 12:55:26 +00:00
bouyer dbe8f22921 Regen: block on wait MSG_OUT after a SELECT. 2002-04-22 20:45:59 +00:00
bouyer 5242b16c65 It seems that the script processor continue to exec a few intructions
after the selection timeout is posted but the number executed isn't
reliable. So wait for MSG_OUT rigth after the select so that the state of
the script when the interruption is handled is known.
2002-04-22 20:45:27 +00:00
bouyer b5c850f201 Regen: tagged queuing support, and led on/off fragments. 2002-04-22 15:55:37 +00:00
bouyer 9080ea0aa3 Add the led_on/led_off script fragments. 2002-04-22 15:55:09 +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 2f72a4fcc7 Generated from esiop.ss, for the new esiop driver. 2002-04-21 22:53:37 +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
bouyer 4b8e2f7002 - handle INTFLY (interrupt on the fly) command
- hanlde set/clear carry
- handle shl, shr (shift left and rigth) and xor operators
2002-04-21 22:40:10 +00:00
bouyer a8ac9f8638 Fix scratchd2 address. 2002-04-20 20:56:25 +00:00
bouyer 7341a66098 Regen: add hooks to drive LED via GPIO. 2002-04-18 11:59:41 +00:00
bouyer 172d73c2d5 Add hooks to drive the activity led via the GPIO pin 1, as required by some
tekram and symbios adapters.
2002-04-18 11:56:11 +00:00
bouyer 6b14001ff6 Really use a JUMP for NOP, not a block move. 2002-04-17 21:39:14 +00:00