On Tue, May 30, 2000, Daniel Streetman <[EMAIL PROTECTED]> wrote:
> I'm working on using usbdevfs to access devices from userspace, and
> have a question about how to get full topology info.
>
> I'm assuming the 'devices' file is intended for users, not programs.
Exactly. Do not use the devices file in a program.
> So I'm wondering how to get full topology information by reading
> (or ioctl?) individual device nodes (bus#/dev#), but it looks to me (in
> 2.4.0-test1) that a read will only get the (binary) device descriptor. I
> saw a post by Johannes Erdfelt stating that the config descriptors should
> follow the device descriptor (do they?).
This was part of a recent patch. The patch is not in 2.4.0-test1.
> After that, do I have to talk to
> the device to get interface and endpoint descriptors?
Those are interleaved in the config descriptors.
> I see in devices.c
> you are getting the info from struct usb_bus which has usb_devices,
> etc... if these are cached (by the USB subsystem?) wouldn't it be better
> to allow access (to the descriptors, not the structs) from devio.c? If
> not then won't there be problems reading them when an interface is claimed
> (by another driver)...? I was thinking possibly a read could return all
> the info that's in the 'devices' file (for the particular device being
> read)?
I'm not sure what you mean by this.
> So basically, I'm wondering how to get all the info that's in the devices
> file, but on a per-device basis (by using the device nodes/files ?).
My last patch adds most of the rest of the information to usbdevfs. It
does not add topology information yet, however David Brownell has some
ideas on how to do that. I'm sure some patches will be developed in the
next couple of days.
> Oh - as a side note, I saw a lot (a LOT) of discussion on linux-usb about
> moving usbdevfs completely to devfs...? Is this so, and does that mean
> it will not work as a mountable fs anymore?
It would implicitility be mounted since it would be part of devfs. The
patch completely removes the VFS portion of usbdevfs in favor of using
devfs. If you have devfs mounted, then /dev/usb would just appear.
Unfortunately, not everyone wants this patch.
JE
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]