All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] re-trigger hid2hci switching for logitech devices
@ 2010-03-23 23:48 Sjoerd Simons
  2010-03-24  5:10 ` Kay Sievers
  2010-03-24  8:00 ` Marcel Holtmann
  0 siblings, 2 replies; 3+ messages in thread
From: Sjoerd Simons @ 2010-03-23 23:48 UTC (permalink / raw)
  To: linux-hotplug

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

Hey,

  Logitech usb bluetooth dongles that have a HID mode need to be retriggered
  into HCI mode after S3 just like Dell ones otherwise they'll just disappear
  and my bluetooth stops working :/

  See attached patch for a potential fix.

  Sjoerd
-- 
Death is God's way of telling you not to be such a wise guy.

[-- Attachment #2: 0001-hid2hci-re-trigger-switching-for-logitech-devices-af.patch --]
[-- Type: text/x-diff, Size: 1938 bytes --]

From 95c18dd070e00a3a641b70fbedcbccb878e817ad Mon Sep 17 00:00:00 2001
From: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Date: Tue, 23 Mar 2010 23:31:38 +0000
Subject: [PATCH] hid2hci: re-trigger switching for logitech devices after S3

When going to S3 logitech usb dongles will loose their bluetooth interface, so
the switch needs to be retriggered afterwards in the same way that's needed for
Dell devices.
---
 extras/hid2hci/70-hid2hci.rules |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/extras/hid2hci/70-hid2hci.rules b/extras/hid2hci/70-hid2hci.rules
index 01ff30d..8150419 100644
--- a/extras/hid2hci/70-hid2hci.rules
+++ b/extras/hid2hci/70-hid2hci.rules
@@ -12,14 +12,15 @@ ATTR{bInterfaceClass}=="03", ATTR{bInterfaceSubClass}=="01", ATTR{bInterfaceProt
 
 # Logitech devices
 KERNEL=="hiddev*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[34bc]", \
-  RUN+="hid2hci --method=logitech-hid --devpath=%p"
+  RUN+="hid2hci --method=logitech-hid --devpath=%p", ENV{HID2HCI_SWITCH}="1"
 
 ENV{DEVTYPE}!="usb_device", GOTO="hid2hci_end"
 
-# When a Dell device recovers from S3, the mouse child needs to be repoked
-# Unfortunately the only event seen is the BT device disappearing, so the mouse
-# device needs to be chased down on the USB bus.
-ATTR{bDeviceClass}=="e0", ATTR{bDeviceSubClass}=="01", ATTR{bDeviceProtocol}=="01", ATTR{idVendor}=="413c", \
+# When a Dell device recovers from S3 or a logitech usb dongle is connected
+# during S3, the mouse child needs to be repoked Unfortunately the only event
+# seen is the BT device disappearing, so the mouse device needs to be chased
+# down on the USB bus.
+ATTR{bDeviceClass}=="e0", ATTR{bDeviceSubClass}=="01", ATTR{bDeviceProtocol}=="01", ATTR{idVendor}=="413c|046d", \
   ENV{REMOVE_CMD}="/sbin/udevadm trigger --action=change --subsystem-match=usb --property-match=HID2HCI_SWITCH=1"
 
 # CSR devices
-- 
1.7.0.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [patch] re-trigger hid2hci switching for logitech devices
  2010-03-23 23:48 [patch] re-trigger hid2hci switching for logitech devices Sjoerd Simons
@ 2010-03-24  5:10 ` Kay Sievers
  2010-03-24  8:00 ` Marcel Holtmann
  1 sibling, 0 replies; 3+ messages in thread
From: Kay Sievers @ 2010-03-24  5:10 UTC (permalink / raw)
  To: linux-hotplug

On Wed, Mar 24, 2010 at 00:48, Sjoerd Simons <sjoerd@luon.net> wrote:
>  Logitech usb bluetooth dongles that have a HID mode need to be retriggered
>  into HCI mode after S3 just like Dell ones otherwise they'll just disappear
>  and my bluetooth stops working :/

Nothing against the patch in particular. It seems reasonable from the
point we are at at the moment.

But Marcel, are we really sure, we want to go through all this crap in
userspace? Isn't it much simpler to do this from inside the kernel, it
seems odd to do this in udev as such a fragile magic.

Kay

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] re-trigger hid2hci switching for logitech devices
  2010-03-23 23:48 [patch] re-trigger hid2hci switching for logitech devices Sjoerd Simons
  2010-03-24  5:10 ` Kay Sievers
@ 2010-03-24  8:00 ` Marcel Holtmann
  1 sibling, 0 replies; 3+ messages in thread
From: Marcel Holtmann @ 2010-03-24  8:00 UTC (permalink / raw)
  To: linux-hotplug

Hi Kay,

> >  Logitech usb bluetooth dongles that have a HID mode need to be retriggered
> >  into HCI mode after S3 just like Dell ones otherwise they'll just disappear
> >  and my bluetooth stops working :/
> 
> Nothing against the patch in particular. It seems reasonable from the
> point we are at at the moment.
> 
> But Marcel, are we really sure, we want to go through all this crap in
> userspace? Isn't it much simpler to do this from inside the kernel, it
> seems odd to do this in udev as such a fragile magic.

we might should just do it inside the kernel. Especially since we now
have a proper HID bus for vendor specific drivers available. Not that
there are clear direction right now, but it would be worth to spent some
time to investigate it.

Regards

Marcel



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-03-24  8:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-23 23:48 [patch] re-trigger hid2hci switching for logitech devices Sjoerd Simons
2010-03-24  5:10 ` Kay Sievers
2010-03-24  8:00 ` Marcel Holtmann

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.