lkml.org 
[lkml]   [2013]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 1/3] usb: musb: core: added musb_restart() API to handle babble condition
On Wed, May 29, 2013 at 06:37:02PM +0530, Ravi Babu wrote:
> Added musb_restart() API, used for restart of the musb controller by
> the glue layer, when there is babble condition occured on the bus.
>
> During babble condition, the musb controller will remove the session
> and no longer in host-mode. As part of recovery this API can be used
> to restart the musb controller.
>
> Signed-off-by: Ravi Babu <ravibabu@ti.com>
> ---
> drivers/usb/musb/musb_core.c | 24 ++++++++++++++++++++++++
> drivers/usb/musb/musb_core.h | 1 +
> 2 files changed, 25 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
> index 37a261a..ab6fa39 100644
> --- a/drivers/usb/musb/musb_core.c
> +++ b/drivers/usb/musb/musb_core.c
> @@ -1373,6 +1373,30 @@ static int ep_config_from_hw(struct musb *musb)
> return 0;
> }
>
> +/*
> + * musb_restart - restarts musb controller
> + * @param musb the controller
> + */
> +int musb_restart(struct musb *musb)
> +{
> + int status = 0;
> +
> + /* during babble condition the musb controller removes the
> + * session bit and the fifo table initialized value get changed
> + */
> + if (musb->dyn_fifo)
> + status = ep_config_from_table(musb);
> + else
> + status = ep_config_from_hw(musb);
> +
> + /* starts session */
> + if (!status)
> + musb_start(musb);
> +
> + return status;
> +}
> +EXPORT_SYMBOL_GPL(musb_restart);

this sort of function should never be exposed outside of MUSB core
itself. This points to a big problem somewhere else.

let me continue reading the other two patches...

--
balbi
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-06-26 11:01    [W:0.084 / U:1.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site