From: Marcel Holtmann <marcel@holtmann.org>
To: Rene Herman <rene.herman@gmail.com>
Cc: Gustavo Padovan <padovan@profusion.mobi>,
Andre Guedes <andre.guedes@openbossa.org>,
linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org
Subject: Re: [bluetooth] linux-3.x regression (bisected)
Date: Wed, 28 Dec 2011 15:07:03 -0800 [thread overview]
Message-ID: <1325113623.1965.289.camel@aeonflux> (raw)
In-Reply-To: <4EFB957A.5070606@gmail.com>
Hi Rene,
> > < HCI Command: Read Local Extended Features (0x04|0x0004) plen 1
> > page 1
> > > HCI Event: Command Complete (0x0e) plen 14
> > Read Local Extended Features (0x04|0x0004) ncmd 1
> > status 0x00 page 0 max 0
> > Features: 0xff 0xfe 0xff 0x7e 0x98 0x19 0x00 0x80
> >
> > And this is correct. Page 0 is the same as local features. Storing this
> > as page 1 is the issue here. We request page 1, but we are getting page
> > 0 instead. So yes, the controller is broken, but not as broken as it
> > gets us false information.
>
> By the way, while the bluetooth (2.0) spec seems to consist of a 1230
> page document that I am most certainly not going to study ...
>
> ... I couldn't help noticing that the HCI_Read_Local_Extended_Features
> command is in fact specified to return "The highest features page number
> which contains non-zero bits for the local device", and if I look at the
> above, it seems to indeed return max=0.
>
> Is it as such not in fact the case that the dongle is spec-compliant,
> whereas it's the linux code that neglects to check that return value in
> order to make sure that it requested a valid page?
the Linux code indeed is broken for not checking the returned page, but
it is broken for different reasons.
However the expected result from the dongle would be an error code and
not just returning page 0 instead.
And the max value just tells you about the max page value. So that the
host does not have to go ahead and read 255 pages before realizing that
there is nothing there.
Regards
Marcel
next prev parent reply other threads:[~2011-12-28 23:07 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4EF3BACA.1080405@gmail.com>
2011-12-27 17:22 ` [bluetooth] linux-3.x regression (bisected) Andre Guedes
2011-12-27 19:38 ` Rene Herman
2011-12-27 20:30 ` Gustavo Padovan
2011-12-27 22:19 ` Rene Herman
2011-12-28 1:22 ` Gustavo Padovan
2011-12-28 1:28 ` Gustavo Padovan
2011-12-28 1:53 ` Rene Herman
2011-12-28 1:57 ` Rene Herman
2011-12-28 15:52 ` Gustavo Padovan
2011-12-28 16:04 ` David Herrmann
2011-12-28 16:16 ` Gustavo Padovan
2011-12-28 16:48 ` Marcel Holtmann
2011-12-28 17:24 ` Rene Herman
2011-12-28 22:17 ` Rene Herman
2011-12-28 23:07 ` Marcel Holtmann [this message]
2011-12-29 0:22 ` Rene Herman
2012-01-04 12:04 ` Rene Herman
2012-01-04 14:16 ` Andre Guedes
2012-01-04 15:12 ` Rene Herman
2011-12-28 16:54 ` Rene Herman
2011-12-28 17:12 ` 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=1325113623.1965.289.camel@aeonflux \
--to=marcel@holtmann.org \
--cc=andre.guedes@openbossa.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=padovan@profusion.mobi \
--cc=rene.herman@gmail.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;
as well as URLs for NNTP newsgroup(s).