From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Thu, 11 Jun 2009 21:46:23 +0000 Subject: Re: [PATCH] Add bluetooth-hid2hci to udev-extras Message-Id: List-Id: References: <4A303B6D.6020508@dell.com> In-Reply-To: <4A303B6D.6020508@dell.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: linux-hotplug@vger.kernel.org On Thu, Jun 11, 2009 at 23:05, Mario Limonciello 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"