summaryrefslogtreecommitdiff
path: root/sys/dev/usb/controller/xhci_pci.c
Commit message (Collapse)AuthorAgeFilesLines
* xhci: Handle the case when MSI-X BAR is the same as IO BAR.Konstantin Belousov2020-10-231-13/+21
| | | | | | | | | | | | | | | | | | | PCIe allows for MSI-X BAR to be either dedicated, or MSI-X Table may be co-located in some functional BAR. In the later case xhci(4) is unable to allocate active resource for the table because BAR is already activated. Handle it by checking for this special case, and not try to alloc resource if MSI-X BAR is IO. Reported and tested by: emaste Reviewed by: emaste, hselasky Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D26913 Notes: svn path=/head/; revision=366978
* Handle Raspberry Pi 4 xhci firmware loading.Andrew Turner2020-08-031-8/+4
| | | | | | | | | | | | | The newer hardware revisions of the Raspberry Pi 4 removed the ability of the VIA VL805 xhci controller to load its own firmware. Instead the firmware must be installed at the appropriate time by the VideoCore coprocessor. Submitted by: Robert Crowston <crowston_protonmail.com> Differential Revision: https://reviews.freebsd.org/D25261 Notes: svn path=/head/; revision=363795
* Add USB host controller PCI ID's for Hygon.Hans Petter Selasky2020-02-101-0/+3
| | | | | | | | | Differential Revision: https://reviews.freebsd.org/D23564 MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=357726
* Correct PCI device ID for XHCI USB controller.Hans Petter Selasky2019-08-071-1/+1
| | | | | | | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=350675
* Add new USB PCI ID.Hans Petter Selasky2019-03-281-0/+2
| | | | | | | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=345633
* Add PCI IDs for AMD X370 AHCI and XHCI.Mark Johnston2018-07-121-1/+2
| | | | | | | | | Submitted by: Greg V <greg@unrelenting.technology> MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D15398 Notes: svn path=/head/; revision=336225
* Describe Fresco Logic FL1100 USB 3.0 controllers.Marius Strobl2018-05-281-0/+2
| | | | Notes: svn path=/head/; revision=334293
* Improve fix in r304629 by allowing configuration of the behaviourHans Petter Selasky2018-04-301-0/+1
| | | | | | | | | | | | | through a SYSCTL instead of a compile time define. Add quirk by default for all LynxPoint XHCI controllers. PR: 227602 MFC after: 3 days Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=333100
* Add AHCI/XHCI device IDs found on AMD 1950X+X399 systemConrad Meyer2017-12-291-0/+2
| | | | | | | | | A follow-up to r327094. Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=327364
* Add AHCI/XHCI device IDs found on AMD Ryzen+B350 system.Alexander Motin2017-12-221-0/+4
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=327094
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326255
* Add new Intel Lewisburg and Union Point chipset PCI IDs.Alexander Motin2017-08-091-0/+4
| | | | | | | | | While there, polish some old AHCI ones, since they are still reused. MFC after: 1 week Notes: svn path=/head/; revision=322308
* Add some device IDs for Intel Denverton SoCs.Alexander Motin2017-06-211-0/+2
| | | | Notes: svn path=/head/; revision=320178
* Describe Intel Apollo Lake and Braswell USB 3.0 controllers.Marius Strobl2017-05-141-0/+4
| | | | Notes: svn path=/head/; revision=318276
* Add ID for NEC uPD720202 xHCI controller.Bruce M Simpson2017-02-271-0/+2
| | | | | | | MFC after: 1 month Notes: svn path=/head/; revision=314345
* Fix problem with suspend and resume when using Skylake chipsets. MakeHans Petter Selasky2017-01-191-0/+1
| | | | | | | | | | | | | | sure the XHCI controller is reset after halting it. The problem is clearly a BIOS bug as the suspend and resume is failing without loading the XHCI driver. The same happens when using Linux and the XHCI driver is not loaded. Submitted by: Yanko Yankulov <yanko.yankulov@gmail.com> PR: 216261 MFC after: 1 week Notes: svn path=/head/; revision=312424
* Add some device IDs found in my new laptop.Alexander Motin2016-11-091-0/+2
| | | | Notes: svn path=/head/; revision=308464
* Fix device delete child function.Hans Petter Selasky2016-10-171-6/+0
| | | | | | | | | | | | | | | | | | | | | | | When detaching device trees parent devices must be detached prior to detaching its children. This is because parent devices can have pointers to the child devices in their softcs which are not invalidated by device_delete_child(). This can cause use after free issues and panic(). Device drivers implementing trees, must ensure its detach function detaches or deletes all its children before returning. While at it remove now redundant device_detach() calls before device_delete_child() and device_delete_children(), mostly in the USB controller drivers. Tested by: Jan Henrik Sylvester <me@janh.de> Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D8070 MFC after: 2 weeks Notes: svn path=/head/; revision=307518
* Add some device IDs from Intel Sunrise Point chipsets.Alexander Motin2016-05-031-0/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=298983
* Add some device IDs found on AMD FCH shipsets.Alexander Motin2016-03-291-0/+3
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=297387
* Add IDs for Intel Wellsburg USB controllers.Alexander Motin2016-03-191-0/+2
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=297049
* Ads support to the xhci pci attachment to use MSI-X interrupts whenAndrew Turner2015-12-241-2/+29
| | | | | | | | | | | | | | | | | available. As with MSI interrupts these can be disabled by setting hw.usb.xhci.msix to 0 in the loader. MSI-X interrupts are needed on some hardware, for example the Cavium ThunderX only supports them, and with this we don't fall back to polling. PR: 204378 Reviewed by: hselasky, jhb MFC after: 1 week (after r292669) Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D4698 Notes: svn path=/head/; revision=292683
* Add quirk for USB 3.0 PCI device.Hans Petter Selasky2015-10-191-0/+3
| | | | | | | | | Submitted by: philipp.maechler@mamo.li PR: 203650 MFC after: 1 week Notes: svn path=/head/; revision=289560
* Add support for Fresco Logic USB 3.0 host controller.Kevin Lo2015-10-081-6/+11
| | | | | | | | | | Fresco Logic hosts advertise MSI, but fail to actually generate MSI interrupts. We have to disable MSI use. Reviewed by: hselasky Notes: svn path=/head/; revision=289030
* Add quirk for USB 3.0 PCI device.Hans Petter Selasky2015-10-081-0/+1
| | | | | | | | Submitted by: Gary Jennejohn <gj@freebsd.org> MFC after: 1 week Notes: svn path=/head/; revision=289029
* Add Cavium ThunderX xHCI controller PCI IDEd Maste2015-09-151-0/+3
| | | | | | | | | | | | There is an issue with interrupts at the moment, but it works with polling mode set (hw.usb.xhci.use_polling=1). Reviewed by: hselasky Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3665 Notes: svn path=/head/; revision=287825
* - Move the remainder of host controller capability registers reading fromMarius Strobl2015-07-271-18/+17
| | | | | | | | | | | | | | | xhci_start_controller() to xhci_init(). These values don't change at run- time so there's no point of acquiring them on every USB_HW_POWER_RESUME instead of only once during initialization. In r276717, reading the first couple of registers in question already had been moved as a prerequisite for the changes in that revision. - Identify ASMedia ASM1042A controllers. - Use NULL instead of 0 for pointers. MFC after: 3 days Notes: svn path=/head/; revision=285914
* Modify the return value of the uhci/ehci/xhci PCI probe routines toNeel Natu2015-04-131-1/+1
| | | | | | | | | | | | | | 'BUS_PROBE_DEFAULT'. This allows bhyve's 'ppt' driver to claim ownership of the device and pass it through to the guest. In the common case where there are no competing drivers for USB controllers this change is a no-op. Reviewed by: hselasky MFC after: 2 weeks Notes: svn path=/head/; revision=281499
* Add quirk for USB 3.0 controllers which don't support 64-bit DMA.Hans Petter Selasky2015-03-031-1/+12
| | | | | | | | MFC after: 3 days Submitted by: Gary Jennejohn <gljennjohn@gmail.com> Notes: svn path=/head/; revision=279563
* Add quirk to disable 64-bit XHCI DMA after r276717.Hans Petter Selasky2015-03-021-1/+1
| | | | | | | | Requested by: Gary Jennejohn <gljennjohn@gmail.com> MFC after: 3 days Notes: svn path=/head/; revision=279544
* Add 64-bit DMA support in the XHCI controller driver.Hans Petter Selasky2015-01-051-14/+12
| | | | | | | | | | - Fix some comments and whitespace while at it. MFC after: 1 month Submitted by: marius@ Notes: svn path=/head/; revision=276717
* Improve/fix interrupt allocation/setup/release:Marius Strobl2014-12-271-21/+24
| | | | | | | | | | | | | | | | | - Simplify MSI allocation to what is actually needed for a single one. - Release the MSI and the corresponding bus resource as appropriate when either the interrupt resource cannot be allocated or setting up the interrupt fails. - Error out when interrupt allocation or setup fails and polling is disabled. - Release the MSI after the corresponding bus resource so the former is not leaked on detach. - Remove a redundant softc member. MFC after: 3 days Notes: svn path=/head/; revision=276321
* Add port routing support for Wildcat Point.Hans Petter Selasky2014-12-081-0/+1
| | | | | | | | PR: 195793 MFC after: 1 week Notes: svn path=/head/; revision=275624
* Add bunch of PCI IDs of Intel Wildcat Point (9 Series) chipsets.Alexander Motin2014-11-261-0/+2
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=275101
* Add the Intel BayTrail USB device which needs port routing for USB 3.0.Kevin Lo2014-10-211-0/+3
| | | | | | | | Tested on the BayTrail E3845 platform. Reviewed by: hselasky Notes: svn path=/head/; revision=273376
* Improve support for Intel Lynx Point USB 3.0 controllers by using theHans Petter Selasky2014-07-161-3/+6
| | | | | | | | | | | | 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 after: 3 days Tested by: Huang Wen Hui <huanghwh@gmail.com> Notes: svn path=/head/; revision=268735
* Improve support for Intel Lynx Point USB 3.0 controllers by maskingHans Petter Selasky2014-07-071-0/+3
| | | | | | | | | | the port routing bits like done in Linux. MFC after: 1 week Tested by: Tur-Wei Chan <twchan@singnet.com.sg> Notes: svn path=/head/; revision=268354
* Setting the IMOD value below 0x3F8 can cause IRQ lockups in the IntelHans Petter Selasky2014-04-271-0/+1
| | | | | | | | | | LynxPoint USB 3.0 controllers found in MacBookPro 2013's. MFC after: 2 days Tested by: Huang Wen Hui <huanghwh@gmail.com> Notes: svn path=/head/; revision=265015
* Add new PCI ID for hardware which needs port routing for USB 3.0.Hans Petter Selasky2014-02-161-0/+2
| | | | | | | | | PR: usb/186811 MFC after: 1 week Submitted by: Philipp Maechler <philipp.maechler@mamo.li> Notes: svn path=/head/; revision=261981
* Stability fixes for Intel LynxPoint XHCI controllers. Disable XHCI portHans Petter Selasky2013-09-211-10/+30
| | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=255768
* Add a tunable to force disable MSI use for xhci(4).Konstantin Belousov2013-07-161-7/+12
| | | | | | | | | Requested and tested by: delphij Sponsored by: The FreeBSD Foundation MFC after: 3 days Notes: svn path=/head/; revision=253398
* Use MSI for xhci(4), if supported.Konstantin Belousov2013-07-091-6/+18
| | | | | | | | | | Reviewed by: jhb Tested by: dchagin Sponsored by: The FreeBSD Foundation MFC after: 1 week Notes: svn path=/head/; revision=253094
* Add support for polling the XHCI interrupt handler whenHans Petter Selasky2013-06-071-15/+32
| | | | | | | | | | | | | the regular interrupt handler is not working properly or in case of MSI interrupts which are not yet supported. Remove interrupt setup code for FreeBSD versions older than 700031. MFC after: 1 week PR: usb/179342 Notes: svn path=/head/; revision=251499
* Add ID for ASMedia ASM1042 USB 3.0 controller.Alexander Motin2013-04-101-0/+3
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=249336
* Add tunable for XHCI port routing.Hans Petter Selasky2012-08-231-3/+3
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=239617
* For Intel Panther/Lynx Point USB 3.0 xHCI controllers enable SuperSpeed USBAlexander Motin2012-07-171-0/+11
| | | | | | | | | capability and reroute USB 2.0 ports to the xHCI controller. Reviewed by: hselasky Notes: svn path=/head/; revision=238551
* Add IDs for some USB controllers I have around. Just a cosmetics.Alexander Motin2012-07-021-0/+13
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=238015
* Implement better support for USB controller suspend and resume.Hans Petter Selasky2011-12-141-49/+10
| | | | | | | | | | | | | 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
* Rename device_delete_all_children() into device_delete_children().Hans Petter Selasky2011-11-221-1/+1
| | | | | | | | Suggested by: jhb @ and marius @ MFC after: 1 week Notes: svn path=/head/; revision=227849
* - There's no need to overwrite the default device method with the defaultMarius Strobl2011-11-221-3/+1
| | | | | | | | | | | | | one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID. Notes: svn path=/head/; revision=227843