Re: [PATCH 0/2] Fix Inquiry command support in HCI request framework

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Johan,

On Fri, Mar 22, 2013 at 8:20 AM, Johan Hedberg <johan.hedberg@xxxxxxxxx> wrote:
> Hi Andre,
>
> On Wed, Mar 20, 2013, Andre Guedes wrote:
>> HCI Inquiry command causes the controller to enter in inquiry mode. A
>> successful Command Status Event for this command means the the
>> controller is running the inquiry procedure therefore the HCI Inquiry
>> command has completed. The Inquiry Complete Event, on the other hand,
>> means the inquiry _procedure_ (not the HCI command) has completed.
>
> It would be good if you could show exact quotes from the core
> specification instead of making stuff up. Here's an exact quote from the
> core spec (page 706) regarding events generated by the Inquiry command:
>
> "No Command Complete event will be sent by the BR/EDR Controller to
> indicate that this command has been completed. Instead, the Inquiry
> Complete event will indicate that this command has been completed."
>
> That's quite the opposite of what you're claiming, with no references to
> the procedure completion but only the command completion. This makes me
> feel like you're trying to persuade us to a particular technical outcome
> that suits your needs with the help of misleading/inaccurate
> information.
>
> It might well be in our best interest to keep processing our
> request/command queue based on command status events (essentially
> treating the commands as completed) but let's at least be honest about
> what the exact wording in the core specification is.

Here go the quotes about the inquiry procedure you requested (they are
on the same page you cited, 706):
"A Command Status event shall be sent from the BR/EDR Controller to
the Host when the BR/EDR Controller has started the Inquiry process."
[...]
"An Inquiry Complete event shall be generated when the Inquiry process
has completed."

Also, on Command Status Event description, on page 979, we have:
"The Command Status event is used to indicate that the command
described by the Command_Opcode parameter has been received, and that
the Controller is currently performing the task for this command. This
event is needed to provide mechanisms for asynchronous operation,
which makes it possible to prevent the Host from waiting for a command
to finish."

So, based on those statements of the Core specification, it makes
sense to me the HCI request framework should consider the HCI Inquiry
command has completed once the Command Status Event is received.

Besides that, calling the complete callback in Inquiry Complete Event
seems broken. This only works if the HCI request has only the Inquiry
command. If we have a HCI request with two HCI commands (inquiry and
any other command), the second HCI command will be sent to the
controller even if the first command has not completed yet.

Additionally, when the second command completes, the complete callback
will be called, but the first command has not completed yet.

This later issue can lead us to situations where the complete callback
is called with success status (the second command returns success),
but the Inquiry Complete Event returns error later.

Regards,

Andre
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux