History log of /freebsd-10.3-release/sys/dev/usb/controller/dwc_otg.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 296373 04-Mar-2016 marius

- Copy stable/10@296371 to releng/10.3 in preparation for 10.3-RC1
builds.
- Update newvers.sh to reflect RC1.
- Update __FreeBSD_version to reflect 10.3.
- Update default pkg(8) configuration to use the quarterly branch.

Approved by: re (implicit)

# 293735 12-Jan-2016 hselasky

MFC r293192:
Fix for directly connected FULL or LOW speed USB devices.


# 291064 19-Nov-2015 hselasky

MFC r290542:
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.


# 290443 06-Nov-2015 hselasky

MFC r290195:
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.


# 287271 29-Aug-2015 hselasky

MFC r283067, r286118, r285638, r285935, r286778, r286780 and r286802:
- 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.


# 284015 05-Jun-2015 hselasky

MFC r283922:
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.


# 283951 03-Jun-2015 hselasky

MFC r283103:
Fix for DWC OTG device side isochronous transfers. The even or odd
isochronous frame bit needs to be flipped.


# 282508 05-May-2015 hselasky

MFC r281881:
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.


# 279644 05-Mar-2015 hselasky

MFC r279210:
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.


# 267242 08-Jun-2014 hselasky

MFC r267044, r267120, r267210 and r267211:
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.


# 267039 04-Jun-2014 hselasky

MFC r266833:
Add some more spinlocks to protect the state of the USB transfer
queue. Rename some functions to indicate locking requirements.


# 266575 23-May-2014 hselasky

MFC r265358, r265427, r265777, r265783,
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.


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 254828 25-Aug-2013 hselasky

Bugfix: The endpoint profile should only be checked in device mode when
allocating USB transfers and not in host mode.

Reported by: George Mitchell <george+freebsd@m5p.com>


# 246125 30-Jan-2013 hselasky

Use string literals in string descriptors for marginally
better readability.

Submitted by: Christoph Mallon


# 246123 30-Jan-2013 hselasky

Provide one global language string descriptor for
american english instead of giving each module its
own.

Submitted by: Christoph Mallon


# 246122 30-Jan-2013 hselasky

Modify the FreeBSD USB kernel code so that it can be compiled directly
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


# 242829 09-Nov-2012 hselasky

Fix LOW and FULL speed USB INTERRUPT endpoint support for the
DWC OTG driver. Fix a hang issue when using LOW and FULL speed
BULK traffic. Make sure we don't ask for data in the last
microframe. This allows using devices like USB mice and USB
keyboards connected to the RPI-B.

Suggested by: gonzo @


# 242126 26-Oct-2012 hselasky

Add missing CTLFLAG_TUN flag to tunable sysctls in USB stack.
Rearrange the tunables and belonging sysctl declarations, so
that they are next to eachother.

Submitted by: n_hibma @
MFC after: 1 week


# 241032 28-Sep-2012 hselasky

Correct NYET handling. Remove superfluous transfer complete interrupt mask.


# 240999 27-Sep-2012 hselasky

Make sure the "wMaxPacketSize" limitations are respected.


# 240998 27-Sep-2012 hselasky

Make sure we record NAK tokens in the TD structure for IN direction.
Improve host channel disabling. Wait two times 125us for channel to be
disabled. The DWC OTG doesn't like when channels are re-used too early.


# 240969 26-Sep-2012 hselasky

Make sure the DWC OTG host mode channels are given enough time to disable.


# 240890 24-Sep-2012 hselasky

DWC OTG host mode improvements:
- Make HSIC selection dynamic.
- Make LOW speed USB devices work through HIGH speed USB HUB.


# 240857 23-Sep-2012 hselasky

DWC OTG host mode improvements. Add support for the 3-strikes and you are
gone rule. Optimise use of channels so that when a channel
is not ready another channel is used. Instead of using the SOF interrupt
use the system timer to drive the host statemachine. This might
give lower throughput and higher latency, but reduces the CPU usage
significantly. The DWC OTG host mode support should not be considered
for serious USB host controller applications. Some problems are still
seen with LOW speed USB devices.


# 240482 14-Sep-2012 hselasky

DWC OTG improvements. Implement full support for SPLIT transactions, in other
words FULL/LOW speed devices through HIGH speed HUBs. Improve support for
suspend and resume in host mode.


# 240419 12-Sep-2012 hselasky

Fix TX FIFO sizes. Correct FIFO handling in Host mode.


# 240381 12-Sep-2012 hselasky

Reduce DWC OTG polling rate by using the SOF interrupt.


# 240374 11-Sep-2012 hselasky

Fix missing parts of DWC OTG host mode support. The host mode support
of the DWC OTG is very simple in PIO mode, and we need to re-transmit
data when NAK is received among other things. We probably will need
to implement some kind of rate limitation on the NAK-ing.


# 240312 10-Sep-2012 hselasky

Fix for IRQ hang in DWC OTG host mode.


# 240302 10-Sep-2012 hselasky

Cleanup interrupt handling in Host Mode.


# 240282 09-Sep-2012 hselasky

Implement missing USB suspend and resume support for DWC OTG driver.


# 240279 09-Sep-2012 hselasky

Add support for host mode to the DWC OTG controller driver.
The DWC OTG host mode support should still be considered
experimental. Isochronous support for DWC OTG is not
fully implemented. Some code added derives from
Aleksandr Rybalko's dotg.c driver.


# 239909 30-Aug-2012 hselasky

Preparations for adding USB HOST mode to the DWC OTG driver.
Merge register file with external one and put all register
definitions in a separate file.

Submitted by: ray @


# 239214 12-Aug-2012 hselasky

Add support for the so-called streams feature of BULK endpoints
in SUPER-speed mode, USB 3.0.

This feature has not been tested yet, due to lack of hardware.

This feature is useful when implementing protocols like UASP,
USB attached SCSI which promises higher USB mass storage throughput.

This patch also implements support for hardware processing of endpoints
for increased performance. The switching to hardware processing
of an endpoint is done via a callback to the USB controller driver. The
stream feature is implemented like a variant of a hardware USB protocol.

USB controller drivers implementing device mode needs to be updated to
implement the new "xfer_stall" USB controller method and remove the
"xfer" argument from the "set_stall" method.

The API's toward existing USB drivers are preserved. To setup a USB transfer
in stream mode, set the "stream_id" field of the USB config structure to
the desired value.

The maximum number of BULK streams is currently hardcoded and limited to 8
via a define in usb_freebsd.h.

All USB drivers should be re-compiled after this change.

LibUSB will be updated next week to support streams mode. A new IOCTL to
setup BULK streams as already been implemented. The ugen device nodes
currently only supports stream ID zero.

The FreeBSD version has been bumped.

MFC after: 2 weeks


# 233774 02-Apr-2012 hselasky

Fix compiler warnings, mostly signed issues,
when USB modules are compiled with WARNS=9.

MFC after: 1 weeks


# 232539 05-Mar-2012 hselasky

Fix for DWC OTG interrupt register programming.
Fix a compiler warning.
Add missing header file.

MFC after: 1 week


# 230424 21-Jan-2012 hselasky

Add support for the DesignWare USB 2.0 OTG controller chipset.
Currently the code is not built by any modules. That will
be fixed later. The Atmel ARM bus interface file part of this
commit is just for sake of example. All registers and bits are
declared like macros and not C-structures like in official
Synopsis header files. This driver mostly origins from the
musb_otg.c driver in FreeBSD except that the chip specific
programming has been replaced by the one for DWC 2.0 USB OTG.
Some parts related to system suspend and resume have been left
like empty functions for the future. USB suspend and resume is
fully supported.