aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/rc
Commit message (Collapse)AuthorAgeFilesLines
* Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style.Eivind Eklund1998-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. Notes: svn path=/head/; revision=32726
* Use ENOIOCTL instead of -1 (= ERESTART) for tty ioctls that areBruce Evans1997-12-061-2/+2
| | | | | | | | not handled at a particular level. This fixes mainly restarting of interrupted TIOCDRAINs and TIOCSETA{W,F}s. Notes: svn path=/head/; revision=31577
* Update select -> poll in drivers.Peter Wemm1997-09-141-1/+1
| | | | Notes: svn path=/head/; revision=29368
* Removed unused #includes.Bruce Evans1997-07-201-4/+0
| | | | Notes: svn path=/head/; revision=27555
* Don't depend on gcc's feature of permitting labels that aren't followedBruce Evans1997-07-011-1/+1
| | | | | | | by a statement. Notes: svn path=/head/; revision=27125
* Don't include <sys/ioctl.h> in the kernel. Stage 1: don't includeBruce Evans1997-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. Notes: svn path=/head/; revision=24203
* Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined.Bruce Evans1997-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. Notes: svn path=/head/; revision=24131
* Remove SC_KBD_PROBE_WORKS option and replace it with a simple run-time flagPaul Traina1996-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 Notes: svn path=/head/; revision=19123
* Remove devconf, it never grew up to be of any use.Poul-Henning Kamp1996-09-061-30/+0
| | | | Notes: svn path=/head/; revision=18084
* Removed unused #includes of <i386/isa/icu.h> and <i386/isa/icu.h>. icu.hBruce Evans1996-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). Notes: svn path=/head/; revision=16471
* Clean up -Wunused warnings.Gary Palmer1996-06-121-8/+5
| | | | | | | Reviewed by: bde Notes: svn path=/head/; revision=16322
* Switched from using devfs_add_sw() to using devfs_add_swf()Marc G. Fournier1996-03-281-5/+5
| | | | | | | Reviewed by: julian@freebsd.org Notes: svn path=/head/; revision=14873
* Convert a timeout loop from 100 iterations of 15uS to 50Rodney W. Grimes1996-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) Notes: svn path=/head/; revision=14441
* Add more disc_optim calls to track line disc changesAndrey A. Chernov1995-12-281-0/+3
| | | | Notes: svn path=/head/; revision=13074
* Replaced nxreset by noreset (if the reset function gets called, then theBruce Evans1995-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). Notes: svn path=/head/; revision=12743
* Removed new alias d_size_t for d_psize_t.Bruce Evans1995-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. Notes: svn path=/head/; revision=12731
* Staticize and cleanup.Poul-Henning Kamp1995-12-101-6/+8
| | | | 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-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.. :) Notes: svn path=/head/; revision=12675
* Removed unnecessary #includes of <sys/user.h>. Some of these were justBruce Evans1995-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. Notes: svn path=/head/; revision=12658
* 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/+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 */ Notes: svn path=/head/; revision=12502
* Added `#include "ioconf.h"' to <machine/conf.h> and cleaned up theBruce Evans1995-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. Notes: svn path=/head/; revision=12080
* Moved prototypes for devswitch functions from conf.c and driver sourcesBruce Evans1995-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. Notes: svn path=/head/; revision=12071
* Allow any speed from 0..76800Andrey A. Chernov1995-08-022-28/+8
| | | | | | | | | Reviewed by: Submitted by: Obtained from: Notes: svn path=/head/; revision=9855
* Improve input flow control.Bruce Evans1995-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. Notes: svn path=/head/; revision=9822
* Don't let IXOFF or ECHONL stop the setting of TS_CAN_BYPASS_L_RINT. IXOFFBruce Evans1995-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. Notes: svn path=/head/; revision=9757
* Always wake up writers after clearing TS_BUSY. This will soon beBruce Evans1995-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(). Notes: svn path=/head/; revision=9754
* Obtained from: partly from ancient patches of mine via 1.1.5Bruce Evans1995-07-221-2/+2
| | | | | | | | Give names to the magic tty i/o sleep addresses and use them. This makes it easier to remember what the addresses are for and to keep them unique. Notes: svn path=/head/; revision=9639
* Move the inline code for waking up writers to a new functionBruce Evans1995-07-221-7/+1
| | | | | | | | | | | | | | ttwwakeup(). The conditions for doing the wakeup will soon become more complicated and I don't want them duplicated in all drivers. It's probably not worth making ttwwakeup() a macro or an inline function. The cost of the function call is relatively small when there is a process to wake up. There is usually a process to wake up for large writes and the system call overhead dwarfs the function call overhead for small writes. Notes: svn path=/head/; revision=9626
* Next version, many bugs fixedAndrey A. Chernov1995-06-142-361/+482
| | | | Notes: svn path=/head/; revision=9232
* RISCom/8 driverAndrey A. Chernov1995-05-122-0/+1485
Notes: svn path=/head/; revision=8471