Bug 248916
Summary: | No /dev/bus/usb nodes | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Tim Waugh <twaugh> |
Component: | udev | Assignee: | Harald Hoyer <harald> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | rawhide | CC: | fabrice, hdegoede, kay.sievers |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2007-07-23 16:04:35 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 248740 |
Description
Tim Waugh
2007-07-19 16:18:54 UTC
Hmm, the rule: ACTION=="add", SUBSYSTEM=="usb_device", \ PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \ NAME="%c", MODE="0644" didn't change... will debug.. SUBSYSTEM=="usb_device" changed to SUBSYSTEM=="usb_endpoint" in the kernel it seems... :-/ Harald, I've been bitten by this and would like to confirm its fixed, in which version is it fixed? udev-113-5.fc8 I installed that package and rebooted, but it still doesn't seem to have helped: [root@hoopoe rules.d]# lsusb Bus 002 Device 001: ID 0000:0000 Bus 001 Device 008: ID 03f0:3304 Hewlett-Packard DeskJet 990c Bus 001 Device 005: ID 046d:c03f Logitech, Inc. Bus 001 Device 003: ID 045e:00db Microsoft Corp. Bus 001 Device 002: ID 050d:0234 Belkin Components F5U234 USB 2.0 4-Port Hub Bus 001 Device 001: ID 0000:0000 [root@hoopoe rules.d]# rpm -q udev udev-113-5.fc8 [root@hoopoe rules.d]# ls /dev/bus ls: cannot access /dev/bus: No such file or directory DOH! Jul 20 12:48:19 localhost udevd-event[6004]: run_program: '/bin/sh -c 'K=usbdev5.5_ep82; K=${K#usbdev}; printf bus/usb/%03i/%03i ${K%%.*} ${K#*.}'' Jul 20 12:48:19 localhost udevd-event[6004]: run_program: '/bin/sh' (stdout) 'bus/usb/005/000' Jul 20 12:48:19 localhost udevd-event[6004]: run_program: '/bin/sh' (stderr) ': line 0: printf: 5_ep82: invalid number' Jul 20 12:48:19 localhost udevd-event[6004]: run_program: '/bin/sh' returned with status 1 Jul 20 12:48:19 localhost udevd-event[6003]: run_program: '/bin/sh -c 'K=usbdev5.5_ep01; K=${K#usbdev}; printf bus/usb/%03i/%03i ${K%%.*} ${K#*.}'' Jul 20 12:48:19 localhost udevd-event[6003]: run_program: '/bin/sh' (stdout) 'bus/usb/005/000' Jul 20 12:48:19 localhost udevd-event[6003]: run_program: '/bin/sh' (stderr) ': line 0: printf: 5_ep01: invalid number' Jul 20 12:48:19 localhost udevd-event[6003]: run_program: '/bin/sh' returned with status 1 ok, got it: ACTION=="add", SUBSYSTEM=="usb", ATTR{devnum}=="?*", ATTR{busnum}=="?*", \ PROGRAM="/bin/sh -c 'printf bus/usb/%%03i/%%03i $attr{busnum} $attr{devnum}'", \ NAME="%c", MODE="0644" .. the question is, if we need %03i ... if not the rule would be:ACTION=="add", SUBSYSTEM=="usb", ATTR{devnum}=="?*", ATTR{busnum}=="?*", \ NAME="bus/usb/$attr{busnum}/$attr{devnum}", MODE="0644" Yes, the simpler two-line rule works fine here. (Needed some other HPLIP and SELinux changes, but now the device node is correct.) Hi! The rule should be backported to F-7, as kernel-2.6.22.1 in F-7 updates is concerned too. And the nut udev rule (nut-usbups.rules) should also be changed. There is no incompatible change unless you disable CONFIG_USB_DEVICE_CLASS (defaults to yes) in the kernel. Old distros should not need anything here. For new distros it is recommended to switch entirely to the new device nodes, as the old ones have unsolvable event timing problems. Btw, the simplest rule to create the same nodes from the new devices is: SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{ BUSNUM}/$env{DEVNUM}", MODE="0644" These nodes now get created correctly under rawhide with udev-113-6.fc8 (and printing works). I think that maybe this can be closed, I say maybe, because if comment #9 is correct this needs to be fixed for F-7 too. kernel-2.6.22.1-27.fc7 udev-106-4.1.fc7 I ran into this bug trying to use a Creative Zen Vplus MP3 player with Amarok and gnomad2. Could not connect to the device unless I used root user. I used the udev rule suggested in the kernel source to solve the problem since CONFIG_USB_DEVICE_CLASS is not enabled in the kernel. From Kconfig: CONFIG_USB_DEVICE_CLASS: Userspace access to USB devices is granted by device-nodes exported directly from the usbdev in sysfs. Old versions of the driver core and udev needed additional class devices to export device nodes. These additional devices are difficult to handle in userspace, if information about USB interfaces must be available. One device contains the device node, the other device contains the interface data. Both devices are at the same level in sysfs (siblings) and one can't access the other. The device node created directly by the usb device is the parent device of the interface and therefore easily accessible from the interface event. This option provides backward compatibility for libusb device nodes (lsusb) when usbfs is not used, and the following udev rule doesn't exist: SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \ NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644" Closing as fixed in rawhide. Bug for Fedora 7 is #249211. |