From: Loic Poulain <loic.poulain@intel.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: bluetooth-next HCI user channel issue
Date: Thu, 21 May 2015 12:18:27 +0200 [thread overview]
Message-ID: <555DB0F3.7020308@intel.com> (raw)
In-Reply-To: <5555F464.7020404@intel.com>
Hi Marcel,
>> any chance you did git bisect this and tell us which patch broken this?
>
> I'll give you a answer/status before the end of next week.
>
> Regards,
> Loic
>
The following patch introduces the regression:
commit bfbd45e9acd2ef90ccc31ea02e08f82af392dbec
Bluetooth: Add device shutdown routine for Intel Bluetooth device
This patch sends the 0xFC3F vendor command from the shutdown callback.
Author says:
"For backward compatibility of this command with old firmware, this
command was supported before, but it behaves same as HCI_RESET
internally. So, it won't be the problem even if the system doesn't have
the latest firmware patch."
However this patch introduces a HCI user channel regression:
- When hci interface is down/up with hciconfig, no problem.
- When hci interface is re-open via HCI user channel (bluemoon), first
command hangs.
After investigating, this is due to the "first HCI command" bug.
There is the following workaround in btusb_setup_intel:
/* The controller has a bug with the first HCI command sent to it
* returning number of completed commands as zero. This would stall the
* command processing in the Bluetooth core.
*
* As a workaround, send HCI Reset command first which will reset the
* number of completed commands and allow normal command processing
* from now on.
*/
Seems that the 0xFC3F command puts the device in the same kind of state
(Intel init state?).
So we need to apply the same workaround by sending HCI_RESET before any
other command, either in the open callback (QUIRK) or in the shutdown
one (after 0xFC3F).
We don't see the issue with "hciconfig up" because the first command is
always HCI_RESET.
Regards,
Loic
--
Intel Open Source Technology Center
http://oss.intel.com/
next prev parent reply other threads:[~2015-05-21 10:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-20 10:35 bluetooth-next HCI user channel issue Loic Poulain
2015-04-20 17:43 ` Marcel Holtmann
2015-05-13 21:10 ` Marcel Holtmann
2015-05-15 13:28 ` Loic Poulain
2015-05-21 10:18 ` Loic Poulain [this message]
2015-05-21 12:22 ` Marcel Holtmann
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=555DB0F3.7020308@intel.com \
--to=loic.poulain@intel.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
/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;
as well as URLs for NNTP newsgroup(s).