Re: usb: musb: "(null)" in sysfs mode file after disabling a gadget (and at other times, system hangs)
From: Bin Liu
Date: Tue Mar 06 2018 - 09:37:07 EST
On Mon, Mar 05, 2018 at 08:44:40PM +0100, Merlijn Wajer wrote:
> Hi Bin,
>
> On 05/03/18 20:28, Bin Liu wrote:
>
> > The musb udc driver sets the state to b_idle without checking a
> > gadget driver, this should be cleaned up. I have add this in my backlog.
> > But if this issue doesn't bother you much right now, I will make the
> > action low priority and address it later whenever I got time. (likely
> > not very soon, I have a hand full of musb driver bugs to fix...)
>
> I can try to fix it this (or next) week. Do you have a pointer for me?
Quickly looking at the code, musb->xceiv->otg->state is set to OTG_STATE_B_IDLE
in musb_init_controller(), musb_gadget_setup(), musb_gadget_start(), and
musb_g_disconnect(). I am not sure if there is redundancy, and gadget
driver should be checked in some of them.
Regards,
-Bin.