Commit Graph

77 Commits

Author SHA1 Message Date
thorpej 72a7af27b0 Use aprint_normal() in cfprint routines. 2003-01-01 00:10:15 +00:00
dsainty 3d3cc353c3 extern references to debugging globals that really exist elsewhere 2002-12-30 02:44:32 +00:00
christos 514f7047e4 si_ -> sel_ 2002-11-26 18:49:40 +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
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
lukem 06de426449 SIMPLEQ rototill:
- implement SIMPLEQ_REMOVE(head, elm, type, field).  whilst it's O(n),
  this mirrors the functionality of SLIST_REMOVE() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
  this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups
2002-06-01 23:50:52 +00:00
augustss 2acf4c8462 Use callout init macro. 2002-05-09 21:54:32 +00:00
augustss 0405958cec Check for write permission for some ioctls. 2002-04-23 06:34:11 +00:00
christos 6728d906e9 Prefix structure members to protect them against clashes with eg. c++ keywords.
Suggested by Alfred Perlstein, from FreeBSD, ok'd by augustss
2002-02-20 20:30:12 +00:00
augustss 319f13f6ef Give usbd_do_request_flags() an extra argument for the timeout. 2002-02-11 15:11:49 +00:00
augustss 7f01f1dd6b Some white space fixes from FreeBSD. 2002-02-03 18:15:20 +00:00
augustss f854b2521f Add a DIAGNOSTIC check. From FreeBSD. 2002-01-03 22:20:45 +00:00
augustss e4552bb657 Add a comment. 2002-01-02 22:44:44 +00:00
augustss 68d53cd694 Fix typo in last commit. 2002-01-02 20:58:12 +00:00
augustss f7839315fb Some more usb_proc_ptr changes.
Also some minor stylistic changes.
2002-01-02 20:55:58 +00:00
augustss cec9735688 Delay bus enumeration a little in case the controller is a companion
controller.  This way the main controller can gain ownership of the port
before enumeration starts.
2001-12-31 15:55:51 +00:00
augustss 152efb1a0e Make a typedef for struct proc to make portingeasier. 2001-12-31 12:15:21 +00:00
augustss 380fd47edb Change wchan name for usb task thread. 2001-11-26 20:16:55 +00:00
augustss b171d0908b Create a special kernel thread to run the usb short lived tasks (instead
of using the device discovery threads).
2001-11-20 23:53:26 +00:00
augustss 7e4459fe10 Keep track of device speed for USB 2.0. 2001-11-20 13:48:03 +00:00
augustss 8b1e2b3b6d Add some #endif comments. 2001-11-13 07:55:30 +00:00
lukem 667807e40c add RCSIDs 2001-11-13 06:24:53 +00:00
augustss 3dd8433864 Add a debug message. 2001-11-09 14:59:11 +00:00
augustss 5e8cefc2ea Ad function to remove a usb task. 2001-01-23 17:04:30 +00:00
augustss 996efaa78c Ad a comment. 2001-01-21 19:00:29 +00:00
augustss df20cb2972 Change the operation of the USB event thread. Before it only performed
USB device discovery, now it can also perform (short) tasks for device
drivers that need a process context, but don't have one.
This is not pretty, but better than using busy-wait in an interrupt context.
2001-01-21 19:00:06 +00:00
augustss 8502ed9498 Remove `#ifdef FreeBSD'; they maintain their own version. 2001-01-21 16:55:11 +00:00
augustss e8db629494 Add code to use soft interrupt to handle USB interrupt processing.
Don't enable the code since it doesn't work with the kludgy Ethernet drivers.
2001-01-21 02:39:52 +00:00
augustss 34bb7b9a35 Don't try to access a device that is being disconnected when generating
the detach event.  Fixes (I hope) PR 11713 from itohy@netbsd.org (ITOH Yasufumi).
2000-12-13 04:05:14 +00:00
augustss fa9cfe5e39 Removed unnecessary variable declaration. 2000-08-24 14:12:34 +00:00
thorpej 23ef490928 Deal with the fact that tsleep() may be a macro. 2000-06-07 00:33:51 +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 a25e27e1eb Some OpenBSD portability fixes. 2000-03-29 18:24:52 +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 c99c03da4d Make the USB event queue longer. Mine overflows before the (user-land)
event handler has started.  But then I have about 25 devices connected. :)
2000-03-16 00:46:38 +00:00
augustss 1e1f1f3b3b Make sure the USB event thread discovers all devices first time it call
usb_discover().
It should now be possible to have the root NFS mounted over a USB Ethernet
adapter.
2000-03-14 23:13:12 +00:00
augustss 9056664327 Prepare a little for having USB interrupt processing done outside the hard
interrupt level (in a thread or a softintr).
No real soft processing done yet.
2000-02-22 11:30:54 +00:00
augustss 481e8339dc Change the USB event mechanism to include more information about devices
and drivers.  Partly from FreeBSD.
2000-02-02 07:33:59 +00:00
thorpej e2e27455dd Use config_pending. 2000-01-24 18:35:51 +00:00
augustss 0e7b1b9ec1 Use the flags `locator' to govern if devices are detected early or
late during cold boot.
1999-12-22 23:54:09 +00:00
augustss a1352b2625 Make sure tsleep() is not called during cold boot. 1999-12-20 02:12:23 +00:00
augustss d94a5b55fb Make timeout device exploration optional in debug mode. 1999-11-26 01:41:03 +00:00
augustss 17971be39a Don't used extern on uhcidebug and ohidebug variables. 1999-11-22 21:57:09 +00:00
augustss 14896709bf Join two lines in the attach message. 1999-11-20 01:15:25 +00:00
augustss 7b92ed07bd Propagate the USB revision number to the usb driver. 1999-11-20 00:57:08 +00:00
augustss 3386c68b46 Cosmetic changes and some small improvements. From FreeBSD and Nick Hibma. 1999-11-18 23:32:25 +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 03a522d3c1 Merge in a large batch of changes from Nick Hibma <hibma@skylink.it> so
the USB stack compiles on FreeBSD again.
1999-10-13 08:10:55 +00:00