summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/wt.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* Mass update of isa drivers using compatability shims to usepeter2000-05-281-1/+11
| | | | COMPAT_ISA_DRIVER() so that we can get rid of the evil isa_compat.h table.
* Separate the struct bio related stuff out of <sys/buf.h> intophk2000-05-051-1/+1
| | | | | | | | | | | | | | | <sys/bio.h>. <sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall not be made a nested include according to bdes teachings on the subject of nested includes. Diskdrivers and similar stuff below specfs::strategy() should no longer need to include <sys/buf.> unless they need caching of data. Still a few bogus uses of struct buf to track down. Repocopy by: peter
* Complete the bio/buf divorce for all code below devfs::strategyphk2000-04-151-14/+14
| | | | | | | | | | Exceptions: Vinum untouched. This means that it cannot be compiled. Greg Lehey is on the case. CCD not converted yet, casts to struct buf (still safe) atapi-cd casts to struct buf to examine B_PHYS
* Move B_ERROR flag to b_ioflags and call it BIO_ERROR.phk2000-04-021-1/+1
| | | | | | | | | | | | | (Much of this done by script) Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED. Move b_pblkno and b_iodone_chain to struct bio while we transition, they will be obsoleted once bio structs chain/stack. Add bio_queue field for struct bio aware disksort. Address a lot of stylistic issues brought up by bde.
* Remove B_READ, B_WRITE and B_FREEBUF and replace them with a newphk2000-03-201-3/+4
| | | | | | | | | | | | | | | | | | | | | field in struct buf: b_iocmd. The b_iocmd is enforced to have exactly one bit set. B_WRITE was bogusly defined as zero giving rise to obvious coding mistakes. Also eliminate the redundant struct buf flag B_CALL, it can just as efficiently be done by comparing b_iodone to NULL. Should you get a panic or drop into the debugger, complaining about "b_iocmd", don't continue. It is likely to write on your disk where it should have been reading. This change is a step in the direction towards a stackable BIO capability. A lot of this patch were machine generated (Thanks to style(9) compliance!) Vinum users: Greg has not had time to test this yet, be careful.
* Stop isadma from abusing the B_READ, B_RAW and B_WRITE flags.phk2000-03-131-5/+5
| | | | | Define ISADMA_{READ,WRITE,RAW} macros with the same numeric values as the B_{READ,WRITE,RAW} and use them instead throughout.
* Remove #if NFOO > 0 (it's not required in most cases) and also where itpeter2000-01-291-4/+0
| | | | | isn't used as a result, remove #include "foo.h". Many of these drivers still use NFOO for softc struct sizing etc however.
* Remove five now unused fields from struct cdevsw. They should neverphk1999-09-251-5/+0
| | | | | | | | have been there in the first place. A GENERIC kernel shrinks almost 1k. Add a slightly different safetybelt under nostop for tty drivers. Add some missing FreeBSD tags
* Don't register a bmajor.phk1999-09-081-3/+1
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Convert DEVFS hooks in (most) drivers to make_dev().phk1999-08-231-13/+2
| | | | | | | | | | | | | | | | Diskslice/label code not yet handled. Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers) Add the correct hook for devfs to kern_conf.c The net result of this excercise is that a lot less files depends on DEVFS, and devtoname() gets more sensible output in many cases. A few drivers had minor additional cleanups performed relating to cdevsw registration. A few drivers don't register a cdevsw{} anymore, but only use make_dev().
* Simplify cdevsw registration.phk1999-05-311-20/+5
| | | | | | | | | | | | | | | | | | | | | | | | | The cdevsw_add() function now finds the major number(s) in the struct cdevsw passed to it. cdevsw_add_generic() is no longer needed, cdevsw_add() does the same thing. cdevsw_add() will print an message if the d_maj field looks bogus. Remove nblkdev and nchrdev variables. Most places they were used bogusly. Instead check a dev_t for validity by seeing if devsw() or bdevsw() returns NULL. Move bdevsw() and devsw() functions to kern/kern_conf.c Bump __FreeBSD_version to 400006 This commit removes: 72 bogus makedev() calls 26 bogus SYSINIT functions if_xe.c bogusly accessed cdevsw[], author/maintainer please fix. I4b and vinum not changed. Patches emailed to authors. LINT probably broken until they catch up.
* This commit should be a extensive NO-OP:phk1999-05-301-5/+21
| | | | | | | | | | | | | Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors.
* Introduce two functions: physread() and physwrite() and use these directlyphk1999-05-071-16/+2
| | | | | | in *devsw[] rather than the 46 local copies of the same functions. (grog will do the same for vinum when he has time)
* Fix up a few easy 'assignment used as truth value' and 'suggest parenspeter1999-05-061-11/+21
| | | | | around && within ||' type warnings. I'm pretty sure I have not masked any problems here, I've committed real problem fixes seperately.
* s/static foo_devsw_installed = 0;/static int foo_devsw_installed;/.dt1999-04-281-2/+2
| | | | (Edited automatically)
* Removed unused (slightly wrong) stub functions.bde1998-12-181-21/+5
| | | | Fixed some staticization obfuscations.
* Initialize isa_devtab entries for interrupt handlers in individualbde1998-10-221-2/+4
| | | | | | | device drivers, not in ioconf.c. Use a different hack in isa_device.h so that a new config(8) is not required yet. pc98 parts approved by: kato
* There is no such thing any more as "struct bdevsw".julian1998-07-041-10/+25
| | | | | | | | | | | | | | | | | | There is only cdevsw (which should be renamed in a later edit to deventry or something). cdevsw contains the union of what were in both bdevsw an cdevsw entries. The bdevsw[] table stiff exists and is a second pointer to the cdevsw entry of the device. it's major is in d_bmaj rather than d_maj. some cleanup still to happen (e.g. dsopen now gets two pointers to the same cdevsw struct instead of one to a bdevsw and one to a cdevsw). rawread()/rawwrite() went away as part of this though it's not strictly the same patch, just that it involves all the same lines in the drivers. cdroms no longer have write() entries (they did have rawwrite (?)). tapes no longer have support for bdev operations. Reviewed by: Eivind Eklund and Mike Smith Changes suggested by eivind.
* This commit fixes various 64bit portability problems required fordfr1998-06-071-2/+2
| | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time.
* Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style.eivind1998-01-241-1/+3
| | | | | | | | This introduce an xxxFS_BOOT for each of the rootable filesystems. (Presently not required, but encouraged to allow a smooth move of option *FS to opt_dontuse.h later.) LFS is temporarily disabled, and will be re-enabled tomorrow.
* In all such uses of struct buf: 's/b_un.b_addr/b_data/g'phk1997-12-021-2/+2
|
* Fixed pedantic syntax error (trailing comma in enum).bde1997-08-251-2/+2
|
* Removed unused #includes.bde1997-07-201-4/+1
|
* Don't include <sys/ioctl.h> in the kernel. Stage 1: don't includebde1997-03-241-2/+1
| | | | | it when it is not used. In most cases, the reasons for including it went away when the special ioctl headers became self-sufficient.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | 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.
* Fix a bug in the wt driver that could cause memory corruption.joerg1996-12-231-8/+16
| | | | | | | | | | Closes PR # kern/1065. While i was at it, also reject IO requests that are not an integer multiple of the device blocksize. Submitted by: vak@crox.net.kiae.su (Serge V.Vakulenko) Confirmed by: Georg-W. Koltermann (gwk@cray.com)
* Remove devconf, it never grew up to be of any use.phk1996-09-061-28/+1
|
* Don't depend in the kernel on the gcc feature of doing arithmetic onbde1996-08-311-2/+2
| | | | pointers of type `void *'. Warn about this in future.
* Make a "DWIM" function for adding [bc]devsw entries for bdev drivers.phk1996-07-231-14/+3
| | | | | | | | | 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 :-)
* Update drivers to use isa_dma_acquire() and isa_dma_release()smpatel1996-04-081-1/+5
| | | | Reviewed by: bde
* Switched from using devfs_add_sw() to using devfs_add_swf()scrappy1996-03-281-10/+7
| | | | Reviewed by: julian@freebsd.org
* . move out the error and status register def's for wt intojoerg1996-02-221-22/+45
| | | | | | | <machine/wtio.h>, so mt(1) can print them, . cosmetics: put the return type and the function name onto different lines.
* Allocate DMA bounce buffers only when requested by drivers. Only thebde1996-01-271-1/+2
| | | | | | | | | | | | | | | | | | | fd and wt drivers need bounce buffers, so this normally saves 32K-1K of kernel memory. Keep track of which DMA channels are busy. isa_dmadone() must now be called when DMA has finished or been aborted. Panic for unallocated and too-small (required) bounce buffers. fd.c: There will be new warnings about isa_dmadone() not being called after DMA has been aborted. sound/dmabuf.c: isa_dmadone() needs more parameters than are available, so temporarily use a new interface isa_dmadone_nobounce() to avoid having to worry about panics for fake parameters. Untested.
* MTRETENS for the wt driver. This patch got lost withjoerg1996-01-081-32/+12
| | | | my previous commit.
* Renamed private DEBUG macro to avoid warnings when DEBUG is an option.bde1995-12-221-16/+16
|
* Staticize and cleanup.phk1995-12-101-2/+2
|
* Julian forgot to make the *devsw structures static.phk1995-12-081-3/+3
|
* Pass 3 of the great devsw changesjulian1995-12-081-37/+46
| | | | | | | | | | | | | | | | | | | | | | | 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.. :)
* If you're going to mechanically replicate something in 50 filesjulian1995-11-291-2/+2
| | | | it's best to not have a (compiles cleanly) typo in it! (sigh)
* OK, that's it..julian1995-11-291-14/+29
| | | | | | | | | | | | | | | | | | | | | | | | 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)
* the second set of changes in a move towards getting devices to bejulian1995-11-281-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | totally dynamic. this is only the devices in i386/isa I'll do more tomorrow. they're completely masked by #ifdef JREMOD at this stage... the eventual aim is that every driver will do a SYSINIT at startup BEFORE the probes, which will effectively link it into the devsw tables etc. If I'd thought about it more I'd have put that in in this set (damn) The ioconf lines generated by config will also end up in the device's own scope as well, so ioconf.c will eventually be gutted the SYSINIT call to the driver will include a phase where the driver links it's ioconf line into a chain of such. when this phase is done then the user can modify them with the boot: -c config menu if he wants, just like now.. config will put the config lines out in the .h file (e.g. in aha.h will be the addresses for the aha driver to look.) as I said this is a very small first step.. the aim of THIS set of edits is to not have to edit conf.c at all when adding a new device.. the tabe will be a simple skeleton.. when this is done, it will allow other changes to be made, all teh time still having a fully working kernel tree, but the logical outcome is the complete REMOVAL of the devsw tables. By the end of this, linked in drivers will be exactly the same as run-time loaded drivers, except they JUST HAPPEN to already be linked and present at startup.. the SYSINIT calls will be the equivalent of the "init" call made to a newly loaded driver in every respect. For this edit, each of the files has the following code inserted into it: obviously, tailored to suit.. ----------------------somewhere at the top: #ifdef JREMOD #include <sys/conf.h> #define CDEV_MAJOR 13 #define BDEV_MAJOR 4 static void sd_devsw_install(); #endif /*JREMOD */ ---------------------somewhere that's run during bootup: EVENTUALLY a SYSINIT #ifdef JREMOD sd_devsw_install(); #endif /*JREMOD*/ -----------------------at the bottom: #ifdef JREMOD struct bdevsw sd_bdevsw = { sdopen, sdclose, sdstrategy, sdioctl, /*4*/ sddump, sdsize, 0 }; struct cdevsw sd_cdevsw = { sdopen, sdclose, rawread, rawwrite, /*13*/ sdioctl, nostop, nullreset, nodevtotty,/* sd */ seltrue, nommap, sdstrategy }; static sd_devsw_installed = 0; static void sd_devsw_install() { dev_t descript; if( ! sd_devsw_installed ) { descript = makedev(CDEV_MAJOR,0); cdevsw_add(&descript,&sd_cdevsw,NULL); #if defined(BDEV_MAJOR) descript = makedev(BDEV_MAJOR,0); bdevsw_add(&descript,&sd_bdevsw,NULL); #endif /*BDEV_MAJOR*/ sd_devsw_installed = 1; } } #endif /* JREMOD */
* Remove unused functions and variables, make things static, and other cleanups.phk1995-10-281-3/+5
|
* Fix benign type mismatches in devsw functions. 82 out of 299 devswbde1995-09-081-6/+6
| | | | functions were wrong.
* Submitted by: John Lind (john@starfire.mn.org)julian1995-09-051-1/+21
| | | | | | | | /* + * Code for MTERASE added by John Lind (john@starfire.mn.org) 95/09/02. + * This was very easy due to the excellent structure and clear coding + * of the original driver. + */
* Remove trailing whitespace.rgrimes1995-05-301-7/+7
|
* Add a class field to devconf and mst drivers.wollman1995-04-121-23/+29
| | | | | | | | | | | | For those where it was easy, drivers were also fixed to call dev_attach() during probe rather than attach (in keeping with the new design articulated in a mail message five months ago). For a few that were really easy, correct state tracking was added as well. The `fd' driver was fixed to correctly fill in the description. The CPU identify code was fixed to attach a `cpu' device. The code was also massively reordered to fill in cpu_model with somethingremotely resembling what identifycpu() prints out. A few bytes saved by using %b to format the features list rather than lots of ifs.
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-281-1/+4
| | | | | (except in netccitt, netiso and netns) that I didn't notice when I fixed "all" such warnings before.
OpenPOWER on IntegriCloud