[pvrusb2] only few informations for udev available

Mike Isely isely at isely.net
Sun Jul 12 00:43:28 CDT 2009


On Fri, 10 Jul 2009, Mike Isely wrote:

> 
> On Sat, 4 Jul 2009, Martin Dauskardt wrote:
> 
> > I want to create an udev rule, but why does the pvrusb2 driver deliver so few 
> > informations? 
> > 
> 
>    [...]
> 
> The ivtv driver handles PCI devices; it is possible that a lot of the 
> information you are seeing for ivtv is just "there" by virtue of it 
> being a PCI device.  With USB devices the pathway for that sort of 
> information is going to be different.
> 
> Now, with that said, I have absolutely nothing against getting as much 
> information as possible into udev.  I can look into this.  This is not 
> the first time this has come up, but right now I do not know how udev is 
> getting this information.  I suspect this may just be a matter of 
> creating some appropriate kobject instances which udev can then 
> enumerate but that's only a guess.
> 

I have looked a little more into this.  There are I believe two issues 
here.  First there is this from the ivtv driver:

>  looking at device '/devices/pci0000:00/0000:00:08.0/video4linux/video1':
>    KERNEL=="video1"
>    SUBSYSTEM=="video4linux"
>    DRIVER==""
>    ATTR{name}=="ivtv0 encoder MPG"
>    ATTR{index}=="0"

The difference here is that the ivtv driver is able to report a "name" 
attribute while the pvrusb2 driver does nothing.  There is probably 
something the pvrusb2 driver needs to supply to the v4l-dvb subsystem.  
I will see what I can do about that.

Second it has been pointed out that with the ivtv driver one also gets 
this:

>  looking at parent device '/devices/pci0000:00/0000:00:08.0':
>    KERNELS=="0000:00:08.0"
>    SUBSYSTEMS=="pci"
>    DRIVERS=="ivtv"
>    ATTRS{vendor}=="0x4444"
>    ATTRS{device}=="0x0803"
>    ATTRS{subsystem_vendor}=="0x0070"
>    ATTRS{subsystem_device}=="0x4000"
>    ATTRS{class}=="0x040000"
>    ATTRS{irq}=="16"
>    ATTRS{local_cpus}=="ffffffff,ffffffff"
>    ATTRS{local_cpulist}=="0-63"

That is all PCI-specific information, technically outside of v4l-dvb.  
The information is likely appearing because udev is able to trace back 
through the v4l device to its PCI "parent" device and thus one gets a 
nice dump of the PCI information.

In the pvrusb2 case we're not talking about a PCI device but rather a 
USB device.  Nevertheless there is (should be) corresponding information 
available for things like subsystem, vendor, device, and class.  I 
believe this is working for ivtv because it is linking the underlying 
PCI device node pointer to the V4L device node pointer.  There is a USB 
device node pointer available in the pvrusb2 driver however historically 
I've deliberately not connected it because of its hotplug nature, i.e. 
the USB device can technically disappear at any time and I have been 
concerned about dangling pointers leading to problems in the V4L core 
which historically has not dealt with hotpluggable devices.  This is 
something that the ivtv driver does not have to worry about.

But recently with the sub-device changes in the V4l core, I made a 
change in the pvrusb2 driver to now provide that device pointer.  
Hoping that this might have actually solved it, I re-tested.  But alas 
there still is no extra data here.  Either I'm not providing that 
pointer correctly or there is still something else needed here that I 
haven't figured out.

I'm not stopped on this problem yet; just wanted to let people know that 
I am looking at it.

  -Mike


-- 

Mike Isely
isely @ isely (dot) net
PGP: 03 54 43 4D 75 E5 CC 92 71 16 01 E2 B5 F5 C1 E8


More information about the pvrusb2 mailing list