Commit Graph

27 Commits

Author SHA1 Message Date
John Dyson 996c772f58 This is the kernel Lite/2 commit. There are some requisite userland
changes, so don't expect to be able to run the kernel as-is (very well)
without the appropriate Lite/2 userland changes.

The system boots and can mount UFS filesystems.

Untested: ext2fs, msdosfs, NFS
Known problems: Incorrect Berkeley ID strings in some files.
		Mount_std mounts will not work until the getfsent
		library routine is changed.

Reviewed by:	various people
Submitted by:	Jeffery Hsu <hsu@freebsd.org>
1997-02-10 02:22:35 +00:00
Jordan K. Hubbard 1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Bruce Evans 4eb73cdaff Removed all references to b_cylinder (aka b_cylin). It was evil and
hasn't been used for a year or two since disksort() started sorting
on b_pblkno.
1996-12-01 16:34:41 +00:00
Søren Schmidt 7cb29d3394 This update adds the support for != 512 byte sector SCSI devices to
the sd & od drivers. There is also slight changes to fdisk & newfs
in order to comply with different sectorsizes.
Currently sectors of size 512, 1024 & 2048 are supported, the only
restriction beeing in fdisk, which hunts for the sectorsize of
the device.
This is based on patches to od.c and the other system files by
John Gumb & Barry Scott, minor changes and the sd.c patches by
me.
There also exist some patches for the msdos filesys code, but I
havn't been able to test those (yet).

	John Gumb (john@talisker.demon.co.uk)
	Barry Scott (barry@scottb.demon.co.uk)
1996-12-01 11:25:38 +00:00
Joerg Wunsch 83e9a3b6fc Fix the sequence at odopen() time so the driver actually notices if a
medium with another size is being inserted.  Right now, this case was
broken and led to a situation where a medium could only be replaced
with another one of the same size.

Closes PR #kern/1830: Can't mount optical disk...

Submitted by:	akiyama@kme.mei.co.jp (Shunsuke Akiyama)
1996-11-06 17:31:14 +00:00
Poul-Henning Kamp bfbb029d87 Remove devconf, it never grew up to be of any use. 1996-09-06 23:09:20 +00:00
Joerg Wunsch e7e3f60d66 Do not test_unit_ready() before starting the unit... 1996-08-17 20:50:26 +00:00
Peter Wemm 2176b02c56 The sd and od drivers didn't check for negative block numbers (like wd.c
does) before calling dscheck().  dscheck() doesn't appreciate this and
calls Debugger() and returns without setting bp->b_error.

This can happen when there is a casting error and offsets > 2G are
converted to negative off_t's in the disk tools.  (dumpfs used to do this).
1996-08-02 06:10:49 +00:00
Poul-Henning Kamp cba8a5ddd3 Make a "DWIM" function for adding [bc]devsw entries for bdev drivers.
Saves about 280 butes of source per driver, 56 bytes in object size
and another 56 bytes moves from data to bss.

No functional change intended nor expected.

GENERIC should be about one k smaller now :-)
1996-07-23 21:52:43 +00:00
Joerg Wunsch c30bc9dba0 Miscellaneous cleanup and minor fixes by Shunsuke and by me.
. use new-style options
. introduce an option OD_AUTO_TURNOFF
. try to use the native geometry as reported by the drive instead of
  a faked on -- MOs do have a ``classical'' geometry
. make the scsi_start_unit() actually working
. some cosmetic fixes

Submitted by:	akiyama@kme.mei.co.jp (Shunsuke Akiyama)
1996-06-16 19:58:24 +00:00
Gary Palmer c23670e294 Clean up -Wunused warnings.
Reviewed by:		bde
1996-06-12 05:11:41 +00:00
Joerg Wunsch a77032a5a4 This patch updates sys/scsi/od.c:
* Improve ficticious geometry translation.
  * CD compatible ioctl's, CDIOCALLOW, CDIOCPREVENT and CDIOCEJECT.
  * Additional sense code handling for some drives.

Reviewed by:	joerg
Submitted by:	akiyama@kme.mei.co.jp (Shunsuke Akiyama)
1996-05-19 19:26:21 +00:00
Bruce Evans 6ae323519c 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
Justin T. Gibbs 9932c050b9 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 Wemm 4bd4912865 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
Bruce Evans c8f2fe8db8 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
Garrett Wollman 8890984dc9 Convert BOUNCE_BUFFERS and BOUNCEPAGES to new option scheme. 1996-01-05 20:12:53 +00:00
Poul-Henning Kamp f708ef1b9e Another mega commit to staticize things. 1995-12-14 09:55:16 +00:00
Bruce Evans f54d2260b4 Replaced odsize by generic nopsize.
Staticized.

Added prototypes.
1995-12-10 20:19:32 +00:00
Bruce Evans 4439655d52 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
Poul-Henning Kamp d2f265fab8 Julian forgot to make the *devsw structures static. 1995-12-08 23:23:00 +00:00
Julian Elischer 87f6c6625d 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
Julian Elischer 7198bf4725 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 Elischer 53ac6efbd8 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
Poul-Henning Kamp 4b2af45f4b 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
John Dyson 68a2196fad 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
Joerg Wunsch b372e37cdf 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