summaryrefslogtreecommitdiffstats
path: root/sys/dev/rc
Commit message (Collapse)AuthorAgeFilesLines
* Remove #include <sys/dkstat.h>phk2003-02-161-1/+0
|
* Use critical_enter/exit instead of disable/enable_intr to make thisjhb2002-11-081-18/+18
| | | | driver more portable.
* Cast si_drv2 to intptr_t instead of int to quiet warnings.jhb2002-10-251-1/+1
| | | | | Tested on: alpha Reported by: marcel (on an ia64)
* - New-bussify the rc(4) device driver.jhb2002-10-232-481/+610
| | | | | | | | | | | | - Add detach support to the driver so that you can kldunload the module. Note that currently rc_detach() fails to detach a unit if any of its child devices are open, thus a kldunload will fail if any of the tty devices are currently open. - sys/i386/isa/ic/cd180.h was moved to sys/dev/ic/cd180.h as part of this change. Requested by: rwatson Tested by: rwatson
* Be consistent about funtions being static.phk2002-10-161-2/+4
| | | | Spotte by: FlexeLint.
* Off-by-128 error in the cuam* device node numbers.rwatson2002-05-201-1/+1
|
* Bump the rc driver a little bit closer to the 21st century: userwatson2002-05-201-0/+6
| | | | | | | make_dev() to create device nodes for each of the serial port channels (ttym%d and cuam%d respectively, as borrowed from MAKEDEV). This allows the rc driver to work in 5.0. I've tested it with only one card, but will try sticking in a second card tomorrow and see what happens.
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-011-2/+2
| | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@
* Fixed some style bugs in the removal of __P(()). The main ones werebde2002-03-231-2/+2
| | | | | | not removing tabs before "__P((", and not outdenting continuation lines to preserve non-KNF lining up of code with parentheses. Switch to KNF formatting and/or rewrap the whole prototype in some cases.
* Remove __P.alfred2002-03-201-14/+14
|
* Change the preemption code for software interrupt thread schedules andjhb2002-01-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mutex releases to not require flags for the cases when preemption is not allowed: The purpose of the MTX_NOSWITCH and SWI_NOSWITCH flags is to prevent switching to a higher priority thread on mutex releease and swi schedule, respectively when that switch is not safe. Now that the critical section API maintains a per-thread nesting count, the kernel can easily check whether or not it should switch without relying on flags from the programmer. This fixes a few bugs in that all current callers of swi_sched() used SWI_NOSWITCH, when in fact, only the ones called from fast interrupt handlers and the swi_sched of softclock needed this flag. Note that to ensure that swi_sched()'s in clock and fast interrupt handlers do not switch, these handlers have to be explicitly wrapped in critical_enter/exit pairs. Presently, just wrapping the handlers is sufficient, but in the future with the fully preemptive kernel, the interrupt must be EOI'd before critical_exit() is called. (critical_exit() can switch due to a deferred preemption in a fully preemptive kernel.) I've tested the changes to the interrupt code on i386 and alpha. I have not tested ia64, but the interrupt code is almost identical to the alpha code, so I expect it will work fine. PowerPC and ARM do not yet have interrupt code in the tree so they shouldn't be broken. Sparc64 is broken, but that's been ok'd by jake and tmm who will be fixing the interrupt code for sparc64 shortly. Reviewed by: peter Tested on: i386, alpha
* KSE Milestone 2julian2001-09-121-9/+9
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Remove unneeded includes of sys/ipl.h and machine/ipl.h.jhb2001-05-151-2/+0
|
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-261-1/+0
| | | | the bit-bucket.
* Extend kqueue down to the device layer.jlemon2001-02-151-2/+3
| | | | Backwards compatible approach suggested by: peter
* Catch up to the new swi API.jhb2001-02-091-7/+6
|
* Move suser() and suser_xxx() prototypes and a related #define fromphk2000-10-291-1/+0
| | | | | | | | | <sys/proc.h> to <sys/systm.h>. Correctly document the #includes needed in the manpage. Add one now needed #include of <sys/systm.h>. Remove the consequent 48 unused #includes of <sys/proc.h>.
* Catch up to the new software interrupt code.jhb2000-10-251-3/+4
| | | | Noticed by: phk
* - Overhaul the software interrupt code to use interrupt threads for eachjhb2000-10-251-5/+8
| | | | | | | | | | | | | | | | | | | type of software interrupt. Roughly, what used to be a bit in spending now maps to a swi thread. Each thread can have multiple handlers, just like a hardware interrupt thread. - Instead of using a bitmask of pending interrupts, we schedule the specific software interrupt thread to run, so spending, NSWI, and the shandlers array are no longer needed. We can now have an arbitrary number of software interrupt threads. When you register a software interrupt thread via sinthand_add(), you get back a struct intrhand that you pass to sched_swi() when you wish to schedule your swi thread to run. - Convert the name of 'struct intrec' to 'struct intrhand' as it is a bit more intuitive. Also, prefix all the members of struct intrhand with 'ih_'. - Make swi_net() a MI function since there is now no point in it being MD. Submitted by: cp
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* Made this file compile again after move of stuff from <machine.ipl.h>bde2000-10-081-1/+2
| | | | to <sys/ipl.h>.
* Mass update of isa drivers using compatability shims to usepeter2000-05-281-2/+7
| | | | COMPAT_ISA_DRIVER() so that we can get rid of the evil isa_compat.h table.
* 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.
OpenPOWER on IntegriCloud