Commit Graph

15 Commits

Author SHA1 Message Date
chs fae4d6d720 fix typo in previous revision so that the scsi code compiles again. 2001-05-23 02:16:19 +00:00
mjacob b9eb902304 Make SDRETRIES an option you can dig out of opt_scsi.h.
Add SD_IO_TIMEOUT (an option in opt_scsi.h) also, which defaults to the
normal 60 * 1000 timeout for normal read/write commamds. This allows you
to shorten or lengthen the timeout as needed.
2001-05-22 18:59:57 +00:00
bouyer 937a7a3ed9 Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
  ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
  to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
  peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
  recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
  scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
  (no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
  set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
  the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
  will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
2001-04-25 17:53:04 +00:00
bouyer e662e86225 sd_interpret_sense() can be called from interrupt context; call scsipi_start()
with XS_CTL_ASYNC if the failed command was called with XS_CTL_ASYNC.
Add a SDF_RESTART flag to keep state, cleared in sddone().
A mounted disk can now spin down, it will propely spin up at the next access.
2000-05-23 10:20:14 +00:00
drochner 05261ccb43 include "rnd.h" explicitely since the size of sd_softc depends on it
(sd_scsi.c and sd_atapi.c missed it, leading to random memory corruption)
2000-01-22 16:35:25 +00:00
thorpej dc59bc1db3 Update for sys/buf.h/disksort_*() changes. 2000-01-21 23:39:55 +00:00
thorpej f77302e768 Implement detaching SCSI and ATAPI disks. 1999-09-11 21:42:58 +00:00
hannken f04bd56be1 Make `sc_ops->sdo_flush' synchronous. The flags `SDF_FLUSHING' and
`SDF_DIRTY' were never reset because `sddone' doesn't get called from
synchronous scsi commands.
1999-08-26 09:28:17 +00:00
mycroft 04f0dc658c Assign my copyrights to TNF. 1998-08-17 00:49:01 +00:00
thorpej b3b533c44d Keep track if the disk has had done i/o, making it dirty. On last close,
or at shutdown, flush the cache if the disk is still dirty and it support
cache flushing.  Fixes PRs #5588 (Jim Bernard) and #5589 (Justin Gibbs).
1998-08-15 01:10:54 +00:00
drochner 32fce55082 Improve generation of default disklabels:
-store printable product ID in cd's and sd's softc, use it as "typename"
-for this, add a "destination buffer length" argument to scsipi_strvis()
-return ATAPI device type for ATAPI devices
1998-08-05 16:29:04 +00:00
thorpej b121e9e772 Add a shutdown hook for SCSI-2 and higher disks that issues a SYNCHRONIZE CACHE
operation with address 0 length 0, which, according to the SCSI-2 spec, should
be interpreted as "synchronize all remaining blocks beginning at address 0".
1998-06-10 22:17:39 +00:00
enami d0ad49a001 Backout previous change, and rather, remove all protection but the one
actually currently required.  Suggested by Charles M. Hannum.
1998-02-13 08:28:16 +00:00
enami ef09ae656f Fix or add protection for mutiple inclusion. 1998-02-13 04:19:13 +00:00
cgd 3b207eaf83 add support for an ATAPI attachment for 'sd'.
fix 'cd' driver's NCD_SCSI bogosity (was using testing wrong macro!)
clean up in various ways:
* make common atapi_mode_{sense,select}() functions.
* put ATAPI data structures in more sensible headers, split up by
  device type.
* include headers a bit more carefully.
* pass flags to attachment-specific cd functions, and use them.
* get rid of SCSI bits in scsipi_base.h's scsipi_make_xs(), move
  them into the correct place in scsi_base.c.
* fix minor typo in struct name in scsipiconf.h (which was apparently
  never used except in a #define later in the same file).
* use __attribute__ to force 4-byte alignment for xs command store,
  so that architectures trying to bus_space_write_multi_N() (where
  N > 1) that data to a controller won't lose.
* clean up a few comments in typos, and make a few #defines easier to
  understand/maintain.
* rename cd_link.h to cdvar.h (via repository copy).  This is exactly
  what a 'var' file is supposed to be.
1998-01-15 02:21:27 +00:00