summaryrefslogtreecommitdiff
path: root/sys/dev/rc
AgeCommit message (Collapse)Author
2020-07-30remove some long abandonded serial drivers (cy, rc, rp) since 2008John-Mark Gurney
Reviewed by: phk (earlier version) Reviewed by: emaste (earlier version) Reviewed by: bcr (earlier version) Reviewed by: zeising (earlier version) Differential Revision: https://reviews.freebsd.org/D25874 Notes: svn path=/head/; revision=363683
2019-03-06Drop "All rights reserved" from my copyright statements.John Baldwin
Reviewed by: rgrimes MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D19485 Notes: svn path=/head/; revision=344855
2017-11-27sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326255
2016-05-03sys/dev: minor spelling fixes.Pedro F. Giffuni
Most affect comments, very few have user-visible effects. Notes: svn path=/head/; revision=298955
2016-04-19sys/dev: use our nitems() macro when it is avaliable through param.h.Pedro F. Giffuni
No functional change, only trivial cases are done in this sweep, Drivers that can get further enhancements will be done independently. Discussed in: freebsd-current Notes: svn path=/head/; revision=298307
2016-02-27Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().Justin Hibbits
Most calls to bus_alloc_resource() use "anywhere" as the range, with a given count. Migrate these to use the new bus_alloc_resource_anywhere() API. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D5370 Notes: svn path=/head/; revision=296137
2007-02-23o break newbus api: add a new argument of type driver_filter_t toPaolo Pisati
bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@ Notes: svn path=/head/; revision=166901
2005-10-26- Use swi_remove() to teardown swi handlers rather thanJohn Baldwin
intr_event_remove_handler(). - Remove tty: prefix from a couple of swi handler names. Notes: svn path=/head/; revision=151700
2005-10-26Catch up with new interrupt handling code.Ruslan Ermilov
Notes: svn path=/head/; revision=151690
2005-10-16Eliminate two unused arguments to ttycreate().Poul-Henning Kamp
Notes: svn path=/head/; revision=151383
2005-01-06Start each of the license/copyright comments with /*-, minor shuffle of linesWarner Losh
Notes: svn path=/head/; revision=139749
2004-10-07Use generic ttycode instead of local copy.Poul-Henning Kamp
Notes: svn path=/head/; revision=136210
2004-07-15Preparation commit for the tty cleanups that will follow in the nearPoul-Henning Kamp
future: rename ttyopen() -> tty_open() and ttyclose() -> tty_close(). We need the ttyopen() and ttyclose() for the new generic cdevsw functions for tty devices in order to have consistent naming. Notes: svn path=/head/; revision=132226
2004-07-11Introduce ttygone() which indicates that the hardware is detached.Poul-Henning Kamp
Move dtrwait logic to the generic TTY level. Notes: svn path=/head/; revision=131981
2004-06-30Define the tty methods as typedefs.Poul-Henning Kamp
Change the return type for t_break to void. Add t_ioctl (more about this later). Notes: svn path=/head/; revision=131373
2004-06-26Pick the hotchar out of the tty structure instead of caching privatePoul-Henning Kamp
copies. No current line disciplines have a dynamically changing hotchar, and expecting to receive anything sensible during a change in ldisc is insane so no locking of the hotchar field is necessary. Notes: svn path=/head/; revision=131134
2004-06-25Use generic support for BREAK and modem control ioctlsPoul-Henning Kamp
Notes: svn path=/head/; revision=131096
2004-06-16Do the dreaded s/dev_t/struct cdev */Poul-Henning Kamp
Bump __FreeBSD_version accordingly. Notes: svn path=/head/; revision=130585
2004-06-04Centralize the line discipline optimization determination in a functionPoul-Henning Kamp
called ttyldoptim(). Use this function from all the relevant drivers. I belive no drivers finger linesw[] directly anymore, paving the way for locking and refcounting. Notes: svn path=/head/; revision=130096
2004-06-04Manual edits to change linesw[]-frobbing to ttyld_*() calls.Poul-Henning Kamp
Notes: svn path=/head/; revision=130095
2004-06-04Machine generated patch which changes linedisc calls from accessingPoul-Henning Kamp
linesw[] directly to using the ttyld...() functions The ttyld...() functions ar inline so there is no performance hit. Notes: svn path=/head/; revision=130077
2004-06-04Make the remaining serial drivers call ttyioctl() rather than callingPoul-Henning Kamp
the linedisc directly. Notes: svn path=/head/; revision=130057
2004-06-01There is no need to explicitly call the stop function. In all likelyhoodPoul-Henning Kamp
->l_close() did it and ttyclose certainly will. Notes: svn path=/head/; revision=129939
2004-05-30Add missing <sys/module.h> includesPoul-Henning Kamp
Notes: svn path=/head/; revision=129879
2004-03-17Convert callers to the new bus_alloc_resource_any(9) API.Nate Lawson
Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Notes: svn path=/head/; revision=127135
2004-02-21Device megapatch 4/6:Poul-Henning Kamp
Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags. Notes: svn path=/head/; revision=126080
2004-02-21Device megapatch 3/6:Poul-Henning Kamp
Add missing D_TTY flags to various drivers. Complete asserts that dev_t's passed to ttyread(), ttywrite(), ttypoll() and ttykqwrite() have (d_flags & D_TTY) and a struct tty pointer. Make ttyread(), ttywrite(), ttypoll() and ttykqwrite() the default cdevsw methods for D_TTY drivers and remove the explicit initializations in various drivers cdevsw structures. Notes: svn path=/head/; revision=126078
2004-02-21Device megapatch 1/6:Poul-Henning Kamp
Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number. Notes: svn path=/head/; revision=126076
2003-08-07Consistently use the BSD u_int and u_short instead of the SYSV uint andJohn Baldwin
ushort. In most of these files, there was a mixture of both styles and this change just makes them self-consistent. Requested by: bde (kern_ktrace.c) Notes: svn path=/head/; revision=118607
2003-03-05Make TTYHOG tunable.David Schultz
Reviewed by: mike (mentor) Notes: svn path=/head/; revision=111899
2003-03-03Make nokqfilter() return the correct return value.Poul-Henning Kamp
Ditch the D_KQFILTER flag which was used to prevent calling NULL pointers. Notes: svn path=/head/; revision=111821
2003-03-03Gigacommit to improve device-driver source compatibility betweenPoul-Henning Kamp
branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl) Notes: svn path=/head/; revision=111815
2003-03-02More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).Dag-Erling Smørgrav
Notes: svn path=/head/; revision=111748
2003-02-26Move an optimization check so that it breaks out of the correct loop.John Baldwin
Basically, as soon as we have run out of events to handle in the swi, we stop looping through all the channels in a for loop. Notes: svn path=/head/; revision=111564
2003-02-16Remove #include <sys/dkstat.h>Poul-Henning Kamp
Notes: svn path=/head/; revision=111002
2002-11-08Use critical_enter/exit instead of disable/enable_intr to make thisJohn Baldwin
driver more portable. Notes: svn path=/head/; revision=106653
2002-10-25Cast si_drv2 to intptr_t instead of int to quiet warnings.John Baldwin
Tested on: alpha Reported by: marcel (on an ia64) Notes: svn path=/head/; revision=105960
2002-10-23- New-bussify the rc(4) device driver.John Baldwin
- 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 Notes: svn path=/head/; revision=105806
2002-10-16Be consistent about funtions being static.Poul-Henning Kamp
Spotte by: FlexeLint. Notes: svn path=/head/; revision=105224
2002-05-20Off-by-128 error in the cuam* device node numbers.Robert Watson
Notes: svn path=/head/; revision=96970
2002-05-20Bump the rc driver a little bit closer to the 21st century: useRobert Watson
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. Notes: svn path=/head/; revision=96969
2002-04-01Change the suser() API to take advantage of td_ucred as well as do aJohn Baldwin
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@ Notes: svn path=/head/; revision=93593
2002-03-23Fixed some style bugs in the removal of __P(()). The main ones wereBruce Evans
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. Notes: svn path=/head/; revision=93024
2002-03-20Remove __P.Alfred Perlstein
Notes: svn path=/head/; revision=92765
2002-01-05Change the preemption code for software interrupt thread schedules andJohn Baldwin
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 Notes: svn path=/head/; revision=88900
2001-09-12KSE Milestone 2Julian Elischer
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 Notes: svn path=/head/; revision=83366
2001-05-15Remove unneeded includes of sys/ipl.h and machine/ipl.h.John Baldwin
Notes: svn path=/head/; revision=76650
2001-03-26Send the remains (such as I have located) of "block major numbers" toPoul-Henning Kamp
the bit-bucket. Notes: svn path=/head/; revision=74810
2001-02-15Extend kqueue down to the device layer.Jonathan Lemon
Backwards compatible approach suggested by: peter Notes: svn path=/head/; revision=72521
2001-02-09Catch up to the new swi API.John Baldwin
Notes: svn path=/head/; revision=72244