Commit Graph

248 Commits

Author SHA1 Message Date
mycroft e03577c2a4 Slight adjustments for new version of ahc driver. 1996-05-16 04:00:58 +00:00
leo 153c617719 Clear SDEV_MEDIA_LOADED bit on the last close of a device. This causes the
geometry info & the disklabel to be reloaded on each 'first-open' of the
device.
1996-05-14 10:38:47 +00:00
thorpej 1379322cde Print the error code in the "not queued" message, to make debugging
a bit easier, and make sure a newline gets printed.
1996-05-14 00:10:37 +00:00
mycroft 7f0f603f3a Bug fixes from PR 2329, plus a few from me. 1996-05-11 22:21:51 +00:00
christos 0efbe64fb8 Cleanup the rest of the SCSIDEBUG printfs. From Bernd Ernesti. 1996-05-05 19:52:50 +00:00
christos 88c3808921 - SCSIDEBUG printf() fixes. 1996-05-03 19:48:20 +00:00
neil c4b8477b78 Added another quirked SCSI device, re PR 2320 from Manuel Bouyer 1996-05-02 01:09:01 +00:00
christos ffd5576439 remove include of <sys/cpu.h> 1996-04-22 01:44:31 +00:00
christos 3c0096ff79 gcc -Wall delinting: unused variables, assignments inside if's and missing
arguments in printf statements.
1996-04-19 00:02:29 +00:00
thorpej 52fee18c6f New SCSI media changer driver, written from scratch by me. Some
influence from the old driver (written by Stefan Grefen) and from
an autochanger driver written by the Systems Programming Group at the
University of Utah Computer Science Department (currently residing
in src/sys/arch/hp300/dev/ac.c).
1996-04-03 00:25:21 +00:00
christos 9fdd088514 Remove unneeded file.. 1996-03-30 21:49:17 +00:00
christos 94d26d3017 - Eliminate scsi_conf.h
- Fix prototypes
- Fix PR/2248 [Problems with HP scanjet...]
1996-03-30 21:47:00 +00:00
christos beec8ba94c Eliminate scsi_conf.h. 1996-03-30 21:44:50 +00:00
mrg 1180bee580 eliminate unused variables. 1996-03-29 14:50:12 +00:00
cgd 4b535677ab fix pasto: sdminphys -> cdminphys in comment. 1996-03-27 01:11:41 +00:00
mycroft f20498187e SDUNIT -> CDUNIT in last. 1996-03-27 00:48:50 +00:00
mycroft 5ed22a9852 Put back dk_establish() for now. 1996-03-26 22:22:19 +00:00
mycroft 5f57f43753 Increase *OUTSTANDING.
Remove old dk_establish() garbage.
Support the `ancient' bit in both drivers.
1996-03-26 20:32:06 +00:00
mycroft caeb897758 Fix trivial oversight in last. 1996-03-24 07:36:11 +00:00
scottr 3166ff9f2f Add a SDEV_NOLUNS quirk for the Epson OMD-5010 removable MO cartridge drive. 1996-03-21 03:29:40 +00:00
mycroft e819063285 Define a full set of [234][bl]tol() and lto[234][bl]() conversion functions,
inlined.
Use sized types in protocol structures.
Make the definition of scsi_sense_data less ugly.
1996-03-19 03:05:15 +00:00
hpeyerl 9785218963 Fix for NEC D3847 1.6gB drive which reported itself at lun[1-7]. 1996-03-18 16:19:58 +00:00
pk 12bcc82160 Parentheses are your friends. 1996-03-17 02:06:50 +00:00
thorpej 532e997971 New device attachment scheme:
- split softc size and match/attach out from cfdriver into
	  a new struct cfattach.

	- new "attach" directive for files.*.  May specify the name of
	  the cfattach structure, so that devices may be easily attached
	  to parents with different autoconfiguration semantics.
1996-03-17 00:57:14 +00:00
thorpej 8f4177ba60 Add another broken drive that doesn't deal with LUNs properly to The List.
Fixes PR 1961, from Kevin P. Neal.
1996-03-05 01:45:42 +00:00
thorpej a8573feb51 Normalize SCSI autoconfiguration output.
From Chris Demetriou <cgd@NetBSD.ORG>.  Fixes PR #1958.
1996-03-05 00:15:09 +00:00
mycroft ad355be572 Add a SDEV_AUTOSAVE quirk for the DEC RZ55. 1996-02-22 23:37:27 +00:00
mycroft 91e913b297 Handle EOF a little differently. 1996-02-19 00:06:07 +00:00
mycroft c5326f656e Change variable name to avoid GCC warning. 1996-02-18 23:21:48 +00:00
mycroft 2dfda50bb9 Minor tweak; make sure window size is 0 on close. 1996-02-18 20:44:40 +00:00
mycroft 8f0f40e8b3 Missed some prototyping foo. 1996-02-18 20:41:18 +00:00
mycroft 342c383728 Truncate to the window size in ssminphys(), not ssread(). 1996-02-18 20:38:44 +00:00
mycroft 294879d4ee Add SCSI scanner support by Kenneth Stailey and Joachim Koenig-Baltes,
hacked a bit.  Needs more work.
1996-02-18 20:32:40 +00:00
mycroft 23726708b0 Minor change. 1996-02-18 20:30:53 +00:00
jtk 45eee6c55b remove #ifdef notdef made unnecessary by previous changes (PR#1597)
put in missing "if (error)" that caused tape IO to always fail.
(closes PR#2086)
1996-02-17 16:00:22 +00:00
christos 0bc63f486d scsi prototypes 1996-02-14 21:46:52 +00:00
briggs f18f32d2e1 PR#2048. Prototype st_erase(). 1996-02-09 14:51:34 +00:00
briggs e5ece749b2 Handle COMMAND ABORTED by forcing a retry. PR#2003, but with some more
diagnostic info.
1996-01-31 15:16:06 +00:00
thorpej 919f6728ab Accept DIOCEJECT as a synonym for CDIOCEJECT. Implement DIOCLOCK
separately from CDIOCALLOW and CDIOCPREVENT, even though they perform
basically the same function (with a different interface XXX).
1996-01-30 18:28:02 +00:00
thorpej c7a20f0ee3 Implement DIOCLOCK and DIOCEJECT. DIOCEJECT is limited to removable
media.  Fixes PR #1975.
1996-01-30 18:24:47 +00:00
thorpej 8068d9eeb2 Handle cases like the following:
- controller calls scsi_done() with error XS_TIMEOUT
	- scsi_done() calls sddone()
	- sddone() calls disk_unbusy()
	- scsi_done() calls controller to retry command (missing the
	  call to disk_busy())
	- controller calls scsi_done()
	- scsi_done() calls sddone()
	- sddone() calls disk_busy(), which panics because of the imbalance.
Bug noticed by Leo Weppleman, who also suggested this fix; pass an additional
boolean argument ("complete") to the device's "done" routine, with a
value of `0' passed from the previous call to "done", and add an additional
call to "done" when the xfer resources are freed.
1996-01-12 22:43:26 +00:00
pk 59dd89e3b1 LUN deficient device: Tandberg 3600 (Ken Raeburn; PR#1933). 1996-01-12 11:32:37 +00:00
thorpej 5b51ec5cc8 Honor cache request and implement erase command, and add the SCSI tape
device configuration page.  Fixes PRs 807, 1201, and 1705.
From John Kohl <jtk@kolvir.blrc.ma.us>.
1996-01-11 03:36:34 +00:00
thorpej 5b39541e48 New generic disk framework. Highlights:
- New metrics handling.  Metrics are now kept in the new
	  `struct disk'.  Busy time is now stored as a timeval, and
	  transfer count in bytes.

	- Storage for disklabels is now dynamically allocated, so that
	  the size of the disk structure is not machine-dependent.

	- Several new functions for attaching and detaching disks, and
	  handling metrics calculation.

Old-style instrumentation is still supported in drivers that did it before.
However, old-style instrumentation is being deprecated, and will go away
once the userland utilities are updated for the new framework.

For usage and architectural details, see the forthcoming disk(9) manual
page.
1996-01-07 22:01:38 +00:00
pk 0548b8e5ad SCSI sense `info' field is a signed value (from John Kohl; PR#1597). 1996-01-05 16:03:35 +00:00
thorpej 19c3f6d999 Add another broken CD-ROM drive to The List (Chinon CDS-525), per PR #1686.
From Kortelainen Mika <k125374@cs.tut.fi>.
1995-12-31 02:40:53 +00:00
mycroft 89f8e05c10 Trim NULs, in addition to spaces, in scsi_strvis(). 1995-12-11 04:43:01 +00:00
thorpej 1cd2ca323b Remove a couple of now unneeded assignments. 1995-12-07 21:54:24 +00:00
thorpej b6c6d46a82 In sdminphys(), add a comment about the semantics of the "length" field
in a 6-byte read/write cdb (namely, length == 0 really means 256), and
that we handle this conservatively by limiting the transfer to 255 blocks.
*sigh* One just never knows how a pre-scsi-1 device is going to behave.
1995-12-07 19:46:00 +00:00
thorpej c9895db015 In both cd.c and sd.c:
If the read or write request can fit into a 6-byte cdb, then
	use a 6-byte cdb, otherwise use the 10-byte as before.

In sd.c:
	In sdattach(), make a note if the device is "ancient" (i.e.
	inqbuf.version & SID_ANSII == 0).

	Implement sdminphys(): if the device is "ancient", shorten the
	transfer so it will fit into a 6-byte cdb.

These changes have eliminated the rejected read/write requests on my
Sun 3/60 with 2 ESDI disks behind an Emulex MD21.
1995-12-07 19:11:32 +00:00