Linux bluetooth development
 help / color / mirror / Atom feed
From: "An, Tedd" <tedd.an@intel.com>
To: "Hedberg, Johan" <johan.hedberg@intel.com>
Cc: "linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	Marcel Holtmann <marcel@holtmann.org>
Subject: Re: [PATCH] Bluetooth: Cancel the hci_request timeout if it received expected event
Date: Tue, 23 Dec 2014 19:09:05 +0000	[thread overview]
Message-ID: <D0BEFBBC.573B%tedd.an@intel.com> (raw)
In-Reply-To: <20141223185511.GA5686@t440s.P-661HNU-F1>

Hi Johan

On 12/23/14, 10:55 AM, "Johan Hedberg" <johan.hedberg@intel.com> wrote:

>Hi Tedd,
>
>On Mon, Dec 22, 2014, Tedd Ho-Jeong An wrote:
>> This patch cancels the hci_request timeout work if the expected event
>> is recevied.
>
>The timer you're canceling isn't hci_request specific, so I'm not sure
>why you're making that reference here? You might want to provide some
>more detailed explanation in the commit message.

When the command is sent with __hci_cmd_sync_ev() and expected event is
other than Command_Complete or
Command_Status, especially, vendor specific event (0xFF), the function
returns the skb filled with
event parameters properly, but there is tx timeout error because the
cmd_timer is not canceled.

I will send out updated patch with details.


>
>> +		if (opcode !=3D HCI_OP_NOP)
>> +			cancel_delayed_work(&hdev->cmd_timer);
>
>I don't think the check for HCI_OP_NOP is necessary here. The opcode is
>from the original command that was sent and it can't be HCI_OP_NOP. The
>other places checking for this before calling cancel_delayed_work() take
>their opcode from the cmd_status/cmd_complete events where it has
>special meaning (i.e. a spontaneous event generated by the controller).

Got it.
=20
>
>Johan

  reply	other threads:[~2014-12-23 19:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-23  3:01 [PATCH] Bluetooth: Cancel the hci_request timeout if it received expected event Tedd Ho-Jeong An
2014-12-23 18:55 ` Johan Hedberg
2014-12-23 19:09   ` An, Tedd [this message]
2014-12-23 20:37     ` 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=D0BEFBBC.573B%tedd.an@intel.com \
    --to=tedd.an@intel.com \
    --cc=johan.hedberg@intel.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