<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev, branch stable/10</title>
<subtitle>FreeBSD source tree</subtitle>
<id>http://cgit.freebsd.org/src/atom?h=stable%2F10</id>
<link rel='self' href='http://cgit.freebsd.org/src/atom?h=stable%2F10'/>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<updated>2021-03-03T13:33:16Z</updated>
<entry>
<title>MFC 12148d4300db:</title>
<updated>2021-03-03T13:33:16Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2021-02-14T19:29:16Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=cdef48b528b6d4ac2771bac376c09905aa7edfd2'/>
<id>urn:sha1:cdef48b528b6d4ac2771bac376c09905aa7edfd2</id>
<content type='text'>
Fix for locking order reversal in USB audio driver, when using mmap().

Locking the second lock which causes the LOR, can be skipped because
the code updating the shared variables is always executing from the
same USB thread.

lock order reversal:
  1st 0xfffff80005cc3840 pcm7:play:dsp7.p0 (pcm play channel, sleep mutex)
@ usb_transfer.c:2342
  2nd 0xfffff80005cc3860 pcm7:record:dsp7.r0 (pcm record channel, sleep mutex)
@ uaudio.c:2317

lock order pcm record channel -&gt; pcm play channel established at:
witness_checkorder+0x461
__mtx_lock_flags+0x98
dsp_mmap_single+0x151
vm_mmap_cdev+0x65
devfs_mmap_f+0x143
kern_mmap_req+0x594
sys_mmap+0x46
amd64_syscall+0x12e
fast_syscall_common+0xf8

lock order pcm play channel -&gt; pcm record channel attempted at:
witness_checkorder+0xd82
__mtx_lock_flags+0x98
uaudio_chan_play_callback+0xeb
usbd_callback_wrapper+0x7ec
usb_command_wrapper+0x7e
usb_callback_proc+0x8e
usb_process+0xf3
fork_exit+0x80
fork_trampoline+0xe

Found by:	Stefan Ehmann &lt;shoesoft@gmx.net&gt;
Sponsored by:	Mellanox Technologies // NVIDIA Networking

(cherry picked from commit 12148d4300dbbd93260bf2801cdb9eda8b3b05a4)
</content>
</entry>
<entry>
<title>MFC r362045:</title>
<updated>2020-06-18T10:41:51Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2020-06-18T10:41:51Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1ae4bac217163b0cfd834213dbe1d64464baef5b'/>
<id>urn:sha1:1ae4bac217163b0cfd834213dbe1d64464baef5b</id>
<content type='text'>
Make sure packets generated by raw IP code is let through by mlx5en(4).

Allow the TCP header to reside in the mbuf following the IP header.
Else such packets will get dropped.

Backtrace:
mlx5e_sq_xmit()
mlx5e_xmit()
ether_output_frame()
ether_output()
ip_output_send()
ip_output()
rip_output()
sosend_generic()
sosend()
kern_sendit()
sendit()
sys_sendto()
amd64_syscall()
fast_syscall_common()

Sponsored by:	Mellanox Technologies
</content>
</entry>
<entry>
<title>MFC r362044:</title>
<updated>2020-06-18T10:31:21Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2020-06-18T10:31:21Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e5fce44e5127a0f7454203b837487cf86986fc55'/>
<id>urn:sha1:e5fce44e5127a0f7454203b837487cf86986fc55</id>
<content type='text'>
Extend use of unlikely() in the fast path, in mlx5en(4).

Typically the TCP/IP headers fit within the first mbuf and should not
trigger any of the error cases. Use unlikely() for these cases.

No functional change.

Sponsored by:	Mellanox Technologies
</content>
</entry>
<entry>
<title>MFC r362043:</title>
<updated>2020-06-18T10:17:36Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2020-06-18T10:17:36Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=73356f025754fa313d4aab17a2afc0acc41e9c0d'/>
<id>urn:sha1:73356f025754fa313d4aab17a2afc0acc41e9c0d</id>
<content type='text'>
Use const keyword when parsing the TCP/IP header in the fast path in mlx5en(4).

When parsing the TCP/IP header in the fast path, make it clear by using
the const keyword, no fields are to be modified inside the transmitted
packet.

No functional change.

Sponsored by:	Mellanox Technologies
</content>
</entry>
<entry>
<title>MFC r362056:</title>
<updated>2020-06-14T05:33:25Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2020-06-14T05:33:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0be584a9496934fd6c9b029a1da757363be30d5c'/>
<id>urn:sha1:0be584a9496934fd6c9b029a1da757363be30d5c</id>
<content type='text'>
Add missing range checks when receiving USB ethernet packets.

Found by:	Ilja Van Sprundel, IOActive
Sponsored by:	Mellanox Technologies
</content>
</entry>
<entry>
<title>MFC r361827:</title>
<updated>2020-06-08T09:34:16Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2020-06-08T09:34:16Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1036bfa7dd4ecac232c91779e9096d3744885f3e'/>
<id>urn:sha1:1036bfa7dd4ecac232c91779e9096d3744885f3e</id>
<content type='text'>
USB HID descriptors may push/pop the current state to allow
description of items residing in a so-called union. FreeBSD currently
only supports 4 such push levels.

If the push level is not restored within the processing of the same
HID item, an invalid memory location may be used for subsequent HID
item processing.

Verify that the push level is always valid when processing HID items.

Reported by:	Andy Nguyen (Google)
Sponsored by:	Mellanox Technologies
</content>
</entry>
<entry>
<title>MFC r361581:</title>
<updated>2020-06-08T09:28:26Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2020-06-08T09:28:26Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ed33b8c8a505b702a9183482b1d61c7d0b315944'/>
<id>urn:sha1:ed33b8c8a505b702a9183482b1d61c7d0b315944</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 r361577:</title>
<updated>2020-06-08T09:25:01Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2020-06-08T09:25:01Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8e51c3499e0273806331f4172c5db90b061734e0'/>
<id>urn:sha1:8e51c3499e0273806331f4172c5db90b061734e0</id>
<content type='text'>
Don't allow USB device drivers to parent own interface.
It will prevent proper USB device detach.

Sponsored by:	Mellanox Technologies
</content>
</entry>
<entry>
<title>MFC r360075:</title>
<updated>2020-04-26T08:38:10Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2020-04-26T08:38:10Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=dfce0ef7af30ba61f6de1ec1a3f9a612c45ff188'/>
<id>urn:sha1:dfce0ef7af30ba61f6de1ec1a3f9a612c45ff188</id>
<content type='text'>
Set the maximum exit latency to 0 for XHCI USB 3.0 devices, because we
don't implement link power management, LPM.

This fixes error code XHCI_TRB_ERROR_BANDWIDTH for isochronous USB 3.0
transactions.

Submitted by:	Horse Ma &lt;Shichun.Ma@dell.com&gt;
Sponsored by:	Mellanox Technologies
</content>
</entry>
<entry>
<title>MFC r348445 (by lwhsu):</title>
<updated>2020-04-25T13:14:06Z</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2020-04-25T13:14:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=490e73cc01cecda152bc63fbf30f83bcc529739f'/>
<id>urn:sha1:490e73cc01cecda152bc63fbf30f83bcc529739f</id>
<content type='text'>
Add the missing braces to fix the code not guarded by the if clause and has
misleading indentation.  This is found by gcc -Wmisleading-indentation

Approved by:	erj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D20428
</content>
</entry>
</feed>
