Commit Graph

567 Commits

Author SHA1 Message Date
bouyer cafe97da38 Another CD drive that doesn't support REQUEST SENSE, from Patrick Welche. 1999-01-26 10:00:08 +00:00
bouyer d86a570eac Add a mitsumi CD that can't handle REQUEST SENSE command. From
Johan Danielsson <joda@pdc.kth.se>.
1999-01-21 10:31:39 +00:00
bouyer d8f58a3506 Move test for SDEV_NOSTARTUNIT quirk from sd.c to scsipi_start().
Add a SDEV_NOSTARTUNIT quirk entry for BCD-16X 1997-04-25", "", "VER 2.2"
CD-rom (from Michael Santos).
1999-01-19 10:57:11 +00:00
bouyer f10115b632 "Memorex CRW-2642" CD-R can't properly handle REQUEST SENSE command.
Add it to the quick table, per PR kern/6844.
1999-01-19 09:31:58 +00:00
thorpej ae8a556ce5 Add missing XS_SELTIMEOUT case in user command completion path, returning
SCCMD_TIMEOUT.  Based on PR #6720, Andreas Wrede.
1999-01-11 22:07:08 +00:00
tron 3fbb44a7bb Make MTIOCRDSPOS, MTIOCSLOCATE, etc. work with write protected tapes.
Patch supplied by Dave Huang in PR kern/5305.
1999-01-10 21:46:39 +00:00
mjacob ec1a086c80 Make the error condition of neither 0x70 or 0x71 error codes a tad
more informative than the lower case 'error code %d'.
1999-01-10 06:26:23 +00:00
thorpej 268eb959c4 Make this compile again after the void * arith changes. 1999-01-09 03:16:17 +00:00
augustss 332d7c138f Avoid arithmetic on `void *' since that's not ANSI C. 1999-01-08 18:10:35 +00:00
is bfb7f2aaf3 Multisession-CD-Support, by Torsten Duwe <duwe@ns.lst.de>. 1999-01-04 15:32:08 +00:00
dbj 3fec12a459 Added parens around ADD_BYTES_LIM() macro definition to protects its
use of the low precedence ?: conditional operator.  This fixes a bug
in scsipi_interpret_sense when printing out debugging info.
1998-12-30 11:17:34 +00:00
leo c81639d273 Change quirk entry: "FX320S", "", " q01" to: "FX320S", "", "q01". This
space does seem to matter...
1998-12-21 21:40:12 +00:00
gibbs c9eb836a6a Return ENODEV when the device capability check fails for MOVE and EXCHANGE
operations.
1998-12-17 22:28:07 +00:00
gibbs 1b30d7e440 Correct the definition of the changer device capabilities page. The
previous definition confused some reserved bytes for exchange capabilities.
1998-12-17 22:27:18 +00:00
bouyer 85078af6c4 Add a new quirk flags, "ADEV_NOSENSE", for devices that don't
handle properly the request sense command. Add <FX320S, , q01> as being
sense-unfriendly in the quirk table.
1998-12-17 13:05:05 +00:00
bouyer 945acd7834 Leave some room for the string-terminating char in temp. buffers.
Pointed out by Scott Presnell (thanks !).
1998-12-16 13:06:52 +00:00
bouyer c37bf0ccb4 Keep track of DMA errors, and downgrade the transert mode (UDMA ->DMA,
DMA->PIO) in case of 2 consecutive errors. Don't downgrade if the
PIO/DMA/UDMA modes were forced by a config flag.
1998-12-16 13:02:03 +00:00
mycroft 95aa0d0b7d Simplify the copy loops a bit. 1998-12-12 16:58:10 +00:00
mjacob 7f5c8f7db2 add Adaptec RAID units as devices that do not return geometry pages 1998-12-10 18:13:29 +00:00
thorpej 10d50739c7 Actually, restructure scsipi_wait_drain() slightly. 1998-12-08 00:26:22 +00:00
thorpej 8ebf1e8824 Remove xs_free_list; it no longer exists. 1998-12-08 00:20:16 +00:00
thorpej 624619a881 When closing, wait for pending xfers to drain before deleting the reference
to the adapter.
1998-12-08 00:19:27 +00:00
thorpej dcc5f32c2b When closing, wait for pending xfers to drain before unlocking the door,
and wait again before deleting the reference to the adapter.
1998-12-08 00:18:46 +00:00
thorpej 1ddd2ffec0 - When allocating a scsipi_xfer, add it to the specified device's
pending_xfers queue.
- When freeing a scsipi_xfer, remove it from the device's pending_xfers
  queue.  If the queue is empty, and SDEV_WAITDRAIN is set, wakeup
  those waiting for the queue to drain.
- Implement scsipi_wait_drain(), which waits for a device's pending_xfers
  queue to drain.
1998-12-08 00:17:21 +00:00
thorpej 98194169ea When allocating a device's scsipi_link, initialize the pending_xfers
queue.
1998-12-08 00:14:41 +00:00
thorpej 126dc6bfcc - Remove the "free_list" member from scsipi_xfer. Add "adapter_q" and
"device_q" TAILQ entries.  The former is for use by the adapter driver,
  as it sees fit.  The latter is for the scsipi middle layer to track
  pending xfers per device.
- Add a pending_xfers queue to scsipi_link, to track pending xfers per
  device.
- Grow scsipi_link's flags to int, and add SDEV_WAITDRAIN, to indicate that
  we're waiting for the pending_xfers queue to empty.
1998-12-08 00:13:58 +00:00
mjacob 337eb43541 NOMODESENSE for all Seagate ST19171- not just FC 1998-12-05 20:52:47 +00:00
mjacob 4b8245a959 Add a max_lun property to match with the max_target property. Shorten
max_target to int16.
1998-12-05 19:41:31 +00:00
mjacob 33fde1ad76 Eliminate the moreluns entry as it makes no sense for fat SCSI busses (e.g,
FC loops). Change the semantics of scsi_probedev so that it returns 1 if
you should continue probing at this target, else 0 for not.

Replace the blanket use of '7' with the use of the new sc_maxlun property
that is now gathered from HBAs. Allocate scsipi_link arrays based upon this.
Fix a really nasty and silly bug that has been there for a while where the
number of first level scsipi_link structures was one less than it needed
to be.
1998-12-05 19:39:23 +00:00
leo bea7038c02 The IOMEGA ZIP 100, J.03 does not grok LUN's. 1998-11-26 13:39:14 +00:00
drochner 3e38051bc5 in wdc_softc: access the per-channel data via a pointer array instead of
an array of fixed-sized channel_softc elements. This way IDE controllers
which more than 1 channel (pciide) can extend the channel data easily
for private needs.
To avoid the double dereference at runtime, change the argument of
wdcstart() to the channel data pointer instead of the array index.
1998-11-21 15:41:41 +00:00
thorpej 6a60e078ee Add adapter reference counting for SCSI and ATAPI devices. 1998-11-20 00:35:39 +00:00
thorpej baec89716d Add a reference to the adapter when the scsibus is opened, and delete it
when it is closed.
1998-11-19 22:28:20 +00:00
thorpej 54b52fb5f6 Add a reference to the adapter before probing the bus, and delete it
once we are done probing.
1998-11-19 22:25:56 +00:00
thorpej 3b068a6c78 Adapt to the new scsipi_adapter interface. 1998-11-19 21:53:32 +00:00
thorpej e87fa217f4 Add support for reference counting and enabling/disabling SCSI and
ATAPI controllers.  This will eventually be used for power management
of e.g. PCMCIA SCSI and IDE controller cards.
1998-11-19 20:08:52 +00:00
thorpej fd684d874c Protect against multiple inclusion. 1998-11-19 03:45:39 +00:00
bouyer 0af9847a2d The ATAPI-specific hack is not needed any more. 1998-11-17 14:46:26 +00:00
bouyer 0d0ff884e5 In atapi_wdc.c, issue a 'REQUEST SENSE' command when appropriate.
Return XS_SENSE when the full sense info has been retrieved, or
XS_SHORTSENSE if only the sense key was available (from the error register)
Make atapi_interpret_sense() deal with this, and call scsipi_interpret_sense()
for XS_SENSE. (XXX sd_interpret_sense() and the ioctl code needs to be made
aware of XS_SHORTSENSE too ! sense hanlding for these is now less broken for
devices that support 'REQUEST SENSE')
All the ATAPI devices I have access to seems to honnor the SENSE_REQUEST
command, but I suspect some ATAPI devices will not (althouh it's mandatory).
The code should be able to deal with this, but is untested ...
1998-11-17 14:45:39 +00:00
bouyer 00d93f776b Rename scsi_interpret_sense() to scsipi_interpret_sense() and move it from
scsi_base.c to scsipi_base.c. Rename the functions from scsi_verbose.c
too, and rename the file itself. Cleaup includes too (scsi_*.h should not
be #included in scsipi_*.h files, which are supposed to be
common to atapi and scsi).
1998-11-17 14:38:42 +00:00
thorpej ed473183ef Define the FORMAT UNIT command, and several related structures. 1998-10-30 02:07:15 +00:00
thorpej c0ba12768e Fix a sight open flags buglet pointed out by Matthias Scheler. 1998-10-20 22:26:04 +00:00
bouyer f6f8ba3446 Allow uk to attach at atapibus. 1998-10-19 12:28:52 +00:00
bouyer 5f723da8af Move the "warning: bcount value is %d after io" message in a WDCDEBUG_PRINT.
Ifdef DIAGNOSTIC, print the above message only if bcount is < 0.
1998-10-19 12:28:03 +00:00
thorpej d153ad6324 Some const poisioning. 1998-10-15 07:06:47 +00:00
thorpej 859b5d88a6 Protect kernel prototypes w/ #ifdef _KERNEL. 1998-10-15 05:11:52 +00:00
thorpej 2ebdceb3f7 Forward decl of struct proc. 1998-10-15 05:10:20 +00:00
bouyer e8322de657 Add a new drive flag, DRIVE_MODE, set when the drive properly reported its
PIO/DMA modes. Don't try a SET_FEATURE if it didn't report its mode.
1998-10-13 15:18:46 +00:00
bouyer 7545a59b8c In debug message, always print controller:channel:drive 1998-10-13 15:02:41 +00:00
bouyer ff0134b99f Properly separate DEBUF_XFERS and DEBUG_FUNCS: DEBUF_XFERS is for data
transfers (may be called often), where DEBUG_FUNCS is for setup functions
(not used for normal contitions).
1998-10-13 09:33:59 +00:00
bouyer da5d0a6f17 pciide.c: don't define WDCDEBUG, so it compiles on alpha. Correct a bogon
in the printing of DMA mode (piix3/4 only)
others: set the debug_mask to 0, so that debug messages are turned off by
default but can be easily turned on.
Reset drive_flags to 0 for unconfigured devices, so that they are ignored
later. For configured devices, reset state to 0 after probe/attach.
1998-10-13 08:59:45 +00:00
kim cd7e3136ad Use ETHERTYPE_ATALK instead of ETHERTYPE_AT. The former seems more common.
Our other constants also use "ATALK".

Added many new ETHERTYPE constants to sys/net/ethertypes.h, including the
ones from libpcap and tcpdump "ethertype.h" files.
1998-10-13 02:34:31 +00:00
enami 13b8051475 Make this file compile again with -DATAPI_DEBUG_PROBE. 1998-10-13 02:09:47 +00:00
bouyer 19fddaeeb5 Merge bouyer-ide 1998-10-12 16:09:10 +00:00
thorpej fe56f257b2 If the adapter returned XS_RESET and the xfer specifies a retry count,
attempt to reissue the command (which was destroyed by the bus reset).

Slightly modified from PR #6090, from Matt Jacob.
1998-10-10 03:42:53 +00:00
thorpej 16cf223098 Enforce open-for-writing on ioctls that change the bus's state.
Implement ioctl pass-through to the host bus adapter, allowing both
SCBUS* ioctls handled at that level and host adapter-specific ioctls
to be implemented.  Implement SCBUSIORESET as a pass-through.

Inspired by PR #6090, from Matt Jacob.
1998-10-10 03:33:01 +00:00
thorpej 45bf57f8a6 Garbage-collect the SCIOCREPROBE and OSCIOCREPROBE ioctls. This is a
bus-oriented command.  (How much sense does it make to open a device
to rescan the bus?!)
1998-10-10 02:35:30 +00:00
thorpej 1e2b6a99ed Implement the SCBUSIOSCAN ioctl. Rescans the bus for new devices. 1998-10-10 02:34:15 +00:00
thorpej e3fb94a7b4 Add the open/close/ioctl entry points for the SCSI bus, i.e. /dev/scsibusN. 1998-10-10 01:14:26 +00:00
thorpej dda872c16a Define an additional host adapter return code, XS_RESET, indicating
that the bus was reset while the command was pending.  The middle
layer may choose to retry the command.
1998-10-10 00:36:13 +00:00
thorpej 29d472f53d Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter.  This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.
1998-10-10 00:28:28 +00:00
thorpej b69841d26a Add a NOSYNCCACHE quirk for the Micropolis 2217-15MQ1091501, as reported
by Matt Jacob, PR #6027.
1998-10-08 20:24:10 +00:00
thorpej 39f4d1c239 Handle devices that have the SDEV_NOSYNCCACHE quirk. 1998-10-08 20:21:13 +00:00
thorpej 7be31bed79 Add a "NOSYNCCACHE" quirk, as suggested by Matt Jacob in PR #6027. 1998-10-08 20:17:52 +00:00
thorpej 6a2b035300 Add a NOLUNS quirk for the Sony CDL1100 changer, from Chris Jones, PR #6238. 1998-10-08 18:46:15 +00:00
is 9d52889ce7 correct obvious typo 1998-09-25 21:50:38 +00:00
scottr c797d52571 SCSI_ASYNCREQ turns out to be redundant; we can simply free the scsipi_xfer
in scsipi_done() if the transfer is asynchronous.  This reduces the size
of the critical section in scsipi_execute_xs() somewhat (in fact,
back to its original size).
1998-09-18 05:53:07 +00:00
scottr 9cf43305cf Define a SCSIPI_XFER_ASYNC macro to test whether a request will be
completed asynchronously.  Eliminate SCSI_ASYNCREQ, which is actually
redundant information.
1998-09-18 05:45:03 +00:00
scottr 4963603d0f Found a race in scsipi_execute_xs(): if an asynchronous transfer completes
(probably due to an interrupt) between the time it is scheduled and the
time we get around to setting the SCSI_ASYNCREQ flag, we can lose the xs.

Fix this by checking to see if the transfer has already completed after
the scsi_cmd function returns SUCCESSFULLY_QUEUED, and just return to the
caller if so.
1998-09-16 05:35:50 +00:00
scottr f2c6836685 Fix a problem uncovered when we started to use the pool allocator to manage
scsipi_xfer structures.

When scsipi_execute_xs() calls the driver's scsi_cmd function, it assumes
that it can still dereference a pointer to the scsipi_xfer struct.  Since
scsipi_done() has already been called, which in turn has called
scsipi_free_xs(), the struct has already been returned the structure to
the pool!  In other words, xs->flags has been compromised, but we are still
testing it.

These changes resolve the problem by doing the following:

- In scsipi_execute_xs(), if the hardware driver's scsi_cmd function
  returns SUCCESSFULLY_QUEUED, set a new flag (SCSI_ASYNCREQ) in xs->flags.
  Since the request will be handled asynchronously, we will need the
  scsipi_xfer struct to be freed in scsipi_done().

  If the hardware driver's scsi_cmd function returns COMPLETE, we now
  simply return any actual errors, or 0 if none occurred.  (Previously,
  we may have returned EJUSTRETURN, of which the sole effect was to
  avoid freeing the scsipi_xfer struct in our caller.)

- In scsipi_done(), only free the scsipi_xfer struct for async requests.
  The contents of the struct will otherwise remain valid until the
  function that initiated the transfer frees it.

With this change, responsibility for freeing the struct now lies in two
places, depending on the type of the request:

- For synchronous requests, the routine calling scsipi_execute_xs()
  must clean up.

- For asynchronous requests, scsipi_done() cleans up (as it always has).

[Note:  this change also corrects a problem with sddump():  scsipi_done()
was attempting to return a static scsipi_xfer struct to the pool!  Since
dumps are performed synchronously, we now handle this correctly.]

This solution was provided by Jason Thorpe, after I got him to look at
some related (but insufficient) attempts of my own.
1998-09-14 05:49:21 +00:00
scottr 10640f1bfc Fix a problem uncovered when we started to use the pool allocator to manage
scsipi_xfer structures.

When scsipi_execute_xs() calls the driver's scsi_cmd function, it assumes
that it can still dereference a pointer to the scsipi_xfer struct.  Since
scsipi_done() has already been called, which in turn has called
scsipi_free_xs(), the struct has already been returned to the pool!  In
other words, xs->flags has been compromised, but we are still testing it.

These changes resolve the problem by doing the following:

- In scsipi_execute_xs(), if the lower-level driver's scsi_cmd function
  returns SUCCESSFULLY_QUEUED and SCSI_NOSLEEP is set in xs->flags, set a
  new flag (SCSI_ASYNCREQ).  This indicates that scsipi_done() should free
  the scsipi_xfer struct.

  If the lower-level driver's scsi_cmd function returns SUCCESSFULLY_QUEUED
  but SCSI_NOSLEEP is not set, we wait (via tsleep()) for the request to
  complete, then fall through to the COMPLETE case.

  If the lower-level driver's scsi_cmd function returns COMPLETE, we now
  simply return any actual errors, or 0 if none occurred.  (Previously,
  we may have returned EJUSTRETURN, of which the sole effect was to
  avoid freeing the scsipi_xfer struct in our caller.  No code seems
  to depend on this behavior, however.)

- In scsipi_done(), only free the scsipi_xfer struct for async requests.
  The contents of the struct will otherwise remain valid until the
  function that initiated the transfer frees it.

With this change, responsibility for freeing the struct now lies in two
places, depending on the type of the request:

- For synchronous requests, the routine calling scsipi_execute_xs()
  must clean up.

- For asynchronous requests, scsipi_done() cleans up (as it always has).

[Note:  this change also corrects a problem with sddump():  scsipi_done()
was attempting to return a static scsipi_xfer struct to the pool!  Since
dumps are performed synchronously, we now handle this correctly.]

This solution was provided by Jason Thorpe, after I got him to look at
some related (but insufficient) attempts of my own.
1998-09-14 05:49:20 +00:00
mjacob 03e28bdbaf keren/6128: add an entry for the TDC 4200. Full density code set isn't known. 1998-09-11 20:10:15 +00:00
mjacob 5c5c3f792f Reflect changes in quirk flags, and also now add case post retrieval
of Inquiry data during probe where SDEV_NOSYNC, SDEV_NOTAG and SDEV_NOWIDE
can be set (with quirk data overriding) per device probed.
1998-09-08 07:34:02 +00:00
mjacob 3805d4f082 Clarify quirk flags somwhat- split SDEV_NOSYNCWIDE into SDEV_NOSYNC and
SDEV_NOWIDE and add SDEV_NOTAG.
1998-09-08 07:32:42 +00:00
mjacob fd97cb265c typo for non-SCSIVERBOSE case 1998-09-02 02:18:48 +00:00
cgd d58173741d kill the last remnants of __BROKEN_INDIRECT_CONFIG. (only the pica port
used it, and it's non-working and apparently slated for replacement.)
1998-08-31 22:28:04 +00:00
explorer 5ae808b38d ss->special could be NULL, so sane would crash the kernel. 1998-08-19 08:40:31 +00:00
thorpej a2cad65f4e Only mark the disk dirty if we write. 1998-08-17 19:30:38 +00:00
mycroft 04f0dc658c Assign my copyrights to TNF. 1998-08-17 00:49:01 +00:00
mycroft 6dc903202f Assign my copyrights to TNF. 1998-08-15 10:10:47 +00:00
mycroft 6d3d8a1350 Make copyright notices with my name consistent. 1998-08-15 03:02:31 +00:00
thorpej 582d4a7856 Should not use SCSI_POLL if the system is not cold. 1998-08-15 01:32:55 +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
thorpej d4a5a3d0ef Run the shutdown hook w/ SCSI_AUTOCONF. 1998-08-12 22:15:57 +00:00
scottr 396881cc5d Eliminate a potential (but not common) NULL dereference. 1998-08-11 05:47:43 +00:00
mjacob 345530343a Responding to an issue brought to my attention- when the device is
opened norewind and 2 filemarks are written at the end a phantom file
is left (just what I was afraid of, but I didn't think about it in
the last delta because somehow I had managed to convince myself that
this was a nonissue. It's not.).

So- in stdone clear ST_WRITTEN for regular reads. In st_close, preserve
the state of ST_WRITTEN, and if no error and 2FM@EOD for this device and
this is a no-rewind open, backspace one filemark. This should preserve
(for this mount session) FILE - FMK - FILE - FMK - FILE ... FILE FMK FMK EOD
sequencing.

This doesn't clean up the case of EOM appends- in this case you *will* still
get (after an MTEOM operation and a write of a file) a phantom empty file,
e.g. FILE - FMK FMK - FILE - FMK FMK EOD *unless* you follow the EOM operation
with an explicit backspace. The trouble is that this makes it difficult for
seamless interchange with other systems which don't necessarily follow.

The preferrable alternative would be to eliminate the 2FM@EOD except for
1/2" Reel tapes, but that has been pretty much nixed within developers.
1998-08-10 16:56:25 +00:00
drochner e2a2525203 fix incorrect length of LOCATE CDB (reported in PR kern/5306 by
Dave Huang <khym@bga.com>)
1998-08-06 10:20:38 +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
mjacob 6e34b79e01 Suggestion from Matthias Drochner: If at close you decide to write
filemark 'coz you opened write only and didn't do anything else,
call st_check_eod to possibly write TWO furshlugginer filemarks.

Also- return any errors from writing filemarks out of stclose.
1998-07-31 17:25:55 +00:00
mjacob b90b2a3798 Several more changes. First of all, move CTRL_MODE to have I/O behaviour
like a no-rewind device. Secondly figure out whether the initial TUR
for a CTRL_MODE open resulted in a tape being actually found (if so,
then do a mount session).

Move the 'sun compatibility' behaviour into stdone && stclose- don't
mark a tape as having been written in stopenm, fer gosh sakes.
1998-07-31 04:00:22 +00:00
thorpej 03ffe0a516 Use the pool allocator for scsipi_xfer structures. 1998-07-31 03:00:51 +00:00
thorpej 3cd681ef27 Typo. 1998-07-31 00:42:31 +00:00
thorpej 34529b444b From cd.c: call disk_unbusy() if we are unable to enqueue our command. 1998-07-30 23:57:07 +00:00
mjacob e404c0efec Some minor comment tweaking.
Also- to be fair and on review, kern/391 isn't really addressed by
the previous commits. In reviewing, I'm embarassed to find that this
talks about reading at EOT. I'm actually going to claim that this
is 'not a bug' or 'fixed already' in that at the end of media (at the
edge of recorded media), you may continuously open the tape (should
you choose to) issue a read, and zero bytes will transfer- this is a
sufficient EOF indicator.
1998-07-30 04:11:43 +00:00
mjacob c45a129a99 Clarify and name some of the 'open' modes. Clarify a few comments. Remove
a now unused variable. Also, remove the restriction against at density
code being greater than the max SCSI 2 density code: 0x80..0xff are the
Vendor Unique codes and most certainly should be allowed. The check for
invalid values should be less than 0 or greater than 255.

Oh- yeah, the previous commit addressed kern/391.
1998-07-30 03:17:22 +00:00
mjacob 7692effeed Make some changes wrt EOM behaviour. Distinguish EIO_PENDING from
EOM_PENDING. Set up a persistent EARLYWARNING behaviour flag. If
set, EOM behaviour forces a 'short read' to signal logical (as
opposed to physical) end of media. The user application may, of
course, do with this information what it will.

The EARLYWARNING behaviour may be enabled/disabled by a MTIOCTOP
operation. The default action is to not have EARLYWARNING enabled-
but this may be reversed by an option ST_ENABLE_EARLYWARN in
the kernel build.
1998-07-30 00:55:20 +00:00
mjacob 4205ca3d2a opt_scsiverbose.h now is opt_scsi.h and contains the defopted
SCSIVERBOSE and the new ST_ENABLE_EARLYWARN.
1998-07-30 00:49:19 +00:00
fvdl d40e353fa6 Add NOLUNS quirk for the UMAX Astra 1220 scanner. 1998-07-30 00:00:06 +00:00
drochner fb28f87855 Remove a check which restricted raw SCSI commands to the "minor 3"
("CTLMODE") subdevice. There are legitimate uses for raw commands with
normal tape handles too.
[I'm not sure if this is a final solution. Administrators might want
to set up a more finegrained policy. However, this should not be mixed
with the "set defaults" semantics of the "CTLMODE" subdevice; another
flag should be used instead (eg execute permission or a minor number bit).]
1998-07-19 18:43:20 +00:00
mjacob 66ea6cc018 Fix for kern/3835: add an sd sense handler. If we get a check condition/sense
data ASC/ASCQ of 0x04/0x01 (logical unit not ready, initialization in progress),
hang out for 5 seconds and return a RETRY THE OPERATION command. If we
get a check condition/sense data ASC/ASCQ of 0x04/0x02 (logical unit not
ready, initialization command required), send a polled/nosleep START UNIT
command and return a RETRY THE OPERATION command if that succeeds.

Don't send a START UNIT to a disk quirked as SDEV_NO_START. Don't send
a START UNIT to removable media. The reason for the latter is to not
just blindly spin up new (maybe changed) media.

I should note that I've successfully made this work with the ISP host
adapter so far. Other host adapters will need some work to be able
to manage or reasonably fail NOSLEEP/POLL commands while in this
state. Alternatively, the internal SCSI midlayer structure has got
to allow for more controlled error recovery (e.g., restart queues
controlled by the target driver).
1998-07-15 20:21:12 +00:00