<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/bluetooth/hci_ldisc.c, branch v3.12.31</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>bluetooth: hci_ldisc: fix deadlock condition</title>
<updated>2014-07-02T10:06:27+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>balbi@ti.com</email>
</author>
<published>2014-04-23T14:58:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2223d1af7def3027f997782665289d91882e0231'/>
<id>2223d1af7def3027f997782665289d91882e0231</id>
<content type='text'>
commit da64c27d3c93ee9f89956b9de86c4127eb244494 upstream.

LDISCs shouldn't call tty-&gt;ops-&gt;write() from within
-&gt;write_wakeup().

-&gt;write_wakeup() is called with port lock taken and
IRQs disabled, tty-&gt;ops-&gt;write() will try to acquire
the same port lock and we will deadlock.

Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Reviewed-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Reported-by: Huang Shijie &lt;b32955@freescale.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Tested-by: Andreas Bießmann &lt;andreas@biessmann.de&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit da64c27d3c93ee9f89956b9de86c4127eb244494 upstream.

LDISCs shouldn't call tty-&gt;ops-&gt;write() from within
-&gt;write_wakeup().

-&gt;write_wakeup() is called with port lock taken and
IRQs disabled, tty-&gt;ops-&gt;write() will try to acquire
the same port lock and we will deadlock.

Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Reviewed-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Reported-by: Huang Shijie &lt;b32955@freescale.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Tested-by: Andreas Bießmann &lt;andreas@biessmann.de&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Remove trivial white space</title>
<updated>2013-04-04T09:36:02+00:00</updated>
<author>
<name>Chan-yeol Park</name>
<email>chanyeol.park@samsung.com</email>
</author>
<published>2013-04-02T12:24:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1687dfc3dcecd7f22f60461b562b9ae3171eb93e'/>
<id>1687dfc3dcecd7f22f60461b562b9ae3171eb93e</id>
<content type='text'>
This patch removes redundant whitespace from the HCI ldisc driver.

Signed-off-by: Chan-yeol Park &lt;chanyeol.park@samsung.com&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch removes redundant whitespace from the HCI ldisc driver.

Signed-off-by: Chan-yeol Park &lt;chanyeol.park@samsung.com&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix possible NULL dereference in hci_uart_tty_receive</title>
<updated>2013-04-04T09:36:00+00:00</updated>
<author>
<name>Chan-yeol Park</name>
<email>chanyeol.park@samsung.com</email>
</author>
<published>2013-04-02T12:24:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=788f0923d3cb5256b12113c041c2381e4b3cecf6'/>
<id>788f0923d3cb5256b12113c041c2381e4b3cecf6</id>
<content type='text'>
This patch adds a NULL check for the HCI UART ldisc driver because some
of HCI UART drivers allow hci_uart_tty_receive function to be called
even though the HCI device hasn't been registered yet.

Signed-off-by: Chan-yeol Park &lt;chanyeol.park@samsung.com&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a NULL check for the HCI UART ldisc driver because some
of HCI UART drivers allow hci_uart_tty_receive function to be called
even though the HCI device hasn't been registered yet.

Signed-off-by: Chan-yeol Park &lt;chanyeol.park@samsung.com&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>TTY: hci_ldisc, remove invalid check in open</title>
<updated>2012-10-22T23:50:53+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2012-10-18T20:26:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f327b340e35b210c936cd109544e672aa7a0e49d'/>
<id>f327b340e35b210c936cd109544e672aa7a0e49d</id>
<content type='text'>
hci_ldisc's open checks if tty_struct-&gt;disc_data is set. And if so it
returns with an error. But nothing ensures disc_data to be NULL. And
since ld-&gt;ops-&gt;open shall be called only once, we do not need the
check at all. So remove it.

Note that this is not an issue now, but n_tty will start using the
disc_data pointer and this invalid 'if' would trigger then rendering
TTYs over BT unusable.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Cc: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Cc: Johan Hedberg &lt;johan.hedberg@gmail.com&gt;
Cc: linux-bluetooth@vger.kernel.org
Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
hci_ldisc's open checks if tty_struct-&gt;disc_data is set. And if so it
returns with an error. But nothing ensures disc_data to be NULL. And
since ld-&gt;ops-&gt;open shall be called only once, we do not need the
check at all. So remove it.

Note that this is not an issue now, but n_tty will start using the
disc_data pointer and this invalid 'if' would trigger then rendering
TTYs over BT unusable.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Cc: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Cc: Johan Hedberg &lt;johan.hedberg@gmail.com&gt;
Cc: linux-bluetooth@vger.kernel.org
Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: hci_ldisc.c: removes unnecessary semicolon</title>
<updated>2012-09-19T01:26:22+00:00</updated>
<author>
<name>Peter Senna Tschudin</name>
<email>peter.senna@gmail.com</email>
</author>
<published>2012-09-07T15:24:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a20890d079aa3130ca3f4e10da207cab9df4a2bb'/>
<id>a20890d079aa3130ca3f4e10da207cab9df4a2bb</id>
<content type='text'>
removes unnecessary semicolon

Found by Coccinelle: http://coccinelle.lip6.fr/

