Usb driver programming, ioctl returns -1
I'm creating a usb device driver that needs to be able to read from two different endpoints. I couldn't see any way of having two read functions in the driver, so I got round this by reading from one of the endpoints with read, and the other with ioctl.
However this hasn't worked, the ioctl call from c returns -1. I added a printk command in the driver in the ioctl function, however looking at kern.log I can see that this function is never being called. Just to mention, debugging is enabled, the other drivers work fine and the ioctl function has been added to the file_operations structure. |
Hi,
What endpoints you are trying to read? Can you post your code ? Thanks, |
Quote:
I say that for at least 2 reasons: -the tools / policies idea (kernel provides tools, policies, that use these tools, must be done elsewhere) -this kind of scheme goes against what I know of USB drivers, thus you're using tricks and tricks are the last solutions, when nothing else could work. |
All times are GMT -5. The time now is 02:58 PM. |