Commit Graph

49 Commits

Author SHA1 Message Date
thorpej 72a7af27b0 Use aprint_normal() in cfprint routines. 2003-01-01 00:10:15 +00:00
thorpej de5b141b6a Avoid strict-alias warnings. 2002-11-25 02:28:56 +00:00
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 6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
simonb 4e3613273b Remove breaks after returns, unreachable returns and returns after
returns(!).
2002-09-23 05:51:10 +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
augustss 86650920c9 Get rid of trailing white space. 2002-07-11 21:14:24 +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
augustss 152efb1a0e Make a typedef for struct proc to make portingeasier. 2001-12-31 12:15:21 +00:00
lukem 667807e40c add RCSIDs 2001-11-13 06:24:53 +00:00
augustss a8415c10db Clear busy flag on write error. From PR 13731, IWAMOTO Toshihiro. 2001-08-16 22:31:24 +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
augustss 8086f5e0ec Print portno when attaching. 2001-04-02 13:18:31 +00:00
augustss 840a1d7e2b Fiddle enough with the tty so that it wakes up on detach and drops
the reference count on the ucom.
2001-01-23 22:06:25 +00:00
augustss 4b0119383e Ad support for an extra message in the ucom attach code. 2001-01-23 21:56:17 +00:00
augustss 0156530592 Null out pointers when closing pipes.
Try to wake upper layer on error.
2001-01-23 21:22:57 +00:00
augustss 23cffa82c7 Rearrange detach code so it is more likely to survive detaching an open
device (it's still not waking up readers properly).
2001-01-23 17:35:58 +00:00
eeh 507aaec04c Adapt to the new line discipline scheme. 2000-11-02 00:01:44 +00:00
explorer 365f7337ea make ucom into a random source, type TTY 2000-10-22 19:01:44 +00:00
augustss 23116295f4 Remove some // type comments. 2000-09-23 04:33:04 +00:00
toshii 8debbc34ab Change the second argument of tiocm_to_ucom to u_long,
since the second argument of ioctl is a u_long value.
2000-09-15 17:03:24 +00:00
toshii 8b74873d54 Cleanup the error handling code introduced in rev. 1.26. Commented by jhawk.
No functional change.
2000-09-13 05:17:14 +00:00
toshii f7d700a127 Make the control line handling a little better. Avoid a DTR/RTS issue
from uninitialized sc_mcr by not calling ucom_{dtr,rts} if possible.

XXX Flow control is still incomplete and needs more work.
2000-09-10 03:10:20 +00:00
toshii 6bc11dce71 In ucomopen(), make sure to call splx() before returning
when initialization fails.
2000-09-08 07:20:52 +00:00
augustss 5cf4edb506 Handle output packet headers in a cleaner way. From IWAMOTO Toshihiro
<iwamoto@sat.t.u-tokyo.ac.jp>, fixes kern/10573.
2000-09-03 19:15:45 +00:00
augustss ed9486e158 Bring the coding style into the 80s, i.e., get rid of __P and use
ANSI prototypes and declarations.
2000-06-01 14:28:57 +00:00
augustss 30c20f930f Change my email address. 2000-04-27 15:26:44 +00:00
augustss 1767c08cba Add a capability for pre/post processing on write/read. 2000-04-14 14:21:55 +00:00
itojun d65678850d fix build of ucom. (static/non-static) 2000-04-08 01:22:26 +00:00
augustss 3b05a69aa2 Remove a couple of Static that shouldn't be there. 2000-04-07 12:40:16 +00:00
augustss a302716de4 Let the parent device of a ucom decide what size the read and write
buffers should be since it knows about the speed.
Increase the buffer size of uvisor.
XXX The uvisor is still pitifully slow.  There must be a problem somewhere.
2000-04-06 13:32:28 +00:00
augustss 1acb380bf7 Make it compile without USB_DEBUG. From Chris Jones. 2000-04-05 21:24:11 +00:00
augustss 8b5373dd2e Use reference counting on the softc so detach doesn't blow it away prematurely. 2000-04-05 11:11:33 +00:00
augustss fc72e72d7d Change (almost) all static to Static. The symbol `Static' can then be defined
to `' or `static' depending on if you want to debug or not.
2000-03-27 12:33:53 +00:00
augustss e922214fb2 Use NULL instead of 0. 2000-02-08 18:45:27 +00:00
augustss e0c519464a Add methods for ucom to call back on open/close. 2000-02-08 09:18:01 +00:00
augustss 0335569abc Make it compile even if you leave out the ucom attachment. 2000-01-25 13:56:23 +00:00
augustss a2b1ac707a Split the umodem driver into two parts: the part that emulates a tty over
two bulk pipes, and the setup and status fiddling goo.
This allows the former part to be shared by other drivers that need to
look like a tty.
2000-01-25 08:12:58 +00:00
augustss 0d2fabdf26 A number of stylistic changes to increase readability (many suggested
by Nick Hibma):
	use NULL not 0
	declare all local definitions static
	rename s/usbd_request/usbd_xfer/ s/reqh/xfer/
	rename s/r/err/
	use implicit test for no err
	KNF
1999-11-12 00:34:57 +00:00
augustss 2aadcb5f47 Change the internal API to allow DMA buffers to be pre-allocated by
the device driver instead of happening automagically in the HC driver.
This affects both the HC-USBD interface as well as the USBD-device
interface.
This change will allow DMA buffers to be reused e.g. in isochronous
traffic.

Add isochronous support to the UHCI driver (not for OHCI yet).
1999-09-09 12:26:43 +00:00
augustss b8b1e35ece Some changes from FreeBSD (no functional differences). 1999-08-14 14:49:31 +00:00
augustss b177c7a397 Totally redo the way device detach is done. It now uses a kernel event
thread and the config detach method.
Squish a number of space leaks on detach.
1999-06-30 06:44:22 +00:00
augustss f963dc8ddb Some minor updates from FreeBSD. 1999-01-10 19:13:15 +00:00
augustss 875aa92d2c Various little fixes from the FreeBSD version. 1999-01-08 11:58:25 +00:00
augustss e4b5e096e8 Fix some FreeBSD compiler warnings. 1999-01-07 02:22:50 +00:00
augustss 3b9a669a7d Remove #include that slipped in at FreeBSD merge. 1998-12-30 17:46:20 +00:00
augustss e0c228ae9c Merge changes to make the USB stack work with FreeBSD. The original
diffs from Nick Hibma <n_hibma@freebsd.org>, but with substantial
changes from me.
XXX Not tested on FreeBSD yet.
1998-12-26 12:53:00 +00:00
augustss f8b9a417f0 Improvement to the ugen driver.
Better error checking.
Some code rearrengment.
1998-12-09 00:18:10 +00:00
augustss e424a174ba Add stub for a modem driver. 1998-12-02 22:47:19 +00:00