[LAU] looking for help with madfuload and udev in Ubuntu

From: Hector Centeno <hcengar@email-addr-hidden>
Date: Fri Apr 20 2007 - 16:39:41 EEST

Hi,

I've been trying to have madfuload working properly under Ubuntu
Feisty and for a M-Audio Transit USB interface. The firmware loader
works fine using the same laptop with Fedora Core 6. In Ubuntu for
some reason the file in /proc/usb is not being created before the
script /etc/udev/rules.d/42-madfuload.rules is called which gives this
error:

Apr 11 22:26:17 hector-laptop NetworkManager: <debug
info>^I[1176344777.429847] nm_hal_device_added (): New device added
(hal udi is '/org/freedesktop/Hal/devices/usb_device_763_2806_noserial').

Apr 11 22:26:37 hector-laptop madfuload: cannot open
/proc/bus/usb/001/008: No such file or directory

Apr 11 22:26:37 hector-laptop NetworkManager: <debug
info>^I[1176344797.483518] nm_hal_device_added (): New device added
(hal udi is '/org/freedesktop/Hal/devices/usb_device_763_2806_noserial_if0').
Apr 11 22:26:37 hector-laptop NetworkManager: <debug
info>^I[1176344797.501767] nm_hal_device_added (): New device added
(hal udi is '/org/freedesktop/Hal/devices/usb_device_763_2806_noserial_usbraw').

This is the entry in the 42-madfuload.rules that calls madfuload:

# Transit
ACTION=="add", SUBSYSTEM=="usb", DEVPATH=="/*.0",
ENV{PRODUCT}=="763/2806/*", RUN+="/usr/local/sbin/madfuload -l -3 -f
/usr/local/share/usb/maudio/ma006100.bin"

I tried inserting a pause in madfuload to see if it was just about
timing but I found that the error was till showing up after the pause
and then the /proc/bus/usb/001/ entry was created. So it seems that
for some reason udev first calls the rules script and then it creates
the file, but I'm not sure if this is the way it's supposed to be and
it's something else going on. At least madfuload is getting the right
device file name when it's called (since the not found error filename
is the one that gets created afterwards), meaning that udev created
the environment variable DEVICE with the proper file name but the file
doesn't exist yet, or something like that. After the failure and
without unplugging the Transit, doing a "/etc/init.d/udev restart"
loads the firmware and makes it work fine.

I would be nice to fix this issue since beside myself I've seen other
people in the Ubuntu forums complaining about the same problem since
the previous version of Ubuntu (Edgy) without getting any solution (I
even found complains about the same issue but with other USB devices,
so it seems to be related to how udev works in Ubuntu). Is there
anyone around who understands the inner works of udev who could point
me to what to look for in trying to solve this issue? I can provide
whatever extra information is needed.

Thanks!

Hector

-- 
===============================
http://www.hcenteno.net
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-user
Received on Fri Apr 20 20:15:02 2007

This archive was generated by hypermail 2.1.8 : Fri Apr 20 2007 - 20:15:05 EEST