From: Johan Hedberg <johan.hedberg@gmail.com>
To: Alex Deymo <deymo@chromium.org>
Cc: Marcel Holtmann <marcel@holtmann.org>,
linux-bluetooth <linux-bluetooth@vger.kernel.org>,
keybuk <keybuk@chromium.org>
Subject: Re: [BUG] HCI_RESET and Num_HCI_Command_Packets limit
Date: Wed, 26 Jun 2013 08:38:30 +0300 [thread overview]
Message-ID: <20130626053830.GA14698@x220> (raw)
In-Reply-To: <CAGd9gwiQJf7T_PS=618N3NNErxWY5TiqOh-QBLxxAHGovxOYTQ@mail.gmail.com>
Hi Alex,
On Tue, Jun 25, 2013, Alex Deymo wrote:
> I'm in 3.8.11 and I don't have that patch... and as I can see from the
> log in mgmt.c it is not going to apply... there are already several
> changes from this kernel to that point. But anyway... that won't fix
> the problem. The scenario is "send a command, btmgmt power off, btmgmt
> power on". The fact that the command was sent because a previous power
> on is not relevant, and bluetoothd normally sends more commands when
> it sees an interface going up that aren't covered by this lock (like
> Write EIR, Write Class of Device, Write Local Name)... right?
Not quite. What we do is program these values to the kernel as soon as
we discover a new adapter and before powering it on. After this
mgmt_set_powered takes care of actually "applying" the values as part of
the power on process. The patch I mentioned should ensure that the
kernel doesn't reply to the mgmt command before all of these HCI
commands have completed.
Of course this still doesn't fix the situation of an HCI command that's
pending that's not part of the power on process (e.g. changing the name
while powered on), so something will probably need to be done about that
anyway.
Johan
prev parent reply other threads:[~2013-06-26 5:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-20 0:56 [BUG] HCI_RESET and Num_HCI_Command_Packets limit Alex Deymo
2013-06-20 1:04 ` Marcel Holtmann
2013-06-20 3:18 ` Alex Deymo
2013-06-20 9:13 ` Andrei Emeltchenko
2013-06-20 12:31 ` Marcel Holtmann
2013-06-20 18:42 ` Alex Deymo
2013-06-21 13:22 ` Marcel Holtmann
2013-06-25 1:02 ` Alex Deymo
2013-06-25 4:55 ` Johan Hedberg
2013-06-25 13:33 ` Marcel Holtmann
2013-06-25 20:34 ` Alex Deymo
2013-06-26 5:38 ` Johan Hedberg [this message]
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=20130626053830.GA14698@x220 \
--to=johan.hedberg@gmail.com \
--cc=deymo@chromium.org \
--cc=keybuk@chromium.org \
--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).