summaryrefslogtreecommitdiff
path: root/sys/dev/usb/controller
Commit message (Collapse)AuthorAgeFilesLines
* MFC: r266470, r273546, r276017, r277932, r279153, r279778, r279780, r278797,Marius Strobl2017-08-202-12/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r278861, r280283, r280284, r280294, r280452, r280558, r280571, r281863, r282049, r282357, r282440, r282441, r282358, r282359, r283550, r283918, r290171, r290667, r290381, r290533, r290666, r292483, r295659, r297545, r298305, r298383, r298428, r306489, r306557, r307067, r307068, r307087, r307088, r307089, r307091, r307092, r307093, r307098, r307115, r307154, r307240, r307241, r315967, r316476 Unbreak BCM2835/RPI-B support by bringing it in line with stable/11 and head: - Optimise reading of pending interrupt registers. - Fix a bug where some DTS layouts could cause the premature ending of the search (i.e. without returning any result) and you would end up with a random MAC address. - Reduce the diff between head and arm_intrng with the bcm2835 interrupt controller. - Allow the retrieving of the reserved pins state. - Add support to the bcm2835 mailbox driver to work before interrupts are enabled. This will be needed to enable the power on devices early on in the boot process. - Add support for enabling the USB on the Raspberry Pi boards when it hasn't been done by U-Boot. This allows the USB to work when we load the kernel directly. - Call config_intrhook_disestablish on failure of the bcm2835 fb and fbd intr hooks. With this we can get through the boot even if these functions fail. - Add the structures needed to get/set the power state. These can be used when, for example, we boot without U-Boot and wish to enable USB, or to suspend an unneeded device. - Add a mask to match only the relative base address of BSC controllers. - Move the code to set the device power to the bcm2835 mailbox driver so it can be reused by other drivers. - Add the SOC_BCM2835 and SOC_BCM2836 options for the arm kernel and add the former to std.bcm2835. - Add a helper function to read clock frequencies from videocore and use this to get the default frequency of the sdhci device. - Add partial support for the Raspberry Pi 2. - Remove a debug #error from the bcm2835 sdhci driver. - Fetch the SDHCI frequency from videocore (our prefered source) and only if it fails, fetch the clock-frequency from DTB. If both methods fail, use the hardcoded default. - Pass the supplied buffer length instead of a fixed size. - Add the routines to query and setup the framebuffer state using the BCM2835_MBOX_CHAN_PROP channel. The old channel (BCM2835_MBOX_CHAN_FB) seems deprecated on recent firmware versions and is causing a freeze on RPi 2. - Fix DMA on RPi 2. BCM2836 has a different base address for peripherals. - Enable DMA for sdhci on RPi 2 (BCM2836). - Add a missing wakeup when releasing ownership of the SPI hardware. - Fix framebuffer compatibility with new RPi firmware. - Refactor bcm2835_cpufreq to use bcm2835_mbox_property API. - Fix the sc(4) framebuffer driver on RPi 2. - Fix the vt(4) framebuffer driver on RPi 2. - Remove unused mutex and softc variables. - Refactor mailbox property API to make it usable for /dev/vcio driver. - Replace semaphore-base locking with sleep/wait synchronization. - Fix infinite loop if response from VideoCore never received. - Set have_message in interrupt to handle "response before READ" case. - Serialize access to property channel when using bcm2835_mbox_property. - Force framebuffer virtual viewport to be the same as physical. - Use proper type of tag in bcm2835_mbox_fb_init. - bcm2835_cpufreq: Only attach driver if we correcly match on the machine compatible string. - Add dev.fb.X.resync sysctl to resync ARM framebuffer with VideoCore. - Do not use DMA channels used by GPU. - Define local-intc for BCM2836 platform (RPI2) and make BCM2835 intc a child of it. - Fix build for Pi kernels with syscons enabled. - Use VM_MEMATTR_WRITE_COMBINING memattr for mmap(2) on framebuffer. - Make intc driver compatible with upstream DTS. - Make Rapsberry Pi watchdog driver compatible with upstream DTS. - Make sure intc is attached before interrupt consumers. - Make framebuffer driver compatible with upstream DT. - Add one more heuristic to determine MAC address of the SMSC device. - Add compatibility strings from upstream DT. - Fix spelling mistake, BCM2835_PASWORD -> BCM2835_PASSWORD. Approved by: re (kib) Notes: svn path=/stable/10/; revision=322724
* MFC: r314345, r318276Marius Strobl2017-05-181-0/+6
| | | | | | | | - Add ID for NEC uPD720202 xHCI controller. - Describe Intel Apollo Lake and Braswell USB 3.0 controllers. Notes: svn path=/stable/10/; revision=318499
* MFC r316412: Add IDs for Intel Cougar Point USB 2.0 controller.Alexander Motin2017-04-091-0/+4
| | | | Notes: svn path=/stable/10/; revision=316651
* MFC r312424:Hans Petter Selasky2017-03-143-16/+35
| | | | | | | | | | | | | | Fix problem with suspend and resume when using Skylake chipsets. Make 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 Notes: svn path=/stable/10/; revision=315252
* MFC r308464, r308471: Add some device IDs found in my new laptop.Alexander Motin2016-11-161-0/+2
| | | | Notes: svn path=/stable/10/; revision=308739
* MFC r307518:Hans Petter Selasky2016-11-0713-78/+0
| | | | | | | | | | | | | | | | | | | | | | | | Fix device delete child function. 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 Notes: svn path=/stable/10/; revision=308402
* MFC r303891, r303892:Pedro F. Giffuni2016-09-081-6/+6
| | | | | | | | | | | sys: replace comma with semicolon when pertinent. Uses of commas instead of a semicolons can easily go undetected. The comma can serve as a statement separator but this shouldn't be abused when statements are meant to be standalone. Notes: svn path=/stable/10/; revision=305615
* MFC r281499:Hans Petter Selasky2016-09-083-3/+3
| | | | | | | | | | | | | | Modify the return value of the uhci/ehci/xhci PCI probe routines to '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. PR: 212256 Notes: svn path=/stable/10/; revision=305589
* MFC r304629:Hans Petter Selasky2016-08-291-0/+4
| | | | | | | | | | | | | Don't separate the status stage of the XHCI USB control transfers into its own job because this breaks the simplified QEMU XHCI TRB parser, which expects the complete USB control transfer as a series of back to back TRBs. The old behaviour is kept under #ifdef in case this change breaks enumeration of any USB devices. PR: 212021 Notes: svn path=/stable/10/; revision=304998
* MFC r304597:Hans Petter Selasky2016-08-291-6/+8
| | | | | | | | | | | | | Fix for invalid use of bits in input context. Basically split configuring of EP0 and non-EP0 into xhci_cmd_evaluate_ctx() and xhci_cmd_configure_ep() respectivly. This resolves some errors when using XHCI under QEMU and gets is more in line with the XHCI specification. PR: 212021 Notes: svn path=/stable/10/; revision=304993
* MFC r302371:Hans Petter Selasky2016-08-121-1/+1
| | | | | | | | Fix regression issue with XHCI on 32-bit ARMv7 Armada-38x. Make sure "struct xhci_dev_ctx_addr" fits into a single 4K page until further. Notes: svn path=/stable/10/; revision=303996
* MFC r302336:Hans Petter Selasky2016-07-111-16/+18
| | | | | | | | | | Fix interrupt loop when switching from USB device to USB host mode by clearing all endpoint interrupt bits. PR: 210736 Notes: svn path=/stable/10/; revision=302563
* MFC r302306:Hans Petter Selasky2016-07-111-1/+4
| | | | | | | | | | | Fix detection of USB device disconnects in USB host mode when the USB device is connected directly to the USB port of the DWC OTG, in this case a RPI-zero. PR: 210695 Notes: svn path=/stable/10/; revision=302562
* MFC r302076:Hans Petter Selasky2016-06-293-7/+8
| | | | | | | | | | | Update the definition for number of scratch pages to match the latest version of the XHCI specification. Make sure the code can handle the maximum number of allowed scratch pages. Submitted by: Shichun_Ma@Dell.com Notes: svn path=/stable/10/; revision=302266
* MFC r298983: Add some device IDs from Intel Sunrise Point chipsets.Alexander Motin2016-05-201-0/+2
| | | | Notes: svn path=/stable/10/; revision=300312
* MFC r297387: Add some device IDs found on AMD FCH shipsets.Alexander Motin2016-04-123-1/+7
| | | | Notes: svn path=/stable/10/; revision=297852
* r297229 (by hselasky): Add more UHCI PCI IDs.Alexander Motin2016-03-291-0/+6
| | | | Notes: svn path=/stable/10/; revision=297375
* MFC r297049: Add IDs for Intel Wellsburg USB controllers.Alexander Motin2016-03-282-0/+6
| | | | Notes: svn path=/stable/10/; revision=297341
* MFC r295463 (by hselasky): Correct PCI device description.Alexander Motin2016-03-281-1/+1
| | | | Notes: svn path=/stable/10/; revision=297340
* MFC r275137 (by adrian): Add PCI ID for Intel Lynx Point LP controller.Alexander Motin2016-03-281-0/+2
| | | | | | | PR: kern/195398 Notes: svn path=/stable/10/; revision=297339
* MFC r295928:Hans Petter Selasky2016-03-072-0/+14
| | | | | | | | | | | | | | Configure the correct bMaxPacketSize for control endpoints before requesting the initial complete device descriptor and not as part of the subsequent babble error recovery. Babble means that the received USB packet was bigger than than configured maximum packet size. This only affects enumeration of FULL speed USB devices which use a bMaxPacketSize different from 8 bytes. This patch might help fix enumeration of USB devices which exhibit USB I/O errors in dmesg during boot. Notes: svn path=/stable/10/; revision=296446
* MFC r293192:Hans Petter Selasky2016-01-121-6/+21
| | | | | | | Fix for directly connected FULL or LOW speed USB devices. Notes: svn path=/stable/10/; revision=293735
* MFC r291199:Hans Petter Selasky2016-01-041-1/+1
| | | | | | | Fix compile warning about shifting signed negative constant. Notes: svn path=/stable/10/; revision=293146
* MFC r290542:Hans Petter Selasky2015-11-192-39/+143
| | | | | | | | | | Avoid using the bounce buffer when the source or destination buffer is 32-bits aligned. Merge the two bounce buffers into a single one. Some rough tests showed that the DWC OTG throughput on RPI2 increased by 10% after this patch. Notes: svn path=/stable/10/; revision=291064
* MFC r290195:Hans Petter Selasky2015-11-061-6/+11
| | | | | | | | | | Reduce the DWC OTG interrupt load by not reading all the host channel status registers for every interrupt. Check a common host channel status interrupt register first, then conditionally read the individual host channel status registers. Notes: svn path=/stable/10/; revision=290443
* MFC r285914, r289029 and r289560:Hans Petter Selasky2015-11-032-82/+81
| | | | | | | | | | | | | | | | | - Move the remainder of host controller capability registers reading from 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. - Add quirks for USB 3.0 PCI devices. PR: 203650 Notes: svn path=/stable/10/; revision=290331
* MFC r289030:Kevin Lo2015-10-121-5/+10
| | | | | | | | | | | | Add support for Fresco Logic USB 3.0 host controller. Fresco Logic hosts advertise MSI, but fail to actually generate MSI interrupts. We have to disable MSI use. Reviewed by: hselasky Notes: svn path=/stable/10/; revision=289161
* MFC r287355, r287772 and r287825:Hans Petter Selasky2015-10-082-0/+10
| | | | | | | | | | | Add new USB PCI IDs. PR: 202807 Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> Differential Revision: https://reviews.freebsd.org/D3665 Notes: svn path=/stable/10/; revision=289013
* MFC r286773:Hans Petter Selasky2015-08-291-4/+10
| | | | | | | | Improve the realtime properties of USB transfers for embedded systems like RPI-B and RPI-2. Notes: svn path=/stable/10/; revision=287274
* MFC r283067, r286118, r285638, r285935, r286778, r286780 and r286802:Hans Petter Selasky2015-08-293-408/+374
| | | | | | | | | | | | | | | - Make the FIFO configuration a bit more flexible for the DWC OTG in device side mode. - Limit the number of times we loop inside the DWC OTG poll handler to avoid starving other fast interrupts. Fix a comment while at it. - Optimise the DWC OTG host mode driver's transmit path - Optimise the DWC OTG host mode driver's receive path - Minor code refactor to avoid duplicating code. - Handle NYET high speed tokens and predict NAK'ing is up next. - Fixes for HIGH speed ISOCHRONOUS traffic. Notes: svn path=/stable/10/; revision=287271
* MFC r283922:Hans Petter Selasky2015-06-051-56/+52
| | | | | | | | | | Fix for control endpoint handling in the DWC OTG driver. The data stage processing is only allowed after the setup complete event has been received. Else a race may occur and the OUT data can be corrupted. While at it ensure resetting a FIFO has the required wait loop. Notes: svn path=/stable/10/; revision=284015
* MFC r283103:Hans Petter Selasky2015-06-031-2/+31
| | | | | | | | Fix for DWC OTG device side isochronous transfers. The even or odd isochronous frame bit needs to be flipped. Notes: svn path=/stable/10/; revision=283951
* MFC r281881:Hans Petter Selasky2015-05-051-9/+7
| | | | | | | | | Disable multi process interrupts, because the current code doesn't use them. Else we can end up in an infinite interrupt loop in USB device mode. Notes: svn path=/stable/10/; revision=282508
* MFC r279563:Hans Petter Selasky2015-03-061-1/+12
| | | | | | | Add quirk for USB 3.0 controllers which don't support 64-bit DMA. Notes: svn path=/stable/10/; revision=279693
* MFC r279544:Hans Petter Selasky2015-03-053-6/+12
| | | | | | | | | Add quirk to disable 64-bit XHCI DMA after r276717. Requested by: Gary Jennejohn <gljennjohn@gmail.com> Notes: svn path=/stable/10/; revision=279648
* MFC r279210:Hans Petter Selasky2015-03-052-12/+49
| | | | | | | | | Add support for the DWC OTG v2 chipset found in the STM32F4 series of processors. Make sure we pullup the data lines in device mode when we power on the port. Notes: svn path=/stable/10/; revision=279644
* MFC r279233:Hans Petter Selasky2015-02-271-0/+7
| | | | | | | | | Ensure that the XHCI driver will refresh the control endpoint settings when re-enumerating a FULL speed device. Else the wrong max packet setting might be used when trying to re-enumerate a FULL speed device. Notes: svn path=/stable/10/; revision=279353
* MFC r278850:Hans Petter Selasky2015-02-251-1/+8
| | | | | | | | | Handle VBUS error interrupts. PR: 190471 Notes: svn path=/stable/10/; revision=279279
* MFC r277454, r277460, r277465, r277466, r277467, r277469, r277470, r277471,Ian Lepore2015-02-131-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | r277472, r277473, r277474, r277475, r277476, r277477, r277478, r277479, r277480, r277512, r277516: Add inline implementations of arm bus_space_read/write_N(). Revise the arm bus_space implementation to avoid dereferencing the tag on every operation to retrieve the bs_cookie value almost nothing actually uses. Use the explicit member initializer style to init the bus_space struct. Use arm/bus_space-v6.c for all armv6 systems Consolidate many identical implementations of bus_space to a single common tag and implementation shared by armv4 and armv6. Micro-optimize the new arm inline bus_space implementation by grouping all the data the inline functions access together at the start of the bus_space struct so that they all fit in a single cache line. Notes: svn path=/stable/10/; revision=278727
* MFC r272103: Move s3c2xx0 into the samsung directory.Ian Lepore2015-02-131-1/+1
| | | | Notes: svn path=/stable/10/; revision=278726
* MFC r278477:Hans Petter Selasky2015-02-131-2/+2
| | | | | | | Fix DMA address casts. Notes: svn path=/stable/10/; revision=278662
* MFC r278071:Hans Petter Selasky2015-02-101-1/+11
| | | | | | | | | | Section 3.2.9 in the XHCI specification about control transfers says that we should use a normal-TRB if there are more TRBs extending the data-stage TRB. Add a dedicated state bit to the internal USB transfer flags to handle this case. Notes: svn path=/stable/10/; revision=278507
* MFC r277136:Hans Petter Selasky2015-02-051-0/+40
| | | | | | | | | | | | | Resolve a special case deadlock: When two or more threads are simultaneously detaching kernel drivers on the same USB device we can get stuck in the "usb_wait_pending_ref_locked()" function because the conditions needed for allowing detach are not met. While at it ensure that "flag_iserror" is only written when "priv_mtx" is locked, which is protecting it. Notes: svn path=/stable/10/; revision=278289
* MFC r266969 and r276717:Hans Petter Selasky2015-02-0520-56/+82
| | | | | | | | | Add 64-bit DMA support in the XHCI controller driver. - Fix some comments and whitespaces while at it. - Add support for PAE. Notes: svn path=/stable/10/; revision=278278
* MFC r276798:Hans Petter Selasky2015-01-191-6/+11
| | | | | | | | Fix handling of an error case when the MUSB driver is operating in USB device side mode. Notes: svn path=/stable/10/; revision=277368
* MFC r271156 and r273376:Hans Petter Selasky2015-01-112-0/+9
| | | | | | | | - Add IDs for Intel Patsburg USB 2.0 controller. - Add the Intel BayTrail USB device which needs port routing for USB 3.0. Notes: svn path=/stable/10/; revision=276968
* MFC r276321, r276404, r276407 and r276799:Hans Petter Selasky2015-01-113-29/+48
| | | | | | | | | | | | | | | Various XHCI fixes and improvements: - Improve and fix MSI interrupt allocation, setup and release. - Add missed flushing of data which can happen when "xhci_configure_mask()" is called from "xhci_configure_reset_endpoint()". Ensure the 3-strikes error feature is always enabled except for ISOCHRONOUS transfers. - Allow systems having a page size greater than 4K to use fewer scatter-gather XHCI TRB entries for its payload data. The XHCI controller can handle at least 65536 bytes per scatter-gather list entry. Notes: svn path=/stable/10/; revision=276965
* MFC r275624:Hans Petter Selasky2014-12-151-0/+1
| | | | | | | | | Add port routing support for Wildcat Point. PR: 195793 Notes: svn path=/stable/10/; revision=275785
* MFC r275101:Alexander Motin2014-12-032-0/+6
| | | | | | | Add bunch of PCI IDs of Intel Wildcat Point (9 Series) chipsets. Notes: svn path=/stable/10/; revision=275439
* MFC r269569:Hans Petter Selasky2014-10-311-2/+2
| | | | | | | | | | | Remove unused defines. Fix some device_printf's that were missing '\n' at the end or had spelling errors. PR: 145319 Notes: svn path=/stable/10/; revision=273883