<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/bluetooth/hci_serdev.c, branch linux-4.20.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.20.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.20.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-09-27T10:40:14+00:00</updated>
<entry>
<title>Bluetooth: hci_serdev: Fixed error space required before open paranethesis</title>
<updated>2018-09-27T10:40:14+00:00</updated>
<author>
<name>Jagdish Tirumala</name>
<email>t.jag587@gmail.com</email>
</author>
<published>2018-09-11T15:40:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ea9ed991c3fc25f56f37fdc537581211426e03df'/>
<id>urn:sha1:ea9ed991c3fc25f56f37fdc537581211426e03df</id>
<content type='text'>
Fixed error in space required before paranthesis
in drivers/bluetooth/hci_serdev.c

Signed-off-by: Jagdish Tirumala &lt;t.jag587@gmail.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: hci_serdev: Add protocol check in hci_uart_dequeue().</title>
<updated>2018-09-27T09:59:58+00:00</updated>
<author>
<name>Balakrishna Godavarthi</name>
<email>bgodavar@codeaurora.org</email>
</author>
<published>2018-08-22T12:04:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5a637751e216de2cad77f24f92b9e97e61e459d9'/>
<id>urn:sha1:5a637751e216de2cad77f24f92b9e97e61e459d9</id>
<content type='text'>
This will help to check the status of protocol while dequeuing an
skb packet. In some instaces we will end up kernel crash,
where proto close is called and we trying to dequeue an packet.

[  500.142902] [&lt;ffffff80080f9ce4&gt;] do_raw_spin_lock+0x1c/0xe0
[  500.148643] [&lt;ffffff80088f1c7c&gt;] _raw_spin_lock_irqsave+0x38/0x48
[  500.154917] [&lt;ffffff8008780ce8&gt;] skb_dequeue+0x28/0x84
[  500.160209] [&lt;ffffff8000ad6f48&gt;] 0xffffff8000ad6f48
[  500.165230] [&lt;ffffff8000ad6610&gt;] 0xffffff8000ad6610
[  500.170257] [&lt;ffffff80080c7ce8&gt;] process_one_work+0x238/0x3e4
[  500.176174] [&lt;ffffff80080c8330&gt;] worker_thread+0x2bc/0x3d4
[  500.181821] [&lt;ffffff80080cdabc&gt;] kthread+0x138/0x140
[  500.186945] [&lt;ffffff80080844e0&gt;] ret_from_fork+0x10/0x18

Signed-off-by: Balakrishna Godavarthi &lt;bgodavar@codeaurora.org&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: hci_serdev: clear HCI_UART_PROTO_READY to avoid closing proto races</title>
<updated>2018-09-27T09:59:58+00:00</updated>
<author>
<name>Balakrishna Godavarthi</name>
<email>bgodavar@codeaurora.org</email>
</author>
<published>2018-08-22T12:04:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7cf7846d27bfc9731e449857db3eec5e0e9701ba'/>
<id>urn:sha1:7cf7846d27bfc9731e449857db3eec5e0e9701ba</id>
<content type='text'>
Clearing HCI_UART_PROTO_READY will avoid usage of proto function pointers
before running the proto close function pointer. There is chance of kernel
crash, due to usage of non proto close function pointers after proto close.

Signed-off-by: Balakrishna Godavarthi &lt;bgodavar@codeaurora.org&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: hci_serdev: Fix HCI_UART_INIT_PENDING not working</title>
<updated>2018-05-30T06:49:20+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2018-05-27T19:04:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fdee6d8fc630fa82e06d792f3adadab3bd48666e'/>
<id>urn:sha1:fdee6d8fc630fa82e06d792f3adadab3bd48666e</id>
<content type='text'>
Init hci_uart-&gt;init_ready so that hci_uart_init_ready() works properly.

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_serdev: Move serdev_device_close/open into common hci_serdev code</title>
<updated>2018-05-30T06:47:42+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2018-05-27T19:04:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e9ca08074ddcdcc3abacbfca888dba3a110e4453'/>
<id>urn:sha1:e9ca08074ddcdcc3abacbfca888dba3a110e4453</id>
<content type='text'>
Make hci_uart_register_device() and hci_uart_unregister_device() call
serdev_device_close()/open() themselves instead of relying on the various
hci_uart drivers to do this for them.

Besides reducing code complexity, this also ensures correct error checking
of serdev_device_open(), which was missing in a few drivers.

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_uart: Restore hci_dev-&gt;flush callback on open()</title>
<updated>2018-05-30T06:46:17+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2018-05-27T19:04:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=412fe29ffcf9a1ba9f125e72ee3da957cd6a0064'/>
<id>urn:sha1:412fe29ffcf9a1ba9f125e72ee3da957cd6a0064</id>
<content type='text'>
For reasons explained in detail in commit 3611f4d2a5e0 ("hci_ldisc:
fix null pointer deref") the hci_uart_close() functions sets
hci_dev-&gt;flush to NULL.

But the device may be re-opened after a close, this commit restores the
hci_dev-&gt;flush callback on open().

Note this commit also moves the nearly empty defition of hci_uart_open()
a bit down in the file to avoid the need for forward declaring
hci_uart_flush().

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_serdev: Removed unnecessary curly braces</title>
<updated>2018-05-29T13:59:50+00:00</updated>
<author>
<name>Vaibhav Murkute</name>
<email>vaibhavmurkute88@gmail.com</email>
</author>
<published>2018-05-14T21:38:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0c0c09ff09bb094bcd496b28b8ac4c8ae5b7a4a8'/>
<id>urn:sha1:0c0c09ff09bb094bcd496b28b8ac4c8ae5b7a4a8</id>
<content type='text'>
checkpatch.pl shows a warning for these unnecessary curly braces.
so just removed those curly braces.

Signed-off-by: Vaibhav Murkute &lt;vaibhavmurkute88@gmail.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: hci_serdev: Init hci_uart proto_lock to avoid oops</title>
<updated>2017-12-12T23:28:41+00:00</updated>
<author>
<name>Lukas Wunner</name>
<email>lukas@wunner.de</email>
</author>
<published>2017-11-16T23:54:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d73e172816652772114827abaa2dbc053eecbbd7'/>
<id>urn:sha1:d73e172816652772114827abaa2dbc053eecbbd7</id>
<content type='text'>
John Stultz reports a boot time crash with the HiKey board (which uses
hci_serdev) occurring in hci_uart_tx_wakeup().  That function is
contained in hci_ldisc.c, but also called from the newer hci_serdev.c.
It acquires the proto_lock in struct hci_uart and it turns out that we
forgot to init the lock in the serdev code path, thus causing the crash.

John bisected the crash to commit 67d2f8781b9f ("Bluetooth: hci_ldisc:
Allow sleeping while proto locks are held"), but the issue was present
before and the commit merely exposed it.  (Perhaps by luck, the crash
did not occur with rwlocks.)

Init the proto_lock in the serdev code path to avoid the oops.

Stack trace for posterity:

Unable to handle kernel read from unreadable memory at 406f127000
[000000406f127000] user address but active_mm is swapper
Internal error: Oops: 96000005 [#1] PREEMPT SMP
Hardware name: HiKey Development Board (DT)
Call trace:
 hci_uart_tx_wakeup+0x38/0x148
 hci_uart_send_frame+0x28/0x38
 hci_send_frame+0x64/0xc0
 hci_cmd_work+0x98/0x110
 process_one_work+0x134/0x330
 worker_thread+0x130/0x468
 kthread+0xf8/0x128
 ret_from_fork+0x10/0x18

Link: https://lkml.org/lkml/2017/11/15/908
Reported-and-tested-by: John Stultz &lt;john.stultz@linaro.org&gt;
Cc: Ronald Tschalär &lt;ronald@innovation.ch&gt;
Cc: Rob Herring &lt;rob.herring@linaro.org&gt;
Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Signed-off-by: Lukas Wunner &lt;lukas@wunner.de&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
<entry>
<title>Bluetooth: Use bt_dev_err and bt_dev_info when possible</title>
<updated>2017-10-30T10:25:45+00:00</updated>
<author>
<name>Marcel Holtmann</name>
<email>marcel@holtmann.org</email>
</author>
<published>2017-10-30T09:42:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2064ee332e4c1b7495cf68b84355c213d8fe71fd'/>
<id>urn:sha1:2064ee332e4c1b7495cf68b84355c213d8fe71fd</id>
<content type='text'>
In case of using BT_ERR and BT_INFO, convert to bt_dev_err and
bt_dev_info when possible. This allows for controller specific
reporting.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
</entry>
<entry>
<title>Bluetooth: hci_serdev: Introduce hci_uart_unregister_device()</title>
<updated>2017-07-20T09:18:36+00:00</updated>
<author>
<name>Ian Molton</name>
<email>ian@mnementh.co.uk</email>
</author>
<published>2017-07-08T16:37:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c34dc3bfa7642fda423208579015d615f7becfa0'/>
<id>urn:sha1:c34dc3bfa7642fda423208579015d615f7becfa0</id>
<content type='text'>
Several drivers have the same (and incorrect) code in their
_remove() handler.

Coalesce this into a shared function.

Signed-off-by: Ian Molton &lt;ian@mnementh.co.uk&gt;
Reviewed-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
</entry>
</feed>
