mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Olivier Galibert <galibert@pobox.com>
To: "Hack inc." <linux-kernel@vger.kernel.org>,
	marcel@holtmann.org, maxk@qualcomm.com,
	bluez-devel@lists.sourceforge.net
Subject: [PATCH] Fix SCO on Broadcom Bluetooth adapters
Date: Tue, 14 Mar 2006 12:12:48 +0100	[thread overview]
Message-ID: <20060314111248.GA75477@dspnet.fr.eu.org> (raw)

Broadcom USB Bluetooth adapters report a maximum of zero SCO packets
in-flight, killing SCO.  Use a reasonable count instead in that case.

Signed-off-by: Olivier Galibert <galibert@pobox.com>

---

I don't think that could be reasonably done as a quirk.  Simple
examination of the .inf coming with the windows driver shows that 100+
different models may be having this problem.  Also, it can't break
already working adapters, so why bother.

 net/bluetooth/hci_event.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

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;

             reply	other threads:[~2006-03-14 11:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-14 11:12 Olivier Galibert [this message]
2006-03-14 12:12 ` Pavel Machek
2006-03-14 13:49 ` Marcel Holtmann
2006-03-14 14:08   ` Olivier Galibert
2006-03-14 22:27     ` Alan Cox
2006-03-14 23:47       ` Olivier Galibert
2006-03-14 17:39 ` Randy.Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060314111248.GA75477@dspnet.fr.eu.org \
    --to=galibert@pobox.com \
    --cc=bluez-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=maxk@qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®