usb: dwc_otg: fix issue with race condition of competition
authorlyz <lyz@rock-chips.com>
Mon, 19 Jan 2015 10:55:56 +0000 (18:55 +0800)
committerlyz <lyz@rock-chips.com>
Fri, 23 Jan 2015 09:08:18 +0000 (17:08 +0800)
commitb1e25b6bf255cecf4d022099857d200cbc681661
treebab9e8568b8efa38bd62a0a337a09f88e03723bf
parentf38ab909f02ed1b9bae7f70d195ec6f14e076acf
usb: dwc_otg: fix issue with race condition of competition
between hcd_reinit() and cil_interrupt handler.

hcd_reinit() should get core_if->lock before modify this
lock, so that can prevent competition between cil_interrupt
handler and hcd_reinit(), hcd_reinit() be scheduled while
cil_interrupt handler holding core_if->lock, hcd_reinit() modify
the lock then previous core_if->lock will never be unlocked.

Signed-off-by: lyz <lyz@rock-chips.com>
drivers/usb/dwc_otg_310/dwc_otg_hcd.c