History log of /freebsd-10-stable/sys/dev/usb/usb_transfer.c
Revision Date Author Comments
# 361912 08-Jun-2020 hselasky

MFC r361581:
Implement helper function, usbd_get_max_frame_length(), which allows kernel
device drivers to correctly predict the default USB transfer frame length.

Sponsored by: Mellanox Technologies


# 356681 13-Jan-2020 hselasky

MFC r356409:
Add own counter for cancelled USB transfers.
Do not count these as errors.

Bump the FreeBSD version to force recompilation of external modules.

Sponsored by: Mellanox Technologies


# 356396 06-Jan-2020 hselasky

MFC r356135:
Make USB statistics per device instead of per bus.

Bump the FreeBSD version due to structure change to
force recompilation of external USB modules.

Sponsored by: Mellanox Technologies


# 353179 07-Oct-2019 hselasky

MFC r352556:
Add quirk for XHCI(4) controllers to support USB control transfers
above 1Kbyte. It might look like some XHCI(4) controllers do not
support when the USB control transfer is split using a link TRB. The
next NORMAL TRB after the link TRB is simply failing with XHCI error
code 4. The quirk ensures we allocate a 64Kbyte buffer so that the
data stage TRB is not broken with a link TRB.

Found at: EuroBSDcon 2019
Sponsored by: Mellanox Technologies


# 305734 12-Sep-2016 hselasky

MFC r305421:
Resolve deadlock between device_detach() and usbd_do_request_flags()
by reviving the SX control request lock and refining which lock
protects the common scratch area in "struct usb_device".

The SX control request lock was removed by r246759 because it caused a
lock order reversal with the USB enumeration lock inside
usbd_transfer_setup() as a function of r246616. It was thought that
reducing the number of locks would resolve the LOR, but because some
USB device drivers use usbd_do_request_flags() inside callback
functions, like in taskqueues, a deadlock may occur when these are
drained from device_detach(). By restoring the SX control request
lock usbd_do_request_flags() is allowed to complete its execution
when a USB device driver is detaching. By using the SX control request
lock to protect the scratch area, the LOR introduced by r246616 is
also resolved.

Bump the FreeBSD version while at it to force recompilation of all USB
kernel modules.

Found by: avos@


# 287274 29-Aug-2015 hselasky

MFC r286773:
Improve the realtime properties of USB transfers for embedded systems
like RPI-B and RPI-2.


# 287272 29-Aug-2015 hselasky

MFC r286799:
Fix race in USB PF which can happen if we stop tracing exactly when
the kernel is tapping an USB transfer. This leads to a NULL pointer
access. The solution is to only trace while the USB bus lock is
locked.


# 278510 10-Feb-2015 hselasky

MFC r278074:
Optimise allocation of USB DMA structures. By default don't double map
allocations if only one element should be allocated per page
cache. Make one allocation per element compile time configurable. Fix
a comment while at it.


# 278507 10-Feb-2015 hselasky

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


# 278278 05-Feb-2015 hselasky

MFC r266969 and r276717:
Add 64-bit DMA support in the XHCI controller driver.
- Fix some comments and whitespaces while at it.
- Add support for PAE.


# 263643 22-Mar-2014 hselasky

MFC r263159:
Workaround for USB MIDI adapters which use non-supported values of
wMaxPacketSize for BULK endpoints.


# 261465 04-Feb-2014 hselasky

MFC r261004, r261005 and r261033:
Adjust the DMA delay logic so that the DMA delay does not become too small.


# 261105 24-Jan-2014 hselasky

MFC r260588 and r260589:
- 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.


# 287274 29-Aug-2015 hselasky

MFC r286773:
Improve the realtime properties of USB transfers for embedded systems
like RPI-B and RPI-2.


# 287272 29-Aug-2015 hselasky

MFC r286799:
Fix race in USB PF which can happen if we stop tracing exactly when
the kernel is tapping an USB transfer. This leads to a NULL pointer
access. The solution is to only trace while the USB bus lock is
locked.


# 278510 10-Feb-2015 hselasky

MFC r278074:
Optimise allocation of USB DMA structures. By default don't double map
allocations if only one element should be allocated per page
cache. Make one allocation per element compile time configurable. Fix
a comment while at it.


# 278507 10-Feb-2015 hselasky

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


# 278278 05-Feb-2015 hselasky

MFC r266969 and r276717:
Add 64-bit DMA support in the XHCI controller driver.
- Fix some comments and whitespaces while at it.
- Add support for PAE.


# 263643 22-Mar-2014 hselasky

MFC r263159:
Workaround for USB MIDI adapters which use non-supported values of
wMaxPacketSize for BULK endpoints.


# 261465 04-Feb-2014 hselasky

MFC r261004, r261005 and r261033:
Adjust the DMA delay logic so that the DMA delay does not become too small.


# 261105 24-Jan-2014 hselasky

MFC r260588 and r260589:
- 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.