>     In the usb_driver structure I've set an ioctl function.  I know my
> driver loads and works, it is running the device just fine.  For now, I
> manually look at /proc/bus/usb/devices to find the bus and device number my
> driver is at.  Then I hardcode that into my app,
> open("/proc/bus/usb/MMM/NNN", 0); and that SEEMS to work.  I get a file
> descriptor, but it is describing the usbdevfs entry, not my driver, if
> that's OK.

It could be, so long as you use the ioctl right ... though "0" isn't O_RDWR,
and you'd likely need to use that.  And it's worth double checking that
there's no more appropriate target of the ioctl.


>      When I try an ioctl, I get a return value of -1 and my driver
> does not get entered in its ioctl function.

While errno is --- what?  That'll be the clue you need.
Then look at the devio.c proc_ioctl() path to see where
that errno is returned.


> What could I be missing?  

My first guess would be that you're not passing the interface number.
When you use the USBDEVFS_IOCTL call, you've got to wrap your
ioctl in a "struct usbdevfs_ioctl", which identifies an interface number
You're issuing an ioctl to whatever driver is bound to that interface.

- Dave



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

Reply via email to