summaryrefslogtreecommitdiff
path: root/sys/dev/usb/controller/uhci.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r260588 and r260589:Hans Petter Selasky2014-01-241-2/+7
| | | | | | | | | | | | | - Separate I/O errors from reception of STALL PID. - Implement better error recovery for Transaction Translators, TTs, found in High Speed USB HUBs which translate from High Speed USB into FULL or LOW speed USB. In some rare cases SPLIT transactions might get lost, which might leave the TT in an unknown state. Whenever we detect such an error try to issue either a clear TT buffer request, or if that is not possible reset the whole TT. Notes: svn path=/stable/10/; revision=261105
* Revert r251023 until a more proper solution is foundHans Petter Selasky2013-05-281-13/+0
| | | | | | | | | for ATI based USB controllers. MFC after: 1 week Notes: svn path=/head/; revision=251065
* Workaround for for a problem seen with ATI Technologies EHCIHans Petter Selasky2013-05-271-0/+13
| | | | | | | | | | | | | | | | | | | controller hardware most likely present on UHCI chipsets aswell. The bug manifests itself when issuing isochronous transfers and bulk transfers towards the same device simultaneously. From time to time it happens that either the completion IRQ was missing or that the completion IRQ was happening before the ITD/SITD was completely written back to memory. The workaround assumes that double buffered isochronous transfers are used, and that a second interrupt is generated at the beginning of the next isochronous transfer to complete the previous one. Possibly skipping the interrupt at the last isochronous frame is possible, but will then break single buffered isochronous transfers. For now we can live with some extra interrupts. MFC after: 1 week Notes: svn path=/head/; revision=251023
* Modify the FreeBSD USB kernel code so that it can be compiled directlyHans Petter Selasky2013-01-301-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | into the FreeBSD boot loader, typically for non-USB aware BIOSes, EFI systems or embedded platforms. This is also useful for out of the system compilation of the FreeBSD USB stack for various purposes. The USB kernel files can now optionally include a global header file which should include all needed definitions required to compile the FreeBSD USB stack. When the global USB header file is included, no other USB header files will be included by default. Add new file containing the USB stack configuration for the FreeBSD loader build. Replace some __FBSDID()'s by /* $FreeBSD$ */ comments. Now all USB files follow the same style. Use cases: - console in loader via USB - loading kernel via USB Discussed with: Hiroki Sato, hrs @ EuroBSDCon Notes: svn path=/head/; revision=246122
* Add missing CTLFLAG_TUN flag to tunable sysctls in USB stack.Hans Petter Selasky2012-10-261-4/+3
| | | | | | | | | | | Rearrange the tunables and belonging sysctl declarations, so that they are next to eachother. Submitted by: n_hibma @ MFC after: 1 week Notes: svn path=/head/; revision=242126
* Make several timing parameters of the USB enumeration sequence tuneable.Hans Petter Selasky2012-10-241-2/+2
| | | | | | | | | | | | | | Also update the port reset time from 250ms to 50ms. Some USB devices have a hard limit in hardware at 222ms for the port reset time and will not enumerate unless this delay is closer to the usb.org defined value. This patch can fix enumeration with some USB devices. Tested by: Guido van Rooij Submitted by: Nick Hibma MFC after: 1 week Notes: svn path=/head/; revision=241987
* Inherit USB mode from RootHUB port where the USB device is connected.Hans Petter Selasky2012-10-011-4/+0
| | | | | | | | | | Only RootHUB ports can be dual mode. Disallow OTG ports on external HUBs. This simplifies some checks in the USB controller drivers. MFC after: 1 week Notes: svn path=/head/; revision=241082
* Fix compiler warnings, mostly signed issues,Hans Petter Selasky2012-04-021-7/+5
| | | | | | | | | when USB modules are compiled with WARNS=9. MFC after: 1 weeks Notes: svn path=/head/; revision=233774
* Implement better support for USB controller suspend and resume.Hans Petter Selasky2011-12-141-27/+29
| | | | | | | | | | | | | This patch should remove the need for kldunload of USB controller drivers at suspend and kldload of USB controller drivers at resume. This patch also fixes some build issues in avr32dci.c MFC after: 2 weeks Notes: svn path=/head/; revision=228483
* Style change.Hans Petter Selasky2011-11-121-1/+1
| | | | | | | | | | | | | | | - Make it easier to port the USB code to other platforms by only using one set of memory functions for clearing and copying memory. None of the memory copies are overlapping. This means using bcopy() is not required. - Fix a compile warning when USB_HAVE_BUSDMA=0 - Add missing semicolon in avr32dci. - Update some comments. MFC after: 1 week Notes: svn path=/head/; revision=227461
* Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.Ed Schouten2011-11-071-1/+1
| | | | | | | | | The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static. Notes: svn path=/head/; revision=227309
* Remove unneeded includes of <sys/linker_set.h>. Other headers that useJohn Baldwin2011-01-111-1/+0
| | | | | | | | | it internally contain nested includes. Reviewed by: bde Notes: svn path=/head/; revision=217265
* Change argument for usbd_get_dma_delay() from USB bus to USB device, someAndrew Thompson2010-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 Notes: svn path=/head/; revision=212134
* Add support for LOW speed BULK transfers. This mode is not recommended by theAndrew Thompson2010-06-221-3/+1
| | | | | | | | | USB 2.0 standard, though some USB devices use it anyway. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=209443
* Change USB_DEBUG to #ifdef and allow it to be turned off. Previously this hadAndrew Thompson2010-04-221-17/+17
| | | | | | | | | the illusion of a tunable setting but was always turned on regardless. MFC after: 1 week Notes: svn path=/head/; revision=207077
* Remove unused uhci_dump_qhs().Edward Tomasz Napierala2010-01-081-27/+0
| | | | | | | Reviewed by: hps Notes: svn path=/head/; revision=201797
* Provide tunables for some of the usb sysctls that affect boot behaviour.Andrew Thompson2009-11-221-0/+4
| | | | | | | Submitted by: Andriy Gapon Notes: svn path=/head/; revision=199675
* Workaround buggy BIOS code in USB regard. By doing the BIOS to OS handover forAndrew Thompson2009-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 Notes: svn path=/head/; revision=198151
* USB CORE:Alfred Perlstein2009-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 Notes: svn path=/head/; revision=195960
* - Make struct usb_xfer opaque so that drivers can not access the internalsAndrew Thompson2009-06-231-3/+22
| | | | | | | - Reduce the number of headers needed for a usb driver, the common case is just usb.h and usbdi.h Notes: svn path=/head/; revision=194677
* s/usb2_/usb_|usbd_/ on all function names for the USB stack.Andrew Thompson2009-06-151-77/+77
| | | | Notes: svn path=/head/; revision=194228
* Rename usb pipes to endpoints as it better represents what they are, and structAndrew Thompson2009-06-071-40/+40
| | | | | | | usb_pipe may be used for a different purpose later on. Notes: svn path=/head/; revision=193644
* s/usb2_/usb_/ on all typedefs for the USB stack.Andrew Thompson2009-05-291-9/+9
| | | | Notes: svn path=/head/; revision=193045
* s/usb2_/usb_/ on all C structs for the USB stack.Andrew Thompson2009-05-281-79/+79
| | | | Notes: svn path=/head/; revision=192984
* Rename the usb sysctl tree from hw.usb2.* back to hw.usb.*.Andrew Thompson2009-05-211-3/+3
| | | | | | | Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=192502
* - rename usb2_mode to usb_mode [1]Andrew Thompson2009-05-211-2/+2
| | | | | | | | | - change variable types to use the enum Submitted by: Hans Petter Selasky [1] Notes: svn path=/head/; revision=192499
* Make sure the frame list base address is re-programmed after stopping the USBAndrew Thompson2009-05-051-37/+50
| | | | | | | | | | schedule, in case the hardware clears the frame list base address. Submitted by: Hans Petter Selasky Reported by: Chao Shin Notes: svn path=/head/; revision=191826
* Revert part of r191494 which used the udev state to mark suspending, this needsAndrew Thompson2009-05-051-5/+3
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=191824
* Track the usb device state as its powered on, addressed and configured. This ↵Andrew Thompson2009-04-251-3/+3
| | | | | | | | | | | | 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. Notes: svn path=/head/; revision=191494
* MFp4 //depot/projects/usb@160930Andrew Thompson2009-04-221-50/+56
| | | | | | | | | | 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 Notes: svn path=/head/; revision=191402
* Remove usb_sw_transfer.[ch] which are now empty after r190735.Andrew Thompson2009-04-061-1/+0
| | | | Notes: svn path=/head/; revision=190755
* Provide a better commit log for r190735, forced by making a whitespace change.Andrew Thompson2009-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 Notes: svn path=/head/; revision=190754
* MFp4 //depot/projects/usb@159946Andrew Thompson2009-04-051-8/+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 Notes: svn path=/head/; revision=190738
* MFp4 //depot/projects/usb@159922Andrew Thompson2009-04-051-180/+29
| | | | | | | | | | 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 Notes: svn path=/head/; revision=190735
* MFp4 //depot/projects/usb @159479,159502,159516,159522,159529Andrew Thompson2009-03-201-25/+45
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=190183
* MFp4 //depot/projects/usb @159431,159437,159438Andrew Thompson2009-03-201-2/+3
| | | | | | | | | | - start using the new USB typedefs in the USB core - Remove usage of USB_ADD_BYTES() Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=190181
* MFp4 //depot/projects/usb @159430Andrew Thompson2009-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 Notes: svn path=/head/; revision=190174
* MFp4 //depot/projects/usb@157853Andrew Thompson2009-02-241-31/+8
| | | | | | | | | | Clean up old way of polling the USB hardware. The existing polling support was a bit hackish. Submitted by: Hans Petter Selasky Notes: svn path=/head/; revision=188983
* Move the new USB stack into its new home.Andrew Thompson2009-02-231-0/+3381
Notes: svn path=/head/; revision=188942