From: Simon Fels <simon.fels@canonical.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: close HCI device when user channel socket gets closed
Date: Wed, 2 Sep 2015 19:55:03 +0200 [thread overview]
Message-ID: <55E737F7.8000303@canonical.com> (raw)
In-Reply-To: <A04078B1-08B8-41CF-88DD-1547BD1B4A34@holtmann.org>
On 02.09.2015 18:17, Marcel Holtmann wrote:
> Hi Simon,
>
>> With 9380f9eacfbbee701daa416edd6625efcd3e29e1 the order of unsetting
>> the HCI_USER_CHANNEL flag of the HCI device was reverted to ensure
>> the device is first closed before making it available again.
>>
>> Due to hci_dev_close checking for HCI_USER_CHANNEL being set on the
>> device it was never really closed and was kept opened. We're now
>> calling hci_dev_do_close directly to make sure the device is correctly
>> closed and we keep the correct order to unset the flag on our device
>> object.
>>
>> Signed-off-by: Simon Fels <simon.fels@canonical.com>
>> ---
>> include/net/bluetooth/hci_core.h | 1 +
>> net/bluetooth/hci_core.c | 2 +-
>> net/bluetooth/hci_sock.c | 2 +-
>> 3 files changed, 3 insertions(+), 2 deletions(-)
>
> patch has been applied to bluetooth-next tree.
Thanks a lot!
> However I added an extra comment into the code on why this is actually doing the right thing in the end. I mentioned before that I failed to comment on this before and we do not want to keep forgetting to comment on code that is not intuitive.
Yeah sorry.. forgot about this :)
regards,
Simon
prev parent reply other threads:[~2015-09-02 17:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-02 10:10 [PATCH] Bluetooth: close HCI device when user channel socket gets closed Simon Fels
2015-09-02 16:17 ` Marcel Holtmann
2015-09-02 17:55 ` Simon Fels [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=55E737F7.8000303@canonical.com \
--to=simon.fels@canonical.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;
as well as URLs for NNTP newsgroup(s).