summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/controller/ehci.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix for missing EHCI datatoggle change case.hselasky2011-04-261-0/+2
| | | | | | Reported by: Mike Tancsa MFC after: 3 days Approved by: thompsa (mentor)
* Fix initialisation order with regard to debug prints.hselasky2011-03-251-2/+2
| | | | | | Reported by: Luiz Otavio O Souza MFC after: 14 days Approved by: thompsa (mentor)
* Fix typo.hselasky2011-03-241-1/+1
| | | | | | Reported by: Garrett Cooper MFC after: 14 days Approved by: thompsa (mentor)
* Comply with style(9).hselasky2011-03-231-4/+4
| | | | | | Reported by: gavin MFC after: 14 days Approved by: thompsa (mentor)
* - Bugfix: Fix a EHCI hardware race, where the hardware computed data togglehselasky2011-03-211-3/+25
| | | | | | | | value is updated after that we read it in the queue-head. This patch can fix problems with BULK timeouts. The issue was found on a Nvidia chipset. MFC after: 14 days Approved by: thompsa (mentor)
* Remove unneeded includes of <sys/linker_set.h>. Other headers that usejhb2011-01-111-1/+0
| | | | | | it internally contain nested includes. Reviewed by: bde
* The EHCI_CAPLENGTH and EHCI_HCIVERSION registers are actually sub-registersnwhitehorn2010-10-251-2/+2
| | | | | | | within the first 4 bytes of the EHCI memory space. For controllers that use big-endian MMIO, reading them with 1- and 2-byte reads would then return the wrong values. Instead, read the combined register with a 4-byte read and mask out the interesting quantities.
* Revert most of r197682 (EHCI Hardware BUG workaround). Implementhselasky2010-10-141-40/+48
| | | | | | | | | | proper solution which is to not use the TERMINATE pointer, but rather link to a halted TD. The initial fix was due to a misunderstanding about how the EHCI hardware works. Thanks to Alan Stern for clearing this up. This patch can increase mass storage read performance significantly when the IRQ rate is less than 8000 IRQ/s. Approved by: thompsa (mentor)
* Avoid using endless retransmission at EHCI hardware level, hence this hidehselasky2010-10-141-1/+2
| | | | | | | errors from the applications. Only use endless retransmission while in the non-addressed state on a High-Speed device. Approved by: thompsa (mentor)
* Correct EHCI root HUB interface descriptor.hselasky2010-10-141-2/+1
| | | | Approved by: thompsa (mentor)
* Correct EHCI port register read.hselasky2010-10-141-1/+1
| | | | Approved by: thompsa (mentor)
* Change argument for usbd_get_dma_delay() from USB bus to USB device, somethompsa2010-09-021-1/+1
| | | | | | | embedded hardware needs to know exactly which device is in question before it exactly can decide the required delay. Submitted by: Hans Petter Selasky
* Add support for LOW speed BULK transfers. This mode is not recommended by thethompsa2010-06-221-3/+1
| | | | | | USB 2.0 standard, though some USB devices use it anyway. Submitted by: Hans Petter Selasky
* Back out r203140 which was causing problems when the first and the lastthompsa2010-05-121-9/+20
| | | | | | | | | | microframe slot was not in the smask. The problem was that the EHCI driver was then thinking that the transfer was immediately complete in some cases. Which could lead to freeze-like situations, which can be recovered by unplugging the USB device. Reported by: Richard Kolkovich Submitted by: Hans Petter Selasky
* Change USB_DEBUG to #ifdef and allow it to be turned off. Previously this hadthompsa2010-04-221-19/+19
| | | | | | the illusion of a tunable setting but was always turned on regardless. MFC after: 1 week
* Disable the use of the IAAD usb doorbell on NVidia controllers as it can causethompsa2010-02-091-0/+19
| | | | | | the hardware to stall. Submitted by: Hans Petter Selasky
* Optimise EHCI ISOC HS done check.thompsa2010-01-291-10/+7
| | | | Submitted by: Hans Petter Selasky
* Actually disable interrupts in ehci_detach().thompsa2009-11-231-1/+1
| | | | Reviewed by: HPS
* Provide tunables for some of the usb sysctls that affect boot behaviour.thompsa2009-11-221-0/+3
| | | | Submitted by: Andriy Gapon
* Improve High Speed slot allocation mechanism by moving the computation to thethompsa2009-11-221-47/+12
| | | | | | endpoint rather than per xfer and provide functions around get/free of resources. Submitted by: Hans Petter Selasky
* improve support for high speed isochronous endpoints which does not run 1:1,thompsa2009-11-081-27/+66
| | | | | | but needs intervalling 1:2, 1:4 or 1:8 Submitted by: Hans Petter Selasky
* Integrate lost interrupts patch from the old USB stack.thompsa2009-11-081-4/+36
| | | | | | | | | | | | | | | Some EHCI chips from VIA / ATI seem to trigger interrupts before writing back the qTD status, or miss signalling occasionally under heavy load. If the host machine is too fast, we can miss transaction completion - when we scan the active list the transaction still seems to be active. This generally exhibits itself as a umass stall that never recovers. We work around this behaviour by setting up this callback after any softintr that completes with transactions still pending, giving us another chance to check for completion after the writeback has taken place Submitted by: Alexander Nedotsuko MFC after: 3 days
* Workaround buggy BIOS code in USB regard. By doing the BIOS to OS handover forthompsa2009-10-151-0/+1
| | | | | | | | | all host controllers at the same time, we avoid problems where the BIOS will actually write to the USB registers of all the USB host controllers every time we handover one of them, and consequently reset the OS programmed values. Submitted by: avg Reviewed by: jhb
* EHCI Hardware BUG workaroundthompsa2009-10-011-21/+57
| | | | | | | | | | | | | | | | | The EHCI HW can use the qtd_next field instead of qtd_altnext when a short packet is received. This contradicts what is stated in the EHCI datasheet. Also the total-bytes field in the status field of the following TD gets corrupted upon reception of a short packet! We work this around in software by not queueing more than one job/TD at a time of up to 16Kbytes! The bug has been seen on multiple INTEL based EHCI chips. Other vendors have not been tested yet. - Applications using /dev/usb/X.Y.Z, where Z is non-zero are affected, but not applications using LibUSB v0.1, v1.2 and v2.0. - Mass Storage (umass) is affected. Submitted by: Hans Petter Selasky MFC after: 3 days
* Simplify logic around setting EHCI_QH_DTC and expand some htohc32(temp.sc, 0)thompsa2009-09-281-19/+15
| | | | | | statements to zero. Submitted by: Hans Petter Selasky
* USB CORE:alfred2009-07-301-0/+1
| | | | | | | | | | | - Add minimum polling support to drive UMASS and UKBD in case of panic. - Add extra check to ukbd probe to fix problem about mouse devices attaching like keyboards. - P4 ID: 166148 Submitted by: hps Approved by: re
* - Make struct usb_xfer opaque so that drivers can not access the internalsthompsa2009-06-231-3/+22
| | | | - Reduce the number of headers needed for a usb driver, the common case is just usb.h and usbdi.h
* s/usb2_/usb_|usbd_/ on all function names for the USB stack.thompsa2009-06-151-107/+107
|
* Rename usb pipes to endpoints as it better represents what they are, and structthompsa2009-06-071-58/+58
| | | | usb_pipe may be used for a different purpose later on.
* s/usb2_/usb_/ on all typedefs for the USB stack.thompsa2009-05-291-11/+11
|
* s/usb2_/usb_/ on all C structs for the USB stack.thompsa2009-05-281-85/+85
|
* Fix a failure to report failure on stalled status stage for controlthompsa2009-05-211-7/+0
| | | | | | transactions. Submitted by: Hans Petter Selasky
* Rename the usb sysctl tree from hw.usb2.* back to hw.usb.*.thompsa2009-05-211-3/+3
| | | | Submitted by: Hans Petter Selasky
* - rename usb2_mode to usb_mode [1]thompsa2009-05-211-2/+2
| | | | | | - change variable types to use the enum Submitted by: Hans Petter Selasky [1]
* Add debug lines for fullspeed and highspeed xfer completion.thompsa2009-05-131-0/+4
| | | | Submitted by: Hans Petter Selasky
* Revert part of r191494 which used the udev state to mark suspending, this needsthompsa2009-05-051-1/+1
| | | | | | | | to be set via two variables (peer_suspended and self_suspended) and can not be merged into one. Submitted by: Hans Petter Selasky Pointy hat: me
* Track the usb device state as its powered on, addressed and configured. This ↵thompsa2009-04-251-1/+1
| | | | | | | | | helps to avoid touching the device when it is not going to respond and would otherwise timeout. Implement the suspend tracking as a udev state too.
* MFp4 //depot/projects/usb@160930thompsa2009-04-221-49/+55
| | | | | | | Change the roothub exec functions to take the usb request and data pointers directly rather than placing them on the parent bus struct. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@160413thompsa2009-04-221-2/+2
| | | | | | | | | Use direct reference to parent high-speed HUB instead of indirect, due to pointer clearing race at detach of parent USB HUB. Reported by: kientzle Submitted by: Hans Petter Selasky PR: usb/133545
* Remove usb_sw_transfer.[ch] which are now empty after r190735.thompsa2009-04-061-1/+0
|
* Provide a better commit log for r190735, forced by making a whitespace change.thompsa2009-04-061-1/+1
| | | | | | | | | | | | Refactor how we interface with the root HUB. This is achieved by making a direct call from usb2_do_request to the host controller for root hub requests, this call will perform the controller specific register read/writes and return the error code. This cuts out a lot of code in the host controller files and saves one thread per USB bus. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@159946thompsa2009-04-051-10/+0
| | | | | | | Some cancelable flags are always true. Substitute these away. These cancelable flags were mostly useful with the root HUB which is now handled differently. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@159922thompsa2009-04-051-162/+14
| | | | | | | Refactor how we interface with the root HUB. This cuts around 1200 lines of code totally and saves one thread per USB bus. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb @159479,159502,159516,159522,159529thompsa2009-03-201-10/+33
| | | | | | | | Workaround for buggy USB hardware not handling new SETUP packet before STATUS stage is complete, this allows xfers to endpoint0 to return a short frame. Submitted by: Hans Petter Selasky Reported by: me
* MFp4 //depot/projects/usb @159431,159437,159438thompsa2009-03-201-6/+7
| | | | | | | - start using the new USB typedefs in the USB core - Remove usage of USB_ADD_BYTES() Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb @159430thompsa2009-03-201-2/+1
| | | | | | | | | | - Move tunable defines into usb_core.h and dependancy towards usb_defs.h - Leave hardcoded defines in "usb_defs.h". - Allow overriding all tunable defines. - Add more customisable typedefs. - Correct maximum device number. Submitted by: Hans Petter Selasky
* (re)merge r186415,186416 from the old usb stack;thompsa2009-03-071-200/+195
| | | | | | | | | | | | | | | o add Transaction Translator support (still missing ISOC xfers) o add EHCI_SCFLG_BIGEMMIO flag to force big-endian byte-select to be set in USBMODE o split reset work into new public routine ehci_reset so bus shim drivers can force big-endian byte-select before ehci_init o enable TT and big-endian MMIO o force a reset before ehci_init to get byte-select setup Also go back to using USB_EHCI_BIG_ENDIAN_DESC at compile time to enable the byteswapping and reduce diffs to the original commits. This fixes the new USB stack on the Cambria board.
* Fix some missed htole32 conversions to htoehci32.thompsa2009-03-071-8/+8
| | | | Reviewed by: hps
* MFp4 //depot/projects/usb@158692thompsa2009-03-061-0/+9
| | | | | | | Workaround a EHCI performance problem by issuing a doorbell after queueing a bulk xfer. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb@157853thompsa2009-02-241-33/+9
| | | | | | | Clean up old way of polling the USB hardware. The existing polling support was a bit hackish. Submitted by: Hans Petter Selasky
OpenPOWER on IntegriCloud