Home | History | Annotate | only in /src/sys/dev/ir
History log of /src/sys/dev/ir
RevisionDateAuthorComments
 1.2 15-Dec-2001  explorer branches: 1.2.2; 1.2.4;
install into /usr/include/dev/ir, since Jason made irdaattach look here.
 1.1 02-Dec-2001  augustss Add framework for Ir devices. The irframe device is for delivering IrDA
frame to user land and the cir device is for consumer Ir (remote controls).

This code is only partially finished, but the irframe device works (given
a low level driver for the actual IrDA device).
 1.2.4.2 10-Jan-2002  thorpej Add kqueue support to the IrDA framework.
 1.2.4.1 15-Dec-2001  thorpej file Makefile was added on branch kqueue on 2002-01-10 18:29:11 +0000
 1.2.2.2 08-Jan-2002  nathanw Catch up to -current.
(hate cvs. hate hate hate.)
 1.2.2.1 15-Dec-2001  nathanw file Makefile was added on branch nathanw_sa on 2002-01-08 17:26:01 +0000
 1.33 31-Mar-2022  pgoyette For device modules that provide both auto-config and /dev/xxx
interfaces, make sure that initialization and destruction
follow the proper sequence. This is triggered by the recent
changes to the devsw stuff; per riastradh@ the required call
sequence is:

devsw_attach()
config_init_component() or config_cf*_attach()
...
config_fini_component() or config_cf*_detach()
devsw_detach()

While here, add a few missing calls to some of the detach
routines.

Testing of these changes has been limited to:
1. compile without build break
2. no related test failures from atf
3. modload/modunload work as well as
before.

No functional device testing done, since I don't have any
of these devices. Let me know of any damage I might cause
here!

XXX Some of the modules affected by this commit are already
XXX broken; see kern/56772. This commit does not break
any additional modules (as far as I know).
 1.32 14-Jul-2016  msaitoh - Use aprint*() more in xxx_attach().
- Add missing aprint_naive("\n").
- Remove extra spaces and tabs.
- KNF.
 1.31 25-Jul-2014  dholland branches: 1.31.4;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.30 16-Mar-2014  dholland branches: 1.30.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.29 26-Jul-2011  mrg branches: 1.29.2; 1.29.12; 1.29.16;
convert to device_t, cfdata_t and CFATTACH_DECL_NEW.
 1.28 29-Dec-2010  jmcneill module needs to devsw_attach/devsw_detach
 1.27 28-Dec-2010  jmcneill add "ir" and "cir" modules
 1.26 06-Dec-2009  dyoung branches: 1.26.4;
Delete unnecessary device-activation hooks.
 1.25 12-May-2009  cegger struct device * -> device_t, no functional changes intended.
 1.24 12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.23 10-Oct-2008  jmcneill branches: 1.23.8;
Make cirpoll work.
 1.22 10-Oct-2008  jmcneill cirkqfilter is not implemented, so remove any references to it so this
file will compile again
 1.21 11-Jun-2008  cegger branches: 1.21.2;
use device_lookup_private to get softc
 1.20 28-Apr-2008  martin branches: 1.20.2; 1.20.4;
Remove clause 3 and 4 from TNF licenses
 1.19 08-Apr-2008  cegger branches: 1.19.2; 1.19.4;
use aprint_*_dev and device_xname
 1.18 01-Mar-2008  rmind Welcome to 4.99.55:

- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call. It will
indicate which event (POLL_IN, POLL_OUT, etc) happen. If unknown,
zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
 1.17 04-Mar-2007  christos branches: 1.17.16; 1.17.32; 1.17.36;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.16 10-Jan-2007  cube branches: 1.16.2;
Complete initialiser, avoid returning stack content as an error code and...
Oh, yeah, we use struct lwp pretty much everywhere in place of struct proc
since... Well, long.
 1.15 09-Jan-2007  cube Comment out a trigraph in a #ifdef 0'd block. Kinda pointless, but allows
it to pass make depend.
 1.14 29-Mar-2006  thorpej branches: 1.14.8;
Use device_private().
 1.13 28-Mar-2006  thorpej Use device_unit().
 1.12 20-Feb-2006  thorpej branches: 1.12.2; 1.12.4; 1.12.6;
Use device_is_active() rather than testing dv_flags for DVF_ACTIVE
directly.
 1.11 29-Jan-2006  augustss branches: 1.11.2; 1.11.4;
Use correct return values when polling.
 1.10 11-Dec-2005  christos branches: 1.10.2;
merge ktrace-lwp.
 1.9 14-Jul-2003  lukem branches: 1.9.16;
add missing __KERNEL_RCSID()
 1.8 23-Oct-2002  jdolecek branches: 1.8.6;
merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.7 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.6 30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.3 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.2 12-Dec-2001  augustss branches: 1.2.2; 1.2.4; 1.2.12;
Add some ioctl()s for consumer IR.
 1.1 02-Dec-2001  augustss Add framework for Ir devices. The irframe device is for delivering IrDA
frame to user land and the cir device is for consumer Ir (remote controls).

This code is only partially finished, but the irframe device works (given
a low level driver for the actual IrDA device).
 1.2.12.1 16-May-2002  gehenna Add the character device switch.
Replace the access to devsw table with calling devsw API.
 1.2.4.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.4.2 10-Jan-2002  thorpej Add kqueue support to the IrDA framework.
 1.2.4.1 12-Dec-2001  thorpej file cir.c was added on branch kqueue on 2002-01-10 18:29:11 +0000
 1.2.2.5 11-Nov-2002  nathanw Catch up to -current
 1.2.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.3 17-Sep-2002  nathanw Catch up to -current.
 1.2.2.2 08-Jan-2002  nathanw Catch up to -current.
(hate cvs. hate hate hate.)
 1.2.2.1 12-Dec-2001  nathanw file cir.c was added on branch nathanw_sa on 2002-01-08 17:26:01 +0000
 1.8.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.6.1 03-Aug-2004  skrll Sync with HEAD
 1.9.16.4 17-Mar-2008  yamt sync with head.
 1.9.16.3 03-Sep-2007  yamt sync with head.
 1.9.16.2 26-Feb-2007  yamt sync with head.
 1.9.16.1 21-Jun-2006  yamt sync with head.
 1.10.2.2 01-Mar-2006  yamt sync with head.
 1.10.2.1 01-Feb-2006  yamt sync with head.
 1.11.4.1 22-Apr-2006  simonb Sync with head.
 1.11.2.1 09-Sep-2006  rpaulo sync with head
 1.12.6.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.12.4.1 19-Apr-2006  elad sync with head.
 1.12.2.1 01-Apr-2006  yamt sync with head.
 1.14.8.1 12-Jan-2007  ad Sync with head.
 1.16.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.17.36.6 17-Jan-2009  mjf Sync with HEAD.
 1.17.36.5 29-Jun-2008  mjf Sync with HEAD.
 1.17.36.4 02-Jun-2008  mjf Sync with HEAD.
 1.17.36.3 06-Apr-2008  mjf - after some discussion with agc@ i agreed it would be a good idea to move
