From: Johan Hedberg <johan.hedberg@gmail.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: shy <shyboysby@gmail.com>, Marcel Holtmann <marcel@holtmann.org>,
padovan@profusion.mobi, linux-bluetooth@vger.kernel.org
Subject: Re: HID UNPLUG_VIRTUAL_CABLE event issue
Date: Tue, 23 Aug 2011 13:09:04 +0300 [thread overview]
Message-ID: <20110823100904.GA15817@dell> (raw)
In-Reply-To: <CABBYNZKOEp3Uc07NcjmGFH42=bLLFxP6-Xz7injKGCV8aBOi1Q@mail.gmail.com>
Hi,
On Tue, Aug 23, 2011, Luiz Augusto von Dentz wrote:
> On Tue, Aug 23, 2011 at 11:54 AM, shy <shyboysby@gmail.com> wrote:
> > Hi Marcel,
> > According to connection_disconnect in input/device.c(Bluez version
> > 4.93), it would disconnect INTR and CONTROL L2cap link and then send
> > HIDP_CTRL_VIRTUAL_CABLE_UNPLUG message by the process sequence.
> > That seems it doesn't comply to the spec Page120, HID version 1.0.
> > Could you please confirm this case? If so, I would submit a patch.
>
> You mean that the disconnect sequence is wrong? Note that we only send
> virtual cable unplug in case the device is being removed, otherwise it
> is just a regular disconnect.
I'm not really an expert with the HID implementation, but I think what's
causing confusion here are the close() (g_io_channel_shutdown) calls in
user-space code. Since the kernel keeps its own socket references
(created through HIDPCONNADD) this will not actually disconnect the
L2CAP channels and so it's still safe to send the unplug command
(triggered by the HIDPCONNDEL ioctl) and wait for the remote side to
disconnect.
So unless you've got actual traces (air or HCI) showing an incorrect
sequence I don't think there's anything wrong with the code.
Johan
next prev parent reply other threads:[~2011-08-23 10:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-23 8:54 HID UNPLUG_VIRTUAL_CABLE event issue shy
2011-08-23 9:45 ` Luiz Augusto von Dentz
2011-08-23 9:53 ` shy
2011-08-23 10:09 ` Johan Hedberg [this message]
2011-08-23 10:30 ` shy
2011-08-23 11:07 ` Luiz Augusto von Dentz
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=20110823100904.GA15817@dell \
--to=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=padovan@profusion.mobi \
--cc=shyboysby@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.