<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/bluetooth, branch tegra-10.7.1</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: Prevent ill-timed autosuspend in USB driver</title>
<updated>2010-01-06T23:03:43+00:00</updated>
<author>
<name>Oliver Neukum</name>
<email>oliver@neukum.org</email>
</author>
<published>2009-12-16T18:23:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f661c3feba2d9455614d64ba0f73f182a1b39456'/>
<id>f661c3feba2d9455614d64ba0f73f182a1b39456</id>
<content type='text'>
commit 652fd781a52ad6e24b908cd8b83d12699754f253 upstream.

The device must be marked busy as it receives data.

Signed-off-by: Oliver Neukum &lt;oliver@neukum.org&gt;
Tested-by: Matthew Garrett &lt;mjg@redhat.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 652fd781a52ad6e24b908cd8b83d12699754f253 upstream.

The device must be marked busy as it receives data.

Signed-off-by: Oliver Neukum &lt;oliver@neukum.org&gt;
Tested-by: Matthew Garrett &lt;mjg@redhat.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>fix memory leak in fixed btusb_close</title>
<updated>2009-11-14T20:57:08+00:00</updated>
<author>
<name>Oliver Neukum</name>
<email>oliver@neukum.org</email>
</author>
<published>2009-11-13T13:26:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7b8e2c1db0f358bc389dd1ee4633a92d80a5a6d0'/>
<id>7b8e2c1db0f358bc389dd1ee4633a92d80a5a6d0</id>
<content type='text'>
If the waker is killed before it can replay outstanding URBs, these URBs
won't be freed or will be replayed at the next open.  This patch closes
the window by explicitely discarding outstanding URBs.

Signed-off-by: Oliver Neukum &lt;oliver@neukum.org&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the waker is killed before it can replay outstanding URBs, these URBs
won't be freed or will be replayed at the next open.  This patch closes
the window by explicitely discarding outstanding URBs.

Signed-off-by: Oliver Neukum &lt;oliver@neukum.org&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>btusb bluetooth driver: wait for 'waker' work too before closing</title>
<updated>2009-11-11T21:32:29+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-11-11T21:32:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=404291ac9e72d118fcadeb939a69b2caa0a0e9ca'/>
<id>404291ac9e72d118fcadeb939a69b2caa0a0e9ca</id>
<content type='text'>
Rafael debugged a resume-time hang (with oopses in workqueue handling)
on his laptop that was due to the 'waker' workqueue entry being
disconnected and then released without the workqueue entry having been
synchronized.

Several people were involved, with Oleg Nesterov doing a debugging patch
showing what workqueue entry was corrupt etc.

This was a regression introduced by commit 7bee549e19 ("Bluetooth: Add
USB autosuspend support to btusb driver") as Rafael points out (not
actually bisected, but it became clear once the bug was found).

Tested-and-reported-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Oliver Neukum &lt;oliver@neukum.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rafael debugged a resume-time hang (with oopses in workqueue handling)
on his laptop that was due to the 'waker' workqueue entry being
disconnected and then released without the workqueue entry having been
synchronized.

Several people were involved, with Oleg Nesterov doing a debugging patch
showing what workqueue entry was corrupt etc.

This was a regression introduced by commit 7bee549e19 ("Bluetooth: Add
USB autosuspend support to btusb driver") as Rafael points out (not
actually bisected, but it became clear once the bug was found).

Tested-and-reported-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Oliver Neukum &lt;oliver@neukum.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>pcmcia: dtl1_cs: fix pcmcia_loop_config logic</title>
<updated>2009-09-15T17:17:16+00:00</updated>
<author>
<name>Philipp Zabel</name>
<email>philipp.zabel@gmail.com</email>
</author>
<published>2009-02-27T16:54:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cb6dbd79628a53e66352387b53b426fa88640bfe'/>
<id>cb6dbd79628a53e66352387b53b426fa88640bfe</id>
<content type='text'>
pcmcia_loop_config returns 0 on success.

[wsa: added '&lt; 0' for better readability]

Signed-off-by: Philipp Zabel &lt;philipp.zabel@gmail.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pcmcia_loop_config returns 0 on success.

[wsa: added '&lt; 0' for better readability]

Signed-off-by: Philipp Zabel &lt;philipp.zabel@gmail.com&gt;
Acked-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Add USB autosuspend support to btusb driver</title>
<updated>2009-08-24T23:31:24+00:00</updated>
<author>
<name>Oliver Neukum</name>
<email>oliver@neukum.org</email>
</author>
<published>2009-08-24T21:44:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7bee549e197c9c0e92b89857a409675c1d5e9dff'/>
<id>7bee549e197c9c0e92b89857a409675c1d5e9dff</id>
<content type='text'>
This patch adds support of USB autosuspend to the btusb driver.

If the device doesn't support remote wakeup, simple support based on
up/down is provided. If the device supports remote wakeup, additional
support for autosuspend while the interface is up is provided. This is
done by queueing URBs in an anchor structure and waking the device up
from a work queue on sending. Reception triggers remote wakeup.

The last busy facility of the USB autosuspend code is used. To close
a race between autosuspend and transmission, a counter of ongoing
transmissions is maintained.

Add #ifdefs for CONFIG_PM as necessary.

Signed-off-by: Oliver Neukum &lt;oliver@neukum.org&gt;
Tested-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.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>
This patch adds support of USB autosuspend to the btusb driver.

If the device doesn't support remote wakeup, simple support based on
up/down is provided. If the device supports remote wakeup, additional
support for autosuspend while the interface is up is provided. This is
done by queueing URBs in an anchor structure and waking the device up
from a work queue on sending. Reception triggers remote wakeup.

The last busy facility of the USB autosuspend code is used. To close
a race between autosuspend and transmission, a counter of ongoing
transmissions is maintained.

Add #ifdefs for CONFIG_PM as necessary.

Signed-off-by: Oliver Neukum &lt;oliver@neukum.org&gt;
Tested-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix false errors from bcsp_pkt_cull function</title>
<updated>2009-08-24T20:32:32+00:00</updated>
<author>
<name>Wending Weng</name>
<email>wweng@rheinmetall.ca</email>
</author>
<published>2009-08-24T20:05:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d2e353f7c3c5fbb3add0341c10ae167ee745d23b'/>
<id>d2e353f7c3c5fbb3add0341c10ae167ee745d23b</id>
<content type='text'>
The error message "Removed only %u out of %u pkts" is printed when multiple
to be acked packets are queued.

    if (i++ &gt;= pkts_to_be_removed)
            break;

This will break out of the loop and increase the counter i when
i==pkts_to_be_removed and the loop ends up with i=pkts_to_be_removed+1.

The following line

    if (i != pkts_to_be_removed) {
            BT_ERR("Removed only %u out of %u pkts", i, pkts_to_be_removed);
    }

will then display the false message.

The counter i must not increase on the same statement.

Signed-off-by: Wending Weng &lt;wweng@rheinmetall.ca&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The error message "Removed only %u out of %u pkts" is printed when multiple
to be acked packets are queued.

    if (i++ &gt;= pkts_to_be_removed)
            break;

This will break out of the loop and increase the counter i when
i==pkts_to_be_removed and the loop ends up with i=pkts_to_be_removed+1.

The following line

    if (i != pkts_to_be_removed) {
            BT_ERR("Removed only %u out of %u pkts", i, pkts_to_be_removed);
    }

will then display the false message.

The counter i must not increase on the same statement.

Signed-off-by: Wending Weng &lt;wweng@rheinmetall.ca&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Add missing kmalloc NULL tests to Marvell driver</title>
<updated>2009-08-22T21:33:22+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>julia@diku.dk</email>
</author>
<published>2009-08-06T20:05:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5959809ded86e267c1a95fb44738a224c30d3434'/>
<id>5959809ded86e267c1a95fb44738a224c30d3434</id>
<content type='text'>
Check that the result of kmalloc is not NULL before dereferencing it.
The patch also replaces kmalloc + memset by kzalloc.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@@
expression *x;
identifier f;
constant char *C;
@@

x = \(kmalloc\|kcalloc\|kzalloc\)(...);
... when != x == NULL
    when != x != NULL
    when != (x || ...)
(
kfree(x)
|
f(...,C,...,x,...)
|
*f(...,x,...)
|
*x-&gt;f
)
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Check that the result of kmalloc is not NULL before dereferencing it.
The patch also replaces kmalloc + memset by kzalloc.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@@
expression *x;
identifier f;
constant char *C;
@@

x = \(kmalloc\|kcalloc\|kzalloc\)(...);
... when != x == NULL
    when != x != NULL
    when != (x || ...)
(
kfree(x)
|
f(...,C,...,x,...)
|
*f(...,x,...)
|
*x-&gt;f
)
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix incorrect alignment in Marvell BT-over-SDIO driver</title>
<updated>2009-08-22T21:25:34+00:00</updated>
<author>
<name>Bing Zhao</name>
<email>bzhao@marvell.com</email>
</author>
<published>2009-07-08T18:44:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3318b2362bf0528be77123c480249663557dfbfc'/>
<id>3318b2362bf0528be77123c480249663557dfbfc</id>
<content type='text'>
The driver uses "u32" for alignment check and calculation which
works only on 32-bit system. It will crash the 64-bit system.
Replace "u32" with "unsigned long" to fix this issue.

Signed-off-by: Bing Zhao &lt;bzhao@marvell.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>
The driver uses "u32" for alignment check and calculation which
works only on 32-bit system. It will crash the 64-bit system.
Replace "u32" with "unsigned long" to fix this issue.

Signed-off-by: Bing Zhao &lt;bzhao@marvell.com&gt;
Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Remove Enter/Leave debug statements from Marvell driver</title>
<updated>2009-08-22T21:25:34+00:00</updated>
<author>
<name>Marcel Holtmann</name>
<email>marcel@holtmann.org</email>
</author>
<published>2009-06-13T05:40:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9374253ffe609f2d70dd5ae280182cb6f08fef08'/>
<id>9374253ffe609f2d70dd5ae280182cb6f08fef08</id>
<content type='text'>
The Marvell Bluetooth driver is full of Enter/Leave debug statements and
all of them are really pointless and only clutter the code. Seems to be
some left-overs when they ported the driver from Windows. For the Linux
driver lets remove these.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Marvell Bluetooth driver is full of Enter/Leave debug statements and
all of them are really pointless and only clutter the code. Seems to be
some left-overs when they ported the driver from Windows. For the Linux
driver lets remove these.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Bluetooth: Fix last few compiler warning within Marvell core driver</title>
<updated>2009-08-22T21:25:34+00:00</updated>
<author>
<name>Marcel Holtmann</name>
<email>marcel@holtmann.org</email>
</author>
<published>2009-06-13T05:27:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e0721f99ba33d13a88746732be2d74ca805abf55'/>
<id>e0721f99ba33d13a88746732be2d74ca805abf55</id>
<content type='text'>
After fixing the driver to use skb_put properly for their HCI commands
only a few compiler warnings are left. Add proper casting for them.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After fixing the driver to use skb_put properly for their HCI commands
only a few compiler warnings are left. Add proper casting for them.

Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
