[Bug 246055] New: udev rules for firmware loader don't run
https://bugzilla.novell.com/show_bug.cgi?id=246055 Summary: udev rules for firmware loader don't run Product: openSUSE 10.2 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: ensonic@sonicpulse.de QAContact: qa@suse.de I have a midiman oxygen 8 usb midikeyboard which is supported by http://usb-midi-fw.sourceforge.net/. This installs firmware + udev rules. I reloaded the udev rules (also rebooted in the mean time). udev recognizes new hardware when switching it on, but does not trigger the rules :(. When I manually run the fxload it works. Some details: when I switch on the device I get this in /var/log/messages: Feb 16 00:19:40 hoshi kernel: usb 4-2: new full speed USB device using uhci_hcd and address 4 Feb 16 00:19:40 hoshi kernel: usb 4-2: new device found, idVendor=0763, idProduct=1014 Feb 16 00:19:40 hoshi kernel: usb 4-2: new device strings: Mfr=0, Product=0, SerialNumber=0 Feb 16 00:19:40 hoshi kernel: usb 4-2: configuration #1 chosen from 1 choice and udevmonitor says: UEVENT[1171577980.264642] add@/devices/pci0000:00/0000:00:10.2/usb4/4-2 UEVENT[1171577980.264702] add@/devices/pci0000:00/0000:00:10.2/usb4/4-2/usbdev4.4_ep00 UEVENT[1171577980.267640] add@/devices/pci0000:00/0000:00:10.2/usb4/4-2/4-2:1.0 UEVENT[1171577980.267672] add@/class/usb_device/usbdev4.4 UDEV [1171577980.313977] add@/devices/pci0000:00/0000:00:10.2/usb4/4-2 UDEV [1171577980.315526] add@/devices/pci0000:00/0000:00:10.2/usb4/4-2/usbdev4.4_ep00 UDEV [1171577980.368022] add@/devices/pci0000:00/0000:00:10.2/usb4/4-2/4-2:1.0 UDEV [1171577980.390572] add@/class/usb_device/usbdev4.4 lsusb list it as : Bus 004 Device 004: ID 0763:1014 Midiman the /etc/udev/rules.d/42-midisport-firmware.rules says: ACTION=="add", SUBSYSTEM=="usb", DEVPATH=="/*.0", ENV{PRODUCT}=="763/1014/*", RUN+="/sbin/fxload -s /usr/share/usb/maudio/MidiSportLoader.ihx -I /usr/share/usb/maudio/MidiSportKS.ihx" and this does not get triggered. When I run : /sbin/fxload -s /usr/share/usb/maudio/MidiSportLoader.ihx -I /usr/share/usb/maudio/MidiSportKS.ihx -D /dev/bus/usb/004/004 the I see this in the /var/log/messages : Feb 16 00:28:34 hoshi kernel: usb 4-2: USB disconnect, address 4 Feb 16 00:28:35 hoshi kernel: usb 4-2: new full speed USB device using uhci_hcd and address 5 Feb 16 00:28:35 hoshi kernel: usb 4-2: new device found, idVendor=0763, idProduct=1015 Feb 16 00:28:35 hoshi kernel: usb 4-2: new device strings: Mfr=0, Product=0, SerialNumber=0 Feb 16 00:28:35 hoshi kernel: usb 4-2: configuration #1 chosen from 1 choice and udevmonitor shows: UEVENT[1171578514.371619] remove@/devices/pci0000:00/0000:00:10.2/usb4/4-2/4-2:1.0 UEVENT[1171578514.371672] remove@/class/usb_device/usbdev4.4 UEVENT[1171578514.371679] remove@/devices/pci0000:00/0000:00:10.2/usb4/4-2/usbdev4.4_ep00 UEVENT[1171578514.371685] remove@/devices/pci0000:00/0000:00:10.2/usb4/4-2 UDEV [1171578514.373295] remove@/devices/pci0000:00/0000:00:10.2/usb4/4-2/4-2:1.0 UDEV [1171578514.375124] remove@/class/usb_device/usbdev4.4 UDEV [1171578514.376292] remove@/devices/pci0000:00/0000:00:10.2/usb4/4-2/usbdev4.4_ep00 UDEV [1171578514.378241] remove@/devices/pci0000:00/0000:00:10.2/usb4/4-2 UEVENT[1171578515.766472] add@/devices/pci0000:00/0000:00:10.2/usb4/4-2 UEVENT[1171578515.766499] add@/devices/pci0000:00/0000:00:10.2/usb4/4-2/usbdev4.5_ep00 UEVENT[1171578515.769664] add@/devices/pci0000:00/0000:00:10.2/usb4/4-2/4-2:1.0 UEVENT[1171578515.769694] add@/class/sound/midiC2D0 UEVENT[1171578515.769700] add@/class/sound/midi2 UEVENT[1171578515.769705] add@/class/sound/dmmidi2 UEVENT[1171578515.769710] add@/class/sound/controlC2 UEVENT[1171578515.769715] add@/class/sound/mixer2 UEVENT[1171578515.769719] add@/devices/pci0000:00/0000:00:10.2/usb4/4-2/4-2:1.0/usbdev4.5_ep81 UEVENT[1171578515.769725] add@/devices/pci0000:00/0000:00:10.2/usb4/4-2/4-2:1.0/usbdev4.5_ep82 UEVENT[1171578515.769730] add@/devices/pci0000:00/0000:00:10.2/usb4/4-2/4-2:1.0/usbdev4.5_ep02 UEVENT[1171578515.769735] add@/class/usb_device/usbdev4.5 UDEV [1171578515.814131] add@/devices/pci0000:00/0000:00:10.2/usb4/4-2 UDEV [1171578515.816332] add@/devices/pci0000:00/0000:00:10.2/usb4/4-2/usbdev4.5_ep00 UDEV [1171578515.869148] add@/devices/pci0000:00/0000:00:10.2/usb4/4-2/4-2:1.0 UDEV [1171578515.891908] add@/class/sound/midiC2D0 UDEV [1171578515.931077] add@/class/sound/midi2 UDEV [1171578515.932250] add@/class/sound/dmmidi2 UDEV [1171578515.969225] add@/class/sound/controlC2 UDEV [1171578515.989900] add@/class/sound/mixer2 UDEV [1171578516.001147] add@/devices/pci0000:00/0000:00:10.2/usb4/4-2/4-2:1.0/usbdev4.5_ep81 UDEV [1171578516.041692] add@/devices/pci0000:00/0000:00:10.2/usb4/4-2/4-2:1.0/usbdev4.5_ep82 UDEV [1171578516.042805] add@/devices/pci0000:00/0000:00:10.2/usb4/4-2/4-2:1.0/usbdev4.5_ep02 UDEV [1171578516.089183] add@/class/usb_device/usbdev4.5 now the device works. Now I would like to get rid of the manual firmware loading as the usb bus address is not constant :( -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246055 chrubis@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team- |kasievers@novell.com |screening@forge.provo.novell| |.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246055 kasievers@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Comment #1 from kasievers@novell.com 2007-02-16 06:24 MST ------- The rule with the fxload call needs to hook into "usb_device" events, these events create a real device node in /dev, to talk to the device(upload the firmware). The environment of the "usb_device" event contains DEVNAME which is the full path to the device file, to pass to fxload. Your rule has timing problems, which are not solvable because you can't be sure the /proc entry to be available at event time. It depends on the deprecated usbfs (no longer available on SUSE). Also don't use PRODUCT or DEVICE, they are also deprecated. Something like this should work: SUBSYSTEM=="usb_device", ACTION=="add", \ ATTRS{idVendor}=="1234", ATTRS{idProduct}=="5678", \ RUN+="/sbin/fxload -s abc.ihx -I def.ihx -D $env{DEVNAME}" Please ask the upstream project to fix the rule. If you (or the upstream author) need further help, please ask on the Linux hotplug list, I'll catch it from there: linux-hotplug-devel@lists.sourceforge.net. Thanks! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246055 User ensonic@sonicpulse.de added comment https://bugzilla.novell.com/show_bug.cgi?id=246055#c2 Stefan Kost <ensonic@sonicpulse.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|INVALID |FIXED --- Comment #2 from Stefan Kost <ensonic@sonicpulse.de> 2008-08-24 06:37:02 MDT --- There is a bug somewhere. I finally managed to figure out: The udev-rule in comment #1 is not right: ACTION=="add", SUBSYSTEM=="usb_device" ATTRS{idVendor}=="0763", ATTRS{idProduct}=="1014", RUN+="/bin/logger rule1: $env{DEVNAME}" There is no SUBSYSTEM=="usb_device". I've been using "/sbin/udevadm monitor --env" to show what going on and ended up with: ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="763/1014/*", RUN+="/bin/logger rule invoked: $env{DEVNAME}" and indeed that was called with the proper DEVNAME. Still no luck once I put fxload there. Comment #1 also mentioned a race and thus I tried my luck with this and that works: ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="763/1014/*", RUN+="/bin/sleep 1s" ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{PRODUCT}=="763/1014/*", RUN+="/sbin/fxload -s /usr/share/usb/maudio/MidiSportLoader.ihx -I /usr/share/usb/maudio/MidiSportKS.ihx -D $env{DEVNAME}" As this is just a workaround that works-for-me, I'd still like to know about a proper fix. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com