Re: [PATCH v5 07/10] usb: chipidea: disable irq while do role switch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 19, 2016 at 01:45:35PM +0800, Li Jun wrote:
> Since hnp polling will directly invoke otg_statemachine() with irq
> enabled, which will cause nobody cared irq while remove host role
> for B host, so we disable irq for it.
> 

Would you explain more about which interrupt is nobody cared?

> Signed-off-by: Li Jun <jun.li@xxxxxxx>
> ---
>  drivers/usb/chipidea/otg_fsm.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c
> index cb28e76..e5def6a 100644
> --- a/drivers/usb/chipidea/otg_fsm.c
> +++ b/drivers/usb/chipidea/otg_fsm.c
> @@ -545,8 +545,10 @@ static int ci_otg_start_host(struct otg_fsm *fsm, int on)
>  		ci_role_stop(ci);
>  		ci_role_start(ci, CI_ROLE_HOST);
>  	} else {
> +		disable_irq(ci->irq);
>  		ci_role_stop(ci);
>  		ci_role_start(ci, CI_ROLE_GADGET);
> +		enable_irq(ci->irq);
>  	}
>  	return 0;
>  }
> -- 
> 1.9.1
> 

-- 

Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux