Commit bed8ac30 authored by Li Jun's avatar Li Jun Committed by Nitin Garg
Browse files

MLK-11183 usb: chipidea: otg: complete state machine before cancel hrtimer



When do usb driver module load and unload loop test for A-device, the
hrtimer may be cancelled during otg state machine running, so after
the hrtimer is cancelled, the otg state machine may start it again by
adding a new timer, this will cause the hrtimer will be active after
its function memory is freed by module unload. This patch is to fix it
by trying to hold the fsm mutex lock before setting otg state to be
undefined, then otg hrtimer will be cancelled after current otg fsm
transition completes, and no new timer will be added.

Signed-off-by: default avatarLi Jun <jun.li@freescale.com>
(cherry picked from commit 8c3ab4f22bc34675aeb8f9c62e69b450a179be0f)
parent 021d6216
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment