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
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
2425433ff6
Change some printf to DPRINTF for consistency. From Nick Hibma, FreeBSD.
1999-09-05 21:22:38 +00:00
augustss
f3421bec94
Change the way the direction is extracted from the endpoint descriptor.
...
No functional changes to the drivers. From Nick Hibma, FreeBSD.
1999-09-04 22:26:11 +00:00
augustss
4c217fdaf8
Merge the soft_{td,ed} with the real {td,ed}. This saves time and space.
...
(And fix typo in corresponding uhci change.)
1999-08-22 23:41:00 +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
290c03447b
Change the way transfers are dequeued so thet we know that they
...
are removed from the queue before being deallocated.
1999-08-16 20:24:33 +00:00
augustss
b23490d39f
Implement timeout and abort of requests.
...
Compute length of short transfers correctly.
1999-08-14 08:56:09 +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
2959234be5
Fix a bug in bulk input. Discovered by Joel Chen <jchen@liberate.com>.
1999-06-09 22:57:16 +00:00
wrstuden
cd0a68c3f6
Fix use of & when % was appropriate.
1999-06-09 19:40:54 +00:00
augustss
ac197c5354
Update documentation URLs.
1999-05-21 10:15:23 +00:00
augustss
4655ae1230
Keep track of vendor id and make sure the vendor string is NUL terminated.
1999-05-20 09:52:35 +00:00
augustss
ea2a114cf0
Fix a serious bug in bandwidth accounting that thrashed memory.
...
Thanks to Joel Chen <jchen@nc.com> for tracking it down.
1999-05-09 22:48:35 +00:00
augustss
79f94410b1
Back out previous fix and apply the patch from Nick Hibma the right way.
1999-01-13 10:33:53 +00:00
augustss
8d6f121902
Fixes from Nick Hibma.
1999-01-13 10:08:59 +00:00
augustss
af7f630631
Some patches from FreeBSD.
1999-01-10 18:42:10 +00:00
augustss
17570494a7
Add back a line that was lost somehow.
1999-01-10 16:38:54 +00:00
augustss
1f1524514a
Ooops, I didn't mean to commit that. Back out.
1999-01-07 02:06:05 +00:00
augustss
02369a7cd2
Add another paranoia test in the interrupt routine.
1999-01-07 01:59:24 +00:00
augustss
bf9647a056
Set the correct transfer count on interrupt transfers.
1999-01-01 15:15:33 +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
47ff9e7c63
Implement short transfers.
1998-12-29 05:08:57 +00:00
augustss
4c9147cd38
Remove part of the bigendian patch that was not supposed to be commited.
1998-12-29 03:01:44 +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
020a909cba
Add a lot of byte swapping to get the code to work on big endian machines.
...
Patch from Tsubai Masanari <tsubai@iri.co.jp>.
Add an extra controller reset. According to the OHCI spec it shouldn't
be necessary, but without some machines don't work.
1998-12-28 12:56:19 +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
46e04a18a1
Take care of some lines > 80 chars.
1998-12-10 23:16:47 +00:00
augustss
43c3030bd5
Print plain text error codes.
1998-12-08 14:34:08 +00:00
augustss
8ae89c20dc
Do untimeout() for the timeouts we set up.
...
(How can this ever have worked?)
1998-11-30 21:39:20 +00:00
augustss
ca707fcdf2
Make the copyright header conform to the NetBSD template.
1998-11-25 22:32:04 +00:00
augustss
32dd1a1d5a
Make sure the Endpoint Descriptor gets the correct maximum packet size.
1998-11-22 20:21:22 +00:00
augustss
c73add02ca
Fix some typos.
1998-11-21 18:57:09 +00:00
augustss
a0aeff98c4
Fix two pastos.
1998-08-05 10:16:25 +00:00
augustss
ac2b25e392
Improve some error messages.
...
Make some preparations for isochronous transfers.
1998-08-02 22:30:52 +00:00
augustss
f654e0188e
Switch from a global flag to tell if the host controller should use
...
polling to a local one for each controller.
1998-08-01 18:16:19 +00:00
augustss
638fb6a638
A first stab att supporting console access with a USB keyboard.
1998-07-26 17:42:48 +00:00
augustss
b916de0f86
Add special memory allocation routines that supports allocation
...
DMA-able memory in small chunks (USB uses a lot of 8 byte chunks).
Using the bus_dma functions directly is inefficient.
1998-07-24 21:09:07 +00:00
augustss
8cdf268a45
Implement bulk transfer for OHCI.
1998-07-23 13:41:04 +00:00
augustss
964fdc18b8
Use the pipe maximum packet length rather than the device max length when
...
setting up a transfer.
Update the UHCI data toggle correctly.
1998-07-23 01:46:27 +00:00
augustss
deb00272b9
Add USB support. Supported so far:
...
* UHCI and OHCI host controllers on PCI
* Hubs
* HID devices withe special drivers for mouse and keyboard
* Printers
1998-07-12 19:51:55 +00:00