I'm using a 4.8.6 kernel with my DM3730 SOM and am trying to use it as a USB peripheral. I am able to successfully load the module, connect the USB cable, and load the driver on a Windows 7 host. The device functions perfectly for a while but about a minute after connecting to the host the USB gadget driver seems to go into a suspended state which causes the device to become unrecognized by the host. I have tried this with the g_serial and g_mass_storage gadgets and they both produce similar behavior. I have been unable to find a way to prevent this or recover from it without rebooting. A log of the behavior is below (the last message repeats ~100 times). Do you have any ideas on how to fix this or debug it further?
Welcome to Buildroot
evt login: root
# uname -a
Linux evt 4.8.6 #3 SMP Wed Dec 14 14:54:14 EST 2016 armv7l GNU/Linux
# modprobe g_serial
[ 23.828521] udc musb-hdrc.0.auto: registering UDC driver [g_serial]
[ 23.920959] userial_init: registered 4 ttyGS* devices
[ 23.960021] g_serial gadget: adding 'acm'/de6b1800 to config 'CDC ACM config'/bf3d3450
[ 23.968811] g_serial gadget: acm ttyGS0: dual speed IN/ep1in OUT/ep1out NOTIFY/ep2in
[ 23.977142] g_serial gadget: Gadget Serial v2.4
[ 23.982025] g_serial gadget: g_serial ready
[ 23.987426] musb-hdrc musb-hdrc.0.auto: power state already 0
# [ 61.578552] g_serial gadget: high-speed config #2: CDC ACM config
[ 61.585754] g_serial gadget: reset acm ttyGS0
[ 61.590393] g_serial gadget: activate acm ttyGS0
[ 61.596466] g_serial gadget: acm ttyGS0 serial state 0000
[ 61.628662] g_serial gadget: acm ttyGS0 reqa1.21 v0000 i0000 l7
[ 61.635253] g_serial gadget: acm ttyGS0 req21.22 v0000 i0000 l0
[ 122.251007] g_serial gadget: suspend
[ 122.383758] g_serial gadget: reset config
[ 122.388031] g_serial gadget: acm ttyGS0 deactivated
[ 122.440765] g_serial gadget: suspend
[ 122.612976] g_serial gadget: suspend
[ 123.372650] g_serial gadget: suspend
[ 125.920776] g_serial gadget: suspend
[ 125.929229] g_serial gadget: suspend