On Tue, 5 Feb 2008 [EMAIL PROTECTED] wrote:

> Thanks, I've finally got it. I see that my incorrect terminology has not
> helped. Sorry to have made you re-iterate couple of points there.
> 
> 1) usbfs can indeed be bound to the interface on the device but the act of
> binding has to be performed by ioctl's ( in this case the ones generated by
> libusb )

Correct.

> 2) You cannot build the "interface > usbfs > libusb > program" chain
> consecutively step by step from the bottom up. Instead the program asks
> libusb to generate ioctl's which will bind the device's interface to usbfs.
> ie a "from the top down" approach

Well, it depends on which side you think of as the "top" and which side
as the "bottom".  But yes.

> 3) It looks like there are no usb errors occurring between my device and
> the system, but rather there is a device-specific error between my device
> and it's program. ie the usb part is fine

Can't tell from the information you have provided.  That's why I 
suggested you set usbfs_snoop.  Better yet, try using usbmon 
(instructions are in the kernel source file 
Documentation/usb/usbmon.txt).

> 4) The other way that the vendor could have accomplished the above would
> have been to have a "driver" which has it's own
> /sys/bus/usb/driver/my_driver directory. This driver would identify
> connected interaces which it supports

Okay up to here.

> and would use ioctl's to bind the
> device's interface to it's /sys/bus/usb/my_driver point.

This part is wrong.  The binding would be done automatically by the 
kernel, or you could do it manually by writing to 
/sys/bus/usb/drivers/my_driver/bind.  No ioctls would be involved.

> Programs would
> then make calls to the driver to get "stuff" done

In more detail: Programs would make calls to the kernel, which would
then be sent to the driver for processing.

> Thanks Alan and Greg for all of your help.

You're welcome.

Alan Stern

-
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to