I would like to implement a usb device using gadgetfs and a usermode driver. The processor is a OMAP L138 on an logicpd experimenter kit.
Kernel 2.6.37 (from DaVinci-PSP-SDK-03.21.00.04) is configured to supply the gadgetfs module. A simple userspace application (derived from usb.c - http://www.lrr.in.tum.de/Par/arch/usb/linux-usb/gadget/usb.c) implements a control out transfer with 7 bytes in the data stage.
When i send the command once, everything is fine, i see the musb debug output "musb_read_setup 616: SETUP req40.cb v0000 i0000 l7" in the kernel logs, my userspace application handles the request and receives the data.
Sending the control out request 500 times in a loop gives 500 times the musb log message in the kernel log but the userspace application sees the request about 450 times (varies slightly from run to run). It seems that each request is handled correctly by the kernel driver but the userspace part misses some of them.
From the host computers point of view the 500 control out transfers finish as expected.
Is anyone facing the same problem? Is it generally a bad idea to use gadgetfs, should i write a separate gadget driver? Are more details (kernelconfig, code, ..) needed to answer my questions?
Any help would be appreciated.
Thanks,
Michael