Commit Graph

138 Commits

Author SHA1 Message Date
Bruce Evans
bf25be48a5 Make everything except the unsupported network sources compile cleanly
with -Wnested-externs.
1995-08-16 16:14:28 +00:00
David Greenman
0640d91d78 Set bp->b_actf=NULL for paranoia sake. 1995-08-07 11:56:31 +00:00
Bruce Evans
73145c38cc Change memcmp() to bcmp(). memcmp() isn't declared or implemented
for the kernel, but gcc provides an inline version of it if the
kernel is compiled with -O.

The inline memcmp() is OK for small compares and is better than
the dumb kernel bcmp() in all cases, but it has been hiding the
library memcmp() which is 4 times faster for large compares.
1995-07-25 22:09:06 +00:00
Justin T. Gibbs
31acd246c0 Allow the specification of the controller bus when wiring down scsi buses.
This is performed by using a line similar to:

controller scbus0 at ahc0 bus 1

to wire scbus0 to the second bus on an adaptec 2742T controller.

Reviewed by: Peter Dufault(dufault@hda.com), Rod Grimes(rgrimes@FreeBSD.org)
1995-07-17 23:38:16 +00:00
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
Bruce Evans
d3ebcaeb6b Fix benign function type mismatch. 1995-07-13 16:08:57 +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
Atsushi Murai
634ccfcbf6 Bestmatch check for cd-drive always faild due to additional space
on manufacture and  other items. So it's never probe as MORE_LUNS
after frist SONY entry....
1995-06-14 12:28:32 +00:00
Rodney W. Grimes
9b2e535452 Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
Rodney W. Grimes
b2b795f07c Fix -Wformat warnings from LINT kernel. 1995-05-11 19:26:53 +00:00
John Dyson
40ab35ce04 Added bounce support for user scsi requests.
Reviewed by:	David Greenman
1995-05-09 02:38:15 +00:00
Bruce Evans
d9bf888a1b sdsize() didn't open a device often enough. This caused swap partitions on
slices other than the first slice looked at to be unavailable for swapping.
1995-05-08 16:53:33 +00:00
Peter Dufault
386d2d2de0 Change defintion of unit to minor(dev). Sorry for not
having this in my local build.  Thanks to gpalmer.
1995-05-03 23:53:32 +00:00
Gary Palmer
7493537088 Try to make this work again. Peter's last changes left it like :
loading kernel
worm.o: Undefined symbol `_STUNIT' referenced from text segment

I copied the STUNIT definition from the old scsiconf.c into this file to
work around this problem.
1995-05-03 23:38:20 +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
Bruce Evans
41882e52fb Change dsioctl() interface to allow DIOCSYNCSLICEINFO to update the caller's
slice pointer and to print the device name in error messages.
1995-04-30 15:14:34 +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
Peter Dufault
1b52479293 Submitted by: ache
Fix extra newline during SCSI_VERBOSE.
1995-04-29 17:52:44 +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
Bruce Evans
625fa10a30 Don't export a bogus include to half the universe. 1995-04-23 07:47:12 +00:00
Bruce Evans
8fe25bc123 Declare wakeup() non-implicitly and don't bogusly cast its arg. 1995-04-23 07:39:21 +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
Andrey A. Chernov
0af4664a6c Read of a record smaller then request size always fails
Submitted by: edward@edcom.com
1995-04-11 19:09:31 +00:00
Andrey A. Chernov
20f97715a5 sdattach: print out cyl/hd/sec info in the same format as wd driver does
as default case, very helpful in many cases.
1995-04-10 18:44:49 +00:00
Bruce Evans
3aa12267a5 Add and move declarations to fix all of the warnings from `gcc -Wimplicit'
(except in netccitt, netiso and netns) that I didn't notice when I fixed
"all" such warnings before.
1995-03-28 07:58:53 +00:00
Bruce Evans
a1c6084710 Support disk slices. This involves mainly replacing inline code with
function calls.  Broken tracking of open partitions gets fixed as a side
effect.  Races in sdopen() and sdioctl() become more numerous than before.

