From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Fri, 16 Mar 2007 13:58:21 +0000 Subject: Re: udev or kernel broken with rsdl 0.30 patch Message-Id: <1174053501.21549.71.camel@lov.localdomain> List-Id: References: <20070315104654.19025CA4097@mx1.ciphirelabs.net> In-Reply-To: <20070315104654.19025CA4097@mx1.ciphirelabs.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org On Fri, 2007-03-16 at 14:35 +0100, Andreas Jellinghaus wrote: > Am Freitag, 16. M=C3=A4rz 2007 13:48 schrieb Kay Sievers: > > > what exactly is "wait_for_sysfs"? I'm asking because it shows up in t= he > > > udevd log right before openct is started / should be started. I thoug= ht > > > it would take care of problems like this? or does it only check the > > > basedir, and not the subdirs / files in the dirs to be present or > > > something like that? > > > > It waits for what you ask it to wait for. This may work: > > SUBSYSTEM=3D"usb", KERNEL=3D"[0-9]*:*", WAIT_FOR_SYSFS=3D"bInterfaceP= rotocol" >=20 > I tried it like this: > BUS!=3D"usb", ACTION!=3D"add", GOTO=3D"openct_usb_rules_end" What do you mean here? You only skip the rules if it's !usb _and_ !add. So any other subsystem will enter here. It should probably be: ACTION=3D!"add", GOTO=3D"openct_usb_rules_end" SUBSYSTEM=3D!"usb", GOTO=3D"openct_usb_rules_end" And don't use BUS=3D, it will search all devices in the devpath, but you need only want to see real usb-device events, not other classes of devices that are childs of any usb-device. > KERNEL=3D"[0-9]*:*", WAIT_FOR_SYSFS=3D"bInterfaceClass" > KERNEL=3D"[0-9]*:*", WAIT_FOR_SYSFS=3D"bInterfaceSubClass" > KERNEL=3D"[0-9]*:*", WAIT_FOR_SYSFS=3D"bInterfaceProtocol" You only need bInterfaceProtocol, it's the last file created by the kernel. > SYSFS{bInterfaceClass}=3D"0b", SYSFS{bInterfaceSubClass}=3D"00",=20 > SYSFS{bInterfaceProtocol}=3D"00" RUN+=3D"/lib/udev/openct_usb" >=20 > LABEL=3D"openct_usb_rules_end" >=20 > i.e. with extra lines in the config file. is that correct? now I have a 5= 0/50 > chance that openct_usb run (I plugged in&out 15 times for testing). > and I get lots of warnings during boot because some usb hardware > doesn't have these attributes. is there a way to restrict them to=20 > everything that has a usb device file? It's probably because you match all sorts of devices which aren't usb. Kay ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=DEVD= EV _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel