Commit Graph

337 Commits

Author SHA1 Message Date
scrappy
bbc29d8b33 Fixed a Typo 1996-03-28 16:51:12 +00:00
scrappy
6b05f7bc38 Using devfs_add_devswf() instead of devfs_add_devsw()
Reviewed by:	julian@freebsd.org
1996-03-28 14:33:59 +00:00
bde
15292c18f1 Fixed name of pt device (it has a unit number). devfs still only creates
one.

Added control device.
1996-03-27 20:07:29 +00:00
bde
ae5ec76b92 Fixed group of disk devices (was wheel or games, now operator).
Added scsi control devices.

Converted almost everything that I changed to use devfs_add_devswf()
and verbose id macros.

st.c:
Renamed enrst* to erst* since that's what the current name is (enrst
seems to be an old name).
1996-03-27 18:50:10 +00:00
dg
6bafa8eb11 Fixed some missing int32 -> int32_t 1996-03-10 18:17:54 +00:00
jkh
9053b7cee7 u_int8 -> u_int8_t 1996-03-10 12:52:47 +00:00
gibbs
7bcff6c308 Cleanse the SCSI subsystem of its internally defined types
u_int32, u_int16, u_int8, int32, int16, int8.
	Use the system defined *_t types instead.
1996-03-10 07:13:15 +00:00
peter
648a0b7e64 Fix broken SCSI_DELAY option.. (missing #include "opt_scsi.h")
Pointed out by: Boyd Faulkner <faulkner@asgard.bga.com>
1996-03-09 07:13:57 +00:00
peter
36af890239 Add more options into the conf/options and i386/conf/options.i386 files
and the #include hooks so that 'make depend' is more useful.  This
covers most of the options I regularly use (but not all) and some other
easy ones.
1996-03-02 18:24:13 +00:00
dyson
f8c9275796 More b_flags fixes. 1996-03-02 01:49:51 +00:00
julian
71193c8808 cosmetic fixes plus bring the cdevsw and bdevsw entries
into line with the new form.
1996-02-19 09:36:23 +00:00
julian
df36e66991 allow the default tape unit to try figure out what it is rather than
forcing it to 512 byte blocks....
1996-02-19 09:26:07 +00:00
se
4e3790843d Add: CDU-8003A aka Apple CDROM-300
Submitted by:	Michael Reifenberger <root@totum.plaut.de>
1996-02-17 23:59:24 +00:00
ache
9832501783 Physically ask for leadout entry instead of asking of
last_track + 1 entry, some drives don't understand it
1996-02-13 03:46:48 +00:00
ache
5989a47f15 Recognize NRC MBR-7.4 too 1996-02-12 23:22:33 +00:00
pst
f1c203982f Close kern/614 - wait up to an hour for a tape operation like "fsf" (slow drives) 1996-02-08 06:23:49 +00:00
joerg
0733c31ecf Add a quirk record for the Tandberg 42XX series. Not only that these
drives require ST_Q_SNS_HLP, they also wrongly accept a blocksize of
1024 in the first place (for a QIC-150 cartridge), but complain later
about it.  The hack is to only probe for 512 for them.

Reorder the entries in st_decide_mode() so that QIC >= 525 is properly
accepted as variable blocksize.
1996-02-03 13:31:13 +00:00
ache
b63b177b85 Simplify READTOCENTRYS by removing fake leadout code,
SCSI system do it for us
1996-02-02 23:43:40 +00:00
joerg
80d1c93577 Add the HP4020i CD-R as a known device.
Reorder the CD-R entries in knowndevs[].

Submitted by:	fred@jjarray.umd.edu (Fred Cawthorne)
1996-02-02 22:59:48 +00:00
joerg
512413f13a Add the Emulex MD21 ESDI-to-SCSI bridge as a known device (with more than
one LUN).
Submitted by:	Wilko Bulte
1996-02-02 22:57:27 +00:00
ache
ef1e2af84f I forget the fact that cd_read_toc reads toc header in any case 1996-02-02 20:43:11 +00:00
ache
7f7103ccb2 Remove statement that does nothing now, forget in my prev. commit 1996-02-01 17:35:15 +00:00
ache
9a75e4f35e Oops, pick wrong volume size for leadout entry 1996-02-01 16:22:58 +00:00
jkh
5449dedc98 Add an entry for my HP Model 4020i CDR drive. 1996-01-31 07:32:11 +00:00
ache
836264a27f Don't convert LBA to host order, they must stay in network order
as old code does.
1996-01-30 23:11:06 +00:00
ache
d10ce23ec1 OOPS, forget to adjust starting track to not physically read
leadout entry
1996-01-30 16:38:30 +00:00
ache
a96934e919 Use ntohs/ntohl when reading TOC instead of hardcoded byte swapping.
Put fake entry len for MSF format too.
1996-01-30 16:12:18 +00:00
ache
3a9261ed62 READTOCENTRYS: make fake leadout entry 1996-01-30 14:30:43 +00:00
ache
70d7165a28 READTOCENTRYS: handle 0 and lead out requests, add argument checking 1996-01-30 12:59:00 +00:00
joerg
ecab0dd9b6 Remove redundant declaration for worminit(). Dunno why my config(8)
didn't generate it, but it's supposed to.
1996-01-29 19:46:26 +00:00
gibbs
e8eaf43bfb Prevent media eject on first open and re-enable ejection on last close.
The previous behavior was based on the lifetime of a "mount session"
which isn't very obvious.
1996-01-29 03:19:23 +00:00
joerg
6277e23ae5 Make worm.c compile with -Wall -Werror again.
. remove some unused variables
. declare worminit() right this time, it's actually extern (?)
. use wormminphys(), now that it's already there (hope i've got this right)
1996-01-28 23:33:23 +00:00
julian
5d668e2b8e Submitted by: rich (which one?)
Another special case for probing multi-CD cdrom drives.

2nd try at this patch.
1996-01-28 22:41:44 +00:00
jkh
8b95702b5b Back out the previous change. It's not correct for -current. 1996-01-28 21:51:57 +00:00
jkh
033d53a92b Add an entry for the "MBR-7", whatever that is.
Submitted by:	rich
1996-01-28 20:43:49 +00:00
joerg
d38d2c0ec7 Minor but fatal spelling error when merging my code into -current.
Also declared worminit() to avoid a compiler warning.  Seems that the
other SCSI drivers don't declare XXinit() yet, so perhaps we'd also
create a typedef for these func's.
1996-01-28 09:56:04 +00:00
joerg
a21d8f4598 The Great Merge.
The worm driver is alpha-usable!  I've stuffed everything that is
needed into the kernel driver, including the logic to select
between different vendor's quirks.

Disclaimer: this has by now _only_ been tested on a heavily tweaked
2.0.5R system.  I've done my best to retrofit it into -current, but
i don't have a chance yet to test it in a -current environment.
1996-01-27 17:48:12 +00:00
bde
5be35af9cd First attempt at creating devfs entries for sliced devices. Doesn't
quite work yet, so the heart of it is disabled.

Added bdev and cdev args to dsopen().

drivers:
Fixed device names, links, minor numbers and modes.

wd.c:
Started actually supporting devfs.