device_unregister_* to device_deregister_* to be more like the pmf(9)
functions, especially since a lot of the time the function calls are next
to each other.

- add device_register_name() support for dk(4).
 1.17.36.2 05-Apr-2008  mjf - add "file-system DEVFS" and "pseudo-device devfsctl" to conf/std seeing
as these are always needed.

- convert many, many drivers over to the New Devfs World Order. For a
list of device drivers yet to be converted see,
http://www.netbsd.org/~mjf/devfs-todo.html.

- add a new device_unregister_all(device_t) function to remove all device
names associated with a device_t, which saves us having to construct
device names when the driver is detached.

- add a DEV_AUDIO type for devices.
 1.17.36.1 03-Apr-2008  mjf Sync with HEAD.
 1.17.32.1 24-Mar-2008  keiichi sync with head.
 1.17.16.1 23-Mar-2008  matt sync with HEAD
 1.19.4.4 11-Mar-2010  yamt sync with head
 1.19.4.3 16-May-2009  yamt sync with head
 1.19.4.2 04-May-2009  yamt sync with head.
 1.19.4.1 16-May-2008  yamt sync with head.
 1.19.2.2 17-Jun-2008  yamt sync with head.
 1.19.2.1 18-May-2008  yamt sync with head.
 1.20.4.1 18-Jun-2008  simonb Sync with head.
 1.20.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.21.2.1 19-Oct-2008  haad Sync with HEAD.
 1.23.8.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.26.4.1 05-Mar-2011  rmind sync with head
 1.29.16.1 18-May-2014  rmind sync with head
 1.29.12.2 03-Dec-2017  jdolecek update from HEAD
 1.29.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.29.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.30.2.1 10-Aug-2014  tls Rebase.
 1.31.4.1 05-Oct-2016  skrll Sync with HEAD
 1.4 06-Sep-2015  dholland More on PR 41200: headers that declare ioctls should include sys/ioccom.h.
This covers (I think) all the MI headers outside of external/ (and dist/).
 1.3 28-Apr-2008  martin branches: 1.3.44; 1.3.64;
Remove clause 3 and 4 from TNF licenses
 1.2 13-Dec-2001  augustss branches: 1.2.2; 1.2.4; 1.2.118; 1.2.120; 1.2.122;
Use unsigned ints.
 1.1 12-Dec-2001  augustss Add some ioctl()s for consumer IR.
 1.2.122.1 16-May-2008  yamt sync with head.
 1.2.120.1 18-May-2008  yamt sync with head.
 1.2.118.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.4.2 10-Jan-2002  thorpej Add kqueue support to the IrDA framework.
 1.2.4.1 13-Dec-2001  thorpej file cirio.h was added on branch kqueue on 2002-01-10 18:29:11 +0000
 1.2.2.2 08-Jan-2002  nathanw Catch up to -current.
(hate cvs. hate hate hate.)
 1.2.2.1 13-Dec-2001  nathanw file cirio.h was added on branch nathanw_sa on 2002-01-08 17:26:01 +0000
 1.3.64.1 22-Sep-2015  skrll Sync with HEAD
 1.3.44.1 03-Dec-2017  jdolecek update from HEAD
 1.9 26-Jul-2011  mrg convert to device_t, cfdata_t and CFATTACH_DECL_NEW.
 1.8 10-Oct-2008  jmcneill Make cirpoll work.
 1.7 28-Apr-2008  martin branches: 1.7.6;
Remove clause 3 and 4 from TNF licenses
 1.6 11-Dec-2005  christos branches: 1.6.70; 1.6.72; 1.6.74;
merge ktrace-lwp.
 1.5 08-Jul-2003  itojun function prototype must not have variable name
 1.4 29-Jun-2003  fvdl branches: 1.4.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.3 28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.2 12-Dec-2001  augustss branches: 1.2.2; 1.2.4;
Add some ioctl()s for consumer IR.
 1.1 02-Dec-2001  augustss Add framework for Ir devices. The irframe device is for delivering IrDA
frame to user land and the cir device is for consumer Ir (remote controls).

This code is only partially finished, but the irframe device works (given
a low level driver for the actual IrDA device).
 1.2.4.2 10-Jan-2002  thorpej Add kqueue support to the IrDA framework.
 1.2.4.1 12-Dec-2001  thorpej file cirvar.h was added on branch kqueue on 2002-01-10 18:29:11 +0000
 1.2.2.2 08-Jan-2002  nathanw Catch up to -current.
(hate cvs. hate hate hate.)
 1.2.2.1 12-Dec-2001  nathanw file cirvar.h was added on branch nathanw_sa on 2002-01-08 17:26:01 +0000
 1.4.2.5 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.2.4 18-Sep-2004  skrll Sync with HEAD.
 1.4.2.3 12-Aug-2004  skrll Sync with HEAD.
 1.4.2.2 03-Aug-2004  skrll Sync with HEAD
 1.4.2.1 02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.6.74.2 04-May-2009  yamt sync with head.
 1.6.74.1 16-May-2008  yamt sync with head.
 1.6.72.1 18-May-2008  yamt sync with head.
 1.6.70.2 17-Jan-2009  mjf Sync with HEAD.
 1.6.70.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.6.1 19-Oct-2008  haad Sync with HEAD.
 1.3 06-Mar-2007  drochner irframe is no interface attribute, so remove the "{}"
 1.2 10-Oct-2002  thorpej branches: 1.2.2; 1.2.24; 1.2.62;
Move IR and Bluetooth config defns missed in previous commit.
 1.1 10-Oct-2002  thorpej Move IR and Bluetooth config defns to their own files.
 1.2.62.1 12-Mar-2007  rmind Sync with HEAD.
 1.2.24.1 03-Sep-2007  yamt sync with head.
 1.2.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.1 10-Oct-2002  nathanw file files.ir was added on branch nathanw_sa on 2002-10-18 02:42:07 +0000
 1.6 28-Dec-2010  jmcneill add "ir" and "cir" modules
 1.5 28-Apr-2008  martin branches: 1.5.22;
Remove clause 3 and 4 from TNF licenses
 1.4 11-Dec-2005  christos branches: 1.4.70; 1.4.72; 1.4.74;
merge ktrace-lwp.
 1.3 14-Jul-2003  lukem add missing __KERNEL_RCSID()
 1.2 01-Jan-2003  thorpej branches: 1.2.2;
