* DEVNAME not set when executing udev rule
@ 2009-09-03 22:33 Stefan Conrad
2009-09-03 22:57 ` Kay Sievers
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Conrad @ 2009-09-03 22:33 UTC (permalink / raw)
To: linux-hotplug
Hi,
I am trying to initialise a MidiSport USB interface with a udev rule
that triggers fxload to upload the firmware:
ACTION="add", SUBSYSTEM="usb", DEVPATH="/*.0",
ENV{PRODUCT}="763/1001/*", RUN+="/sbin/fxload -v -s
/usr/local/share/usb/maudio/MidiSportLoader.ihx -I
/usr/local/share/usb/maudio/MidiSport2x2.ihx -D $env{DEVNAME}"
The problem:
DEVNAME is not set in the environment.
Only DEVICE is set with the 'wrong' device file name under /proc/bus/usb
which is deprecated and thus not useful.
System: Suse 11.1 Linux 2.6.27.29-0.1-default #1 SMP 2009-08-15 17:53:59
+0200 i686 athlon i386 GNU/Linux
udev Version: 128
What can I do to pass a valid device file name to fxload to upload the
firmware?
Thanks,
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: DEVNAME not set when executing udev rule
2009-09-03 22:33 DEVNAME not set when executing udev rule Stefan Conrad
@ 2009-09-03 22:57 ` Kay Sievers
0 siblings, 0 replies; 2+ messages in thread
From: Kay Sievers @ 2009-09-03 22:57 UTC (permalink / raw)
To: linux-hotplug
On Fri, Sep 4, 2009 at 00:33, Stefan Conrad<dr.stefan.conrad@t-online.de> wrote:
> I am trying to initialise a MidiSport USB interface with a udev rule
> that triggers fxload to upload the firmware:
>
> ACTION="add", SUBSYSTEM="usb", DEVPATH="/*.0",
Better use KERNEL="*.0". Matching on the DEVPATH is in most cases wrong.
> ENV{PRODUCT}="763/1001/*", RUN+="/sbin/fxload -v -s
> /usr/local/share/usb/maudio/MidiSportLoader.ihx -I
> /usr/local/share/usb/maudio/MidiSport2x2.ihx -D $env{DEVNAME}"
>
> The problem:
> DEVNAME is not set in the environment.
The rule matches on USB devices _and_ interfaces and runs several
times. You better limit it to the device only with:
ENV{DEVTYPE}="usb_device".
> Only DEVICE is set with the 'wrong' device file name under /proc/bus/usb
> Â which is deprecated and thus not useful.
There is a known timing problem with the usb device nodes, and this
should fix it:
http://git.kernel.org/?p=linux/kernel/git/gregkh/patches.git;a=blob;f=driver-core/driver-core-add-new-device-to-bus-s-list-before-probing.patch;hb=HEAD
Kay
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-09-03 22:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-03 22:33 DEVNAME not set when executing udev rule Stefan Conrad
2009-09-03 22:57 ` Kay Sievers
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.