Re: [PATCH] Add bluetooth-hid2hci to udev-extras

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 11, 2009 at 23:05, Mario
Limonciello<mario_limonciello@xxxxxxxx> wrote:
>> This is all about adding USB devices, right? So the entire rules file
>> should be guarded by:
>>   ACTION=="add", ... out
>>   SUBSYSTEM=="usb", ... out
>>   ENV{DEVTYPE}=="usb_device", ... out
>>
>> to exclude all other events from trying to match these rules. Also the
>> individual ACTION matches are not needed then.
>>
> I added an ACTION guard around the top, but those other two guards break
> things.

That sounds weird. We match against properties of the usb_device
device, so we should only hook into the usb_device events. We can not
do the rules that way, they will match on _all_ child events for the
usb_device.

Using ATTRS is needlessly expensive because it walks up the chain of
parent devices to search for a match. It also does not make sure we
run only once per usb_device, it will match all usb_interface and
usb_endpoint devices.

The appendend works fine here, care to check what's going wrong on your side?

Thanks,
Kay


ACTION!="add", GOTO="hid2hci_end"
SUBSYSTEM!="usb", GOTO="hid2hci_end"
ENV{DEVTYPE}!="usb_device", GOTO="hid2hci_end"

...
ATTR{idVendor}=="046d", ATTR{idProduct}=="c703" RUN+="...
...

LABEL="hid2hci_end"
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux