On Tue, Jan 15, 2002 at 12:49:05PM -0500, Steve Urquhart wrote:
> Hi,
> 
> I'm having a problem trying to get my user mode application to ioctl my usb
> driver.  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.  When I try an ioctl, I get a return value of -1 and my driver
> does not get entered in its ioctl function.

If you call ioctl on the usbfs entry, then you are calling the
usbfs/usbdevfs driver, not your driver.  You need to call ioctl on your
device node.

> What could I be missing?  I don't set fops in usb_driver, is that a problem?
> I really don't want to read or write from my app, and since the device is
> also an ethernet driver it already fills out a net_device for open, read,
> write, etc.  I see there is also an ioctl in net_device but it's a different
> declaration and I've found comments in network source to the effect that
> this ioctl is not used anymore.

You need to call ioctl on your net device, that is different from the
other network ioctl calls?  See the ethtool ioctls, which should cover
everything that you need.

If not, I'd suggest you post your driver, and what you are trying to do
to this and the linux-network mailing list.

thanks,

greg k-h

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

Reply via email to