On Wed, 28 Jun 2017, Yoshihiro Shimoda wrote:

> Hi,
> 
> I have a question about the behavior.
> 
> < Background >
> In my environment (R-Car + renesas_usbhs driver), the driver will call 
> usb_gadget_driver->disconnect() in system suspend timing.
>  - In case of the ncm driver, it will call usb_ep_disable() via the 
> disconnect().
>  - But, in case of the mass_storage driver, it will not call usb_ep_disable().
>    This is because the f_mass_storage.c uses send_sig_info() and 
> handle_exception() will be not called during system suspend timing.
> 
> If usb_ep_disable() is not called, the renesas_usbhs driver causes an issue.
> So, I would like to resolve the issue somehow.
> 
> < Question >
> - How to resolve this issue?
>  - Should I add ep disabling code in the renesas_driver's suspend() anyway?
>  - Should I modify the f_mass_storage.c somehow?

You should fix renesas_usbhs.  A UDC driver should not assume that a
gadget driver's ->disconnect callback will immediately disable all
endpoints.  Although the gadger driver is supposed to disable them
eventually, it might not do so until after the callback has returned.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to