From mboxrd@z Thu Jan 1 00:00:00 1970 From: Moshe Yudkowsky Date: Mon, 10 Apr 2006 15:16:37 +0000 Subject: USB camera not hotplugging because SYSFS{ID_VENDOR} etc. not available Message-Id: <443A76D5.60208@bl.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org In *both* the patched version of udev that I was running, and in the new=20 official release of 0.089, I don't have SYSFS{ID_VENDOR} available when=20 the device is plugged in. This in turn means that the libgphoto2.rules=20 do not execute and the camera group is not set. HOWEVER, the SYSFS variables for the MP3 player *are* available! libgphoto2.rules: > SYSFS{idVendor}=3D"04a9", SYSFS{idProduct}=3D"3051", MODE=3D"0660", GROUP= =3D"camera" udevmonitor --evn output for plugin of camera: > UEVENT[1144681428.413283] add@/devices/pci0000:00/0000:00:10.0/usb1/1-1 > ACTION=ADd > DEVPATH=3D/devices/pci0000:00/0000:00:10.0/usb1/1-1 > SUBSYSTEM=3Dusb > SEQNUM453 > PHYSDEVBUS=3Dusb > PHYSDEVDRIVER=3Dusb >=20 > UDEV [1144681428.414601] add@/devices/pci0000:00/0000:00:10.0/usb1/1-1 > UDEV_LOG=3D3 > ACTION=ADd > DEVPATH=3D/devices/pci0000:00/0000:00:10.0/usb1/1-1 > SUBSYSTEM=3Dusb > SEQNUM453 > PHYSDEVBUS=3Dusb > PHYSDEVDRIVER=3Dusb > UDEVD_EVENT=3D1 >=20 > UEVENT[1144681428.421787] add@/devices/pci0000:00/0000:00:10.0/usb1/1-1/1= -1:1.0 > ACTION=ADd > DEVPATH=3D/devices/pci0000:00/0000:00:10.0/usb1/1-1/1-1:1.0 > SUBSYSTEM=3Dusb > SEQNUM454 > PHYSDEVBUS=3Dusb > DEVICE=3D/proc/bus/usb/001/008 > PRODUCTJ9/3051/1 > TYPE%5/255/255 > INTERFACE%5/255/255 > MODALIAS=3Dusb:v04A9p3051d0001dcFFdscFFdpFFicFFiscFFipFF >=20 > UEVENT[1144681428.430368] add@/class/usb_device/usbdev1.8 > ACTION=ADd > DEVPATH=3D/class/usb_device/usbdev1.8 > SUBSYSTEM=3Dusb_device > SEQNUM455 > PHYSDEVPATH=3D/devices/pci0000:00/0000:00:10.0/usb1/1-1 > PHYSDEVBUS=3Dusb > PHYSDEVDRIVER=3Dusb > MAJOR=189 > MINOR=3D7 >=20 > UDEV [1144681428.486187] add@/devices/pci0000:00/0000:00:10.0/usb1/1-1/1= -1:1.0 > UDEV_LOG=3D3 > ACTION=ADd > DEVPATH=3D/devices/pci0000:00/0000:00:10.0/usb1/1-1/1-1:1.0 > SUBSYSTEM=3Dusb > SEQNUM454 > PHYSDEVBUS=3Dusb > DEVICE=3D/proc/bus/usb/001/008 > PRODUCTJ9/3051/1 > TYPE%5/255/255 > INTERFACE%5/255/255 > MODALIAS=3Dusb:v04A9p3051d0001dcFFdscFFdpFFicFFiscFFipFF > UDEVD_EVENT=3D1 >=20 > UDEV [1144681428.584855] add@/class/usb_device/usbdev1.8 > UDEV_LOG=3D3 > ACTION=ADd > DEVPATH=3D/class/usb_device/usbdev1.8 > SUBSYSTEM=3Dusb_device > SEQNUM455 > PHYSDEVPATH=3D/devices/pci0000:00/0000:00:10.0/usb1/1-1 > PHYSDEVBUS=3Dusb > PHYSDEVDRIVER=3Dusb > MAJOR=189 > MINOR=3D7 > UDEVD_EVENT=3D1 > DEVNAME=3D/dev/bus/usb/001/008 And the device /dev/bus/usb/001/008 has group set to root, and that's=20 the problem. If I plug in the USB-based mp3 player, I get in part: > UDEV [1144681853.831681] add@/block/sdb > UDEV_LOG=3D3 > ACTION=ADd > DEVPATH=3D/block/sdb > SUBSYSTEM=3Dblock > SEQNUM464 > MINOR=16 > MAJOR=3D8 > PHYSDEVPATH=3D/devices/pci0000:00/0000:00:10.3/usb4/4-4/4-4:1.0/host24/ta= rget24:0:0/24:0:0:0 > PHYSDEVBUS=3Dscsi > PHYSDEVDRIVER=3Dsd > UDEVD_EVENT=3D1 > ID_VENDOR=3Diriver > ID_MODEL=3DMassStorage_Disc > ID_REVISION=0001 > ID_SERIAL=3Diriver_MassStorage_Disc > ID_TYPE=3Ddisk > ID_BUS=3Dusb > ID_PATH=3Dpci-0000:00:10.3-usb-0:4:1.0-scsi-0:0:0:0 > REMOVE_CMD=3D/etc/hotplug/usb/iriver remove > DEVNAME=3D/dev/scsi/host24/bus0/target0/lun0/disc > DEVLINKS=3D/dev/sdb /dev/discs/disc2/disc /dev/disk/by-id/usb-iriver_Mass= Storage_Disc /dev/disk/by-path/pci-0000:00:10.3-usb-0:4:1.0-scsi-0:0:0:0 /d= ev/iriver and the rules based on SYSFS{ID_VENDOR} work as expected. (Well, there's=20 one bug that I'm chasing down -- REMOVE_CMD did *not* execute, and=20 neither did the other remove rules. I don't know why just yet.) So, in summary, SYSFS is available but only for some USB items. Please let me know if you need any further information. --=20 Moshe Yudkowsky work: http://www.Disaggregate.com book: http://www.PebbleAndAvalanche.com ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=110944&bid$1720&dat=121642 _______________________________________________ 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