diskslice.h:
Added devfs tokens to structs (currently 576 of them per disk! :-().

subr_diskslice.c:
Create devfs entries in dsopen() and (unsuccessfully) attempt to make
them go away at the right times.  DEVFS is #undefed at the start so
that this shouldn't cause problems.
1996-01-27 04:18:15 +00:00
joerg
04d220e90a Fold in my latest changes to the worm driver.
This makes it sorta usable, just for my ``proof-of-concept'' Perl
script i've been posting to freebsd-scsi.  The driver will be
overhauled further, this is just to provide Jordan with a base to
perform testing of his own with his HP burner.  Use entirely at your
own risk, expect a bunch of misburnt CD-R's when using it already in
this very green stage.

Note that by now the driver will only work when the CD-R has already
been in the drive at boot time.
1996-01-20 15:27:36 +00:00
joerg
1814c6d457 Make the "uk" device usable again. The open() always failed due to an internal driver
design problem.
1996-01-20 15:05:55 +00:00
joerg
1fb34dbd86 Bump the timeout in st_load() from 5 to 15 minutes. My Tandberg
TDC3620 takes 4.5 minutes to retenstion a QIC-250 cartridge, so the
5 minutes seem to be too tight.
1996-01-14 16:29:01 +00:00
joerg
183861cb86 Implement the MTRETENS command. 1996-01-08 12:26:15 +00:00
gibbs
17c4ed7010 Add an adapter_softc field to the scsi_link struct. 1996-01-07 19:27:06 +00:00
wollman
06468bb31d Convert BOUNCE_BUFFERS and BOUNCEPAGES to new option scheme. 1996-01-05 20:12:53 +00:00
joerg
f6ea7c4b2e Introduce a wormunit() so the control device will work. 1996-01-02 15:44:00 +00:00
joerg
8a10451060 Use a medium_type field of 0 (Default), instead of the value that was
obtained by the MOSE SENSE command.  SONY drives are too stupid to eat
their own food.

Submitted by:	stu@solaris.com (Stu Phillips)

While i was at it, i've removed two bogus channel numbers in the``set
mono'' command, that kept my Toshiba drive complaining.

Also remove Julian's misspelling of `stereo'.
1995-12-30 13:56:28 +00:00
pst
949e088236 Add NEC CDR 210 to list of devices with broken LUN support 1995-12-27 17:07:12 +00:00
peter
9b73a0890c Add an entry for the NEC CDROM:55 drive to stop it answering all 7 LUNS. 1995-12-26 21:08:39 +00:00
dufault
11b2e460e6 Bruce's fix for when dk_ndrive >= DK_NDRIVE. Fixes CDROM changer
and other "lots of CDROM devices" problems.  This code should be
put in a single place.
1995-12-20 12:02:43 +00:00
phk
826d00f42d Staticize.
Unstaticize a function in scsi/scsi_base that was used, with an undocumented
option.
My last count on the LINT kernel shows:
Total symbols:  3647
unref symbols:   463
undef symbols:     4
1 ref symbols:  1751
2 ref symbols:   485
Approaching the pain threshold now.
1995-12-17 21:23:44 +00:00
bde
964118393b Moved prototypes to better places.
Fixed indentation of some function headers.
1995-12-14 19:51:15 +00:00
bde
a1da7ed79e Added prototypes. 1995-12-14 19:44:29 +00:00
bde
8547a87e7f Declared functions as static in their definitions as well as in their
prototypes.
1995-12-14 19:38:40 +00:00
bde
fbbd7b144b The change of [cb]devsw was missed here. 1995-12-14 19:13:36 +00:00
phk
50d195499f Another mega commit to staticize things. 1995-12-14 09:55:16 +00:00
peter
bb350ca897 Check before dereferencing a possible null pointer (cdevsw[i]->d_open) 1995-12-13 20:08:53 +00:00
julian
c685779913 devsw tables are now arrays of POINTERS to struct [cb]devsw
seems to work hre just fine though  I can't check every file
that changed due to limmited h/w, however I've checked enught to be petty
happy withe hte code..

WARNING... struct lkm[mumble] has changed
so it might be an idea to recompile any lkm related programs
1995-12-13 15:13:57 +00:00
dyson
ebf058dfc1 Undo a change that should not have been committed with the 1Tb enhancements. 1995-12-11 05:02:52 +00:00
dyson
a3d5209b62 Changes to support 1Tb filesizes. Pages are now named by an
(object,index) pair instead of (object,offset) pair.
1995-12-11 04:58:34 +00:00
bde
ea0cc9a845 Replaced nxmmap by nommap (if the mmap function gets called, then the
device must be configured).
1995-12-10 20:34:53 +00:00
bde
94494257e4 Replaced odsize by generic nopsize.
Staticized.

Added prototypes.
1995-12-10 20:19:32 +00:00
bde
4104cf6e31 Replaced cdsize by generic nopsize.
Added prototypes.

Declared statics consistently.
1995-12-10 20:02:47 +00:00
bde
17d4f6e4d5 Replaced nxdump by nodump (if the dump function gets called, then the
device must be configured, so ENXIO is a bogus errno).

Replaced zerosize by nopsize.  zerosize was a temporary alias.
1995-12-10 19:53:42 +00:00
bde
80c0c7435e Removed unused functions sudump() and supsize().
Added `extern' to misplaced public prototypes.
1995-12-10 14:57:04 +00:00
julian
7e21565f06 Make NEW_SCSICONF the default way of doing things
It will need to be changed
but it's the better starting point..

also add '?' to wildcarding in SCSI identification of devices..
so we can catch all PIONEER	CD 6??* devices instead of having
separate entries for the 600, 602, 604X, 624X etc..

it's getting so we should have a small regexp routine in the kernel
maybe just a little one..  matching CDX-6[0-9][0-9][ A-Z] would be better

there will be drastic changes in this
but this is the best starting point..
1995-12-10 10:58:30 +00:00
bde
e06219cfc3 Restored used variable `name[32]' (used by DEVFS).
Completed function declarations and/or added prototypes.
1995-12-10 01:47:34 +00:00
phk
6517b22ba6 scsi_tape.h had some old cruft that looked like missing typedefs or
something.  Cleanup  some lint in sd.c and st.c.
1995-12-09 20:42:38 +00:00
phk
34914741e3 Julian forgot to make the *devsw structures static. 1995-12-08 23:23:00 +00:00
julian
2a6a55ef99 Pass 3 of the great devsw changes
most devsw referenced functions are now static, as they are
in the same file as their devsw structure. I've also added DEVFS
support for nearly every device in the system, however
many of the devices have 'incorrect' names under DEVFS
because I couldn't quickly work out the correct naming conventions.
(but devfs won't be coming on line for a month or so anyhow so that doesn't
matter)

If you "OWN" a device which would normally have an entry in /dev
then search for the devfs_add_devsw() entries and munge to make them right..
check out similar devices to see what I might have done in them in you
can't see what's going on..
for a laugh compare conf.c conf.h defore and after... :)
I have not doen DEVFS entries for any DISKSLICE devices yet as that will be
a much more complicated job.. (pass 5 :)

pass 4 will be to make the devsw tables of type (cdevsw * )
rather than (cdevsw)
seems to work here..
complaints to the usual places.. :)
1995-12-08 11:19:42 +00:00
dg
f102a0eacf Untangled the vm.h include file spaghetti. 1995-12-07 12:48:31 +00:00
bde
81dc8c8855 Removed unnecessary #includes of <sys/user.h>. Some of these were just
to get the definitions of TRUE and FALSE which happen to be defined in
a deeply nested include.

Added nearby #includes of <sys/conf.h> where appropriate.
1995-12-06 23:44:23 +00:00
bde
d0beda5f72 Removed dummy routines sscstrategy(), sscread(), sscwrite() and
sscselect().  Use the standard dummies nostrategy(), noread(),
nowrite() and noselect() instead.

sscread() and sscwrite() returned bogus errnos.  It isn't possible
to return an error from a select routine so noselect() is just as
bogus as sscselect() (it's equivalent to nullselect()).
1995-12-05 19:36:47 +00:00
julian
9ddc7d6b48 fix a couple of stuffups in the worm driver and in other associated scsi files 1995-12-05 07:14:27 +00:00
julian
20e33b6b11 If the open fails, don't mark the device as open (duh!)
symptom:.. once an open of a 'can only open it once' device fails..
you can never open it again, as it was marked open but wasn't open..
1995-12-05 04:41:20 +00:00
pst
e4bc4230d6 Fix support for QIC_3080 drives...it 1/2 worked before. 1995-11-30 07:43:47 +00:00
julian
6458dd5afd If you're going to mechanically replicate something in 50 files
it's best to not have a (compiles cleanly) typo in it! (sigh)
1995-11-29 14:41:20 +00:00
julian
6c979de707 OK, that's it..
That's EVERY SINGLE driver that has an entry in conf.c..
my next trick will be to define cdevsw[] and bdevsw[]
as empty arrays and remove all those DAMNED defines as well..

Each of these drivers has a SYSINIT linker set entry
that comes in very early.. and asks teh driver to add it's own
entry to the two devsw[] tables.

some slight reworking of the commits from yesterday (added the SYSINIT
stuff and some usually wrong but token DEVFS entries to all these
devices.

BTW does anyone know where the 'ata' entries in conf.c actually reside?
seems we don't actually have a 'ataopen() etc...

If you want to add a new device in conf.c
please  make sure I know
so I can keep it up to date too..

as before, this is all dependent on #if defined(JREMOD)
(and #ifdef DEVFS in parts)
1995-11-29 10:49:16 +00:00
bde
6851f5f69a Completed function declarations, added prototypes and removed redundant
declarations.
1995-11-21 15:14:28 +00:00
bde
e5bf7b988b Completed function declarations and/or added prototypes. 1995-11-21 12:55:26 +00:00
bde
27ef45c4e7 Fixed replication error so that this compiles again.
Removed bogus comment and useless braces.
1995-11-21 08:35:49 +00:00
phk
a341547c98 Mega commit for sysctl.
Convert the remaining sysctl stuff to the new way of doing things.
the devconf stuff is the reason for the large number of files.
Cleaned up some compiler warnings while I were there.
1995-11-20 12:42:39 +00:00
dg
ca17300bd6 Trim #includes to those that are necessary; other cosmetic changes. 1995-11-20 02:12:34 +00:00
dyson
c4954db8f7 First set of changes to eliminate the ad-hoc device buffer queues,
replacing them with TAILQ's as appropriate.  The SCSI code is the
first to be changed -- until the changes are complete, both b_act and
b_actf will be in the buf structure.  b_actf will eventually be removed.
1995-11-19 22:22:35 +00:00
asami
e636e7cd44 Minor aesthetics (changed "." to space in "cd present.[a x b records]"
and removed extraneous newline after "can't get the size").
1995-11-15 03:27:14 +00:00
dg
5fc5b3dab8 Set B_BUSY on the private buffer to avoid a panic in biodone when the
I/O completes. Bug apparantly seen when attempting to format SCSI disks.

Submitted by:	Peter Dufault <dufault@hda.com>
1995-11-10 14:54:16 +00:00
dg
5189f32a1e Initialize the 3 remaining elements of the scsi_cmd struct rather than
bzeroing the whole thing in sdstart().
1995-11-06 08:19:24 +00:00
bde
7c859aa27a Replaced bogus macros for dummy devswitch entries by functions.
These functions went away:

	enosys (hasn't been used for some time)
	enxio
	enodev
	enoioctl (was used only once, actually for a vop)

if_tun.c:
Continued cleaning up...

conf.h:
Probably fixed the type of d_reset_t.  It is hard to tell the correct
type because there are no non-dummy device reset functions.

Removed last vestige of ambiguous sleep message strings.
1995-11-06 00:36:19 +00:00
bde
1bc5fa9c2e Moved prototypes for devswitch functions from conf.c and driver sources
to <machine/conf.h>.  conf.h was mechanically generated by
`grep ^d_ conf.c >conf.h'.  This accounts for part of its ugliness.  The
prototypes should be moved back to the driver sources when the functions
are staticalized.
1995-11-04 13:25:33 +00:00
bde
2e74402fec Fixed the type of sscstrategy() (return void).
Removed sscdump() (it was never used).
Removed sscpsize() (it was never used, and returned a bogus value (ENXIO = 6
means a size of 6)).
1995-11-04 11:12:41 +00:00
joerg
25df2e93f1 The "od" driver. While the name is suggesting the use for
magneto-optical devices, it's scope can (and should) be widened to
cover all removable type 0 (direct) devices as well, since this class
of devices is sharing the same principles.  Things like suport for
media eject etc. will be supported later.  (Shunsuke is also working
on the problems arising out of the use of media with physical block
size != 512 bytes (which is not uncommon for MODs).

Submitted by:	 akiyama@kme.mei.co.jp (Shunsuke Akiyama)
1995-10-31 17:25:58 +00:00
joerg
5d7fdd5b04 Include the "od" driver. (Oops, forgot to cvs add the driver file
itself.  Will do this after this commit.)

Make scsiconf more flexible about recognizing ``foreign'' devices.
This part needs to be rewritten some day to allow for matches whithou
strict version number checks, but either Julian as Peter seem to be
too busy right now, so i'm finally commiting the version that's
working for me stable now for several months, as an interim
workaround.

Submitted by: akiyama@kme.mei.co.jp (Shunsuke Akiyama)
1995-10-31 17:21:00 +00:00
phk
00455628d1 Make a lot of things static. 1995-10-21 23:13:11 +00:00
julian
ac7151e313 oops currupted a line by hitting the wrong key..
fix it
1995-10-12 02:05:47 +00:00
julian
3f50cec828 Ack!
sometime around 1.51, the check for minphys dissappeared out of
transfers for disks..
we weren't hecking that the adapter could handle a transfer of
the size we were requesting..
Peter!?
 :)
this explains the rash of failures I've seen reported recently
with "too many DMA segments" on raw devices

(added one for st as well)
1995-10-12 02:02:03 +00:00
joerg
0a24fe2d28 Some bug fixes for the worm driver:
o  don't use polled mode after the device probe phase
o  don't biodone() a NULL buffer pointer
o  increase the timeout for scsi_read_capacity(); WORMs are slooow
o  make WORMMs known to scsiconf at all

This brings the driver in a state where it at least doesn't
immediately panic, nor hangs the controller any more.  Unfortunately,
at least the YAMAHA CDR100 i've been testing with answered my write
attempts with an "Incorrect command sequence" response.  Perhaps other
CD burners might work however.

Reviewed by:	dufault
1995-10-09 15:15:01 +00:00
dufault
2a0cac9f46 Say so if a sense code is vendor specific. 1995-10-01 15:19:05 +00:00
gibbs
7d291942a8 Remove hard coded assumption that SCSI busses have 7 targets.
This change forces the controller drivers to allocate a scsibus_data struct
via a call to scsi_alloc_bus(), fill in the adapter_link field, and optionally
modify any other fields of the struct.  Scsi_alloc_bus() initializes all fields
to the default, so the changes in most drivers are very minimal.  For drivers
that support Wide controllers, the maxtarg field will have to be updated to
allow probing of all targets (for an example, look at the aic7xxx driver).

Scsi_attachdevs() now takes a scsibus_data* as its argument instead of an
sc_link*.  This allows us to expand the role of the scsibus_data struct for
other bus level configuration setings (max number of transactions, current
transaction opennings, etc for better tagged queuing support).

Reviewed by: Rodney Grimes <rgrimes>, Peter Dufault <dufault>, Julian Elischer <julian>
1995-08-23 23:03:34 +00:00
bde
448cbcf132 Make everything except the unsupported network sources compile cleanly
with -Wnested-externs.
1995-08-16 16:14:28 +00:00
dg
c4fa996cb3 Set bp->b_actf=NULL for paranoia sake. 1995-08-07 11:56:31 +00:00
bde
7914954f46 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
gibbs
4a5a148f08 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
gibbs
850e0c35b7 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
bde
2cdf4da661 Fix benign function type mismatch. 1995-07-13 16:08:57 +00:00
joerg
942548eae5 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
amurai
98e7d5c553 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
rgrimes
b6f07b22b2 Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
rgrimes
04efbd5263 Fix -Wformat warnings from LINT kernel. 1995-05-11 19:26:53 +00:00
dyson
afc7be93e8 Added bounce support for user scsi requests.
Reviewed by:	David Greenman
1995-05-09 02:38:15 +00:00
bde
1e23848a89 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
dufault
fd947148d6 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
gpalmer
4120e53577 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
dufault
45b3096e33 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
bde
b982e4a35c 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
10f5e797f5 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
dufault
535c23ccd2 Submitted by: ache
Fix extra newline during SCSI_VERBOSE.
1995-04-29 17:52:44 +00:00
gibbs
ad18e45bfc 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
bde
db8f1d4c9c Don't export a bogus include to half the universe. 1995-04-23 07:47:12 +00:00
bde
364c312409 Declare wakeup() non-implicitly and don't bogusly cast its arg. 1995-04-23 07:39:21 +00:00
dufault
cdd7abf61a 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
ache
0af83b403a Read of a record smaller then request size always fails
Submitted by: edward@edcom.com
1995-04-11 19:09:31 +00:00
ache
5c218cf305 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
bde
2ebb4e5ed8 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
bde
f1674dd31a 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
dufault
08da39fda0 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
dg
e468f7aa17 Removed redundant newlines that were in some panic strings. 1995-03-19 14:29:26 +00:00
bde
69e0f79830 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
dufault
a578c20eb6 Plug lurking bug when a device returns ASC:ASCQ 0xff:0xff 1995-03-15 22:42:25 +00:00
dufault
ce773dca12 Change it so it doesn't say "probe0" for SCSI probe "device". 1995-03-15 14:44:01 +00:00
dufault
8e77b0f653 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
dufault
e13f0833e8 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
dg
c37e317347 Remove some of my old debugging junk that somehow slipped in under my nose. 1995-03-06 05:36:59 +00:00
dufault
0add2e63f8 Fix when SCSI_DEBUG turned on. Thanks to Michael Reifenberger. 1995-03-05 20:01:44 +00:00
dufault
9900bd79b3 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
bde
59a10bf615 Remove unused common variable `extended'. 1995-03-04 12:36:55 +00:00
dufault
266848ffa3 Make sure there is a device before opening. Fixes NULL access
when opening unattached devices.
1995-03-03 21:38:43 +00:00
dufault
325be5ffa7 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
jkh
921208b591 iodone->biodone; get rid of older call syntax. 1995-02-25 19:11:11 +00:00
gibbs
bb4314a0bc Add a define for the SCSI_QUEUE_FULL sense message 1995-02-22 01:44:21 +00:00
dg
905f17b4ab >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
phk
deaea2f54f YFfix. 1995-02-14 06:28:25 +00:00
phk
9221afecab YFfix. added
errval scsi_probe_busses __P(( int, int, int));
1995-02-14 06:17:23 +00:00
dufault
56d5749916 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
dufault
b94160430b 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
ats
55a0d19bda Add the missing forward declaration of chopen. Reported in the
mailinglists some time ago.
1995-01-19 21:02:54 +00:00
dufault
e91ce4826b Remove dup biodone and no more SCSIUSER option. 1995-01-19 12:41:36 +00:00
dufault
25f76dccb4 Ensured all files have copyright and RCS ID variable. 1995-01-08 15:56:10 +00:00
ats
267b61143a 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
dufault
f9dfd17603 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
bde
a46c3ece75 Fix the "wds" count stat. 1994-12-24 09:48:32 +00:00
bde
1fc0e7a59d Really fix the "byte" count stat. `wd's are actually blocks of 32 16-bit
words in dkstat-speak.  `ms's are seconds in dkstat-speak...
1994-12-24 09:19:00 +00:00