linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* USB camera not hotplugging because  SYSFS{ID_VENDOR} etc. not available
@ 2006-04-10 15:16 Moshe Yudkowsky
  2006-04-10 17:02 ` Andrey Borzenkov
  2006-04-10 19:02 ` USB camera not hotplugging because SYSFS{ID_VENDOR} etc. not Moshe Yudkowsky
  0 siblings, 2 replies; 3+ messages in thread
From: Moshe Yudkowsky @ 2006-04-10 15:16 UTC (permalink / raw)
  To: linux-hotplug

In *both* the patched version of udev that I was running, and in the new 
official release of 0.089, I don't have SYSFS{ID_VENDOR} available when 
the device is plugged in. This in turn means that the libgphoto2.rules 
do not execute and the camera group is not set.

HOWEVER, the SYSFS variables for the MP3 player *are* available!

libgphoto2.rules:

> SYSFS{idVendor}="04a9", SYSFS{idProduct}="3051", MODE="0660", GROUP="camera"


udevmonitor --evn output for plugin of camera:

> UEVENT[1144681428.413283] add@/devices/pci0000:00/0000:00:10.0/usb1/1-1
> ACTION­d
> DEVPATH=/devices/pci0000:00/0000:00:10.0/usb1/1-1
> SUBSYSTEM=usb
> SEQNUM453
> PHYSDEVBUS=usb
> PHYSDEVDRIVER=usb
> 
> UDEV  [1144681428.414601] add@/devices/pci0000:00/0000:00:10.0/usb1/1-1
> UDEV_LOG=3
> ACTION­d
> DEVPATH=/devices/pci0000:00/0000:00:10.0/usb1/1-1
> SUBSYSTEM=usb
> SEQNUM453
> PHYSDEVBUS=usb
> PHYSDEVDRIVER=usb
> UDEVD_EVENT=1
> 
> UEVENT[1144681428.421787] add@/devices/pci0000:00/0000:00:10.0/usb1/1-1/1-1:1.0
> ACTION­d
> DEVPATH=/devices/pci0000:00/0000:00:10.0/usb1/1-1/1-1:1.0
> SUBSYSTEM=usb
> SEQNUM454
> PHYSDEVBUS=usb
> DEVICE=/proc/bus/usb/001/008
> PRODUCTJ9/3051/1
> TYPE%5/255/255
> INTERFACE%5/255/255
> MODALIAS=usb:v04A9p3051d0001dcFFdscFFdpFFicFFiscFFipFF
> 
> UEVENT[1144681428.430368] add@/class/usb_device/usbdev1.8
> ACTION­d
> DEVPATH=/class/usb_device/usbdev1.8
> SUBSYSTEM=usb_device
> SEQNUM455
> PHYSDEVPATH=/devices/pci0000:00/0000:00:10.0/usb1/1-1
> PHYSDEVBUS=usb
> PHYSDEVDRIVER=usb
> MAJOR\x189
> MINOR=7
> 
> UDEV  [1144681428.486187] add@/devices/pci0000:00/0000:00:10.0/usb1/1-1/1-1:1.0
> UDEV_LOG=3
> ACTION­d
> DEVPATH=/devices/pci0000:00/0000:00:10.0/usb1/1-1/1-1:1.0
> SUBSYSTEM=usb
> SEQNUM454
> PHYSDEVBUS=usb
> DEVICE=/proc/bus/usb/001/008
> PRODUCTJ9/3051/1
> TYPE%5/255/255
> INTERFACE%5/255/255
> MODALIAS=usb:v04A9p3051d0001dcFFdscFFdpFFicFFiscFFipFF
> UDEVD_EVENT=1
> 
> UDEV  [1144681428.584855] add@/class/usb_device/usbdev1.8
> UDEV_LOG=3
> ACTION­d
> DEVPATH=/class/usb_device/usbdev1.8
> SUBSYSTEM=usb_device
> SEQNUM455
> PHYSDEVPATH=/devices/pci0000:00/0000:00:10.0/usb1/1-1
> PHYSDEVBUS=usb
> PHYSDEVDRIVER=usb
> MAJOR\x189
> MINOR=7
> UDEVD_EVENT=1
> DEVNAME=/dev/bus/usb/001/008

And the device /dev/bus/usb/001/008 has group set to root, and that's 
the problem.

If I plug in the USB-based mp3 player, I get in part:

> UDEV  [1144681853.831681] add@/block/sdb
> UDEV_LOG=3
> ACTION­d
> DEVPATH=/block/sdb
> SUBSYSTEM=block
> SEQNUM464
> MINOR\x16
> MAJOR=8
> PHYSDEVPATH=/devices/pci0000:00/0000:00:10.3/usb4/4-4/4-4:1.0/host24/target24:0:0/24:0:0:0
> PHYSDEVBUS=scsi
> PHYSDEVDRIVER=sd
> UDEVD_EVENT=1
> ID_VENDOR=iriver
> ID_MODEL=MassStorage_Disc
> ID_REVISION\001
> ID_SERIAL=iriver_MassStorage_Disc
> ID_TYPE=disk
> ID_BUS=usb
> ID_PATH=pci-0000:00:10.3-usb-0:4:1.0-scsi-0:0:0:0
> REMOVE_CMD=/etc/hotplug/usb/iriver remove
> DEVNAME=/dev/scsi/host24/bus0/target0/lun0/disc
> DEVLINKS=/dev/sdb /dev/discs/disc2/disc /dev/disk/by-id/usb-iriver_MassStorage_Disc /dev/disk/by-path/pci-0000:00:10.3-usb-0:4:1.0-scsi-0:0:0:0 /dev/iriver

and the rules based on SYSFS{ID_VENDOR} work as expected. (Well, there's 
one bug that I'm chasing down -- REMOVE_CMD did *not* execute, and 
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.

-- 
  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=lnk&kid\x110944&bid$1720&dat\x121642
_______________________________________________
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-04-10 19:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-10 15:16 USB camera not hotplugging because SYSFS{ID_VENDOR} etc. not available Moshe Yudkowsky
2006-04-10 17:02 ` Andrey Borzenkov
2006-04-10 19:02 ` USB camera not hotplugging because SYSFS{ID_VENDOR} etc. not Moshe Yudkowsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).