> > > 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. > > > Hi Marc, I think this problem can be fixed with below patch, I verified it at imx6 platform. diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index e26e616..c3fcd64 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -644,6 +644,11 @@ static int ci_hdrc_probe(struct platform_device *pdev) : CI_ROLE_GADGET; } + if (ci->role == CI_ROLE_GADGET) + /* only update vbus status for peripheral */ + ci_handle_vbus_change(ci); + + ret = ci_role_start(ci, ci->role); if (ret) { dev_err(dev, "can't start %s role\n", ci_role(ci)->name); diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index b34c819..69d20fb 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -1795,9 +1795,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: ��.n��������+%������w��{.n�����{���)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