Signed-off-by: Peter Senna Tschudin &lt;peter.senna@gmail.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
removes unnecessary semicolon

Found by Coccinelle: http://coccinelle.lip6.fr/

Signed-off-by: Peter Senna Tschudin &lt;peter.senna@gmail.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Add delayed init sequence support for UART controllers</title>
<updated>2012-07-17T17:48:29+00:00</updated>
<author>
<name>Johan Hedberg</name>
<email>johan.hedberg@intel.com</email>
</author>
<published>2012-07-16T13:12:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9f2aee848fe60325b1984653833d2d1825ec730d'/>
<id>9f2aee848fe60325b1984653833d2d1825ec730d</id>
<content type='text'>
This patch makes it possible to have UART drivers perform an internal
initialization before calling hci_register_dev. This allows moving a lot
of init code from user space (hciattach) to the kernel side, thereby
creating a more controlled/robust initialization process.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch makes it possible to have UART drivers perform an internal
initialization before calling hci_register_dev. This allows moving a lot
of init code from user space (hciattach) to the kernel side, thereby
creating a more controlled/robust initialization process.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Simplify hci_uart_tty_close logic</title>
<updated>2012-07-17T17:48:27+00:00</updated>
<author>
<name>Johan Hedberg</name>
<email>johan.hedberg@intel.com</email>
</author>
<published>2012-07-16T13:12:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dac670b97698f7c5584b224dd68d9d612b9ad4d7'/>
<id>dac670b97698f7c5584b224dd68d9d612b9ad4d7</id>
<content type='text'>
This patch cleans up and reduces indentation in the hci_uart_tty_close
function.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch cleans up and reduces indentation in the hci_uart_tty_close
function.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Initial skeleton for Three-wire UART (H5) support</title>
<updated>2012-07-17T17:33:20+00:00</updated>
<author>
<name>Johan Hedberg</name>
<email>johan.hedberg@intel.com</email>
</author>
<published>2012-07-16T13:12:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7dec65c8a7fdab87d23bcf3c7e7eff662d180853'/>
<id>7dec65c8a7fdab87d23bcf3c7e7eff662d180853</id>
<content type='text'>
This patch adds the initial skeleton for Three-wire UART (H5) support
and hooks it up to the HCI UART framework.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds the initial skeleton for Three-wire UART (H5) support
and hooks it up to the HCI UART framework.

Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.co.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Rename HCI_QUIRK_NO_RESET to HCI_QUIRK_RESET_ON_CLOSE</title>
<updated>2012-06-05T03:34:06+00:00</updated>
<author>
<name>Szymon Janc</name>
<email>szymon.janc@tieto.com</email>
</author>
<published>2012-05-23T10:35:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a6c511c636848f871f5b7aef38e25e5b894b3b48'/>
<id>a6c511c636848f871f5b7aef38e25e5b894b3b48</id>
<content type='text'>
HCI_QUIRK_NO_RESET name is misleading - purpose of this quirk is to
reset device on close instead of init, not to not reset at all.
Rename it to HCI_QUIRK_RESET_ON_CLOSE to avoid confusion.

Signed-off-by: Szymon Janc &lt;szymon.janc@tieto.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
HCI_QUIRK_NO_RESET name is misleading - purpose of this quirk is to
reset device on close instead of init, not to not reset at all.
Rename it to HCI_QUIRK_RESET_ON_CLOSE to avoid confusion.

Signed-off-by: Szymon Janc &lt;szymon.janc@tieto.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Remove redundant hdev-&gt;parent field</title>
<updated>2012-05-09T03:41:30+00:00</updated>
<author>
<name>David Herrmann</name>
<email>dh.herrmann@googlemail.com</email>
</author>
<published>2012-03-09T14:53:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6935e0f5181644201894f0b7fbe3d8910c18af05'/>
<id>6935e0f5181644201894f0b7fbe3d8910c18af05</id>
<content type='text'>
We initialize the "struct device" in hci_alloc_dev() for a long time now
so we can access hdev-&gt;dev.parent directly. Hence, we can drop the
temporary field hdev-&gt;parent which is used in no other place than
hci_add_sysfs().

SET_HCIDEV_DEV() is never called after registering a device by the
drivers so we do not overwrite internal device-state. Furthermore,
hdev-&gt;dev is initialized to 0 by kzalloc() inside hci_alloc_dev() so the
default behavior with dev.parent = NULL is kept.

Signed-off-by: David Herrmann &lt;dh.herrmann@googlemail.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We initialize the "struct device" in hci_alloc_dev() for a long time now
so we can access hdev-&gt;dev.parent directly. Hence, we can drop the
temporary field hdev-&gt;parent which is used in no other place than
hci_add_sysfs().

SET_HCIDEV_DEV() is never called after registering a device by the
drivers so we do not overwrite internal device-state. Furthermore,
hdev-&gt;dev is initialized to 0 by kzalloc() inside hci_alloc_dev() so the
default behavior with dev.parent = NULL is kept.

Signed-off-by: David Herrmann &lt;dh.herrmann@googlemail.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Johan Hedberg &lt;johan.hedberg@intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
