summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/controller
Commit message (Collapse)AuthorAgeFilesLines
* MFC r272349, r272422 and r272479:hselasky2014-10-062-8/+16
| | | | | | | | | | | | - Fix XHCI driver for devices which have more than 15 physical root HUB ports. The current bitmap array was too small to hold more than 16 bits and would at some point toggle the context size, which then would trigger an enumeration fault and cause a fallback to the EHCI companion controller, if any. - Make sure we always set the maximum number of valid contexts. - Set default cycle state in case of early interrupts. Approved by: re, marius
* MFC r271953:hselasky2014-09-251-1/+8
| | | | | | | Some XHCI hardware requires dropping the endpoint context before adding it again. Approved by: re, glebius
* MFC r269565:hselasky2014-08-132-4/+4
| | | | Rename driver name a bit to avoid unit number confusion in dmesg.
* MFC r269604:hselasky2014-08-134-85/+127
| | | | | | | | - Implement fast interrupt handler to save CPU usage. - Cleanup some register reads and writes to use existing register access macros. - Ensure code which only applies to the control endpoint is not run for other endpoints in the data transfer path.
* MFC r257594:hselasky2014-08-121-0/+4
| | | | Add description of two EHCI PCI IDs.
* MFC r269139:hselasky2014-08-022-22/+22
| | | | | Split the XHCI TRB allocations into smaller parts, so that we don't end up allocating contiguous busdma buffers above PAGE_SIZE bytes.
* MFC r268735:hselasky2014-07-191-3/+6
| | | | | | | Improve support for Intel Lynx Point USB 3.0 controllers by using the USB 2.0 port mask in addition to the USB 3.0 port mask. The hardware does not always accept when writing -1U to the port switching registers.
* MFC r268354:hselasky2014-07-142-0/+5
| | | | | Improve support for Intel Lynx Point USB 3.0 controllers by masking the port routing bits like done in Linux.
* MFC: r267321marius2014-06-231-2/+3
| | | | | | | | | Avoid the USB device disconnected and controller shutdown clutter on system shutdown by putting the former under !rebooting and turning the latter into debug messages. Reviewed by: hps Sponsored by: Bally Wulff Games & Entertainment GmbH
* MFC r267240:hselasky2014-06-111-1/+7
| | | | | | | | | Resolve a deadlock setting the USB configuration index from userspace on USB HUBs by moving the code into the USB explore threads. The deadlock happens because child devices of the USB HUB don't have the expected reference count when called from outside the explore thread. Only the HUB device itself, which the IOCTL interface locks, gets the correct reference count.
* MFC r267212:hselasky2014-06-101-2/+2
| | | | Make WITNESS happy by giving USB mutexes different names.
* MFC r267044, r267120, r267210 and r267211:hselasky2014-06-082-240/+303
| | | | | | | Multiple fixes for FULL and LOW speed USB transfers going through the DWC OTG as split transactions. INTERRUPT transfers should have a higher chance of success after this series of patches and the chance of data loss should be reduced.
* MFC r266833:hselasky2014-06-041-27/+38
| | | | | Add some more spinlocks to protect the state of the USB transfer queue. Rename some functions to indicate locking requirements.
* MFC r266541:hselasky2014-05-251-11/+5
| | | | | | | | - Fix a bug where the TLBPC value was forced to being odd for IN direction isochronous transfers. - Remove setting of fields which does not belong to the respective TRBs. These fields are currently set as zero and this is more a cosmetic change.
* MFC r265358, r265427, r265777, r265783,hselasky2014-05-236-738/+1316
| | | | | | | | | | r265806, r265872, r266012 and r266394: - Multiple DWC OTG host mode related fixes, improvements and optimisations. - Add full support for ISOCHRONOUS transfers to the DWC OTG driver. - Use the interrupt filter to handle basic USB FIFO interrupts. - Fixed unbalanced unlock in case of "dwc_otg_init_fifo()" failure. - Add common spinlock to the USB bus structure.
* MFC 264977:ian2014-05-171-1/+1
| | | | | | Stop calling imx51_ccm_foo() clock functions from imx6 code. Instead define a few imx_ccm_foo() functions that are implemented by the imx51 or imx6 ccm code.
* MFC r262591, r262592, r262593, r262597, r262598, r262599, r262600, r262601,ian2014-05-162-0/+583
| | | | | | | | | | | | | | | | | | r262606 Initial import of Linux/Vendor DTS files for various embedded boards. Initial import of DTS files from Linux Correct initial import script New AT91 devices or fdt probe added to existing devices. Some of these are just stubs for testing the new dts. - nand - SDRAMC - shdwc - tcb - usb host and gadget
* MFC r261616, r261639ian2014-05-152-10/+0
| | | | | | | | Remove FreeBSD 6 support from atmel usb controllers. Add Vybrid drivers for: - Enhanced Direct Memory Access Controller (eDMA) - Direct Memory Access Multiplexer (DMAMUX)
* MFC r261410ian2014-05-154-0/+13
| | | | | Follow r261352 by updating all drivers which are children of simplebus to check the status property in their probe routines.
* MFC r256839, r256948, r256950, r257299, r257414, r258057, r259090ian2014-05-141-0/+211
| | | | | | | | | | | | | | | Add configuration for the Freescale i.MX53 Quick Start Board. Add the Raspberry Pi BSC (I2C compliant) controller driver. Add Radxa Rock board (by radxa.com) support. Digi-CCWMX53: enable ffec and uart, USB. Add support for Freescale Vybrid Family VF600 Move and rename dwc otg driver to more generic one as it appears to work for rk3188 SoC based board too.
* MFC r265015:hselasky2014-04-294-2/+9
| | | | | Setting the IMOD value below 0x3F8 can cause IRQ lockups in the Intel LynxPoint USB 3.0 controllers found in MacBookPro 2013's.
* MFC r264340:hselasky2014-04-181-1/+1
| | | | Correct IMOD default value according to comment.
* MFC r264294:hselasky2014-04-111-2/+14
| | | | Fix for infinite XHCI reset loops when the set address USB request fails.
* MFC r262125:dim2014-02-241-0/+7
| | | | | | | | | In sys/dev/usb/controller/uss820dci.c, similar to r261977, fix a warning about uss820dci_odevd being unused, by adding it to the part that handles getting descriptors. Reported by: loos Reviewed by: hselasky
* MFC r261872:hselasky2014-02-232-1/+3
| | | | | Fix minor logical error in the XHCI driver. Set correct SETUP packet direction value.
* MFC r261981:hselasky2014-02-231-0/+2
| | | | | | Add new PCI ID for hardware which needs port routing for USB 3.0. PR: usb/186811
* MFC r261795:hselasky2014-02-231-8/+54
| | | | | | | Issue doorbell twice before finally freeing the DMA descriptors. This should fix DMA descriptor caching issues seen with the EHCI controller found in Google Chromebook C720 during removal and insertion of USB devices.
* MFC r261977:dim2014-02-191-0/+7
| | | | | | | In sys/dev/usb/controller/musb_otg.c, fix a warning about musbotg_odevd being unused, by adding it to the part that handles getting descriptors. Reviewed by: hselasky
* MFC r261004, r261005 and r261033:hselasky2014-02-041-1/+1
| | | | Adjust the DMA delay logic so that the DMA delay does not become too small.
* MFC r258779,r258780,r258787,r258822:eadler2014-02-041-2/+2
| | | | | | | | | | | | | Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this shifts into the sign bit. Instead use (1U << 31) which gets the expected result. Similar to the (1 << 31) case it is not defined to do (2 << 30). This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases. A similar change was made in OpenBSD.
* MFC r258545:hselasky2014-01-241-1/+5
| | | | | Comply to the XHCI specification. Certain input context fields should always be zero.
* MFC r260588 and r260589:hselasky2014-01-242-5/+17
| | | | | | | | | | - 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.
* MFC r260563:hselasky2014-01-241-3/+26
| | | | | Make sure reserved fields of the EHCI DMA descriptors are not dirty after previous transfers.
* MFC r260388, r260535 and r260536:hselasky2014-01-241-10/+12
| | | | Fix XHCI interrupt logic for "Intel Lynx Point" found in MBP2013.
* MFC r260184:hselasky2014-01-111-2/+2
| | | | Minor correction for the XHCI reset logic.
* MFC r258162:mav2014-01-051-0/+2
| | | | Add some more IDs for Intel ATA, AHCI and USB controllers.
* MFC r259248 and r259462:hselasky2013-12-191-2/+13
| | | | | | Set chain bit correctly. This will fix some problems sending and receiving Zero Length Packets, ZLPs. See comment in code for more information.
* MFC r259023 and r259095:hselasky2013-12-192-21/+135
| | | | | Improve the XHCI command timeout recovery handling code. Fix some typos while at it.
* MFC r257393:ian2013-12-131-193/+243
| | | | | | | | | | | Rework the imx ehci driver so that it's four separate ehci units rather than one unit with four busses attached to it. This allows us to use existing fdt data which describes separate devices with separate resources. It also allows any combination of the units to be en/disabled in the board dts files. Adjust our dts code to match what's used by linux and u-boot now that we're structured to do so.
* MFC r256750:hselasky2013-10-251-0/+19
| | | | | | | | Improve XHCI stability. When a command timeout happens, the command should be aborted else the command queue can stop. Refer to section "4.6.1.2" of the XHCI specification. Approved by: re (glebius)
* MFC r256548:hselasky2013-10-242-17/+38
| | | | | | | | | Correct programming of XXX_MAXP register. This register is 16-bit wide and not 8-bit. Fix support for isochronous transfers in USB host mode. Fix a whitespace while at it. PR: usb/181987 Approved by: re (Xin Li)
* Stability fixes for Intel LynxPoint XHCI controllers. Disable XHCI porthselasky2013-09-213-25/+66
| | | | | | | | | | routing if we get certain errors. Poll for command completion upon command timeouts. The XHCI error events might not generate interrupts. MFC after: 1 week Reported by: Daniel Gerzo <danger@rulez.sk>, Antonis Anastasiadis <anastasiadis@datalive.gr> PR: usb/181159 Approved by: re (gjb)
* Revert parts of r245132 and r245175. We don't need to write to thehselasky2013-09-071-10/+0
| | | | | | | | IMAN register to clear the pending interrupt status bits. This patch tries to solve problems seen on the MacBook Air, as reported by Johannes Lundberg <johannes@brilliantservice.co.jp> MFC after: 1 week
* Disable USB 3.0 streams mode by default, hence not all XHCI chipsetshselasky2013-09-071-2/+9
| | | | implement it to avoid undefined behaviour.
* Bugfix: The endpoint profile should only be checked in device mode whenhselasky2013-08-252-15/+17
| | | | | | allocating USB transfers and not in host mode. Reported by: George Mitchell <george+freebsd@m5p.com>
* Fix some USB controller names according to pciconf output.hselasky2013-08-172-1/+3
| | | | | MFC after: 1 week Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
* Correct an EHCI register write.hselasky2013-08-121-1/+1
| | | | | MFC after: 1 week Reported by: aseem.jolly@gmail.com
* Fix an XHCI regression:hselasky2013-07-211-11/+9
| | | | | | | | | | | | | The Block Event Interrupts, BEI, feature does not work like expected with the Renesas XHCI chipsets. Revert feature. While at it correct the TD SIZE computation in case of Zero Length Packet, ZLP, in the end of a multi frame USB transfer. MFC after: 1 week PR: usb/180726
* Add a tunable to force disable MSI use for xhci(4).kib2013-07-161-7/+12
| | | | | | Requested and tested by: delphij Sponsored by: The FreeBSD Foundation MFC after: 3 days
* Use MSI for xhci(4), if supported.kib2013-07-092-6/+19
| | | | | | | Reviewed by: jhb Tested by: dchagin Sponsored by: The FreeBSD Foundation MFC after: 1 week
OpenPOWER on IntegriCloud