Add support to hid2hci for recovering Dell BT devices
PATCH 1/2 Add support to hid2hci for recovering Dell BT devices
Hi:
Attached is the first of two follow up patches to the original thread titled "Explicitly disable BT radio using rfkill interface on suspend". This patch adds support for finding the child device to poke. It addresses previous feedback that more pointers needed to be added to find_resuscitated_device for readability.
Regards
Signature · 3 lines
Mario Limonciello *Dell | Linux Engineering* [email protected]
=== modified file 'extras/hid2hci/70-hid2hci.rules'
hid2hci/70-hid2hci.rules +5 -0
@@ -11,6 +11,11 @@ ATTR{bInterfaceClass}=="03", ATTR{bInterfaceSubClass}=="01", ATTR{bInterfaceProtocol}=="02", ATTRS{bDeviceClass}=="00", ATTRS{idVendor}=="413c", ATTRS{bmAttributes}=="e0", \ RUN+="hid2hci --method dell -v $attr{idVendor} -p $attr{idProduct} --mode hci" +# 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", ATTR{bmAttributes}=="e0", IMPORT{parent}="ID_*", ENV{REMOVE_CMD}="hid2hci --method dell -v $env{ID_VENDOR_ID} -p $env{ID_MODEL_ID} --mode hci -s 02" + ENV{DEVTYPE}!="usb_device", GOTO="hid2hci_end" # Logitech devices
=== modified file 'extras/hid2hci/hid2hci.c'
hid2hci/hid2hci.c +44 -1
82 lines not on this page · raw message
Quoted 5 lines · Mario Limonciello
Attached is the first of two follow up patches to the original thread titled "Explicitly disable BT radio using rfkill interface on suspend". This patch adds support for finding the child device to poke. Â It addresses previous feedback that more pointers needed to be added to
find_resuscitated_devicefor readability.
I replaced all the conceptually wrong things, with, i guess, *actually* broken rules and code. :)
Details are in the git log:
http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;hK6769f61206e90850aff8a30e8e93fbfcc18673
I don't have the hardware to test. Please check the new logic, and fix it that it works again. If we can not get it running this way, we need to fix it even more - or if we don't get it fixed before the next release, we need to remove it from udev until we have a properly working version.
Sorry for all the inconvenience, but we have to get it right, the stuff we ship with udev itself. People will copy things from here to start their own projects, and they have to work properly for that reason.
Thanks,
Kay
Hi Kay:
Quoted 10 lines · Kay Sievers
On Thu, Jul 16, 2009 at 23:37, Mario
Limonciello<[email protected]> wrote:I replaced all the conceptually wrong things, with, i guess, *actually* broken rules and code. :)
Details are in the git log:
http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h=4b6769f61206e90850aff8a30e8e93fbfcc18673
Thanks for cleaning that up.
Quoted 6 lines
I don't have the hardware to test. Please check the new logic, and fix it that it works again. If we can not get it running this way, we need to fix it even more - or if we don't get it fixed before the next release, we need to remove it from udev until we have a properly working version.
From testing this, there are two things that needed to be fixed. I'll follow up with two patches in separate threads so that discussions can pursue from there.
Quoted 5 lines
Sorry for all the inconvenience, but we have to get it right, the stuff we ship with udev itself. People will copy things from here to start their own projects, and they have to work properly for that reason.
I understand, and I'd much like to make sure everyone involved here is happy.
Signature · 3 lines
Mario Limonciello *Dell | Linux Engineering* [email protected]