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>
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.
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 :-)
media in all cases.
Remove SCSI_2_MAX_DENSITY_CODE definition and rely on the device to tell
us if we attempt an invalid setting.
Closes PR 1245.
Submitted by: fredriks@mcs.com a few changes by me.
Changed DEVFS structure devfs_token so that adding the devices is
a simple matter of a 4 line for loop versus 16 lines of code
Reviewed by: julian@freebsd.org
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).
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.
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..
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.. :)
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.
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)
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.
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.
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.
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)
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.
>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)
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.