Re: [PATCH 11/12] musb_hdrc: Allow suspend if host is already suspended

Felipe Balbi
2007-10-11T20:07:28Z

Hi,

On 10/11/07, Tony Lindgren <tony@atomide.com> wrote:
> Allow suspend if host is already suspended
>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
>
> diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
> index 091ae8f..4eeff91 100644
> --- a/drivers/usb/musb/musb_host.c
> +++ b/drivers/usb/musb/musb_host.c
> @@ -2128,6 +2128,9 @@ static int musb_bus_suspend(struct usb_hcd *hcd)
> {
> struct musb *musb = hcd_to_musb(hcd);
>
> + if (musb->xceiv.state == OTG_STATE_A_SUSPEND)
> + return 0;
> +

Should we allow this ? If it's already suspended it doesn't make sense
suspending again. And in OTG state machine there's no way to suspend a
suspended device i.e. no loop going back to [ab]_suspend state.

In any case, if it works... ;-)

> if (is_host_active(musb) && musb->is_active) {
> WARN("trying to suspend as %s is_active=%i\n",
> otg_state_string(musb), musb->is_active);
> --
> 1.5.2.5
>
> _______________________________________________
> Linux-omap-open-source mailing list
> Linux-omap-open-source@linux.omap.com
> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
>

--
Best Regards,

Felipe Balbi
felipebalbi@users.sourceforge.net