Use aprint_normal() in cfprint routines.
 1.1 02-Dec-2001  augustss branches: 1.1.2; 1.1.4;
Add framework for Ir devices. The irframe device is for delivering IrDA
frame to user land and the cir device is for consumer Ir (remote controls).

This code is only partially finished, but the irframe device works (given
a low level driver for the actual IrDA device).
 1.1.4.2 10-Jan-2002  thorpej Add kqueue support to the IrDA framework.
 1.1.4.1 02-Dec-2001  thorpej file ir.c was added on branch kqueue on 2002-01-10 18:29:11 +0000
 1.1.2.3 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.2 08-Jan-2002  nathanw Catch up to -current.
(hate cvs. hate hate hate.)
 1.1.2.1 02-Dec-2001  nathanw file ir.c was added on branch nathanw_sa on 2002-01-08 17:26:01 +0000
 1.2.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.2.1 03-Aug-2004  skrll Sync with HEAD
 1.4.74.1 16-May-2008  yamt sync with head.
 1.4.72.1 18-May-2008  yamt sync with head.
 1.4.70.1 02-Jun-2008  mjf Sync with HEAD.
 1.5.22.1 05-Mar-2011  rmind sync with head
 1.5 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.4 11-Dec-2005  christos branches: 1.4.70; 1.4.72; 1.4.74;
merge ktrace-lwp.
 1.3 08-Jul-2003  itojun function prototype must not have variable name
 1.2 05-Dec-2001  augustss branches: 1.2.2; 1.2.4; 1.2.20;
Constify a little.
 1.1 02-Dec-2001  augustss Add framework for Ir devices. The irframe device is for delivering IrDA
frame to user land and the cir device is for consumer Ir (remote controls).

This code is only partially finished, but the irframe device works (given
a low level driver for the actual IrDA device).
 1.2.20.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.20.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.20.1 03-Aug-2004  skrll Sync with HEAD
 1.2.4.2 10-Jan-2002  thorpej Add kqueue support to the IrDA framework.
 1.2.4.1 05-Dec-2001  thorpej file ir.h was added on branch kqueue on 2002-01-10 18:29:12 +0000
 1.2.2.2 08-Jan-2002  nathanw Catch up to -current.
(hate cvs. hate hate hate.)
 1.2.2.1 05-Dec-2001  nathanw file ir.h was added on branch nathanw_sa on 2002-01-08 17:26:01 +0000
 1.4.74.1 16-May-2008  yamt sync with head.
 1.4.72.1 18-May-2008  yamt sync with head.
 1.4.70.1 02-Jun-2008  mjf Sync with HEAD.
 1.8 06-Sep-2015  dholland More on PR 41200: headers that declare ioctls should include sys/ioccom.h.
This covers (I think) all the MI headers outside of external/ (and dist/).
 1.7 28-Apr-2008  martin branches: 1.7.44; 1.7.64;
Remove clause 3 and 4 from TNF licenses
 1.6 13-Dec-2001  augustss branches: 1.6.2; 1.6.4; 1.6.118; 1.6.120; 1.6.122;
Move parameter checks to a common place.
 1.5 13-Dec-2001  augustss Don't use u_int since it requires sys/types.h
 1.4 12-Dec-2001  augustss Use unsigned ints for device settings.
 1.3 05-Dec-2001  augustss Constify a little.
 1.2 04-Dec-2001  augustss Add some dongle support ioctl()s.
 1.1 02-Dec-2001  augustss Add framework for Ir devices. The irframe device is for delivering IrDA
frame to user land and the cir device is for consumer Ir (remote controls).

This code is only partially finished, but the irframe device works (given
a low level driver for the actual IrDA device).
 1.6.122.1 16-May-2008  yamt sync with head.
 1.6.120.1 18-May-2008  yamt sync with head.
 1.6.118.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.4.2 10-Jan-2002  thorpej Add kqueue support to the IrDA framework.
 1.6.4.1 13-Dec-2001  thorpej file irdaio.h was added on branch kqueue on 2002-01-10 18:29:12 +0000
 1.6.2.2 08-Jan-2002  nathanw Catch up to -current.
(hate cvs. hate hate hate.)
 1.6.2.1 13-Dec-2001  nathanw file irdaio.h was added on branch nathanw_sa on 2002-01-08 17:26:01 +0000
 1.7.64.1 22-Sep-2015  skrll Sync with HEAD
 1.7.44.1 03-Dec-2017  jdolecek update from HEAD
 1.46 25-Jul-2014  dholland Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.45 16-Mar-2014  dholland branches: 1.45.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.44 06-Dec-2009  dyoung branches: 1.44.12; 1.44.22; 1.44.26;
Delete unnecessary device-activation hooks.
 1.43 11-Jan-2009  mlelstv Register with pmf.
 1.42 10-Jun-2008  cegger branches: 1.42.4;
device_private(device_lookup()) -> device_lookup_private()
ok cube@
 1.41 28-Apr-2008  martin branches: 1.41.2; 1.41.4;
Remove clause 3 and 4 from TNF licenses
 1.40 14-Mar-2008  cube branches: 1.40.2; 1.40.4;
Split device_t and softc for irframe(4).
 1.39 06-Mar-2007  drochner branches: 1.39.16; 1.39.32; 1.39.36;
clean up and fix irframe attachment as a line discipline:
make it a regular "bus frontend" in terms of configuration attachment
(this is something new: a device which can be real or pseudo device),
and use only autoconf functions considered exported.
This suffers a bit from the fact that pseudo-devices don't get "aux"
context data passed to the xxx_attach() function. This can be changed
easily; the differences between real and pseudo devices are diminishing...
 1.38 05-Mar-2007  drochner replace the code which digs in the guts of autoconf. It is not obvious
what it does; use some code from btuart(4) which might be for a
similar purpose.
XXX This is very definitely broken; when I understand how this is
supposed to work and how it can be tested I'll have another look at it.
 1.37 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.36 16-Nov-2006  christos branches: 1.36.4;
__unused removal on arguments; approved by core.
 1.35 12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.34 30-Aug-2006  christos branches: 1.34.2; 1.34.4;
fix incomplete initializer.
 1.33 29-Mar-2006  thorpej Use device_private().
 1.32 28-Mar-2006  thorpej Use device_unit().
 1.31 21-Feb-2006  thorpej branches: 1.31.2; 1.31.4; 1.31.6;
Use device_is_active().
 1.30 11-Dec-2005  christos branches: 1.30.2; 1.30.4; 1.30.6;
merge ktrace-lwp.
 1.29 21-Jun-2005  ws branches: 1.29.2;
