summaryrefslogtreecommitdiff
path: root/sys/i386/isa/labpc.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove the LABPC driver.Poul-Henning Kamp2001-02-041-1091/+0
| | | | | | | Doesn't work, no maintainer, more promising code exists elsewhere. Notes: svn path=/head/; revision=71990
* Check return value of malloc correctly and use M_ZERO.David Malone2000-12-031-7/+6
| | | | Notes: svn path=/head/; revision=69547
* Remove unneeded #include <machine/clock.h>Poul-Henning Kamp2000-10-151-1/+0
| | | | Notes: svn path=/head/; revision=67164
* Mass update of isa drivers using compatability shims to usePeter Wemm2000-05-281-2/+9
| | | | | | | COMPAT_ISA_DRIVER() so that we can get rid of the evil isa_compat.h table. Notes: svn path=/head/; revision=61011
* Separate the struct bio related stuff out of <sys/buf.h> intoPoul-Henning Kamp2000-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 Notes: svn path=/head/; revision=60041
* Complete the bio/buf divorce for all code below devfs::strategyPoul-Henning Kamp2000-04-151-45/+45
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=59249
* Move B_ERROR flag to b_ioflags and call it BIO_ERROR.Poul-Henning Kamp2000-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. Notes: svn path=/head/; revision=58934
* Remove B_READ, B_WRITE and B_FREEBUF and replace them with a newPoul-Henning Kamp2000-03-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=58345
* Remove five now unused fields from struct cdevsw. They should neverPoul-Henning Kamp1999-09-251-5/+3
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=51658
* Convert DEVFS hooks in (most) drivers to make_dev().Poul-Henning Kamp1999-08-231-15/+1
| | | | | | | | | | | | | | | | | | | 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(). Notes: svn path=/head/; revision=50254
* Simplify cdevsw registration.Poul-Henning Kamp1999-05-311-18/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=47640
* This commit should be a extensive NO-OP:Poul-Henning Kamp1999-05-301-4/+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. Notes: svn path=/head/; revision=47625
* Introduce two functions: physread() and physwrite() and use these directlyPoul-Henning Kamp1999-05-071-15/+1
| | | | | | | | | in *devsw[] rather than the 46 local copies of the same functions. (grog will do the same for vinum when he has time) Notes: svn path=/head/; revision=46625
* Fix typo - sizeof(struct crtl *) -> sizeof(struct ctrl *).Eivind Eklund1998-12-131-1/+1
| | | | | | | | XXX This still assume that bzero() over a field create null-pointers, which seems a chancy proposition at best. Notes: svn path=/head/; revision=41745
* Ifdefed a conditionally used include.Bruce Evans1998-12-061-2/+4
| | | | | | | | | Don't depend on "implicit int". Don't bloat the data section with labpc_devsw_installed. Notes: svn path=/head/; revision=41564
* Initialize isa_devtab entries for interrupt handlers in individualBruce Evans1998-10-221-1/+3
| | | | | | | | | | 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 Notes: svn path=/head/; revision=40565
* Fixed printf format errors. Only one left in LINT on i386's.Bruce Evans1998-08-241-4/+4
| | | | Notes: svn path=/head/; revision=38505
* There is no such thing any more as "struct bdevsw".Julian Elischer1998-07-041-3/+18
| | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=37389
* This commit fixes various 64bit portability problems required forDoug Rabson1998-06-071-1/+1
| | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=36735
* Support compiling with `gcc -ansi'.Bruce Evans1998-04-151-4/+4
| | | | Notes: svn path=/head/; revision=35210
* Make the debug options new-style.Eivind Eklund1998-01-311-0/+1
| | | | | | | | This also zaps a DPT option from lint; it wasn't referenced from anywhere. Notes: svn path=/head/; revision=32929
* Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style.Eivind Eklund1998-01-241-0/+1
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=32726
* In all such uses of struct buf: 's/b_un.b_addr/b_data/g'Poul-Henning Kamp1997-12-021-5/+5
| | | | Notes: svn path=/head/; revision=31493
* restore a line I accidentally deleted with my callout changes.Justin T. Gibbs1997-09-221-0/+1
| | | | | | | Submitted by: bde@FreeBSD.org Notes: svn path=/head/; revision=29719
* aha1542.c aic6360.c cy.c fd.c ft.cJustin T. Gibbs1997-09-211-3/+8
| | | | | | | | | | | | | | | if_ie.c if_wl.c if_zp.c isa.c isa_device.h labpc.c mcd.c ncr5380.c scd.c seagate.c si.c sio.c tw.c ultra14f.c wcd.c wd.c: Update for changes in the callout interface. apic_vector.s icu_vector.s ipl.s ipl_funcs.c: Add CAM software/hardware interrupt support. Notes: svn path=/head/; revision=29677
* Removed unused #includes.Bruce Evans1997-07-201-4/+0
| | | | Notes: svn path=/head/; revision=27555
* Stop using old compatibility names from buf.hPoul-Henning Kamp1996-10-131-3/+3
| | | | Notes: svn path=/head/; revision=18909
* Remove devconf, it never grew up to be of any use.Poul-Henning Kamp1996-09-061-44/+0
| | | | Notes: svn path=/head/; revision=18084
* A nasty #define, so that we don't use buf->b_actf anymore.Poul-Henning Kamp1996-05-031-0/+1
| | | | Notes: svn path=/head/; revision=15581
* Switched from using devfs_add_sw() to using devfs_add_swf()Marc G. Fournier1996-03-281-6/+5
| | | | | | | Reviewed by: julian@freebsd.org Notes: svn path=/head/; revision=14873
* Staticize and cleanup.Poul-Henning Kamp1995-12-101-18/+10
| | | | Notes: svn path=/head/; revision=12724
* Julian forgot to make the *devsw structures static.Poul-Henning Kamp1995-12-081-1/+1
| | | | Notes: svn path=/head/; revision=12678
* Pass 3 of the great devsw changesJulian Elischer1995-12-081-28/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.. :) Notes: svn path=/head/; revision=12675
* If you're going to mechanically replicate something in 50 filesJulian Elischer1995-11-291-1/+1
| | | | | | | it's best to not have a (compiles cleanly) typo in it! (sigh) Notes: svn path=/head/; revision=12521
* OK, that's it..Julian Elischer1995-11-291-14/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=12517
* the second set of changes in a move towards getting devices to beJulian Elischer1995-11-281-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 */ Notes: svn path=/head/; revision=12502
* Fiddle with <machine/isa_device.h>Poul-Henning Kamp1995-11-141-0/+2
| | | | Notes: svn path=/head/; revision=12298
* Make everything except the unsupported network sources compile cleanlyBruce Evans1995-08-161-2/+2
| | | | | | | with -Wnested-externs. Notes: svn path=/head/; revision=10080
* Return the correct number of I/O ports as part of the probe so that thePeter Dufault1995-07-311-1/+1
| | | | | | | conflict resolution works. Notes: svn path=/head/; revision=9813
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-8/+8
| | | | Notes: svn path=/head/; revision=8876
* Reduce latency by checking FIFO for samples in startPeter Dufault1995-05-021-40/+84
| | | | | | | | | Remove flags by testing register shadow Handle apparent pending interrupt after interrupts disabled. Notes: svn path=/head/; revision=8225
* Renamed "aio.h" as <sys/dataacq.h>.Peter Dufault1995-04-281-1/+2
| | | | Notes: svn path=/head/; revision=8125
* Add National Instruments "LabPC" driverPeter Dufault1995-04-281-0/+1051
Notes: svn path=/head/; revision=8114