Re: [PATCH] Fix SCO on Broadcom Bluetooth adapters

From: Pavel Machek
Date: Tue Mar 14 2006 - 07:11:02 EST


On Út 14-03-06 12:12:48, Olivier Galibert wrote:
> Broadcom USB Bluetooth adapters report a maximum of zero SCO packets
> in-flight, killing SCO. Use a reasonable count instead in that
> case.

Printk("broken Broadcom USB detected, working around"), I'd say. Then
you can also remove the comment :-). Maybe 4 is reasonable value for
some really broken thing, or something...

> Signed-off-by: Olivier Galibert <galibert@xxxxxxxxx>

Pavel

> diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
> --- a/net/bluetooth/hci_event.c
> +++ b/net/bluetooth/hci_event.c
> @@ -324,6 +324,13 @@ static void hci_cc_info_param(struct hci
> hdev->acl_pkts = hdev->acl_cnt = __le16_to_cpu(bs->acl_max_pkt);
> hdev->sco_pkts = hdev->sco_cnt = __le16_to_cpu(bs->sco_max_pkt);
>
> + /* Some buggy USB bluetooth adapters, Broadcom in
> + particular, answer zero as the max number of sco
> + packets in flight. Use a reasonable value
> + instead */
> + if (hdev->sco_pkts == 0)
> + hdev->sco_pkts = hdev->sco_cnt = 8
> +
> BT_DBG("%s mtu: acl %d, sco %d max_pkt: acl %d, sco %d", hdev->name,
> hdev->acl_mtu, hdev->sco_mtu, hdev->acl_pkts, hdev->sco_pkts);
> break;


--
189: private string AtomSTSZ = "stsz";
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/