summaryrefslogtreecommitdiffstats
path: root/sys/dev/rc
Commit message (Collapse)AuthorAgeFilesLines
...
* Add $FreeBSD$peter2000-05-011-0/+2
|
* Remove #if NFOO > 0 (it's not required in most cases) and also where itpeter2000-01-291-3/+0
| | | | | isn't used as a result, remove #include "foo.h". Many of these drivers still use NFOO for softc struct sizing etc however.
* Introduce ttyread() and ttywrite() which do the canonical thing.phk1999-09-281-28/+2
| | | | | | Use them in many tty drivers. Reviewed by: julian, bde
* 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
* This patch clears the way for removing a number of tty relatedphk1999-09-251-20/+12
| | | | | | | | | | | | | | | | | | | | | fields in struct cdevsw: d_stop moved to struct tty. d_reset already unused. d_devtotty linkage now provided by dev_t->si_tty. These fields will be removed from struct cdevsw together with d_params and d_maxio Real Soon Now. The changes in this patch consist of: initialize dev->si_tty in *_open() initialize tty->t_stop remove devtotty functions rename ttpoll to ttypoll a few adjustments to these changes in the generic code a bump of __FreeBSD_version add a couple of FreeBSD tags
* Convert DEVFS hooks in (most) drivers to make_dev().phk1999-08-231-17/+0
| | | | | | | | | | | | | | | | 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().
* Fixed null setting of `rc_started'. This was fixed for thebde1999-06-041-7/+2
| | | | | | | | | | corresponding variable `rc_wakeup_started' in rev.1.36 but broken again in rev.1.37. This bug only caused excessive polling (it gave NRC activations for each of the SWI handler and the timeout handler instead of 1 of each). Moved cdevsw attachment from the driver probe routine to the driver attach routine.
* Simplify cdevsw registration.phk1999-05-311-16/+4
| | | | | | | | | | | | | | | | | | | | | | | | | 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-6/+20
| | | | | | | | | | | | | 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.
* Add brackets around && within || to quieten egcs. I've checked the codepeter1999-05-081-6/+6
| | | | and I'm reasonably sure it's right, but I don't have one of the beasties.
* Fix up a few easy 'assignment used as truth value' and 'suggest parenspeter1999-05-061-2/+3
| | | | | 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-1/+1
| | | | (Edited automatically)
* Suser() simplification:phk1999-04-271-2/+2
| | | | | | | | | | | | | | | | | | | 1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in <sys/proc.h>. 3: s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/ The remaining suser_xxx() calls will be scrutinized and dealt with later. There may be some unneeded #include <sys/cred.h>, but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code.
* Use suser() to check for super user rather than examining cr_uid directly.phk1999-01-301-1/+2
| | | | | | Use TTYDEF_SPEED rather than 9600 a couple of places. Reviewed by: bde, with a few grumbles.
* Initialize isa_devtab entries for interrupt handlers in individualbde1998-10-221-1/+5
| | | | | | | 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
* fix handling more than one cardsache1998-09-281-2/+3
| | | | Submitted by: "Sergey V.Dorokhov" <svd@kbtelecom.nalnet.ru>
* Added D_TTY to the cdevswitch flags for all tty drivers. This is requiredbde1998-08-231-7/+8
| | | | | | | | | for the Lite2 fix for always returning EIO in dead_read(). Cleaned up the cdevswitch initializers for all tty drivers. Removed explicit calls to ttsetwater() from all (tty) drivers. ttsetwater() is now called centrally for opens, not just for parameter changes.
* Register tty software interrupt handlers at run time using register_swi()bde1998-08-111-12/+7
| | | | | | | instead of at compile time using ifdefs. Use _swi_null instead of dummycamisr. CAM and dpt should call register_swi() instead of hacking on ihandlers[] directly.
* Fixed null setting of multiple wakeup prevention variable.bde1998-08-101-3/+3
| | | | Fixed printf format errors.
* This commit fixes various 64bit portability problems required fordfr1998-06-071-1/+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.
* Implement the spirit but not the letter of Terrys hot-char patch.phk1998-02-131-6/+1
| | | | | | | The differences Terrys patch and this patch are: * Remove a lot of un-needed comments. * Don't put l_hotchar at the front of stuct linesw, there is no need to. * Use the #defines for the hotchar in the SLIP and PPP line disciplines
* Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style.eivind1998-01-241-0/+2
| | | | | | | | 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.
* Use ENOIOCTL instead of -1 (= ERESTART) for tty ioctls that arebde1997-12-061-2/+2
| | | | | not handled at a particular level. This fixes mainly restarting of interrupted TIOCDRAINs and TIOCSETA{W,F}s.
* Update select -> poll in drivers.peter1997-09-141-1/+1
|
* Removed unused #includes.bde1997-07-201-4/+0
|
* Don't depend on gcc's feature of permitting labels that aren't followedbde1997-07-011-1/+1
| | | | by a statement.
* Don't include <sys/ioctl.h> in the kernel. Stage 1: don't includebde1997-03-241-1/+0
| | | | | it when it is not used. In most cases, the reasons for including it went away when the special ioctl headers became self-sufficient.
* Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined.bde1997-03-231-1/+1
| | | | | Fixed everything that depended on getting fcntl.h stuff from the wrong place. Most things don't depend on file.h stuff at all.
* Remove SC_KBD_PROBE_WORKS option and replace it with a simple run-time flagpst1996-10-231-0/+2
| | | | | | | | | bit (0x0008) in the sc driver configuration line. This way it's easy to boink a generic kernel. Also, document and place in an opt_ file the #define's for overriding which serial port is the system console. Approved by: sos
* Remove devconf, it never grew up to be of any use.phk1996-09-061-30/+0
|
* Removed unused #includes of <i386/isa/icu.h> and <i386/isa/icu.h>. icu.hbde1996-06-181-1/+0
| | | | | | | is only used by the icu support modules and by a few drivers that know too much about the icu (most only use it to convert `n' to `IRQn'). isa.h is only used by ioconf.c and by a few drivers that know too much about isa addresses (a few have to, because config is deficient).
* Clean up -Wunused warnings.gpalmer1996-06-121-8/+5
| | | | Reviewed by: bde
* Switched from using devfs_add_sw() to using devfs_add_swf()scrappy1996-03-281-5/+5
| | | | Reviewed by: julian@freebsd.org
* Convert a timeout loop from 100 iterations of 15uS to 50rgrimes1996-03-091-2/+2
| | | | | | | iterations of 30uS so that really fast systems stop getting timeout messages from the Riscom driver. Reviewed by: ache, peter@nmti.com (Peter da Silva)
* Add more disc_optim calls to track line disc changesache1995-12-281-0/+3
|
* Replaced nxreset by noreset (if the reset function gets called, then thebde1995-12-101-1/+1
| | | | | | | device must be configured. It's hard to tell whether a reset function should be noreset or nullreset since reset functions are never called. Most drivers use nullreset but noreset has the advantage of complaining if somehow gets called).
* Removed new alias d_size_t for d_psize_t.bde1995-12-101-1/+1
| | | | | | | | | | Removed old aliases d_rdwr_t and d_ttycv_t for d_read_t/d_write_t and d_devtotty_t. Sorted declarations of switch functions into switch order. Removed duplicated comments and declarations of nonexistent switch functions.
* Staticize and cleanup.phk1995-12-101-6/+8
|
* Julian forgot to make the *devsw structures static.phk1995-12-081-1/+1
|
* Pass 3 of the great devsw changesjulian1995-12-081-33/+43
| | | | | | | | | | | | | | | | | | | | | | | 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.. :)
* Removed unnecessary #includes of <sys/user.h>. Some of these were justbde1995-12-061-1/+0
| | | | | | | 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.
* If you're going to mechanically replicate something in 50 filesjulian1995-11-291-1/+1
| | | | it's best to not have a (compiles cleanly) typo in it! (sigh)
* OK, that's it..julian1995-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)
* the second set of changes in a move towards getting devices to bejulian1995-11-281-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 */
* Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up thebde1995-11-041-1/+1
| | | | | | | | | | misplaced extern declarations (mostly prototypes of interrupt handlers) that this exposed. The prototypes should be moved back to the driver sources when the functions are staticalized. Added idempotency guards to <machine/conf.h>. "ioconf.h" can't be included when building LKMs so define a wart in bsd.kmod.mk to help guard against including it.
* Moved prototypes for devswitch functions from conf.c and driver sourcesbde1995-11-041-6/+6
| | | | | | | 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.
* Allow any speed from 0..76800ache1995-08-022-28/+8
| | | | | | Reviewed by: Submitted by: Obtained from:
* Improve input flow control.bde1995-07-311-16/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use input buffer watermarks of TTYHOG-512 (high) and (high)*7/8 (low) instead of TTYHOG/2 (high) and TTYHOG/5 (low) to agree with some drivers. 512 is magic and some things depended on TTYHOG/2 >= TTYHOG-512 to work; now they depend on the 512 magic not changing and TTYHOG-512 being significantly larger than 0. This should be handled in ttsetwater(). Separate the decision about whether to do input flow control from doing it. ttyblock() now just starts input flow control (hardware and/or software) and there is a new function ttyunblock() to stop it. The decisions are the same except for the watermark changes and allowing for input expansion for PARMRK. When flushing input, try harder at first to send a start character if required, but give up if the first attempt fails. cy.c, rc.c, sio.c: Simplify: let ttyinput() handle input flow control if it is not being bypassed. Use ttyblock() to start flow control otherwise. rc.c: Use same input flow control test as elsewhere: test in a more efficient order and start flow control at >= highwater instead of at > highwater.
* Don't let IXOFF or ECHONL stop the setting of TS_CAN_BYPASS_L_RINT. IXOFFbde1995-07-291-6/+4
| | | | | is handled at a low level, and ECHONL only applies if ICANON is set, although tty.c sometimes bogusly applies it when ICANON isn't set.
* Always wake up writers after clearing TS_BUSY. This will soon bebde1995-07-291-1/+2
| | | | | | | | | essential when I fix excessive wakeups for output-below-low-water. In cy.c and sio.c, wake up via the driver start routine to also eliminate duplicated code involving the clearing of TS_TTSTOP. Always (except in code to be replaced soon) call driver start routine directly instead of going through ttstart().
OpenPOWER on IntegriCloud