<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/bluetooth, branch v5.12</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.12</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.12'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2021-04-09T16:08:02Z</updated>
<entry>
<title>Bluetooth: btusb: Revert Fix the autosuspend enable and disable</title>
<updated>2021-04-09T16:08:02Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2021-04-09T13:58:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=895915226a598394fe9bf57fe97612bdfcb2fb86'/>
<id>urn:sha1:895915226a598394fe9bf57fe97612bdfcb2fb86</id>
<content type='text'>
drivers/usb/core/hub.c: usb_new_device() contains the following:

        /* By default, forbid autosuspend for all devices.  It will be
         * allowed for hubs during binding.
         */
        usb_disable_autosuspend(udev);

So for anything which is not a hub, such as btusb devices, autosuspend is
disabled by default and we must call usb_enable_autosuspend(udev) to
enable it.

This means that the "Fix the autosuspend enable and disable" commit,
which drops the usb_enable_autosuspend() call when the enable_autosuspend
module option is true, is completely wrong, revert it.

This reverts commit 7bd9fb058d77213130e4b3e594115c028b708e7e.

Cc: Hui Wang &lt;hui.wang@canonical.com&gt;
Fixes: 7bd9fb058d77 ("Bluetooth: btusb: Fix the autosuspend enable and disable")
Acked-by: Hui Wang &lt;hui.wang@canonical.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>module: remove never implemented MODULE_SUPPORTED_DEVICE</title>
<updated>2021-03-17T20:16:18Z</updated>
<author>
<name>Leon Romanovsky</name>
<email>leonro@nvidia.com</email>
</author>
<published>2021-03-17T10:45:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6417f03132a6952cd17ddd8eaddbac92b61b17e0'/>
<id>urn:sha1:6417f03132a6952cd17ddd8eaddbac92b61b17e0</id>
<content type='text'>
MODULE_SUPPORTED_DEVICE was added in pre-git era and never was
implemented. We can safely remove it, because the kernel has grown
to have many more reliable mechanisms to determine if device is
supported or not.

Signed-off-by: Leon Romanovsky &lt;leonro@nvidia.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'tty-5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty</title>
<updated>2021-02-21T05:28:04Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2021-02-21T05:28:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e4286926abbbaab9b047c8bc25cae78ec990928f'/>
<id>urn:sha1:e4286926abbbaab9b047c8bc25cae78ec990928f</id>
<content type='text'>
Pull tty/serial driver updates from Greg KH:
 "Here is the big set of tty/serial driver changes for 5.12-rc1.

  Nothing huge, just lots of good cleanups and additions:

   - n_tty line discipline cleanups

   - vt core cleanups and reworks to make the code more "modern"

   - stm32 driver additions

   - tty led support added to the tty core and led layer

   - minor serial driver fixups and additions

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'tty-5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (54 commits)
  serial: core: Remove BUG_ON(in_interrupt()) check
  vt_ioctl: Remove in_interrupt() check
  dt-bindings: serial: imx: Switch to my personal address
  vt: keyboard, use new API for keyboard_tasklet
  serial: stm32: improve platform_get_irq condition handling in init_port
  serial: ifx6x60: Remove driver for deprecated platform
  tty: fix up iterate_tty_read() EOVERFLOW handling
  tty: fix up hung_up_tty_read() conversion
  tty: fix up hung_up_tty_write() conversion
  tty: teach the n_tty ICANON case about the new "cookie continuations" too
  tty: teach n_tty line discipline about the new "cookie continuations"
  tty: clean up legacy leftovers from n_tty line discipline
  tty: implement read_iter
  tty: convert tty_ldisc_ops 'read()' function to take a kernel pointer
  serial: remove sirf prima/atlas driver
  serial: mxs-auart: Remove &lt;asm/cacheflush.h&gt;
  serial: mxs-auart: Remove serial_mxs_probe_dt()
  serial: fsl_lpuart: Use of_device_get_match_data()
  dt-bindings: serial: renesas,hscif: Add r8a779a0 support
  tty: serial: Drop unused efm32 serial driver
  ...
</content>
</entry>
<entry>
<title>Bluetooth: hci_qca: Fixed issue during suspend</title>
<updated>2021-02-08T13:54:07Z</updated>
<author>
<name>Venkata Lakshmi Narayana Gubba</name>
<email>gubbaven@codeaurora.org</email>
</author>
<published>2021-02-05T15:37:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=55c0bd77479b60ea29fd390faf4545cfb3a1d79e'/>
<id>urn:sha1:55c0bd77479b60ea29fd390faf4545cfb3a1d79e</id>
<content type='text'>
If BT SoC is running with ROM FW then just return in
qca_suspend function as ROM FW does not support
in-band sleep.

Fixes: 2be43abac5a8 ("Bluetooth: hci_qca: Wait for timeout during suspend")
Signed-off-by: Venkata Lakshmi Narayana Gubba &lt;gubbaven@codeaurora.org&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btusb: Some Qualcomm Bluetooth adapters stop working</title>
<updated>2021-02-08T13:51:29Z</updated>
<author>
<name>Hui Wang</name>
<email>hui.wang@canonical.com</email>
</author>
<published>2021-02-08T05:02:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=234f414efd1164786269849b4fbb533d6c9cdbbf'/>
<id>urn:sha1:234f414efd1164786269849b4fbb533d6c9cdbbf</id>
<content type='text'>
This issue starts from linux-5.10-rc1, I reproduced this issue on my
Dell Inspiron 7447 with BT adapter 0cf3:e005, the kernel will print
out: "Bluetooth: hci0: don't support firmware rome 0x31010000", and
someone else also reported the similar issue to bugzilla #211571.

I found this is a regression introduced by 'commit b40f58b97386
("Bluetooth: btusb: Add Qualcomm Bluetooth SoC WCN6855 support"), the
patch assumed that if high ROM version is not zero, it is an adapter
on WCN6855, but many old adapters don't need to load rampatch or nvm,
and they have non-zero high ROM version.

To fix it, let the driver match the rom_version in the
qca_devices_table first, if there is no entry matched, check the
high ROM version, if it is not zero, we assume this adapter is ready
to work and no need to load rampatch and nvm like previously.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=211571
Fixes: b40f58b97386 ("Bluetooth: btusb: Add Qualcomm Bluetooth SoC WCN6855 support")
Signed-off-by: Hui Wang &lt;hui.wang@canonical.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btusb: fix excessive stack usage</title>
<updated>2021-02-04T17:11:23Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2021-02-04T15:47:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=10888140f09c3472146dc206accd0cfa051d0ed4'/>
<id>urn:sha1:10888140f09c3472146dc206accd0cfa051d0ed4</id>
<content type='text'>
Enlarging the size of 'struct btmtk_hci_wmt_cmd' makes it no longer
fit on the kernel stack, as seen from this compiler warning:

drivers/bluetooth/btusb.c:3365:12: error: stack frame size of 1036 bytes in function 'btusb_mtk_hci_wmt_sync' [-Werror,-Wframe-larger-than=]

Change the function to dynamically allocate the buffer instead.
As there are other sleeping functions called from the same location,
using GFP_KERNEL should be fine here, and the runtime overhead should
not matter as this is rarely called.

Unfortunately, I could not figure out why the message size is
increased in the previous patch. Using dynamic allocation means
any size is possible now, but there is still a range check that
limits the total size (including the five-byte header) to 255
bytes, so whatever was intended there is now undone.

Fixes: 48c13301e6ba ("Bluetooth: btusb: Fine-tune mt7663 mechanism.")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btusb: remove set but not used variable in btusb_mtk_setup_firmware_79xx</title>
<updated>2021-02-04T12:56:11Z</updated>
<author>
<name>Ye Bin</name>
<email>yebin10@huawei.com</email>
</author>
<published>2021-02-04T01:18:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8564baa3cf986b2f61af93128161b9cf25d4139f'/>
<id>urn:sha1:8564baa3cf986b2f61af93128161b9cf25d4139f</id>
<content type='text'>
Fix follow warning:
drivers/bluetooth/btusb.c:3479:9: warning: variable ‘fw_size’ set but not used [-Wunused-but-set-variable]
  size_t fw_size;
         ^~~~~~~
drivers/bluetooth/btusb.c:3473:29: warning: variable ‘patchhdr’ set but not used [-Wunused-but-set-variable]
  struct btmtk_patch_header *patchhdr = NULL;
                             ^~~~~~~~

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Ye Bin &lt;yebin10@huawei.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btusb: Fix typo and correct the log print</title>
<updated>2021-02-03T14:47:36Z</updated>
<author>
<name>Jupeng Zhong</name>
<email>zhongjupeng@yulong.com</email>
</author>
<published>2021-02-03T14:28:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a297f565f299f63c3d44f6fd3bafe06e2accf00d'/>
<id>urn:sha1:a297f565f299f63c3d44f6fd3bafe06e2accf00d</id>
<content type='text'>
Change "deivice" to "device"

Correct "Unsupported support hardware variant (%08x)" to
"Unsupported hardware variant (%08x)"

Signed-off-by: Jupeng Zhong &lt;zhongjupeng@yulong.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btusb: Fix the autosuspend enable and disable</title>
<updated>2021-02-03T13:34:02Z</updated>
<author>
<name>Hui Wang</name>
<email>hui.wang@canonical.com</email>
</author>
<published>2021-02-03T08:02:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7bd9fb058d77213130e4b3e594115c028b708e7e'/>
<id>urn:sha1:7bd9fb058d77213130e4b3e594115c028b708e7e</id>
<content type='text'>
I tried to disable the autosuspend on btusb through the module
parameter enable_autosuspend, this parameter is set to N, but the usb
bluetooth device is still runtime suspended.
$ cat /sys/module/btusb/parameters/enable_autosuspend
N
$ cat /sys/bus/usb/devices/3-10/power/runtime_status
suspended
$ cat /sys/bus/usb/devices/3-10/power/runtime_suspended_time
65187

We already set ".supports_autosuspend = 1" in the usb_driver, this
device will be set autosuspend enabled by usb core, we don't need
to call usb_enable_autosuspend() in the btusb_probe(). Instead if
users set the parameter enable_autosuspend to N, we need to call
usb_disable_autosuspend() in the btusb_probe(). After this change
and set the parameter to N, we could see the device is not runtime
suspended anymore.
$ cat /sys/module/btusb/parameters/enable_autosuspend
N
$ cat /sys/bus/usb/devices/3-10/power/runtime_status
active
$ cat /sys/bus/usb/devices/3-10/power/runtime_suspended_time
0

And if we disable the autosuspend in the btusb_probe(), we need to
enable the autosuspend in the disconnect(), this could guarantee
that the device could be runtime suspended after we rmmod the btusb.

Signed-off-by: Hui Wang &lt;hui.wang@canonical.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btusb: Fix memory leak in btusb_mtk_wmt_recv</title>
<updated>2021-02-02T16:25:46Z</updated>
<author>
<name>Jupeng Zhong</name>
<email>zhongjupeng@yulong.com</email>
</author>
<published>2021-02-02T01:39:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=de71a6cb4bf24d8993b9ca90d1ddb131b60251a1'/>
<id>urn:sha1:de71a6cb4bf24d8993b9ca90d1ddb131b60251a1</id>
<content type='text'>
In btusb_mtk_wmt_recv if skb_clone fails, the alocated skb should be
released.

Omit the labels “err_out” and “err_free_skb” in this function
implementation so that the desired exception handling code
would be directly specified in the affected if branches.

Fixes: a1c49c434e15 ("btusb: Add protocol support for MediaTek MT7668U USB devices")
Signed-off-by: Jupeng Zhong &lt;zhongjupeng@yulong.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
</feed>
