USB OTG using both host and peripheral

I'm new to all this so please let me know if I'm doing something
wrong. I'm using Angstrom with the 2.6.30 kernel in a rev C board.
What I'm trying to do is have ethernet gadget support when it's a
peripheral and control a USB hub/ethernet dongle when it's the host. I
followed the instructions in <
beagleboard/browse_thread/thread/d73d7baa8907df80> to enable OTG
(basically change the USB peripheral controller to Inventra HDRC USB
Peripheral, change gadget support from module to built in).

I connected the hub and it works fine but if I disconnect it and
connect it again it doesn't work anymore. It won't work either if I
use the board as a peripheral before using it as a host.

I recompiled the kernel to have USB host support only (with the
Renesas M66592 USB Peripheral Controller, the Inventra one is not on
the list for USB Host) and I can disconnect and reconnect the hub
without any problems.