<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/usb/usb_transfer.c, branch stable/9</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=stable%2F9</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=stable%2F9'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2020-06-09T22:15:45Z</updated>
<entry>
<title>Adapt merge of r361581 to 9-stable to unbreak kernel compilation.</title>
<updated>2020-06-09T22:15:45Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2020-06-09T22:15:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=adbe94a5773e71d863c94185977f43d26f6edde8'/>
<id>urn:sha1:adbe94a5773e71d863c94185977f43d26f6edde8</id>
<content type='text'>
This is a direct commit.

Sponsored by:	Mellanox Technologies
</content>
</entry>
<entry>
<title>MFC r361581:</title>
<updated>2020-06-08T09:29:08Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2020-06-08T09:29:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a8de87d5760d344fb9c63ea8f08ecb68a4d91294'/>
<id>urn:sha1:a8de87d5760d344fb9c63ea8f08ecb68a4d91294</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>MFC r305421:</title>
<updated>2016-09-12T10:20:44Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2016-09-12T10:20:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7ad0de4a4871c7e6a4b2fc04f3da8069468fec60'/>
<id>urn:sha1:7ad0de4a4871c7e6a4b2fc04f3da8069468fec60</id>
<content type='text'>
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@
</content>
</entry>
<entry>
<title>MFC r286799:</title>
<updated>2015-08-29T06:17:39Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2015-08-29T06:17:39Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6f1d9f70305f30eca4005a7f9d6a64dfdda1f63a'/>
<id>urn:sha1:6f1d9f70305f30eca4005a7f9d6a64dfdda1f63a</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>MFC r278071:</title>
<updated>2015-02-10T13:18:48Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2015-02-10T13:18:48Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1568a8916a194b3c8c36f68f6049705cdb3a6fdb'/>
<id>urn:sha1:1568a8916a194b3c8c36f68f6049705cdb3a6fdb</id>
<content type='text'>
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.
</content>
</entry>
<entry>
<title>MFC r266969 and r276717:</title>
<updated>2015-02-05T20:15:42Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2015-02-05T20:15:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d256fef9e0e95102094b7f6d2a1dac3ec978cfb9'/>
<id>urn:sha1:d256fef9e0e95102094b7f6d2a1dac3ec978cfb9</id>
<content type='text'>
Add 64-bit DMA support in the XHCI controller driver.
- Fix some comments and whitespaces while at it.
- Add support for PAE.
</content>
</entry>
<entry>
<title>MFC r263159:</title>
<updated>2014-03-22T17:20:10Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2014-03-22T17:20:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=108e515ccd6e9e21905b3c5d6819eb3be26b7e9b'/>
<id>urn:sha1:108e515ccd6e9e21905b3c5d6819eb3be26b7e9b</id>
<content type='text'>
Workaround for USB MIDI adapters which use non-supported values of
wMaxPacketSize for BULK endpoints.
</content>
</entry>
<entry>
<title>MFC r261004, r261005 and r261033:</title>
<updated>2014-02-04T08:44:33Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2014-02-04T08:44:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=efc58f195f88f66460551a08194f389e64754cd3'/>
<id>urn:sha1:efc58f195f88f66460551a08194f389e64754cd3</id>
<content type='text'>
Adjust the DMA delay logic so that the DMA delay does not become too small.
</content>
</entry>
<entry>
<title>MFC r260588 and r260589:</title>
<updated>2014-01-24T07:57:21Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2014-01-24T07:57:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=bd015f51e340a97f8ce4fef518f6febfd69cbe9e'/>
<id>urn:sha1:bd015f51e340a97f8ce4fef518f6febfd69cbe9e</id>
<content type='text'>
- 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.
</content>
</entry>
<entry>
<title>MFC r246616 and r246759:</title>
<updated>2013-02-21T07:48:07Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2013-02-21T07:48:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4b98c206999a3a320d294c6d2d48072902224251'/>
<id>urn:sha1:4b98c206999a3a320d294c6d2d48072902224251</id>
<content type='text'>
- Move scratch data from the USB bus structure to the USB device
structure so that simultaneous access cannot happen. Protect scratch
area using the enumeration lock.
- Reduce stack usage in usbd_transfer_setup() by moving some big stack
members to the scratch area. This saves around 200 bytes of stack.
- Fix a whitespace.
- Protect control requests using the USB device enumeration lock.
- Make sure all callers of usbd_enum_lock() check the return value.
- Remove the control transfer specific lock.
- Bump the FreeBSD version number, hence external USB modules may need
to be recompiled due to a USB device structure change.
</content>
</entry>
</feed>
