<feed xmlns='http://www.w3.org/2005/Atom'>
<title>blackbird-obmc-linux/drivers/bluetooth, branch dev-5.0-raptor-04-16-2019</title>
<subtitle>Blackbird™ Linux sources for OpenBMC</subtitle>
<id>https://git.raptorcs.com/git/blackbird-obmc-linux/atom?h=dev-5.0-raptor-04-16-2019</id>
<link rel='self' href='https://git.raptorcs.com/git/blackbird-obmc-linux/atom?h=dev-5.0-raptor-04-16-2019'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/'/>
<updated>2019-03-27T05:17:58+00:00</updated>
<entry>
<title>Bluetooth: hci_ldisc: Postpone HCI_UART_PROTO_READY bit set in hci_uart_set_proto()</title>
<updated>2019-03-27T05:17:58+00:00</updated>
<author>
<name>Kefeng Wang</name>
<email>wangkefeng.wang@huawei.com</email>
</author>
<published>2019-02-23T04:33:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=35228ce61a8160199d1ea4ced956116bba686192'/>
<id>urn:sha1:35228ce61a8160199d1ea4ced956116bba686192</id>
<content type='text'>
commit 56897b217a1d0a91c9920cb418d6b3fe922f590a upstream.

task A:                                task B:
hci_uart_set_proto                     flush_to_ldisc
 - p-&gt;open(hu) -&gt; h5_open  //alloc h5  - receive_buf
 - set_bit HCI_UART_PROTO_READY         - tty_port_default_receive_buf
 - hci_uart_register_dev                 - tty_ldisc_receive_buf
                                          - hci_uart_tty_receive
				           - test_bit HCI_UART_PROTO_READY
				            - h5_recv
 - clear_bit HCI_UART_PROTO_READY             while() {
 - p-&gt;open(hu) -&gt; h5_close //free h5
				              - h5_rx_3wire_hdr
				               - h5_reset()  //use-after-free
                                              }

It could use ioctl to set hci uart proto, but there is
a use-after-free issue when hci_uart_register_dev() fail in
hci_uart_set_proto(), see stack above, fix this by setting
HCI_UART_PROTO_READY bit only when hci_uart_register_dev()
return success.

Reported-by: syzbot+899a33dc0fa0dbaf06a6@syzkaller.appspotmail.com
Signed-off-by: Kefeng Wang &lt;wangkefeng.wang@huawei.com&gt;
Reviewed-by: Jeremy Cline &lt;jcline@redhat.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Bluetooth: hci_ldisc: Initialize hci_dev before open()</title>
<updated>2019-03-27T05:17:57+00:00</updated>
<author>
<name>Jeremy Cline</name>
<email>jcline@redhat.com</email>
</author>
<published>2019-02-06T17:54:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=c8d311117c3e45b55794ace66e098f6b622c356e'/>
<id>urn:sha1:c8d311117c3e45b55794ace66e098f6b622c356e</id>
<content type='text'>
commit 32a7b4cbe93b0a0ef7e63d31ca69ce54736c4412 upstream.

The hci_dev struct hdev is referenced in work queues and timers started
by open() in some protocols. This creates a race between the
initialization function and the work or timer which can result hdev
being dereferenced while it is still null.

The syzbot report contains a reliable reproducer which causes a null
pointer dereference of hdev in hci_uart_write_work() by making the
memory allocation for hdev fail.

To fix this, ensure hdev is valid from before calling a protocol's
open() until after calling a protocol's close().

Reported-by: syzbot+257790c15bcdef6fe00c@syzkaller.appspotmail.com
Signed-off-by: Jeremy Cline &lt;jcline@redhat.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Bluetooth: hci_uart: Check if socket buffer is ERR_PTR in h4_recv_buf()</title>
<updated>2019-03-27T05:17:57+00:00</updated>
<author>
<name>Myungho Jung</name>
<email>mhjungk@gmail.com</email>
</author>
<published>2019-01-22T08:33:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=572ae5c7646b36b06d8431682ebfca66229b2ff4'/>
<id>urn:sha1:572ae5c7646b36b06d8431682ebfca66229b2ff4</id>
<content type='text'>
commit 1dc2d785156cbdc80806c32e8d2c7c735d0b4721 upstream.

