Dave,
I have g_ether working fine now :-)
This is what I changed in usbmisc_imx.c:
http://pastebin.com/jmwY4hvL
And I used the same usbotg node that you mentioned before.
Test procedure:
1. Do a full power cycle
2. Load the g_ether module on the mx51evk:
$ modprobe g_ether
using random self ethernet address
using random host ethernet address
usb0: HOST MAC 22:81:c3:54:bb:20
usb0: MAC 62:f7:11:de:af:d3
g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
g_ether gadget: g_ether ready
3. Insert the USB cable between the mx51evk USB OTG port and the PC
You should see the following message pop up: "g_ether gadget: high-speed config #1: CDC Ethernet (EEM)"
4. On the mx51evk console:
$ ifconfig usb0 up
$ ifconfig usb0 10.0.0.2
5. On the host PC terminal:
# sudo ifconfig usb0 10.0.0.1
# ping 10.0.0.2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_req=1 ttl=64 time=1.62 ms
64 bytes from 10.0.0.2: icmp_req=2 ttl=64 time=0.502 ms
64 bytes from 10.0.0.2: icmp_req=3 ttl=64 time=0.501 ms
64 bytes from 10.0.0.2: icmp_req=4 ttl=64 time=0.295 ms
64 bytes from 10.0.0.2: icmp_req=5 ttl=64 time=0.345 ms
64 bytes from 10.0.0.2: icmp_req=6 ttl=64 time=0.361 ms
64 bytes from 10.0.0.2: icmp_req=7 ttl=64 time=0.322 ms
64 bytes from 10.0.0.2: icmp_req=8 ttl=64 time=0.531 ms
64 bytes from 10.0.0.2: icmp_req=9 ttl=64 time=0.543 ms
64 bytes from 10.0.0.2: icmp_req=10 ttl=64 time=0.492 ms
64 bytes from 10.0.0.2: icmp_req=11 ttl=64 time=0.401 ms
64 bytes from 10.0.0.2: icmp_req=12 ttl=64 time=0.301 ms
64 bytes from 10.0.0.2: icmp_req=13 ttl=64 time=0.506 ms
64 bytes from 10.0.0.2: icmp_req=14 ttl=64 time=0.510 ms
64 bytes from 10.0.0.2: icmp_req=15 ttl=64 time=0.552 ms
6. If you notice that the ping stops, do a CTRL + C and inspect 'ifconfig usb0'. Probably it lost its IP, then just do number 5 again.
Regards,
Fabio Estevam