linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Ron Shaffer <rshaffer@codeaurora.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 3/3] Bluetooth: Synchronize SCO/eSCO connection requests to ACL state
Date: Fri, 16 Jul 2010 09:32:10 -0700	[thread overview]
Message-ID: <1279297930.6282.83.camel@localhost.localdomain> (raw)
In-Reply-To: <4C3F7FEE.1040101@codeaurora.org>

Hi Ron,

> >> Certain headsets such as the Motorola H350 will reject SCO and eSCO
> >> connection requests while the ACL is transitioning from sniff mode
> >> to active mode. Add synchronization so that SCO and eSCO connection
> >> requests will wait until the ACL has fully transitioned to active mode.
> > 
> > I find your patch actually highly complicated. So I tried to capture
> > your intend the in the attached patch (only compiled test) and it would
> > be good if you can try that.
> > 
> > So in general it makes no difference which mode we are in. If a mode
> > change is pending, then we have to delay the SCO setup. And once we are
> > done we the mode change we just setup the SCO link. So in theory that
> > should be enough. Not sure if that is true. I could have overlooked
> > something since I don't really have tested the patch at all ;)
>
> Would have been back with you sooner on this but I'm having some
> hardware issues preventing me from testing your code. I'm fairly
> confident it works as you've consolidated the pending check into
> hci_conn which I like.
> 
> However, the complicated pieces to which I think you are referring are
> the error handling pieces which we should want want to keep. These make
> sure that we clean up appropriately if:
> 
> 1. The HW rejects the exit sniff or the SCO/eSCO request for some reason
> i.e. in the case the HW returns a command status with a failure
> 2. In the latter case, the user space process is also notified that its
> SCO/eSCO request has failed.
> 
> Give the cleanup code some thought. I think you'll see we want this
> there to make the system more reliable.
> 
> As soon as I've confirmed your patch I'll get back to you.

I think the general discussion here is what we expect a normal behaving
system to do and what would be a good idea.

So we already have the case where just always unsniff the ACL link
before establishing any SCO link. If that assumption still holds then I
think it is more than fair to wait for the mode change event as well.

My point is just that when we receive the mode change event, we don't
care if the unsniff (or unpark/unhold) for that matter was successful.
We proceed with the SCO setup.

The change is like this "if a mode change is in progress, then wait
until it finished before trying to setup SCO". I think that is a proper
way of doing this anyway. It really doesn't change anything else. If the
link is active anyway, then nothing has been changed here in the first
place.

And yes, in case of a HCI disconnect event we should clear out the
pending SCO setup request. However that is done anyway, since this flag
is stored inside the ACL connection handle. Right now I really don't see
an issue with this patch.

For the potential security concern, yes that can happen, but lets be
fair, we can't prevent this from the host anyway. Same as someone could
just block the 2.4 GHz spectrum and will disrupt calls.

Regards

Marcel



  reply	other threads:[~2010-07-16 16:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-28 15:53 [PATCH v3 0/3] Don't send SCO/eSCO request during a mode change from sniff to active Ron Shaffer
2010-05-28 15:53 ` [PATCH 1/3] Bluetooth: Remove extraneous white space Ron Shaffer
2010-07-08 21:49   ` Marcel Holtmann
2010-05-28 15:53 ` [PATCH 2/3] Bluetooth: Reassigned copyright to Code Aurora Forum Ron Shaffer
2010-07-08 21:49   ` Marcel Holtmann
2010-05-28 15:53 ` [PATCH 3/3] Bluetooth: Synchronize SCO/eSCO connection requests to ACL state Ron Shaffer
2010-07-08 21:49   ` Marcel Holtmann
2010-07-12 21:06     ` Ron Shaffer
2010-07-12 22:07       ` Marcel Holtmann
2010-07-14 19:20         ` Perelet, Oleg
2010-07-14 19:30           ` Marcel Holtmann
2010-07-14 20:55             ` Matthew Wilson
2010-07-14 20:59             ` Matt Wilson
2010-07-15  3:07               ` Perelet, Oleg
2010-07-15  6:16                 ` Marcel Holtmann
2010-07-15 17:23                   ` Perelet, Oleg
2010-07-15  6:13               ` Marcel Holtmann
2010-07-19 22:07                 ` Matt Wilson
2010-07-15 21:38         ` Ron Shaffer
2010-07-16 16:32           ` Marcel Holtmann [this message]
2010-06-03 20:00 ` [PATCH v3 0/3] Don't send SCO/eSCO request during a mode change from sniff to active Ron Shaffer

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=1279297930.6282.83.camel@localhost.localdomain \
    --to=marcel@holtmann.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=rshaffer@codeaurora.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).