PR-30566: Poll must not return <sys/errno.h> values.
Start with those places I can easily test.
 1.28 21-Oct-2003  simonb Remove break after return.
 1.27 14-Jul-2003  lukem add missing __KERNEL_RCSID()
 1.26 29-Jun-2003  fvdl branches: 1.26.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.25 28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.24 17-Apr-2003  fvdl Fix size_t printf formats in DIAGNOSTIC case.
 1.23 23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.22 02-Oct-2002  thorpej Use CFDRIVER_DECL(). PR #18500.
 1.21 02-Oct-2002  thorpej Remove unnecessary extern decl of iframe_ca.
 1.20 30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.19 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.18 27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.17 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.16 12-Jan-2002  tsutsui branches: 1.16.8;
Call malloc(9) with M_ZERO flag instead of memset() after malloc().
 1.15 29-Dec-2001  augustss branches: 1.15.2; 1.15.4;
Add an XXX comment.
 1.14 26-Dec-2001  augustss Be a little more paranoid.
 1.13 14-Dec-2001  augustss Sanity check speed setting.
 1.12 13-Dec-2001  augustss Some debug stuff.
 1.11 13-Dec-2001  augustss Move parameter checks to a common place.
 1.10 13-Dec-2001  augustss Some DIAGNOSTIC nonsense.
 1.9 05-Dec-2001  augustss Constify a little.
 1.8 05-Dec-2001  augustss Break out SIR framing to its own file.
 1.7 05-Dec-2001  augustss Set error code for IRDA_RESET_PARAMS.
 1.6 05-Dec-2001  augustss Reset parameters on open.
 1.5 04-Dec-2001  augustss Simplify interface to irframe.
 1.4 03-Dec-2001  augustss Add irframetty driver for IrDA frames over serial lines.
THIS MOST DEFINITELY DOES NOT WORK. IT'S VERY INCOMPLETE.
 1.3 02-Dec-2001  augustss GC unused stuff.
 1.2 02-Dec-2001  augustss Fixes from Jan Sparud's code:
Make read and write methods symmetrical, add poll method.
 1.1 02-Dec-2001  augustss Add framework for Ir devices. The irframe device is for delivering IrDA
frame to user land and the cir device is for consumer Ir (remote controls).

This code is only partially finished, but the irframe device works (given
a low level driver for the actual IrDA device).
 1.15.4.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.15.4.3 11-Feb-2002  jdolecek Sync w/ -current.
 1.15.4.2 10-Jan-2002  thorpej Add kqueue support to the IrDA framework.
 1.15.4.1 29-Dec-2001  thorpej file irframe.c was added on branch kqueue on 2002-01-10 18:29:12 +0000
 1.15.2.6 11-Nov-2002  nathanw Catch up to -current
 1.15.2.5 18-Oct-2002  nathanw Catch up to -current.
 1.15.2.4 17-Sep-2002  nathanw Catch up to -current.
 1.15.2.3 28-Feb-2002  nathanw Catch up to -current.
 1.15.2.2 08-Jan-2002  nathanw Catch up to -current.
(hate cvs. hate hate hate.)
 1.15.2.1 29-Dec-2001  nathanw file irframe.c was added on branch nathanw_sa on 2002-01-08 17:26:01 +0000
 1.16.8.1 16-May-2002  gehenna Add the character device switch.
Replace the access to devsw table with calling devsw API.
 1.26.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.26.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.26.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.26.2.2 03-Aug-2004  skrll Sync with HEAD
 1.26.2.1 02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.29.2.4 17-Mar-2008  yamt sync with head.
 1.29.2.3 03-Sep-2007  yamt sync with head.
 1.29.2.2 30-Dec-2006  yamt sync with head.
 1.29.2.1 21-Jun-2006  yamt sync with head.
 1.30.6.1 22-Apr-2006  simonb Sync with head.
 1.30.4.1 09-Sep-2006  rpaulo sync with head
 1.30.2.1 01-Mar-2006  yamt sync with head.
 1.31.6.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.31.4.1 19-Apr-2006  elad sync with head.
 1.31.2.2 03-Sep-2006  yamt sync with head.
 1.31.2.1 01-Apr-2006  yamt sync with head.
 1.34.4.2 10-Dec-2006  yamt sync with head.
 1.34.4.1 22-Oct-2006  yamt sync with head
 1.34.2.1 18-Nov-2006  ad Sync with head.
 1.36.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.39.36.6 17-Jan-2009  mjf Sync with HEAD.
 1.39.36.5 29-Jun-2008  mjf Sync with HEAD.
 1.39.36.4 02-Jun-2008  mjf Sync with HEAD.
 1.39.36.3 06-Apr-2008  mjf - after some discussion with agc@ i agreed it would be a good idea to move
device_unregister_* to device_deregister_* to be more like the pmf(9)
functions, especially since a lot of the time the function calls are next
to each other.

- add device_register_name() support for dk(4).
 1.39.36.2 05-Apr-2008  mjf - add "file-system DEVFS" and "pseudo-device devfsctl" to conf/std seeing
as these are always needed.

- convert many, many drivers over to the New Devfs World Order. For a
list of device drivers yet to be converted see,
http://www.netbsd.org/~mjf/devfs-todo.html.

- add a new device_unregister_all(device_t) function to remove all device
names associated with a device_t, which saves us having to construct
device names when the driver is detached.

- add a DEV_AUDIO type for devices.
 1.39.36.1 03-Apr-2008  mjf Sync with HEAD.
 1.39.32.1 24-Mar-2008  keiichi sync with head.
 1.39.16.1 23-Mar-2008  matt sync with HEAD
 1.40.4.3 11-Mar-2010  yamt sync with head
 1.40.4.2 04-May-2009  yamt sync with head.
 1.40.4.1 16-May-2008  yamt sync with head.
 1.40.2.2 17-Jun-2008  yamt sync with head.
 1.40.2.1 18-May-2008  yamt sync with head.
 1.41.4.1 18-Jun-2008  simonb Sync with head.
 1.41.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.42.4.1 19-Jan-2009  skrll Sync with HEAD.
 1.44.26.1 18-May-2014  rmind sync with head
 1.44.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.44.12.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.45.2.1 10-Aug-2014  tls Rebase.
 1.67 26-Oct-2022  riastradh irframetty(4): Convert to ttylock/ttyunlock.
 1.66 24-May-2022  andvar fix various typos in comment, documentation and log messages.
 1.65 26-Sep-2021  thorpej Change the kqueue filterops::f_isfd field to filterops::f_flags, and
define a flag FILTEROP_ISFD that has the meaning of the prior f_isfd.
Field and flag name aligned with OpenBSD.

This does not constitute a functional or ABI change, as the field location
and size, and the value placed in that field, are the same as the previous
code, but we're bumping __NetBSD_Version__ so 3rd-party module source code
can adapt, as needed.

NetBSD 9.99.89
 1.64 19-Dec-2020  thorpej Use sel{record,remove}_knote().
 1.63 24-Jan-2019  knakahara branches: 1.63.12;
Add comments about D_MPSAFE to functions called as struct linesw.l_ioctl.
 1.62 25-Oct-2017  maya branches: 1.62.2; 1.62.4;
Use C99 initializer for filterops

Mostly done with spatch with touchups for indentation

@@
expression a;
identifier b,c,d;
identifier p;
@@
const struct filterops p =
- { a, b, c, d
+ {
+ .f_isfd = a,
+ .f_attach = b,
+ .f_detach = c,
+ .f_event = d,
};
 1.61 20-Aug-2015  christos branches: 1.61.2; 1.61.8;
include "ioconf.h" to get the 'void <driver>attach(int count);' prototype.
 1.60 16-Nov-2014  ozaki-r branches: 1.60.2;
Replace callout_stop with callout_halt

In order to call callout_destroy for a callout safely, we have to ensure
the function of the callout is not running and pending. To do so, we should
use callout_halt, not callout_stop.

Discussed with martin@ and riastradh@.
 1.59 16-Dec-2013  mrg branches: 1.59.4;
apply __diagused where appropriate.
 1.58 12-May-2009  cegger branches: 1.58.12; 1.58.18; 1.58.22; 1.58.26;
struct device * -> device_t, no functional changes intended.
 1.57 12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.56 11-Jan-2009  mlelstv branches: 1.56.2;
Avoid crash under LOCKDEBUG by destroying a mutex correctly.
Also: move mutex init/destroy into attach/detach functions and
handle case where line discipline is closed before the irframe
device. Fixes PR kern/40271.
 1.55 11-Jan-2009  christos merge christos-time_t
 1.54 25-May-2008  ad branches: 1.54.6; 1.54.8; 1.54.10;
Properly fix the "hanging in tty" bug that was worked around with cv_wakeup()
some time again.
 1.53 28-Apr-2008  martin branches: 1.53.2;
Remove clause 3 and 4 from TNF licenses
 1.52 14-Mar-2008  cube branches: 1.52.2; 1.52.4;
Split device_t and softc for irframe(4).
 1.51 01-Mar-2008  rmind Welcome to 4.99.55:

- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call. It will
indicate which event (POLL_IN, POLL_OUT, etc) happen. If unknown,
zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
 1.50 15-Dec-2007  perry branches: 1.50.2; 1.50.6;
__FUNCTION__ -> __func__
 1.49 05-Dec-2007  pooka branches: 1.49.4;
Do not "return 1" from kqfilter for errors. That value is passed
directly to the userland caller and results in a mysterious EPERM.
Instead, return EINVAL or something else sensible depending on the
case.
 1.48 05-Dec-2007  ad lockmgr -> mutex
 1.47 19-Nov-2007  ad branches: 1.47.2;
- Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
 1.46 10-Nov-2007  ad Call ttyflush() with tty_lock held.
 1.45 07-Nov-2007  ad Merge tty changes from the vmlocking branch.
 1.44 09-Jul-2007  ad branches: 1.44.6; 1.44.8; 1.44.12; 1.44.14;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.43 08-Mar-2007  drochner branches: 1.43.2; 1.43.4;
In the pseudo-dev attach function, also try to register the struct cfdriver
of the backend irframe device with autoconf. This might fail or not,
depending on whether another frontend was configured. It helps if
irframetty is the only frontend.
This is a workaround for some inconsistencies in the interaction of
pseudo-devices with the autoconf framework. A fix will require changes
to config(8) which needs more consideration and testing.
Should fix a crash reported by Dieter Baron per PM.
 1.42 06-Mar-2007  drochner clean up and fix irframe attachment as a line discipline:
make it a regular "bus frontend" in terms of configuration attachment
(this is something new: a device which can be real or pseudo device),
and use only autoconf functions considered exported.
This suffers a bit from the fact that pseudo-devices don't get "aux"
context data passed to the xxx_attach() function. This can be changed
easily; the differences between real and pseudo devices are diminishing...
 1.41 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.40 16-Nov-2006  christos branches: 1.40.4;
__unused removal on arguments; approved by core.
 1.39 12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.38 07-Oct-2006  peter Fix compilation with IRFRAMET_DEBUG (use %zu/%zd for sizes).
 1.37 01-Oct-2006  elad Adapt MD code to KAUTH_DEVICE_TTY_OPEN, batch #2 from Matt Fleming, thanks!

Also, add forgotten splx() calls in some places.
 1.36 21-Jul-2006  ad branches: 1.36.4; 1.36.6;
- Use the LWP cached credentials where sane.
- Minor cosmetic changes.
 1.35 09-Jun-2006  christos stack police: Fix the biggest offender with ~4K stack, by allocating the
buffer in the softc.
 1.34 14-May-2006  elad branches: 1.34.2;
integrate kauth.
 1.33 28-Mar-2006  thorpej Use device_unit().
 1.32 05-Mar-2006  christos branches: 1.32.2; 1.32.4;
cleanup more SET/CLR/ISSET lossage
 1.31 11-Dec-2005  christos branches: 1.31.4; 1.31.6; 1.31.8;
merge ktrace-lwp.
 1.30 27-Nov-2005  thorpej Overhaul how TTY line disciplines are handled:
- Replace references to linesw[0] with a ttyldisc_default() function
that returns the default ("termios") line discipline.
- The linesw[] array is gone, replaced by a linked list.
- ttyldisc_add() and ttyldisc_remove() have been replaced by
ttyldisc_attach() and ttyldisc_detach().
- Things that provide line disciplines are now responsible for
registering those disciplines with the system. The linesw
structures are no longer declared in tty_conf.c
- Line disciplines are now refcounted; a lookup causes a reference to
be held. ttyldisc_release() releases the reference. Attempts to
detach an in-use line discipline result in EBUSY.
- Fix function signature lossage in if_sl.c, if_strip.c, and tty_tb.c
that was masked by the old tty_conf.c
- tty_init() is no longer necessary; delete it and its call from main().
 1.29 29-May-2005  christos branches: 1.29.2; 1.29.8;
- remove Static define
- avoid variable shadowing.
 1.28 27-Feb-2005  perry nuke trailing whitespace
 1.27 14-Jul-2003  lukem branches: 1.27.8; 1.27.10;
add missing __KERNEL_RCSID()
 1.26 29-Jun-2003  fvdl branches: 1.26.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.25 28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.24 13-Jun-2003  uwe Rename struct frame to irt_frame to avoid name clash with struct frame
in <arm/arm32/frame.h>.
 1.23 26-Nov-2002  christos si_ -> sel_
 1.22 23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.21 06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.20 17-Mar-2002  atatat branches: 1.20.4;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.19 26-Dec-2001  augustss branches: 1.19.2; 1.19.4;
Be a little more paranoid.
 1.18 20-Dec-2001  augustss Don't forget to call start routine in dongle manipulation.
 1.17 20-Dec-2001  augustss Rearrange code that wiggles modem control lines so it actually reaches
the com port driver.
 1.16 14-Dec-2001  augustss Rearrage softc a little.
 1.15 13-Dec-2001  augustss Fix TODO comment.
 1.14 13-Dec-2001  augustss Move parameter checks to a common place.
 1.13 12-Dec-2001  augustss Add missing delay for the tekram dongle.
 1.12 12-Dec-2001  augustss Don't use timeout 0 to tsleep() when the time is short.
 1.11 06-Dec-2001  augustss Don't crash on early calls to get the speeds.
 1.10 05-Dec-2001  augustss Add dongle specific code.
 1.9 05-Dec-2001  augustss Break out SIR framing to its own file.
 1.8 05-Dec-2001  augustss Put bytes on right q.
 1.7 05-Dec-2001  augustss Fix some minor bug.
Add more debugging.
 1.6 05-Dec-2001  augustss Mention that much of the code was stolen from Tommy Bohlin.
 1.5 04-Dec-2001  augustss Add some dongle support ioctl()s.
 1.4 04-Dec-2001  augustss Change speed setting a little.
 1.3 04-Dec-2001  augustss Implement speed setting.
 1.2 04-Dec-2001  augustss Implement input processing (untested).
 1.1 03-Dec-2001  augustss Add irframetty driver for IrDA frames over serial lines.
THIS MOST DEFINITELY DOES NOT WORK. IT'S VERY INCOMPLETE.
 1.19.4.5 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.19.4.4 02-Oct-2002  jdolecek do not need the (void *) cast for kn_hook anymore
 1.19.4.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.19.4.2 10-Jan-2002  thorpej Add kqueue support to the IrDA framework.
 1.19.4.1 26-Dec-2001  thorpej file irframe_tty.c was added on branch kqueue on 2002-01-10 18:29:12 +0000
 1.19.2.9 11-Dec-2002  thorpej Sync with HEAD.
 1.19.2.8 11-Nov-2002  nathanw Catch up to -current
 1.19.2.7 17-Sep-2002  nathanw Catch up to -current.
 1.19.2.6 12-Jul-2002  nathanw No longer need to pull in lwp.h; proc.h pulls it in for us.
 1.19.2.5 24-Jun-2002  nathanw Curproc->curlwp renaming.

Change uses of "curproc->l_proc" back to "curproc", which is more like the
original use. Bare uses of "curproc" are now "curlwp".

"curproc" is now #defined in proc.h as ((curlwp) ? (curlwp)->l_proc) : NULL)
so that it is always safe to reference curproc (*de*referencing curproc
is another story, but that's always been true).
 1.19.2.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.19.2.3 09-Jan-2002  nathanw LWPify.
 1.19.2.2 08-Jan-2002  nathanw Catch up to -current.
(hate cvs. hate hate hate.)
 1.19.2.1 26-Dec-2001  nathanw file irframe_tty.c was added on branch nathanw_sa on 2002-01-08 17:26:01 +0000
 1.20.4.1 16-May-2002  gehenna Use devsw API instead of accessing to devsw table.
 1.26.2.7 11-Dec-2005  christos Sync with head.
 1.26.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.26.2.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.26.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.26.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.26.2.2 03-Aug-2004  skrll Sync with HEAD
 1.26.2.1 02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.27.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.27.8.1 29-Apr-2005  kent sync with -current
 1.29.8.1 29-Nov-2005  yamt sync with head.
 1.29.2.7 17-Mar-2008  yamt sync with head.
 1.29.2.6 21-Jan-2008  yamt sync with head
 1.29.2.5 07-Dec-2007  yamt sync with head
 1.29.2.4 15-Nov-2007  yamt sync with head.
 1.29.2.3 03-Sep-2007  yamt sync with head.
 1.29.2.2 30-Dec-2006  yamt sync with head.
 1.29.2.1 21-Jun-2006  yamt sync with head.
 1.31.8.5 11-Aug-2006  yamt sync with head
 1.31.8.4 26-Jun-2006  yamt sync with head.
 1.31.8.3 24-May-2006  yamt sync with head.
 1.31.8.2 01-Apr-2006  yamt sync with head.
 1.31.8.1 13-Mar-2006  yamt sync with head.
 1.31.6.2 01-Jun-2006  kardel Sync with head.
 1.31.6.1 22-Apr-2006  simonb Sync with head.
 1.31.4.1 09-Sep-2006  rpaulo sync with head
 1.32.4.2 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.32.4.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.32.2.3 19-Apr-2006  elad sync with head.
 1.32.2.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.32.2.1 08-Mar-2006  elad Adapt to kernel authorization KPI.
 1.34.2.1 19-Jun-2006  chap Sync with head.
 1.36.6.2 10-Dec-2006  yamt sync with head.
 1.36.6.1 22-Oct-2006  yamt sync with head
 1.36.4.1 18-Nov-2006  ad Sync with head.
 1.40.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.43.4.1 11-Jul-2007  mjf Sync with head.
 1.43.2.3 19-Oct-2007  ad Replace the tty locks with a global tty_lock.
 1.43.2.2 01-Jul-2007  ad Adapt to callout API change.
 1.43.2.1 05-Apr-2007  ad Compile fixes.
 1.44.14.3 27-Dec-2007  mjf Sync with HEAD.
 1.44.14.2 08-Dec-2007  mjf Sync with HEAD.
 1.44.14.1 19-Nov-2007  mjf Sync with HEAD.
 1.44.12.2 21-Nov-2007  bouyer Sync with HEAD
 1.44.12.1 13-Nov-2007  bouyer Sync with HEAD
 1.44.8.3 23-Mar-2008  matt sync with HEAD
 1.44.8.2 09-Jan-2008  matt sync with HEAD
 1.44.8.1 08-Nov-2007  matt sync with -HEAD
 1.44.6.3 09-Dec-2007  jmcneill Sync with HEAD.
 1.44.6.2 21-Nov-2007  joerg Sync with HEAD.
 1.44.6.1 11-Nov-2007  joerg Sync with HEAD.
 1.47.2.2 26-Dec-2007  ad Sync with head.
 1.47.2.1 08-Dec-2007  ad Sync with head.
 1.49.4.1 02-Jan-2008  bouyer Sync with HEAD
 1.50.6.3 17-Jan-2009  mjf Sync with HEAD.
 1.50.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.50.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.50.2.1 24-Mar-2008  keiichi sync with head.
 1.52.4.3 16-May-2009  yamt sync with head
 1.52.4.2 04-May-2009  yamt sync with head.
 1.52.4.1 16-May-2008  yamt sync with head.
 1.52.2.2 04-Jun-2008  yamt sync with head
 1.52.2.1 18-May-2008  yamt sync with head.
 1.53.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.54.10.2 09-Nov-2008  christos account for major and minor being unsigned long long
 1.54.10.1 25-May-2008  christos file irframe_tty.c was added on branch christos-time_t on 2008-11-09 02:05:20 +0000
 1.54.8.1 10-Apr-2009  snj Pull up following revision(s) (requested by mlelstv in ticket #684):
sys/dev/ir/irframe_tty.c: revision 1.56
Avoid crash under LOCKDEBUG by destroying a mutex correctly.
Also: move mutex init/destroy into attach/detach functions and
handle case where line discipline is closed before the irframe
device. Fixes PR kern/40271.
 1.54.6.1 19-Jan-2009  skrll Sync with HEAD.
 1.56.2.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.58.26.1 18-May-2014  rmind sync with head
 1.58.22.2 03-Dec-2017  jdolecek update from HEAD
 1.58.22.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.58.18.1 07-Dec-2014  martin Pull up following revision(s) (requested by ozaki-r in ticket #1201):
sys/kern/kern_ktrace.c: revision 1.166
sys/dev/isa/aps.c: revision 1.16
sys/dev/sysmon/sysmonvar.h: revision 1.45
sys/dev/ir/irframe_tty.c: revision 1.60
sys/dev/sysmon/sysmon_envsys_events.c: revision 1.111-1.112 (patch)
sys/dev/pci/pccbb.c: revision 1.207
sys/dev/wscons/wskbd.c: revision 1.135
sys/dev/usb/ohci.c: revision 1.254
sys/net/if_ecosubr.c: revision 1.41
sys/dev/pcmcia/btbc.c: revision 1.17
sys/arch/x86/x86/via_padlock.c: revision 1.23
sys/dev/sdmmc/sdmmc.c: revision 1.23 (patch)
sys/dev/bluetooth/btkbd.c: revision 1.17
sys/dev/bluetooth/bcsp.c: revision 1.25
sys/arch/x86/pci/fwhrng.c: revision 1.8
sys/dev/ic/nslm7x.c: revision 1.61
share/man/man9/callout.9: revision 1.28 (patch)

Replace callout_stop with callout_halt and ensure the callout
is not running before destroying it.
 1.58.12.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.59.4.1 01-Dec-2014  martin Pull up following revision(s) (requested by ozaki-r in ticket #279):
sys/kern/kern_ktrace.c: revision 1.166
sys/dev/isa/aps.c: revision 1.16
sys/dev/sysmon/sysmonvar.h: revision 1.45
sys/dev/ir/irframe_tty.c: revision 1.60
sys/dev/sysmon/sysmon_envsys_events.c: revision 1.111
sys/dev/sysmon/sysmon_envsys_events.c: revision 1.112
sys/dev/pci/pccbb.c: revision 1.207
sys/dev/wscons/wskbd.c: revision 1.135
sys/dev/usb/ohci.c: revision 1.254
sys/net/if_ecosubr.c: revision 1.41
sys/dev/pcmcia/btbc.c: revision 1.17
sys/arch/x86/x86/via_padlock.c: revision 1.23
sys/dev/sdmmc/sdmmc.c: revision 1.23
sys/dev/bluetooth/btkbd.c: revision 1.17
sys/dev/bluetooth/bcsp.c: revision 1.25
sys/arch/x86/pci/fwhrng.c: revision 1.8
sys/dev/ic/nslm7x.c: revision 1.61
share/man/man9/callout.9: revision 1.28
Replace callout_stop with callout_halt
In order to call callout_destroy for a callout safely, we have to ensure
the function of the callout is not running and pending. To do so, we should
use callout_halt, not callout_stop.
Discussed with martin@ and riastradh@.
Make it clear that we should use not callout_stop but callout_halt
before callout_destroy
Replace callout_stop with callout_halt
In order to call callout_destroy for a callout safely, we have to ensure
the function of the callout is not running and pending. To do so, we should
use callout_halt, not callout_stop.
In this case, we need to pass an interlock to callout_halt to wait for
the callout complete.
Reviewed by riastradh@.
Kill sme_callout_mtx and use sme_mtx instead
We can use sme_mtx for the callout as well. Actually we should do so
because sme_events_list and some other data that are touched in the
callout should be protected by sme_mtx, not sme_callout_mtx.
Discussed with riastradh@ in
http://mail-index.netbsd.org/tech-kern/2014/11/11/msg017956.html
Replace callout_stop with callout_halt
In order to call callout_destroy for a callout safely, we have to ensure
the function of the callout is not running and pending. To do so, we should
use callout_halt, not callout_stop.
In this case, we need to pass an interlock to callout_halt to wait for
the callout complete. And also we make sure that SME_CALLOUT_INITIALIZED
is unset before calling callout_halt to prevent the callout from calling
callout_schedule. This is the same as what we did in sys/netinet6/mld6.c@1.61.
Reviewed by riastradh@.
 1.60.2.1 22-Sep-2015  skrll Sync with HEAD
 1.61.8.2 17-May-2017  pgoyette At suggestion of chuq@, modify config_attach_pseudo() to return with a
reference held on the device.

Adapt callers to expect the reference to exist, and to ensure that the
reference is released.
 1.61.8.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.61.2.1 20-Jul-2016  pgoyette Adapt machine-independant code to the new {b,c}devsw reference-counting
(using localcount(9)). All callers of {b,c}devsw_lookup() now call
{b,c}devsw_lookup_acquire() which retains a reference on the 'struct
{b,c}devsw'. This reference must be released by the caller once it is
finished with the structure's content (or other data that would disappear
if the 'struct {b,c}devsw' were to disappear).
 1.62.4.1 10-Jun-2019  christos Sync with HEAD
 1.62.2.1 26-Jan-2019  pgoyette Sync with HEAD
 1.63.12.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.19 12-May-2009  cegger struct device * -> device_t, no functional changes intended.
 1.18 28-Apr-2008  martin branches: 1.18.14;
Remove clause 3 and 4 from TNF licenses
 1.17 14-Mar-2008  cube branches: 1.17.2; 1.17.4;
Split device_t and softc for irframe(4).
 1.16 06-Mar-2007  drochner branches: 1.16.16; 1.16.32; 1.16.36;
clean up and fix irframe attachment as a line discipline:
make it a regular "bus frontend" in terms of configuration attachment
(this is something new: a device which can be real or pseudo device),
and use only autoconf functions considered exported.
This suffers a bit from the fact that pseudo-devices don't get "aux"
context data passed to the xxx_attach() function. This can be changed
easily; the differences between real and pseudo devices are diminishing...
 1.15 27-Dec-2005  chs branches: 1.15.26;
changes for making DIAGNOSTIC not change the kernel ABI:
- for structure fields that are conditionally present,
make those fields always present.
- for functions which are conditionally inline, make them never inline.
- remove some other functions which are conditionally defined but
don't actually do anything anymore.
- make a lock-debugging function conditional on only LOCKDEBUG.

as discussed on tech-kern some time back.
 1.14 11-Dec-2005  christos merge ktrace-lwp.
 1.13 08-Jul-2003  itojun branches: 1.13.16;
function prototype must not have variable name
 1.12 29-Jun-2003  fvdl branches: 1.12.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.11 28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.10 03-Jan-2003  dsainty Remove protoype for irframe_frame_available(), it's never implemented
 1.9 23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.8 13-Dec-2001  augustss branches: 1.8.2; 1.8.4;
Move parameter checks to a common place.
 1.7 13-Dec-2001  augustss Some DIAGNOSTIC nonsense.
 1.6 12-Dec-2001  augustss Change default value for ebofs.
 1.5 05-Dec-2001  augustss Constify a little.
 1.4 04-Dec-2001  augustss Simplify interface to irframe.
 1.3 02-Dec-2001  augustss GC unused stuff.
 1.2 02-Dec-2001  augustss Fixes from Jan Sparud's code:
Make read and write methods symmetrical, add poll method.
 1.1 02-Dec-2001  augustss Add framework for Ir devices. The irframe device is for delivering IrDA
frame to user land and the cir device is for consumer Ir (remote controls).

This code is only partially finished, but the irframe device works (given
a low level driver for the actual IrDA device).
 1.8.4.2 10-Jan-2002  thorpej Add kqueue support to the IrDA framework.
 1.8.4.1 13-Dec-2001  thorpej file irframevar.h was added on branch kqueue on 2002-01-10 18:29:12 +0000
 1.8.2.4 07-Jan-2003  thorpej Sync with HEAD.
 1.8.2.3 11-Nov-2002  nathanw Catch up to -current
 1.8.2.2 08-Jan-2002  nathanw Catch up to -current.
(hate cvs. hate hate hate.)
 1.8.2.1 13-Dec-2001  nathanw file irframevar.h was added on branch nathanw_sa on 2002-01-08 17:26:01 +0000
 1.12.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.12.2.2 03-Aug-2004  skrll Sync with HEAD
 1.12.2.1 02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.13.16.3 17-Mar-2008  yamt sync with head.
 1.13.16.2 03-Sep-2007  yamt sync with head.
 1.13.16.1 21-Jun-2006  yamt sync with head.
 1.15.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.16.36.2 02-Jun-2008  mjf Sync with HEAD.
 1.16.36.1 03-Apr-2008  mjf Sync with HEAD.
 1.16.32.1 24-Mar-2008  keiichi sync with head.
 1.16.16.1 23-Mar-2008  matt sync with HEAD
 1.17.4.2 16-May-2009  yamt sync with head
 1.17.4.1 16-May-2008  yamt sync with head.
 1.17.2.1 18-May-2008  yamt sync with head.
 1.18.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.6 27-May-2013  kiyohara Split IrDA SIR part for other SIR device.
 1.5 28-Apr-2008  martin branches: 1.5.34; 1.5.44;
Remove clause 3 and 4 from TNF licenses
 1.4 11-Dec-2005  christos branches: 1.4.70; 1.4.72; 1.4.74;
merge ktrace-lwp.
 1.3 14-Jul-2003  lukem add missing __KERNEL_RCSID()
 1.2 06-Dec-2001  augustss branches: 1.2.2; 1.2.4; 1.2.20;
Restructure to get rid of size limit.
Fix return value bug.
 1.1 05-Dec-2001  augustss Break out SIR framing to its own file.
 1.2.20.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.20.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.20.1 03-Aug-2004  skrll Sync with HEAD
 1.2.4.2 10-Jan-2002  thorpej Add kqueue support to the IrDA framework.
 1.2.4.1 06-Dec-2001  thorpej file sir.c was added on branch kqueue on 2002-01-10 18:29:12 +0000
 1.2.2.2 08-Jan-2002  nathanw Catch up to -current.
(hate cvs. hate hate hate.)
 1.2.2.1 06-Dec-2001  nathanw file sir.c was added on branch nathanw_sa on 2002-01-08 17:26:01 +0000
 1.4.74.1 16-May-2008  yamt sync with head.
 1.4.72.1 18-May-2008  yamt sync with head.
 1.4.70.1 02-Jun-2008  mjf Sync with HEAD.
 1.5.44.1 23-Jun-2013  tls resync from head
 1.5.34.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.8 27-May-2013  kiyohara Split IrDA SIR part for other SIR device.
 1.7 28-Apr-2008  martin branches: 1.7.34; 1.7.44;
Remove clause 3 and 4 from TNF licenses
 1.6 16-Feb-2006  perry branches: 1.6.64; 1.6.66; 1.6.68;
Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
 1.5 24-Dec-2005  perry branches: 1.5.2; 1.5.4; 1.5.6;
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.4 11-Dec-2005  christos merge ktrace-lwp.
 1.3 27-Feb-2005  perry nuke trailing whitespace
 1.2 08-Jul-2003  itojun branches: 1.2.8; 1.2.10;
function prototype must not have variable name
 1.1 05-Dec-2001  augustss branches: 1.1.2; 1.1.4; 1.1.20;
Break out SIR framing to its own file.
 1.1.20.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.1.20.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.20.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.20.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 10-Jan-2002  thorpej Add kqueue support to the IrDA framework.
 1.1.4.1 05-Dec-2001  thorpej file sir.h was added on branch kqueue on 2002-01-10 18:29:12 +0000
 1.1.2.2 08-Jan-2002  nathanw Catch up to -current.
(hate cvs. hate hate hate.)
 1.1.2.1 05-Dec-2001  nathanw file sir.h was added on branch nathanw_sa on 2002-01-08 17:26:01 +0000
 1.2.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.2.8.1 29-Apr-2005  kent sync with -current
 1.5.6.1 22-Apr-2006  simonb Sync with head.
 1.5.4.1 09-Sep-2006  rpaulo sync with head
 1.5.2.1 18-Feb-2006  yamt sync with head.
 1.6.68.1 16-May-2008  yamt sync with head.
 1.6.66.1 18-May-2008  yamt sync with head.
 1.6.64.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.44.1 23-Jun-2013  tls resync from head
 1.7.34.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")

RSS XML Feed