All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Thomas Bächler" <thomas@archlinux.org>
To: linux-kernel@vger.kernel.org
Subject: Bluetooth HID devices not getting properly removed
Date: Wed, 24 Jun 2009 13:11:14 +0200	[thread overview]
Message-ID: <4A4209D2.4060209@archlinux.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1844 bytes --]

I am unsure where to put this bug, because it actually manifests inside 
HAL. I think the bluetooth hid driver is at fault, because there is an 
inconsistency in uevents between USB and bluetooth mice.

So this is what happens: When I add a bluetooth mouse, udev receives 
certain uevents, this is an excerpt from udevadm monitor:

KERNEL[1245834026.993304] add 
/devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/bluetooth/hci0/hci0:11 
(bluetooth)
KERNEL[1245834027.252241] add 
/devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/bluetooth/hci0/hci0:11/0005:046D:B002.0005 
(hid)
KERNEL[1245834027.252301] add 
/devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/bluetooth/hci0/hci0:11/input12 
(input)

Pay attention to the input device, it is added with a full device path. 
When removing the mouse, this happens:

KERNEL[1245834012.631443] remove 
/devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/bluetooth/hci0/hci0:11 
(bluetooth)
KERNEL[1245834012.632668] remove   /hci0:11/input12/mouse2 (input)
KERNEL[1245834012.641797] remove   /hci0:11/input12/event8 (input)
KERNEL[1245834012.655447] remove   /hci0:11/input12 (input)
KERNEL[1245834012.655502] remove   /hci0:11/0005:046D:B002.0004 (hid)

See how the device path of the removed input devices is truncated? When 
I do the same with a USB mouse, a full device path is returned each time.

All of this results in hal not removing its logical input device, which 
means the number of (non-existent) mice in the hal device tree increases 
whenever I disable and re-enable my mouse.

So where do I put this bug? Linux? Bluez? Udev? Hal? My guess is Linux, 
as these device paths come from Linux originally and are in fact 
inconsistent. This is all tested on 2.6.30, I have no idea if it was the 
case on older kernels.

Please CC me on replies.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

             reply	other threads:[~2009-06-24 11:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-24 11:11 Thomas Bächler [this message]
2009-06-24 11:28 ` Bluetooth HID devices not getting properly removed David Woodhouse

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=4A4209D2.4060209@archlinux.org \
    --to=thomas@archlinux.org \
    --cc=linux-kernel@vger.kernel.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 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.