Commit Graph

603 Commits

Author SHA1 Message Date
drochner e81d123f6d try to dtrt for sector sizes <DEV_BSIZE (at least, don't divide by 0) 2000-01-25 20:42:33 +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
mjacob 91c88eb52f PR/9271 (from srp@zgi.com)- recognize (indirectly) HP4000s via density
code and do the right QIC type dance (1 FM @EOT, fixed block size).
2000-01-22 04:29:58 +00:00
thorpej dc59bc1db3 Update for sys/buf.h/disksort_*() changes. 2000-01-21 23:39:55 +00:00
mjacob 04b750733c slight change for platform independence 2000-01-21 21:19:57 +00:00
mjacob 7faf9d32ea cleanup SAF-TE attachment code 2000-01-21 21:10:41 +00:00
mjacob 56196ffa4e Nobody said no to adding a pointer to original scsi inquiry data
to the scsibus attach args. Make sure it's nulled for ATAPI. Also,
for scsiconf.c, modify SENA's quirk entry.
2000-01-20 17:10:18 +00:00
mjacob 3bcc285367 add SES driver 2000-01-20 17:07:41 +00:00
mjacob a8f0034523 add SES device 2000-01-20 16:07:43 +00:00
abs 3a63eeee63 newline terminate ss: atatch message - from Roger Brooks 2000-01-19 01:00:07 +00:00
bouyer e51ae5d23a Use SCSIPIRETRIES instead of hard-coded value '2' for number of retries in
common routines. Define SCSIPIRETRIES as 4, so that the command will finally
succeed after several consecutive downgrades from UDMA2 to PIO4.
2000-01-17 17:59:48 +00:00
abs 0f75dd5dc4 allow ioctl() on all scanner device nodes - now SANE can work with ss* driver 2000-01-17 11:25:31 +00:00
bouyer 638e1a6958 Improve the downgrade logic:
- If UDMA 2 is failing try UDMA 1 first, it helps in some cases
- downgrade if we get an error in the first 4000 xfers, or if we get
  4 errors in 4000 xfers if the first 4000 went without troubles.

While I'm there commit a local change I have since some time to get my CD
probed: issue a "blanck" IDENTIFY before the one used to detect slave ghosts,
with my drive the first IDENTIFY following a controller reset fails with an
aborted command ...
2000-01-17 00:01:00 +00:00
mjacob 4cb8fbf10d Print out the contents of an otherwise unreported undecodable
sense data buffer. This helps catch adapter breakage mostly.
2000-01-14 02:40:45 +00:00
nisimura 1775fae985 Add tweaks for TEAC compact cassette tape drive. 2000-01-13 00:18:27 +00:00
mjacob 34721cbe92 Check in the implementation of the ST_MOUNT_DELAY option.
This is an attempt to allow people to change the default configuration
to try harder at 'mounting' a tape. This allows you to specify, in
seconds, the amount of time a non-control unit open will retry
(once per second) the scsipi_test_unit_ready when it tries to mount
the tape. It also turns off the over-verbose error reporting at
this time unless SCSIDEBUG is set.

The reason this is not enabled as a default is that it's a large change
of behaviour. I find it useful to 'try harder' at mounting a tape in
the tape driver, particularly when loaded via a media changer device
rather than specifying the delays in the backup program.
2000-01-12 14:46:43 +00:00
pk 33f192535d <machine/cpu.h> is not needed here. 2000-01-11 15:32:37 +00:00
mjacob 4783eac2b8 add ST_MOUNT_DELAY options for st 2000-01-06 18:28:28 +00:00
mjacob 182c6629c1 oops, bad patch 2000-01-04 22:47:12 +00:00
mjacob c763ef5b5d - If the user application issues an INITIALIZE ELEMENT STATUS which
succeeds, note that we now are valid.

- Don't attempt to try and run initialize element status from interrupt level-
  we don't really support that yet. Also, key more correctly off of ASC/ASCQ
  instead of just the sense key.

- Make the practice of doing an INITIALIZE ELEMENT STATUS automatically when
  we get params (from chopen time even) a policy decision that is not the
  default for now- this can be a dangerous practice as well as time consuming.
  It's dangerous in that you can have a hung open when all you really want
  to do is do a read of parameters- and parameters, including slot status,
  are perfectly fine to read even before an INITIALIZE ELEMENT STATUS is
  done- all the elements whos status your read are going to be marked with
  an exception- so leave it up to the application to decide how important
  this is.
2000-01-04 22:35:57 +00:00
leo 384bdc532b Implement the DIOCKLABEL ioctl. Through this ioctl it it possible keep the
disklabel on the last close or to drop it.
1999-12-23 21:23:19 +00:00
soren b202ac1466 Allow SCSI_DELAY to be shorter than 2 seconds. 1999-11-14 18:06:09 +00:00
matthias b45486b2a2 Make this work again by adding XS_CTL_ASYNC to the SCSI requests in
se_ifstart and se_recv.
1999-11-13 18:03:34 +00:00
bouyer fb8b192c0a Pass xfer->c_bcount instead of sc_xfer->datalen to the device, so that
it gets the rigth len for a request sense (from OpenBSD).
1999-11-04 21:16:53 +00:00
matt 31ba134e32 use __vax__ and __i386__ instead of vax and i386 1999-11-03 20:50:17 +00:00
mycroft 8efdaab402 Fix the size of start_sector, end_sector and end_sector_l0. (I'm just going to
assume the Linux people will also fix this, since I reported it to them.)
1999-10-31 14:03:16 +00:00
bouyer 98b5a519ce In sddump(), check sd->sc_dev.dv_flags once sd has been initialised.
Patch supplied by tsutsui@ceres.dti.ne.jp in kern/8708.
1999-10-30 16:35:12 +00:00
mycroft e45ef6abcd Emulate the Linux DVD_* ioctls(2). This gets us 90% of the way to running the
LiViD DVD player.  (See forthcoming mail to current-users.)
XXX NOTE: We should do something to probe capabilities, rather than allowing
these ioctls on any device.
1999-10-29 15:02:56 +00:00
enami a2369d8e97 Cancel active transfers on aic/wdc detach.
Also makes LS-120 drive works for me again.
1999-10-20 15:22:24 +00:00
ragge 2674b15280 Don't call dk_establish() on vax either. 1999-10-17 09:44:48 +00:00
enami 46f1868fe7 Cosmetic changes. 1999-10-17 06:22:05 +00:00
enami de4b3a819a ENODEV is not a value supposed to be assigned to xs->error. Use
XS_DRIVER_STUFFUP instead.
1999-10-17 06:13:01 +00:00
hwr d5103deed3 Add ad quirk for CDU-561 CD-ROM. From PR kern/8608
by SUNAGAWA Keiki <kei_sun@ba2.so-net.ne.jp>.
1999-10-11 15:28:57 +00:00
hwr eed9db126b Add a quirk to recognize a Toshiba XM-3401TA SCSI CD-ROM as
removable SCSI device. From Matthew Fredette <fredette@mit.edu> in
kern/7438.
1999-10-10 18:49:15 +00:00
mjacob 51a4d18f0f If we're discovering, don't tsleep on lbolt if we had a busy status. 1999-10-06 05:01:05 +00:00
thorpej 16a9d90e17 Cleanup the scsipi_xfer flags:
- `flags' is now gone, replaced with `xs_control' and `xs_status'.
- Massive cleanup of the control flags.  Now we explicitly say that
  a job is to complete asynchronously, rather than relying on side-effects,
  and use a new flag to now that device discovery is being performed.
- Do SCSI device discovery interrupt-driven.
1999-09-30 22:57:52 +00:00
soren 1d04441597 Remove outdated list of density codes. mt(1) has helpful
hints and the SCSI specification has the real, current list.
1999-09-30 12:12:41 +00:00
enami 67e874d814 Allow to detach wdc, atapibus, wd and cd. 1999-09-23 11:04:29 +00:00
enami 31e6da77de Calculate the correct device minor of the first partition. 1999-09-21 03:10:00 +00:00
nathanw 3598bf5251 Add NOLUNS quirk for another Texel CD-ROM revision. 1999-09-19 23:45:28 +00:00
thorpej f77302e768 Implement detaching SCSI and ATAPI disks. 1999-09-11 21:42:58 +00:00
thorpej e8dded5513 Implement a function to kill off all commands pending for a given
scsipi_link.
1999-09-11 21:39:53 +00:00
thorpej 5116cf4fa5 Implement detaching of SCSI busses. 1999-09-11 21:25:26 +00:00
thorpej d622281820 Rework the changer driver a bit:
- Take note of magazine changes, and enqueue "Element Status Changed" events
  that user processes can read or select on.
- Normalize some structure names.
- Report back more status about changer elements:
  * Volume tags (e.g. barcode labels on the backs of your tapes)
  * External device names (for drive units in a changer)
  * Last element a unit of media was moved from
  * Sense information for SCSI changer elements in EXCEPT condition
  * Vendor-specific data if the user requests it.
- Add support for setting volume tags.
1999-09-09 23:24:11 +00:00
hwr 31292f422e Add a quirk for Wangtec SCSI-36 (QIC-120) tape drive.
From Izumi Tsutsiu in PR 8357.
1999-09-09 20:06:52 +00:00
simonb 56a01be374 Fix tyop in a comment. 1999-09-04 09:41:15 +00:00
thorpej 61f3c9356e If scsipi_make_xs() fails, make sure to flag the buffer as error'd,
if provided, and biodone() it.  Callers of scsipi_command() expect
this to be done.
1999-08-28 22:28:35 +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
bouyer 7eb1fae5d3 Add a missing 'return' in previous commit.
Don't use C_NEEDDONE anymore (it's safe to always call scsipi_done()).
1999-08-09 09:49:48 +00:00
mycroft 6b33521af9 Increase several timeouts to 30s. 1999-08-07 02:51:51 +00:00