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 11:34:11 +0000 [thread overview]
Message-ID: <1174044851.21549.39.camel@lov.localdomain> (raw)
In-Reply-To: <20070315104654.19025CA4097@mx1.ciphirelabs.net>
On Fri, 2007-03-16 at 11:59 +0100, Andreas Jellinghaus wrote:
> Am Freitag, 16. März 2007 11:35 schrieb Kay Sievers:
> > On Fri, 2007-03-16 at 11:06 +0100, Andreas Jellinghaus wrote:
> > > Am Donnerstag, 15. März 2007 20:57 schrieb Kay Sievers:
> > > > > why are the endpointes removed and added in the working case?
> > > > > the device is unchanged.
> > > >
> > > > Don't know what's with the endpoints, but what device event do you
> > > > miss? It looks like it's all there in the udevmonitor output, right?
> > >
> > > it was not a missing event.
> >
> > Well, you wrote: "why udev/kernel emit less events?" :)
>
> and debugging shows udev gets the event, but does not emit it,
What shows that?
> i.e. doesn't run my script. in one case it runs my script,
> in the other case it does not. why?
In both cases in your log, there are no events for the usb-device
itself: /devices/pci0000:00/0000:00:1d.1/usb2/2-1
Maybe you missed to copy a few lines?
> > You mean, that the /proc file is not there,
>
> does udev look for the /proc file?
No, that will never happen. :)
> I don't get a chance to do so - my script
> is not even run, as udev indicates. the udev config lines are the same:
> refering to BUS and some SYSFS stuff, but not to /proc, so why do you
> think it has to do with /proc? also my script would work fine with both
> $DEVICE - traditional /proc stuff - and $DEVNAME - was used when
> introducing /dev/bus/usb stuff. but I don't get to that point, the script
> isn't run at all (I checked with a echo in the first line of the script and
> with udevd in debug logging mode where it logs each time it runs
> something).
>
> > Or don't use it at all, and hook into the "usb_device" event and use the
> > files in /dev with the same layout, instead of the crappy usbfs files.
>
> earlier I got those events, but these days I don't get called for them.
> any idea why? (ubuntu edgy, config as posted).
No idea, I get all usual events just fine here.
> guess I got them with dapper
Oh, can you please talk about kernel versions, and not distro nicknames?
I have no clue what they mean.
> and had to implement proper interface
> claiming to prevent two processes talking to the same hardware through
> different devices.
>
> how can I debug why udev doesn't run openct on the /dev/bus/usb
> device? I can see in udev log that it creates the device:
udevmonitor, if you see the event from the kernel, it's udev problem, if
not, it's a kernel problem.
> Mar 15 11:19:07 localhost udevd[2622]: udev_event_run: seq 2873 forked, pid
> [6094], 'add' 'usb_device', 1 seconds old
> Mar 15 11:19:07 localhost udevd-event[6094]:
> run_program: 'usb_device_name --export usbdev2.16'
> Mar 15 11:19:07 localhost udevd-event[6094]:
> run_program: '/lib/udev/usb_device_name' (stdout) 'USB_BUS\02'
> Mar 15 11:19:07 localhost udevd-event[6094]:
> run_program: '/lib/udev/usb_device_name' (stdout) 'USB_DEV\x016'
> Mar 15 11:19:07 localhost udevd-event[6094]:
> run_program: '/lib/udev/usb_device_name' returned with status 0
> Mar 15 11:19:07 localhost udevd-event[6094]: udev_rules_get_name: rule
> applied, 'usbdev2.16' becomes 'bus/usb/002/016'
> Mar 15 11:19:07 localhost udevd-event[6094]: udev_db_get_device: no db file to
> read /dev/.udev/db/class@usb_device@usbdev2.16: No such file or directory
> Mar 15 11:19:07 localhost udevd-event[6094]: udev_node_add: creating device
> node '/dev/bus/usb/002/016', major = '189', minor = '143', mode = '0664', uid
> = '0', gid = '0'
> Mar 15 11:19:07 localhost udevd-event[6094]: pass_env_to_socket: passed 305
> bytes to socket '/org/freedesktop/hal/udev_event',
> Mar 15 11:19:07 localhost udevd-event[6094]: pass_env_to_socket: passed -1
> bytes to socket '/org/kernel/udev/monitor',
> Mar 15 11:19:07 localhost udevd-event[6094]: udev_event_run: seq 2873 finished
> Mar 15 11:19:07 localhost udevd[2622]: udev_done: seq 2873, pid [6094] exit
> with 0, 1 seconds old
>
> see, the device is created and udev is run. but my openct rule:
> BUS!="usb", ACTION!="add", GOTO="openct_usb_rules_end"
> SYSFS{bInterfaceClass}="0b", SYSFS{bInterfaceSubClass}="00",
> SYSFS{bInterfaceProtocol}="00" RUN+="/lib/udev/openct_usb"
>
> is not run. why?
>
> or does udev create these new /dev/bus/usb devices are /proc/bus/usb
> replacement, but does not allow to match simple usb config values like
> interface class on them? that would be a huge step back, so I hope it
> isn't the case.
Right, that never worked. The usb-interfaces are childs of the
usb-device in /sys/devices. The usb_device class-devices (the ones with
the /dev/bus node) are also just childs of the usb-device and therefore
can't access the (sibling) interface devices.
With the current usb driver core, you can't match the /dev device-node
to interfaces, only to the device.
There is a patch pending (now that the new driver core allows us to do
that), that moves the device-node directly to the /sys/devices
usb-device, which should solve all the issues in the future.
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
next prev parent reply other threads:[~2007-03-16 11:34 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 [this message]
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
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=1174044851.21549.39.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