Commit Graph

38 Commits

Author SHA1 Message Date
Justin T. Gibbs
ffc2aaf2d8 Do not set SCSI_NOSLEEP on every tape command (the exception being during
probes).  Apart from there being no reason to set SCSI_NOSLEEP on every
tape command, this prevents controller drivers from sleeping when resources
are fully utilized causing unecessary "Oops not queued" errors.  This is
only noticed for controllers that can run out of resources like the
27/2842 adaptec controllers.  Before this fix, it is almost impossible to
perform extended tape operations if more than one scsi disk is on the
bus with the tape drive with these controllers.  This does not address a
similar problem that could occur if devices are probed while other targets
are active since SCSI_NOSLEEP will still be set in that case.
1995-07-16 09:13:14 +00:00
Joerg Wunsch
6aeb10f748 PR #kern/572:
>Synopsis:       Booting w/scsi tape in drive causes first use to fail

Booting with a tape in a SCSI tape drive will cause the first
use of the tape to fail with the following message:

st0: bad request, must be between 0 and 0.

Submitted by:	mpp@legarto.minn.net (Mike Pritchard)
1995-07-09 08:14:24 +00:00
Rodney W. Grimes
9b2e535452 Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
Peter Dufault
7d613f6a39 Moved unit definitions out of scsiconf.h;
Added CONTROL device that only does user-ioctl and nothing else;
Added protection so user-ioctl requires write access;
Clean up scsiconf.h a little. It needs more work.
1995-05-03 18:09:20 +00:00
Joerg Wunsch
3586bcab62 Finally implement the kernel hook for the "mt eom" command. (The
user-level part has already been commited.)

Note that i've lost the "official" code for this; it went into the
system after 1.1.5.1.  The commited code is my own version, but it has
proven to work for me for more than a year now.
1995-04-29 21:30:29 +00:00
Justin T. Gibbs
a34bad999b Set SCSI_NOSLEEP only when we really need to. This requires an additional
flags parameter to all xxstart routines so that the correct information can
be passed down into the device specific routines.  This is needed to ensure
that ccb/scb allocation routines don't hang.

Submitted by: John Dyson
1995-04-23 22:07:56 +00:00
Peter Dufault
81e01d44ce Added "scsi target" device that can act as a target for scsi transfers
from an initiator
Added Julian's support for residuals.
Added Julian's fixes to the tape driver
Made compile cleanly with -Wall
Reduce boot up output
1995-04-14 15:10:44 +00:00
Peter Dufault
3358f19c6e cd.c: Julian's CD audio cleanup
sd.c: Julian's removal of subdriver requests
st.c, scsi_tape.h: Julian's suport of compressed tape drives

Note: compressed tape drives are still not working fully.

scsiconf.h, scsi_base.c, scsi_driver.c: address problems in probes
and error console logs
1995-03-21 11:21:08 +00:00
Peter Dufault
73d664ca78 1. Add text for ASC/ASCQ
2. Clean up probe messages.  This is how I propose it looks for 2.1 so
if you don't like it you have my e-mail address.
1995-03-15 14:22:12 +00:00
Peter Dufault
f29b7a5d14 1. Change driver signatures to full signature for slice support.
2. Add "pt" (processor type) driver.
3. Add "worm" (Write Once) driver for Jordan.
1995-03-04 20:51:10 +00:00
Peter Dufault
a0520fbaac Reviewed by: gibbs@freefall.cdrom.com julian@freefall.cdrom.com
1. Support for fixed device configuration
2. Hoisted common code to scsi_driver
3. SCSI busses dynamically allocated at boot
4. Reorg'd for LKMs
1995-03-01 22:24:47 +00:00
Jordan K. Hubbard
686c46d225 iodone->biodone; get rid of older call syntax. 1995-02-25 19:11:11 +00:00
Peter Dufault
8be820d189 Split byte packing functions into signed and unsigned versions.
Left most current invocations as signed, though that could be wrong.
1995-01-31 11:41:47 +00:00
Peter Dufault
d1b8cd258b 1. Reject obviously broken CDB command lengths
2. Use "uprintf" (instead of printf) to log the "tape not ready" message
1995-01-24 12:04:56 +00:00
Peter Dufault
7562b0d606 Reviewed by: gibbs@estienne.CS.Berkeley.EDU
Reenabled "SCIOCOMAND" ioctl.
Restructured so low level drivers can easily request retries.
Added preliminary fixed SCSI devices (should be revisited before 2.1)
Added "ssc" device that can have its' (HBA, ID, LUN) set via ioctl.
1995-01-08 13:38:38 +00:00
Poul-Henning Kamp
a31f80dc67 Allocate all scsi-devices on the fly, not just CDs.
Reviewed by:	phk
Submitted by:	rgrimes
1994-12-16 06:03:28 +00:00
Jordan K. Hubbard
7366bf01ab Andreas Klemm's tape erase patches from 1.1.5.1
Submitted by:	andreas
1994-10-28 13:19:42 +00:00
Garrett Wollman
2f86936a07 Finished device configuration database work for all ISA devices (except `ze')
and all SCSI devices (except that it's not done quite the way I want).  New
information added includes:

-	A text description of the device
-	A ``state''---unknown, unconfigured, idle, or busy
-	A generic parent device (with support in the m.i. code)
-	An interrupt mask type field (which will hopefully go away) so that
.	  ``doconfig'' can be written

This requires a new version of the `lsdev' program as well (next commit).
1994-10-23 21:28:03 +00:00
Garrett Wollman
324b24896b all: register devices
cd.c sd.c: implement disk stats
1994-10-19 00:09:47 +00:00
Stefan Eßer
92a25df797 Reviewed by: Julian Elischer / Jordan K. Hubbard
Changes are only effective, if NEW_SCSICONF is defined:

1) Added u_int16 quirks to struct scsi_link for device quirks.
2) Added void *devmodes to struct scsi_link for tape density modes.
3) Modified selectdev() to return first full match (with wildcard).

With this patch all device dependent configuration is done in one place
(scsiconf.c), while there were some specifications in st.c and some
hardware dependent drivers (ie. ncr.c) before.
1994-09-28 20:16:45 +00:00
David Greenman
9aba88bf29 Rather than exclude bounce buffers support with NOBOUNCE, include it
with BOUNCE_BUFFERS. This is more intuitive, and is better for future
multiplatform support. Added BOUNCE_BUFFERS option to the GENERIC and
LINT kernel config files.
1994-08-31 06:17:49 +00:00
David Greenman
3c4dd3568f Added $Id$ 1994-08-02 07:55:43 +00:00
David Greenman
d5e26ef0ef Bounce buffers. From John Dyson with help from me. 1994-03-23 09:16:04 +00:00
Rodney W. Grimes
861e92cb98 Patch from Julian. Commit message by me.
cd.c:
Initialize channel info in CDIOCSETVOL ioctl.
Correct CDIOCSTOP and CDIOCEJCET ioctls to use scsi_stop_unit
instead of scsi_start_unit.
Add CDIOCALLOW and CDIOCPREVENT ioctls.

ch.h:
Return EBUSY instead of ENXIO if the device is already in use.

scsi_base.c:
Add scsi_stop_unit routine.

sd.c:
Add mising indirection through sc_link to sd_get_parms routine
when checking for media loaded.

st.c:
Return EBUSY instead of ENXIO if the device is already in use.
Clear the SDEV_WAITING flag in ststart if we do the wakeup call.
1994-01-29 10:30:41 +00:00
Garrett Wollman
aaf08d94ca Make everything compile with -Wtraditional. Make it easier to distribute
a binary link-kit.  Make all non-optional options (pagers, procfs) standard,
and update LINT to reflect new symtab requirements.

NB: -Wtraditional will henceforth be forgotten.  This editing pass was
primarily intended to detect any constructions where the old code might
have been relying on traditional C semantics or syntax.  These were all
fixed, and the result of fixing some of them means that -Wall is now a
realistic possibility within a few weeks.
1993-12-19 00:55:01 +00:00
Rodney W. Grimes
57bb0ee45f New version of scsi code from Julian 1993-11-18 05:03:27 +00:00
Rodney W. Grimes
1c9af4358a >From: "Andrew A. Chernov, Black Mage" <ache@astral.msk.su>
Date: Wed, 20 Oct 1993 18:28:44 +0300

