Commit Graph

70 Commits

Author SHA1 Message Date
augustss
86650920c9 Get rid of trailing white space. 2002-07-11 21:14:24 +00:00
augustss
f8e03bd53c Change some DIAGNOSTIC #defines. 2001-12-27 18:43:46 +00:00
augustss
bfc3660fb1 Add some more DIAGNOSTIC tests.
Make usb_match_device() match on USB_PRODUCT_ANY.
2001-12-24 21:36:15 +00:00
augustss
6bba920516 Wrap dump routine prototypes in #ifdef USB_DEBUG 2001-11-21 13:44:47 +00:00
augustss
7e4459fe10 Keep track of device speed for USB 2.0. 2001-11-20 13:48:03 +00:00
augustss
9a444aef81 Get rid of unused abort_handle. 2001-11-10 17:11:38 +00:00
augustss
3d963db4f2 Add some dump routines for debugging. 2001-11-10 16:54:56 +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
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
jdolecek
34c8ae80da constify 2001-01-18 20:28:15 +00:00
augustss
4dbac77503 #define for USB_2_0 2000-12-28 10:40:36 +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
thorpej
6a6fdc8681 Kill SPLUSBCHECK -- it's not portable, and quite annoying on some
platforms which otherwise function just fine.
2000-06-24 04:12:53 +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
dd7160dcba Afew more OpenBSD portability fixes. 2000-03-30 00:18:17 +00:00
simonb
365daa37be Remove redundant decl of cold - it's in <sys/kernel.h>. 2000-03-29 03:59:43 +00:00
augustss
5e754a177b Do not accept new xfers for queuing while a pipe is aborting. 2000-03-29 01:45:20 +00:00
augustss
3fded57690 Rename and move around callout handles to make it more sane.
Add some DIAGNOSTIC.
Fix buglet in isoc abort on UHCI.
2000-03-25 18:02:32 +00:00
augustss
df370f0e48 More DIAGNOSTIC.
Initialize a callout handle I forgot.
2000-03-25 07:13:05 +00:00
augustss
6aeaa39b1b GC an unsued field and add some DIAGNOSTIC in xfer. 2000-03-25 00:10:19 +00:00
augustss
0069eba19b Some cleanup and renaming of the callouts used in USB drivers. 2000-03-24 22:03:28 +00:00
thorpej
fc96443d15 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 07:01:25 +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
55c5d10627 Fix typos.
Never, never, never commit without compiling first.
2000-01-19 01:16:38 +00:00
augustss
c3716a6bb9 Add an argument to usbd_open_pipe_intr() to specify the polling interval
for an interrupt pipe in case we don't what what the descriptor suggests.
2000-01-19 00:23:58 +00:00
augustss
f14036861f Turn xfer allocation into a method in the HC driver. The reason is that
an HC driver may want to subclass the xfer to have additional private fields.
2000-01-18 20:11:00 +00:00
augustss
98347a7628 Add comments. 2000-01-16 09:43:43 +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
mycroft
105a2438f9 Fix an obvious bug is some diagnostic code; we must lower our spl again... 1999-11-10 04:19:59 +00:00
augustss
1eb80cc225 Make the SPLUSBCHECK diagnostic test silent durning cold boot. 1999-10-25 10:51:46 +00:00
augustss
11403b6ec1 Fix some bugs in USB controller detach code. 1999-10-12 20:02:47 +00:00
augustss
df435c83b2 Add an event mechanism so that a userland process can watch devices come
and go.
1999-10-12 11:54:56 +00:00
augustss
d4f0eac72e Change SPLUSBCHECK diagnostic macro a little. 1999-09-15 21:08:19 +00:00
augustss
7049e8eb1b Add preliminary (untested) code for detaching the USB host controller
(needed for CardBus based controllers).
1999-09-15 10:25:30 +00:00
augustss
ba2c2e2ade * Make sure an aborted pipe is marked as not running.
* Start queued request in the right order.
* Insert some more DIAGNOSTIC sanity checks.
1999-09-13 21:33:25 +00:00
augustss
bc5da9a8da Make sure timeouts count as interrupt context too. 1999-09-13 19:49:41 +00:00
augustss
ff6a476e6c Rearrange the code a little so we can decide if we are in process
or interrupt context in a reliable way.  Mainly used for DIAGNOSTIC.
1999-09-13 19:18:17 +00:00
augustss
98b6524413 * Move DMA buffer allocation to HC independent code.
* Remove (almost) unused definitions USBD_XFER_OUT and USBD_XFER_IN.
1999-09-11 08:19:26 +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
24251055bc Change the way the `struct device' base part of all driver softc are
declared and accessed to make it more portable.  Idea from Nick Hibma, FreeBSD.
No functional changes.
1999-09-05 19:32:18 +00:00
thorpej
f91881f24a Since we poll around the `done' member of a usbd_request, make it volatile. 1999-08-29 17:57:25 +00:00
augustss
036a9c6974 Change some 'struct device' to 'bdevice'. From FreeBSD. 1999-08-28 21:42:35 +00:00
augustss
f747201099 Move more of the transfer completion processing to HC independent code.
Fix some problems with transfer abort & timeout.
1999-08-22 20:12:39 +00:00
augustss
54adf47f36 Redo the UHCI data toggle handling.
Make sure data toggles get synchronized on open and
when clearing an endpoint stall.
1999-08-17 20:59:04 +00:00
augustss
3016e1ebe0 Make some small changes to make it compile on OpenBSD. 1999-08-17 16:06:20 +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
475ed73e46 Get rid of a bunch of code that was part of an old USBDI proposal, but that
is unused in our USB stack.

Once upon a time, when I started writing the USB stack for NetBSD, there
was an effort to make a standard for how USB device drivers should interact
with the rest of the USB stack.  This effort had contributors from just
about all Un*x camps (but not Micro$oft :).  I based my design on one of their
early proposals since I thought it would be a good idea if we could all
share device drivers with a minimum effort.  Shortly after I started my work
all the free Un*x people were thrown out of the USBDI work since we did not
pay the USB membership fee.  Well, some time has passed now and the work of
the standardization group is almost public again.  But alas, the new standard
has grown to be a monster!  I do not want to have this as the basis for the
*BSD USB stack; it is far too complicated.
So, since we are not even close to being compilant with the standard, I've
thrown out some old baggage.
1999-06-14 17:09:57 +00:00