Linux bluetooth development
 help / color / mirror / Atom feed
From: Andrei Emeltchenko <andrei.emeltchenko.news@gmail.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>, linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: Fix device reset
Date: Thu, 9 Feb 2012 16:25:09 +0200	[thread overview]
Message-ID: <20120209142508.GB22374@aemeltch-MOBL1> (raw)
In-Reply-To: <1328795471.28848.19.camel@aeonflux>

Hi Marcel,

On Thu, Feb 09, 2012 at 02:51:11PM +0100, Marcel Holtmann wrote:
> > > > > > >     if (!test_bit(HCI_RAW, &hdev->flags) &&
> > > > > > > -                           test_bit(HCI_QUIRK_NO_RESET,
> > > > &hdev->quirks)) {
> > > > > > > +                   !test_bit(HCI_QUIRK_NO_RESET,
> > > > &hdev->quirks)) {
> > > > > > Nack. The NO_RESET quirk is supposed to prevent reset during the
> > > > device
> > > > > > init sequence. The purpose of the test in hci_dev_do_close() is to
> > > > let
> > > > > > the reset be done there instead.
> > > > >
> > > > > we might wanna rename this into HCI_QUIRK_RESET_ON_CLOSE. Otherwise
> > > > > people keep in getting confused.
> > > > >
> > > > 
> > > > Moreover without my patch my USB dongle gets stuck after reset.
> > > 
> > > please send hcidump traces for this. And you mean hciconfig hci0 reset?
> > 
> > In the trace there is only one line:
> > 
> > < HCI Command: Reset (0x03|0x0003) plen 0
> > 
> > Then chip stuck (I am testing this inside virtual machine).
> > 
> > I have A-Link BCM USB dongle.
> 
> the patch in general is correct, but it seems that it has some side
> effects on some dongles. Can you try doing hciconfig hci0 reset versus a
> hciconfig hci0 down + hciconfig hci0 up and if it makes any difference.

I was testing for some time and I think now with Johan's patch reverted it
only a little bit better. I was testing with hciconfig hci0 down +
hciconfig hci0 up and with hciconfig hci0 reset and at some point dongle
gets stuck in my virtualbox either way. This is very unstable and probably
related to timing.

Has anybody else experienced the same problem?

Best regards 
Andrei Emeltchenko 

      reply	other threads:[~2012-02-09 14:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-06 13:59 [PATCH] Bluetooth: Fix device reset Emeltchenko Andrei
2012-02-06 15:21 ` Johan Hedberg
2012-02-06 19:02   ` Marcel Holtmann
2012-02-06 19:36     ` Andrei Emeltchenko
2012-02-06 19:38       ` Marcel Holtmann
2012-02-07  9:23         ` Andrei Emeltchenko
2012-02-09 13:51           ` Marcel Holtmann
2012-02-09 14:25             ` Andrei Emeltchenko [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=20120209142508.GB22374@aemeltch-MOBL1 \
    --to=andrei.emeltchenko.news@gmail.com \
    --cc=johan.hedberg@gmail.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