Commit Graph

24 Commits

Author SHA1 Message Date
jdolecek e0cc03a09b 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
2002-10-23 09:10:23 +00:00
thorpej 9b2c2ec24d Add trailing ; to CFATTACH_DECL. 2002-10-02 16:50:59 +00:00
thorpej 387fc6dc87 Use CFATTACH_DECL(). 2002-09-30 20:37:04 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
gehenna 77a6b82b27 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.
2002-09-06 13:18:43 +00:00
atatat 31144d9976 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.
2002-03-17 19:40:26 +00:00
tsutsui b87a051ec8 Call malloc(9) with M_ZERO flag instead of memset() after malloc(). 2002-01-12 16:17:05 +00:00
lukem 9048aaae21 add RCSID 2001-11-13 07:48:40 +00:00
scw 2963ff5c58 Add `l_poll' to `struct linesw' and provide an xxxpoll() entry point
in each tty driver to indirect through it.

This allows tty line-disciplines to handle poll(2) system calls.
2001-05-02 10:32:08 +00:00
thorpej 3aef368a04 Use device_lookup() in cztty_getttysoftc(). 2001-01-20 19:10:36 +00:00
thorpej ddbaea62cb Garbage-collect some unused macros. 2001-01-20 19:08:24 +00:00
thorpej 6549452c38 Don't deref NULL when searching for the correct board. 2001-01-20 04:19:21 +00:00
sommerfeld 851de295eb Change pci_intr_map to get interrupt source information from a "struct
pci_attach_args *" instead of from four separate parameters which in
all cases were extracted from the same "struct pci_attach_args".

This both simplifies the driver api, and allows for alternate PCI
interrupt mapping schemes, such as one using the tables described in
the Intel Multiprocessor Spec which describe interrupt wirings for
devices behind pci-pci bridges based on the device's location rather
the bridge's location.

Tested on alpha and i386; welcome to 1.5Q
2000-12-28 22:59:06 +00:00
eeh 507aaec04c Adapt to the new line discipline scheme. 2000-11-02 00:01:44 +00:00
thorpej 081f57c846 Handle booting without a serial expander box connected. 2000-07-28 06:10:54 +00:00
thorpej 17de155949 Make sure we use firmware->host communication channel in cz_intr(), from
Bill Studenmund.
2000-06-14 17:54:33 +00:00
wrstuden eb21ed4746 Adapt to going back to decemal device numbering. 2000-06-09 18:00:45 +00:00
wrstuden 8d04cd3f90 Rather than assinging 64 tty's per pci card, assign tty's as found.
Cyclades says driver should work with up to 128 tty's per pci card
even though they only support 64 now. Also matches FreeBSD behavior.

Print located tty's using new tty naming scheme - ttyCZ?? where ?? are
two hex letters.

Make firmware load on macppc - one le32toh() was missing.
2000-06-09 16:53:23 +00:00
thorpej 4f92d2cd54 Update from Bill Studenmund <wrstuden@zembu.com>:
- Note that the FreeBSD driver distributed by Cyclades served as
  documentation on how the board works.
- Use the wait-until-pending-I/O-completes-before-loading-parameters
  command in czttyparam().
- Pass BREAKs up to the tty later properly.
- Garbage-collect some debugging code.
2000-05-24 22:26:35 +00:00
thorpej 8f7304f9b7 Typo in previous. 2000-05-23 16:47:44 +00:00
thorpej 5c9920bbb6 Update from Bill Studenmund <wrstuden@zembu.com>:
Correctly send and receive BREAKs -- still needs to do something
intelligent with them.  Some additional debugging goo.
2000-05-23 01:02:21 +00:00
thorpej 3e403cdb65 In tiocm_to_cztty(), use SET() instead of CLR() in the
TIOCMBIS case.  "Oops!"
2000-05-19 06:01:14 +00:00
thorpej 59164fe0fc Fix an inverted test. 2000-05-18 17:55:17 +00:00
thorpej 5274a6162f Add a device driver for the Cyclades-Z series of intelligent multi-port
serial boards.  Written by Jason R. Thorpe and Bill Studenmund.
2000-05-17 17:58:09 +00:00