Commit Graph

58 Commits

Author SHA1 Message Date
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
augustss
011be0080e Add vendor/product/release locators. Added in frustration as my HID
devices appeared as different devices after some plugging and unplugging. :-)
1999-05-16 13:51:05 +00:00
thorpej
0d0cc4aa14 Rework the way ukbd attaches itself as the console (again). We now allow
the code to pick the first USB keyboard instance as the console, ignoring
which USB controller it's on.  Should eventually allow detaching of the
console keyboard.

From Jason Thorpe <thorpej@nas.nasa.gov>
1999-05-13 23:34:38 +00:00
thorpej
375d7c32f2 Add a way for machine-dependent code to tell a USB controller that it
has the console input device.  The USB keyboard driver uses this to
attach the first USB keyboard instance as the console keyboard.

Unfortunately, this must still be deferred to autoconfiguration time,
but there's not much we can do about that right now.
1999-05-06 19:12: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
20f51aae57 Split usbd_delay_ms() into two functions, one can be used in
device drivers.
1998-12-30 18:06:25 +00:00
augustss
21e272bf01 Do not blindly assume that a device supports language id 0, instead
ask it what languages it supports.
1998-12-29 16:02:55 +00:00
augustss
dfad58d4e0 Change the host controller internal API a little and add some incomplete
support for isochronous transfers.
1998-12-28 20:13:59 +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
2228eaca8a Add configuration and interface locators. 1998-12-02 22:57:08 +00:00