Commit Graph

95 Commits

Author SHA1 Message Date
augustss eb210eda08 Make the ohci driver not hang suspend/resume. It still doesn't resume
correctly.  From itohy@netbsd.org (ITOH Yasufumi) PR kern/11714.
2000-12-13 03:09:06 +00:00
augustss 6836c0bd28 Update frlengths after a isoc transfer.
Suggested by Yuri <yuri@tsoft.com>
2000-11-10 14:11:49 +00:00
augustss 7e5bb38ef2 Add an XXX comment. 2000-08-17 23:18:56 +00:00
tv 2b3a50d3de %b -> bitmask_snprintf()
Because this code is shared, add a macro for bitmask_snprintf() that
should expand to the equivalent snprintf() on non-NetBSD systems.  This is
only used in ?HCI_DEBUG cases anyway.
2000-08-08 19:51:46 +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
thorpej 622e87734a Quiet some uninitialized variable warnings that do in fact look legitimate. 2000-05-08 18:28:46 +00:00
augustss 30c20f930f Change my email address. 2000-04-27 15:26:44 +00:00
augustss df70862e8c Insert (very conservative!) bus_space_barrier() calls at all register accesses.
The bus_space(9) man page says you've gotta have them...
2000-04-25 14:28:13 +00:00
augustss 3a27942ba8 Add a clarifying comment. 2000-04-22 22:50:44 +00:00
augustss fdeba432d2 Add a comment about a non-obvious use of a #define. 2000-04-21 15:38:55 +00:00
augustss 7311856f29 Add a delay before reading the number of ports from the controller to
avoid getting 0 from it.
2000-04-01 09:27:35 +00:00
augustss a25e27e1eb Some OpenBSD portability fixes. 2000-03-29 18:24:52 +00:00
augustss 7e7ceecd2b A first stab at support for isochronous transfers. 2000-03-29 01:46:26 +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 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 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 eb6e78ce98 Make sure all packets (except the last) have the maximum packet size even
when using multiple TDs.
2000-03-20 00:37:00 +00:00
augustss 9762d78a52 Make control transfer of over 8K possible by using a chain of TDs. 2000-03-19 22:24:57 +00:00
tsutsui 6e0e3d609f Replace LE() macro with le32toh()/le32toh(). 2000-03-16 12:40:51 +00:00
augustss 1a9f0619fd Fix thinko in the handling of FORCE_SHORT_XFER so that it actually
transfers a 0 length package instead on munging the whole transfer.
The aue driver works now.
2000-03-16 00:41:50 +00:00
augustss 7d05674ba7 Distinguish between device and interface classes.
(I finally found a document that said that they were different.)
2000-02-29 21:37:00 +00:00
augustss 9651e60835 Fix typos in my last commit that caused the driver to panic.
Change some (unrelated) debug messages.
2000-02-22 22:59:49 +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 6393288539 Put some #ifdefs around power and shutdown hooks. 2000-02-01 05:42:52 +00:00
augustss daa36b1b58 Rename TAILMASK to HEADMASK, since it really masks the head pointer.
From FreeBSD.
2000-01-31 22:35:13 +00:00
augustss cc46ffeb91 Change where the has table for physical-to-virtual address translation
is handled.  Partly from FreeBSD.
2000-01-31 22:09:13 +00:00
augustss ae4bbc4485 Fiddle with over-current protect when turning on port power to make
things work for some OHCI controllers.
2000-01-31 20:17:25 +00:00
augustss ef79cf035a Correct error message list. From Nick Hibma. 2000-01-28 13:32:55 +00:00
augustss 119272426a Fix typo. From Nick Hibma. 2000-01-28 10:19:48 +00:00
augustss f0ebd281e5 Add done method for root control transfers. 2000-01-25 12:06:21 +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 21863071b1 Move the zeroing of the xfer to the individual methods. 2000-01-18 20:23:42 +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 537c04e5ee Add a flag, USBD_FORCE_SHORT_XFER, to transfers. Using this flag will
force the last packet of a transfer to be smaller than the maximum
packet size.  The only time this matters is if the transfer size is
a multiple of the maximum packet size, in which case a 0 length packet
is sent last.
Some weird devices require this behaviour to determine the end of
a transfer.
2000-01-16 13:12:05 +00:00
augustss 9e5ce08183 Add framework for doing isoc transfers. The actual scheduling code
is still missing.
2000-01-16 10:35:24 +00:00
augustss 1a080201cc Add shutdown hooks to ensure that the host controller is halted when
a reboot occurs.
2000-01-16 10:27:51 +00:00
augustss 8111aaeef9 Cosmetics and a couple of diagnostic messages. 1999-12-06 21:06:59 +00:00
augustss b687c3c859 Some more DIAGNOSTIC. 1999-12-01 23:19:11 +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 cdaec29859 A few more purely stylistic changes that I missed in the last round. 1999-11-17 23:00:49 +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
augustss 11403b6ec1 Fix some bugs in USB controller detach code. 1999-10-12 20:02:47 +00:00
augustss b14b78dfc9 Deallocate resources (bus space and interrupts) when detaching from
the bus.
1999-10-12 11:21:24 +00:00
augustss fb7795c908 Make sure the HC deactivation is propagated. 1999-09-18 11:25:50 +00:00
augustss 2557320246 Handle the case when a USB transfer is so long that it crosses two page
(4K) boundaries.  OHCI cannot do that with a single TD so we make a chain.
1999-09-15 21:14:03 +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