Close the device in sdsize().  Media removal could not have worked right
when unused swap devices were held open.  There may now be a problem
with used swap devices not being held open.

Fix ancient operator precedence bug in sddump().  It may have been
possible to attempt dumping to unloaded media.

Remove NetBSD ifdefs.  We're too different now, and the NetBSD driver was
already too different for them to be relevant.

Remove support for soft write protection.  There are no ioctls to set it,
and this driver never set it either.  It was used in the wd driver to
disable writing to unlabelled disk, but we want to support writing to
foreign partitions on unlabeled disks.

Clean up some formatting and restore some old-style function headers.
1995-03-23 16:09:01 +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
David Greenman
edf8a81561 Removed redundant newlines that were in some panic strings. 1995-03-19 14:29:26 +00:00
Bruce Evans
b5e8ce9f12 Add and move declarations to fix all of the warnings from `gcc -Wimplicit'
(except in netccitt, netiso and netns) and most of the warnings from
`gcc -Wnested-externs'.  Fix all the bugs found.  There were no serious
ones.
1995-03-16 18:17:34 +00:00
Peter Dufault
66b0ec7d86 Plug lurking bug when a device returns ASC:ASCQ 0xff:0xff 1995-03-15 22:42:25 +00:00
Peter Dufault
1a084a9abd Change it so it doesn't say "probe0" for SCSI probe "device". 1995-03-15 14:44:01 +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
558b7c23d1 Submitted by: bde@zeta.org.au (Bruce Evans)
Fix it so that calls to extend_get won't dereference 0 when "swap
on sd.." calls sdsize() on systems with no SCSI devices.

This probably really fixes Poul's "boot with no SCSI" problem.
1995-03-06 15:02:13 +00:00
David Greenman
e1acba5ab1 Remove some of my old debugging junk that somehow slipped in under my nose. 1995-03-06 05:36:59 +00:00
Peter Dufault
0f48de1c30 Fix when SCSI_DEBUG turned on. Thanks to Michael Reifenberger. 1995-03-05 20:01:44 +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
Bruce Evans
b09e27e3d0 Remove unused common variable `extended'. 1995-03-04 12:36:55 +00:00
Peter Dufault
1ea3a7260a Make sure there is a device before opening. Fixes NULL access
when opening unattached devices.
1995-03-03 21:38:43 +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
Justin T. Gibbs
45e002218d Add a define for the SCSI_QUEUE_FULL sense message 1995-02-22 01:44:21 +00:00
David Greenman
2f8f2dd5bb >From a week or two ago I got kernel panics as soon as I tried to access my
tape drive. I traced it to sys/scsi/scsi_base.c where some code were added
to print the return values of the sense command. My tape drive returned a
extended flags value of 0x20, so the key that is the lower 4 bits, is 0.
The code uses "key-1" to index into a table and then the kernel go to never-
never land.

Here is a fix for this. Will somebody please apply it?

Submitted by:	John Hay
1995-02-15 07:44:07 +00:00
Poul-Henning Kamp
c70f45100d YFfix. 1995-02-14 06:28:25 +00:00
Poul-Henning Kamp
01c9aaafc4 YFfix. added
errval scsi_probe_busses __P(( int, int, int));
1995-02-14 06:17:23 +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
Andreas Schulz
a4ef0a998a Add the missing forward declaration of chopen. Reported in the
mailinglists some time ago.
1995-01-19 21:02:54 +00:00
Peter Dufault
c3280a6d1a Remove dup biodone and no more SCSIUSER option. 1995-01-19 12:41:36 +00:00
Peter Dufault
04bcc6f58b Ensured all files have copyright and RCS ID variable. 1995-01-08 15:56:10 +00:00
Andreas Schulz
c9082578fa Submitted by: Gerd Truschinski
Removed one semicolon, two are one to much :-). Found by the hc860 compiler
and Gerd Truschinski 8-).
1995-01-08 15:13:40 +00:00