From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: udev or kernel broken with rsdl 0.30 patch
Date: Fri, 16 Mar 2007 15:39:15 +0000 [thread overview]
Message-ID: <1174059555.21549.90.camel@lov.localdomain> (raw)
In-Reply-To: <20070315104654.19025CA4097@mx1.ciphirelabs.net>
On Fri, 2007-03-16 at 16:20 +0100, Andreas Jellinghaus wrote:
> Am Freitag, 16. März 2007 15:59 schrieb Kay Sievers:
> > Hmm, if it's a timing issue we should be able to fix it with
> > WAIT_FOR_SYSFS. What does:
> > udevtest /devices/pci0000:00/0000:00:1d.2/usb4/4-1/4-1.3/4-1.3:1.0
>
> udevtest /devices/pci0000\:00/0000\:00\:1d.1/usb2/2-1/2-1.5/2-1.5\:1.0
> main: looking at
> device '/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1.5/2-1.5:1.0' from
> subsystem 'usb'
> wait_for_sysfs:
> file '/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1.5/2-1.5:1.0/bInterfaceProtocol'
> appeared after 0 loops
> main: run: '/lib/udev/openct_usb'
> main: run: 'socket:/org/freedesktop/hal/udev_event'
> main: run: 'socket:/org/kernel/udev/monitor'
>
> looks ok to me.
>
> > for the interface (the one with the ":") say to WAIT_FOR_SYSFS? It finds
> > the attributes, and says it would run your program?
>
> yes, udevtest is always fine.
>
> > It does not work on device plug-in, does it work if you write "add" to
> > the "uevent"-file of the device in sysfs?
>
> that works as well.
>
> > Does adding PROGRAM="/bin/sleep 1" make a difference?
>
> that solved the problem.
Weird, WAIT_FOR_SYSFS should have catched that, but maybe the file is
there, and you just can't open it that time, because the device refuses
the access.
> small delay, but now the
> plugin works all the time. will add that to openct.
> (or rather remove the "sleep 1" I already have in my
> script to "wait" for the device file and add the sleep 1 as
> udev rule instead).
>
> btw: if this get fixed so the "sleep 1" becomes obsolete one day - is there
> some rule etc. to wait for the /proc/bus/usb or /dev/bus/usb devices, so I
> won't need an arbitrary sleep for that either?
If we get a device node at the real usb-device in /sys/devices, the
interface-event is guaranteed to come after the device-event, and the
device-file for the usb-device will always be created before udev calls
any RUN program.
Udev should be able to IMPORT{parent}="DEVNAME" to the interface event,
os that the device file name is available at the interface events too.
For /proc there will be no fix ever I guess, we can't use it on modern
desktops anyway, because is doesn't support ACL's which is the default
way to grant access to devices to untrusted users.
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=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
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
prev parent reply other threads:[~2007-03-16 15:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-15 10:46 udev or kernel broken with rsdl 0.30 patch [u] Andreas Jellinghaus [c]
2007-03-15 15:22 ` Kay Sievers
2007-03-15 17:03 ` udev or kernel broken with rsdl 0.30 patch Andreas Jellinghaus
2007-03-15 19:57 ` Kay Sievers
2007-03-16 10:06 ` Andreas Jellinghaus
2007-03-16 10:35 ` Kay Sievers
2007-03-16 10:59 ` Andreas Jellinghaus
2007-03-16 11:34 ` Kay Sievers
2007-03-16 11:45 ` Andreas Jellinghaus
2007-03-16 12:08 ` Kay Sievers
2007-03-16 12:32 ` Andreas Jellinghaus
2007-03-16 12:48 ` Kay Sievers
2007-03-16 13:35 ` Andreas Jellinghaus
2007-03-16 13:38 ` Andreas Jellinghaus
2007-03-16 13:58 ` Kay Sievers
2007-03-16 14:39 ` Andreas Jellinghaus
2007-03-16 14:59 ` Kay Sievers
2007-03-16 15:20 ` Andreas Jellinghaus
2007-03-16 15:39 ` Kay Sievers [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1174059555.21549.90.camel@lov.localdomain \
--to=kay.sievers@vrfy.org \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).