h4_recv_buf() callers store the return value to socket buffer and
recursively pass the buffer to h4_recv_buf() without protection. So,
ERR_PTR returned from h4_recv_buf() can be dereferenced, if called again
before setting the socket buffer to NULL from previous error. Check if
skb is ERR_PTR in h4_recv_buf().

Reported-by: syzbot+017a32f149406df32703@syzkaller.appspotmail.com
Signed-off-by: Myungho Jung &lt;mhjungk@gmail.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Bluetooth: btrtl: Restore old logic to assume firmware is already loaded</title>
<updated>2019-03-10T06:09:01+00:00</updated>
<author>
<name>Kai-Heng Feng</name>
<email>kai.heng.feng@canonical.com</email>
</author>
<published>2019-01-27T08:33:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=95b6840860ee06e1826ace0c30561d8b7703a838'/>
<id>urn:sha1:95b6840860ee06e1826ace0c30561d8b7703a838</id>
<content type='text'>
commit 00df214b1faae520880cc5c57e206f21239ef741 upstream.

Realtek bluetooth may not work after reboot:
[   12.446130] Bluetooth: hci0: RTL: rtl: unknown IC info, lmp subver a99e, hci rev 826c, hci ver 0008

This is a regression introduced by commit 26503ad25de8 ("Bluetooth:
btrtl: split the device initialization into smaller parts"). The new
logic errors out early when no matching IC info can be found, in this
case it means the firmware is already loaded.

So let's assume the firmware is already loaded when we can't find
matching IC info, like the old logic did.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201921
Fixes: 26503ad25de8 ("Bluetooth: btrtl: split the device initialization into smaller parts")
Cc: stable@vger.kernel.org # 4.19+
Signed-off-by: Kai-Heng Feng &lt;kai.heng.feng@canonical.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Bluetooth: hci_bcm: Handle specific unknown packets after firmware loading</title>
<updated>2018-12-19T12:43:42+00:00</updated>
<author>
<name>Jonathan Bakker</name>
<email>xc-racer2@live.ca</email>
</author>
<published>2018-12-19T11:22:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=22bba80500fdf624a7cfbb65fdfa97a038ae224d'/>
<id>urn:sha1:22bba80500fdf624a7cfbb65fdfa97a038ae224d</id>
<content type='text'>
The Broadcom controller on aries S5PV210 boards sends out a couple of
unknown packets after the firmware is loaded.  This will cause
logging of errors such as:
	Bluetooth: hci0: Frame reassembly failed (-84)

This is probably also the case with other boards, as there are related
Android userspace patches for custom ROMs such as
https://review.lineageos.org/#/c/LineageOS/android_system_bt/+/142721/
Since this appears to be intended behaviour, treated them as diagnostic
packets.

Note that this is another variant of commit 01d5e44ace8a
("Bluetooth: hci_bcm: Handle empty packet after firmware loading")

Signed-off-by: Jonathan Bakker &lt;xc-racer2@live.ca&gt;
Signed-off-by: Paweł Chmiel &lt;pawel.mikolaj.chmiel@gmail.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btbcm: Add entry for BCM4329B1 UART bluetooth</title>
<updated>2018-12-19T12:43:42+00:00</updated>
<author>
<name>Paweł Chmiel</name>
<email>pawel.mikolaj.chmiel@gmail.com</email>
</author>
<published>2018-12-19T11:22:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=e3ca60d06cf37ea57d77eb834dca418f9c2dea81'/>
<id>urn:sha1:e3ca60d06cf37ea57d77eb834dca418f9c2dea81</id>
<content type='text'>
This patch adds the device ID for the BCM 4329 combo module used
in the Samsung Aries based phones (Galaxy S and it's variants).

```
[   11.508980] Bluetooth: hci0: BCM: chip id 41
[   11.518975] Bluetooth: hci0: BCM: features 0x04
[   11.550132] Bluetooth: hci0: BCM4329B1
[   11.557046] Bluetooth: hci0: BCM4329B1 (002.002.023) build 0000
[   13.737071] Bluetooth: hci0: BCM4329B1 (002.002.023) build 0744
```

Output from hciconfig

```
hci0:   Type: Primary  Bus: UART
        BD Address: 43:29:B1:55:00:00  ACL MTU: 1021:6  SCO MTU: 64:1
        UP RUNNING
        RX bytes:1675 acl:0 sco:0 events:145 errors:0
        TX bytes:20426 acl:0 sco:0 commands:146 errors:0
        Features: 0xbf 0xfe 0x8f 0xfe 0x9b 0xff 0x79 0x83
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH SNIFF
        Link mode: SLAVE ACCEPT
        Name: 'aries'
        Class: 0x000000
        Service Classes: Unspecified
        Device Class: Miscellaneous,
        HCI Version: 2.1 (0x4)  Revision: 0x2e8
        LMP Version: 2.1 (0x4)  Subversion: 0x4217
        Manufacturer: Broadcom Corporation (15)
```

Signed-off-by: Paweł Chmiel &lt;pawel.mikolaj.chmiel@gmail.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: btusb: Add support for Intel bluetooth device 8087:0029</title>
<updated>2018-12-19T06:38:21+00:00</updated>
<author>
<name>Raghuram Hegde</name>
<email>raghuram.hegde@intel.com</email>
</author>
<published>2018-12-19T06:12:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=2da711bcebe81209a9f2f90e145600eb1bae2b71'/>
<id>urn:sha1:2da711bcebe81209a9f2f90e145600eb1bae2b71</id>
<content type='text'>
Include the new USB product ID for Intel Bluetooth device 22260
family(CcPeak)

The /sys/kernel/debug/usb/devices portion for this device is:

T:  Bus=01 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#=  2 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=8087 ProdID=0029 Rev= 0.01
C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=1ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
I:  If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  63 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  63 Ivl=1ms

Signed-off-by: Raghuram Hegde &lt;raghuram.hegde@intel.com&gt;
Signed-off-by: Chethan T N &lt;chethan.tumkur.narayan@intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: hci_h5: Turn off RTL8723BS on suspend, reprobe on resume</title>
<updated>2018-12-18T23:49:33+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2018-10-30T13:17:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=8589086f4efd5756d20cedd844b865e5d20164ec'/>
<id>urn:sha1:8589086f4efd5756d20cedd844b865e5d20164ec</id>
<content type='text'>
On many devices the RTL8723BS device gets reset during suspend/resume,
causing it to lose its firmware and all state.

Testing has shown it drops back to communicating at 115200 bps and sends
sync-request packages, indicating it has been fully reset.

This commit fixes this by queueing a reprobe on resume.

This mirrors how USB RTL BT devices, which have the same problem, are
handled in the btusb driver, there we set the USB_QUIRK_RESET_RESUME for
all RTL devices, which also causes a reprobe on resume. The only difference
is that here we need to do the reprobe ourselves.

Since we are doing a full reprobe on resume now, we can also turn off the
device on suspend to save power while suspended.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: hci_h5: Add suspend / resume ops</title>
<updated>2018-12-18T23:49:30+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2018-10-30T13:17:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=28a75e4c813c7ae7de5b4baf4c29369769247cc6'/>
<id>urn:sha1:28a75e4c813c7ae7de5b4baf4c29369769247cc6</id>
<content type='text'>
Add support for vendor specific suspend / resume callbacks.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: hci_intel: clean an indentation issue, remove extraneous spaces</title>
<updated>2018-12-18T23:46:30+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2018-10-30T11:34:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=7086b36b8080e6252162cf5d681f521738e7ced5'/>
<id>urn:sha1:7086b36b8080e6252162cf5d681f521738e7ced5</id>
<content type='text'>
Trivial fix to clean up an indentation issue, remove spaces

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
</feed>