Editors Note:
	Line ended with comma (``,'') instead of semicolon (``;''),
	this should not have effected the code.
	Submitter made no comments other than it was ``simple''.
1993-10-20 15:49:02 +00:00
Rodney W. Grimes
624dc0c13b Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, some
minor cleanup.  Added $Id$ to files that did not have any version info, etc
1993-10-16 17:21:10 +00:00
Rodney W. Grimes
0e08d66ab8 >From: Julian Elischer <julian@jules.DIALix.oz.au>
Subject: Re: Error reading from DAT (fwd)
Date: Mon, 11 Oct 1993 03:02:39 -40962758 (WST)

Some tapes won't do anything until you tell them to load.
Other tapes think that being asked to load is a great excuse to
make the next command return a "unit attention" (media changed) error.
Since we need to do the load, throw in a dummy instruction to cop the
error.

specifically for DEC DAT drives.
1993-10-11 04:53:23 +00:00
Rodney W. Grimes
968d6ea058 The dynamically allocated struct's where not getting properly initialized
as malloc memory is NOT zerod.  Added bzero's after the malloc calls
to make sure that things are initialized.

>From Julian Elischer
1993-09-20 06:27:06 +00:00
Rodney W. Grimes
57dd4ca1b2 Several fixes to the st driver, for density detection and selection. No
longer have to do the st -f /dev/rst0 blocksize 0 on dat drives!
1993-09-07 15:58:00 +00:00
Rodney W. Grimes
682834bbb5 SCSI code update from Julian 1993-09-05 15:42:22 +00:00
Rodney W. Grimes
a3e4335498 Revised drivers from Julian. Support for generic scsi. Fixed scsi tape (st.c)
problems with respect to multiple tar files on one tape.  Now uses malloc
of data structures to reduce static kernel size.
1993-08-28 03:08:59 +00:00
Rodney W. Grimes
296cbdb15b Fixed printf's so that they announce them selfs correctly (ie aha%d: before
every error message and every probe message).
1993-08-21 20:01:59 +00:00
Rodney W. Grimes
e5cf9f6134 Update scsi code to the latest from Julian. This code is now identical
to the last copy from Julian.  After this commit I will be commiting the
local fixes and makeing diffs to send back to Julian so he can update his
code.

----
From julian@jules.DIALix.oz.au  Thu Aug  5 09:25:23 1993
To: hd@world.std.com, julian@jules.DIALix.oz.au
Cc: nate@bsd.coe.montana.edu
Subject: Re: new scsi

----
From julian@jules.DIALix.oz.au  Sat Aug  7 04:13:17 1993
To: hd@world.std.com (HD Associates)
Cc: nate@bsd.coe.montana.edu
Subject: Re: timeout diffs

Here are the diffs to take the scsi stuff to my latest tree from what
Nate and you received..

the changes remove all the local timeout stuff and use (un)timeout(),

----
From julian@jules.DIALix.oz.au  Sat Aug  7 04:13:45 1993
To: hd@world.std.com (HD Associates)
Cc: nate@bsd.coe.montana.edu, briggs@csugrad.cs.vt.edu

here is a fix for a silly bug in the scsiconf I just sent out
and a similar fix for st.c
1993-08-20 09:23:30 +00:00
Rodney W. Grimes
903a4691a3 Removed tabs from the front of XXU: messages to make it fit the other
messages closer.  Added missing new line to the message about to many
scsi cd drives.
1993-08-06 12:11:52 +00:00
Nate Williams
d97875d4b0 Removed PATCHKIT headers and updated our sources to Julian's with
our patches back in.  Major changes to the Bustek driver and the
Tape driver, the rest are minor.
1993-07-29 11:49:13 +00:00
Rodney W. Grimes
5b81b6b301 Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00