Greetings,

On Sunday 17 March 2002 22:49, David Brownell wrote:
> > Unfortunately, your problem cannot be solved right now. There is
> > currently no way to register the device info with a USB device, so that
> > it appears somewhere in /proc/bus/usb. There are all sorts of problems
> > with this (driver having multiple configurations, multiple devices per
> > USB device, devices that don't have a /dev entry (network
> > interfaces!)), etcetera, etcetera.
>
> It can be solved for any particular driver just by adding usb(dev)fs
> ioctl support to that driver.  Define a structure, say FOO, that
> encapsulates the relevant device ID info ... for /dev files, major/minor
> and whether it's character or block; for network devices, something else.
>
> Then USBDEVFS_IOCTL can be used to pass an ioctl request for FOO
> to that driver (current configuration, one of N functions).  And the
> driver can fill it out, so the user level code can find the "higher
> level" device IDs.
>
> It'd be useful to have a generic definition of "FOO", since there's no
> good reason each driver should re-invent that (and the ioctl to pass
> through USBDEVFS_IOCTL).  Then drivers could just implement that
> ioctl, to provide that information in a usefully standard form.

Worth a try. I see only have a few problems with this:

1) This person wants (well, must) use /proc because he is using Java, thus 
no ioctl(). I'm sure he's not the only one with that problem. So this 
information should be readily available for the usbcore as well, so that it 
can be printed in /proc/bus/usb/devices or other place.

2) Perhaps a system wide system would be more apropriate, not just for USB 
(though I agree it is one of the areas where this is most applicable). The 
same situation will no doubt apply to FireWire. 

3) How should this information be presented in textual form in 
/proc/bus/usb/*? For example, on my system I use both old-style device 
inodes and devfs (devfs is mounted on /devfs, while /dev has the 
old-style). How am I going to print this? I could deliver just major:minor, 
but netdevices don't have major (right?), and a lot of logic would have to 
be built into either the application or the driver. For example, 81:0 would 
be /dev/video0 old-style, but /dev/v4l/video0 new-style and depends on the 
exact mounting point of devfs. And in my setup *both* paths work.

I suggest we work these problems out before we start hacking :)

 - Nemosoft

-- 
Linux Philips webcam driver page: http://www.smcc.demon.nl/webcam/
Includes FAQs, links to working programs and lots of info.

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to