Title: [7698] branches/2009R1/drivers/bluetooth/hci_bcsp.c: Fix UART Bluetooth BCSP Bug: bcsp_pkt_cull: Removed only x out of x-1
- Revision
- 7698
- Author
- hennerich
- Date
- 2009-10-22 04:07:35 -0400 (Thu, 22 Oct 2009)
Log Message
Fix UART Bluetooth BCSP Bug: bcsp_pkt_cull: Removed only x out of x-1
pkts errors.
After debugging this issue - I found that the issue was fixed in
linux-2.6.32:
Using Google I found this thread between Wending and Marcel:
http://www.spinics.net/lists/linux-bluetooth/msg03158.html
From: root <r...@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 24 Aug 2009 14:06:18 -0400
Subject: [PATCH] The routine bcsp_pkt_cull displays the false error
message
"Removed only %u out of %u pkts" when multiple to be acked packets are
queued.
As if (i++ >= pkts_to_be_removed)
break;
will breaks the loop and increase the counter i when
i==pkts_to_be_removed,
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 display the false message.
The counter i must not increase on the same line.
Modified Paths
Diff
Modified: branches/2009R1/drivers/bluetooth/hci_bcsp.c (7697 => 7698)
--- branches/2009R1/drivers/bluetooth/hci_bcsp.c 2009-10-22 08:06:47 UTC (rev 7697)
+++ branches/2009R1/drivers/bluetooth/hci_bcsp.c 2009-10-22 08:07:35 UTC (rev 7698)
@@ -378,8 +378,9 @@
i = 0;
skb_queue_walk_safe(&bcsp->unack, skb, tmp) {
- if (i++ >= pkts_to_be_removed)
+ if (i >= pkts_to_be_removed)
break;
+ i++;
__skb_unlink(skb, &bcsp->unack);
kfree_skb(skb);
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits