> > > > What your otg port looks like? It is a Micro-B-Female port? > > If ID pin is low, it will be considered as host role, when you > > connect to another machine's host port, both sides are host, it can't > > be enumerated. > > Yes, I know, both sides are in the host role. Granted my fault, but > never the less, we get an IRQ storm and the IRQ gets disabled. You have > to reboot to get the system working again. > 1. If the ethernet gadget is built as module, does this problem occur? (The cable should connect between two sides before modprobe) 2. Try below patch to see if it can fix your problem diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index b34c819..3ae5341 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -1626,6 +1626,9 @@ static int ci_udc_start(struct usb_gadget *gadget, if (driver->disconnect == NULL) return -EINVAL; + /* Update ci->vbus_active */ + if (ci->role == CI_ROLE_GADGET) + ci_handle_vbus_change(ci); ci->ep0out->ep.desc = &ctrl_endpt_out_desc; retval = usb_ep_enable(&ci->ep0out->ep); @@ -1795,9 +1798,6 @@ static int udc_start(struct ci_hdrc *ci) pm_runtime_no_callbacks(&ci->gadget.dev); pm_runtime_enable(&ci->gadget.dev); - /* Update ci->vbus_active */ - ci_handle_vbus_change(ci); - return retval; destroy_eps: Peter ��.n��������+%������w��{.n�����{���)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