I'm writing a custom USB device driver and the write() and read() functions of the drivers initiate an INTERRUPT out and INTERRUPT in transfer, respectively. In the callback functions I want to copy the data from/to userspace.
What I did was in the write() for example, I made a copy of the buffer ptr and stored it in my driver struct. Then in the callback function I did a copy_from_user using that pointer as the "to" parameter. This came out with weird results. After the first interrupt transfer the memory is garbage, presumably because only the first transfer used copy_from_user in the write() and not the callback function.
I tried using shared memory, but when I compiled and tried to insmod, I get unresolved symbols, so I guess shared memory is not allowed in drivers. I am really stuck here. Can any please guide me? Is there a proper way to do is? I'm setting the interrupt transfers at around 2ms intervals. Its used to send constant value updates to the device.
Thanks for reading and any help!
Edmund
_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users