<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/bluetooth/btrtl.c, branch linux-5.6.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.6.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.6.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-01-24T18:57:53Z</updated>
<entry>
<title>Bluetooth: btrtl: Use kvmalloc for FW allocations</title>
<updated>2020-01-24T18:57:53Z</updated>
<author>
<name>Maxim Mikityanskiy</name>
</author>
<published>2020-01-24T17:15:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=268d3636dfb22254324774de1f8875174b3be064'/>
<id>urn:sha1:268d3636dfb22254324774de1f8875174b3be064</id>
<content type='text'>
Currently, kmemdup is applied to the firmware data, and it invokes
kmalloc under the hood. The firmware size and patch_length are big (more
than PAGE_SIZE), and on some low-end systems (like ASUS E202SA) kmalloc
may fail to allocate a contiguous chunk under high memory usage and
fragmentation:

Bluetooth: hci0: RTL: examining hci_ver=06 hci_rev=000a lmp_ver=06 lmp_subver=8821
Bluetooth: hci0: RTL: rom_version status=0 version=1
Bluetooth: hci0: RTL: loading rtl_bt/rtl8821a_fw.bin
kworker/u9:2: page allocation failure: order:4, mode:0x40cc0(GFP_KERNEL|__GFP_COMP), nodemask=(null),cpuset=/,mems_allowed=0
&lt;stack trace follows&gt;

As firmware load happens on each resume, Bluetooth will stop working
after several iterations, when the kernel fails to allocate an order-4
page.

This patch replaces kmemdup with kvmalloc+memcpy. It's not required to
have a contiguous chunk here, because it's not mapped to the device
directly.

Signed-off-by: Maxim Mikityanskiy &lt;maxtram95@gmail.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btrtl: remove unneeded semicolon</title>
<updated>2019-10-26T05:23:30Z</updated>
<author>
<name>YueHaibing</name>
</author>
<published>2019-10-25T09:26:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=515d6798fec9632fffb79261c511eb166f773273'/>
<id>urn:sha1:515d6798fec9632fffb79261c511eb166f773273</id>
<content type='text'>
Remove unneeded semicolon.
This is detected by coccinelle.

Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btrtl: Fix an issue for the incorrect error return code.</title>
<updated>2019-10-16T17:26:40Z</updated>
<author>
<name>Max Chou</name>
</author>
<published>2019-09-18T08:56:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d171dfb621240ee6c77cb354c0767b6dd41f83fe'/>
<id>urn:sha1:d171dfb621240ee6c77cb354c0767b6dd41f83fe</id>
<content type='text'>
It does not need the '-' for PTR_ERR(skb) because PTR_ERR(skb) will
return the negative value during errors.

Signed-off-by: Max Chou &lt;max.chou@realtek.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btrtl: Fix an issue that failing to download the FW which size is over 32K bytes</title>
<updated>2019-09-05T15:27:32Z</updated>
<author>
<name>Max Chou</name>
</author>
<published>2019-09-05T05:21:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cf0d9a705d81a0f581865cefe0880f29589dd06f'/>
<id>urn:sha1:cf0d9a705d81a0f581865cefe0880f29589dd06f</id>
<content type='text'>
Fix the issue that when the FW size is 32K+, it will fail for the download
process because of the incorrect index.

When firmware patch length is over 32K, "dl_cmd-&gt;index" may &gt;= 0x80. It
will be thought as "data end" that download process will not complete.
However, driver should recount the index from 1.

Signed-off-by: Max Chou &lt;max.chou@realtek.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btrtl: Remove trailing newline from calls to rtl_dev macros</title>
<updated>2019-09-05T15:27:22Z</updated>
<author>
<name>Alex Lu</name>
</author>
<published>2019-08-31T08:46:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f1300c0340872d7d02617f439433d70c6f47700f'/>
<id>urn:sha1:f1300c0340872d7d02617f439433d70c6f47700f</id>
<content type='text'>
These printing macros already add a trailing newline, so drop these
unnecessary additional newlines.

Signed-off-by: Alex Lu &lt;alex_lu@realsil.com.cn&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btrtl: Remove redundant prefix from calls to rtl_dev macros</title>
<updated>2019-09-05T15:27:22Z</updated>
<author>
<name>Alex Lu</name>
</author>
<published>2019-08-31T08:41:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d182215d2fb9e58a7637efc937fa11dc15cf7a84'/>
<id>urn:sha1:d182215d2fb9e58a7637efc937fa11dc15cf7a84</id>
<content type='text'>
the rtl: or RTL: prefix in the string is pointless. The rtl_dev_* macros
already does that.

Signed-off-by: Alex Lu &lt;alex_lu@realsil.com.cn&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btrtl: Add firmware version print</title>
<updated>2019-09-05T15:27:22Z</updated>
<author>
<name>Alex Lu</name>
</author>
<published>2019-08-31T08:36:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=240b64a83165dde816664b50900aa12f1db92359'/>
<id>urn:sha1:240b64a83165dde816664b50900aa12f1db92359</id>
<content type='text'>
This patch is used to print fw version for debug convenience

Signed-off-by: Alex Lu &lt;alex_lu@realsil.com.cn&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btrtl: Set HCI_QUIRK_SIMULTANEOUS_DISCOVERY</title>
<updated>2019-09-05T15:27:22Z</updated>
<author>
<name>Alex Lu</name>
</author>
<published>2019-08-30T12:02:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=65251e2e0ad379d89f5784626b8c40ff62220d8b'/>
<id>urn:sha1:65251e2e0ad379d89f5784626b8c40ff62220d8b</id>
<content type='text'>
Realtek Bluetooth controllers can do both LE scan and BR/EDR inquiry
at once, need to set HCI_QUIRK_SIMULTANEOUS_DISCOVERY quirk.

Signed-off-by: Alex Lu &lt;alex_lu@realsil.com.cn&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth:: btrtl: Add support for RTL8723DU</title>
<updated>2019-07-06T11:00:58Z</updated>
<author>
<name>Larry Finger</name>
</author>
<published>2019-05-29T18:12:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6c595ea8b7b9d4048760c28cbccd8956acbc0762'/>
<id>urn:sha1:6c595ea8b7b9d4048760c28cbccd8956acbc0762</id>
<content type='text'>
This device is functionally equivalent to the BT part of the RTL8723DE,
uses the same firmware, but the LMP subversion and HCI revision are unique.

Signed-off-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btrtl: HCI reset on close for Realtek BT chip</title>
<updated>2019-07-06T10:32:50Z</updated>
<author>
<name>Jian-Hong Pan</name>
</author>
<published>2019-06-25T08:30:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7af3f558aca74f2ee47b173f1c27f6bb9a5b5561'/>
<id>urn:sha1:7af3f558aca74f2ee47b173f1c27f6bb9a5b5561</id>
<content type='text'>
Realtek RTL8822BE BT chip on ASUS X420FA cannot be turned on correctly
after on-off several times. Bluetooth daemon sets BT mode failed when
this issue happens. Scanning must be active while turning off for this
bug to be hit.

bluetoothd[1576]: Failed to set mode: Failed (0x03)

If BT is turned off, then turned on again, it works correctly again.

According to the vendor driver, the HCI_QUIRK_RESET_ON_CLOSE flag is set
during probing. So, this patch makes Realtek's BT reset on close to fix
this issue.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=203429
Signed-off-by: Jian-Hong Pan &lt;jian-hong@endlessm.com&gt;
Reviewed-by: Daniel Drake &lt;drake@endlessm.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
</feed>
