aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc2/core_intr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/dwc2/core_intr.c')
-rw-r--r--drivers/usb/dwc2/core_intr.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c
index c93918b70d03..ad43c5bc1ef1 100644
--- a/drivers/usb/dwc2/core_intr.c
+++ b/drivers/usb/dwc2/core_intr.c
@@ -128,6 +128,9 @@ static void dwc2_handle_otg_intr(struct dwc2_hsotg *hsotg)
128 dwc2_op_state_str(hsotg)); 128 dwc2_op_state_str(hsotg));
129 gotgctl = readl(hsotg->regs + GOTGCTL); 129 gotgctl = readl(hsotg->regs + GOTGCTL);
130 130
131 if (dwc2_is_device_mode(hsotg))
132 s3c_hsotg_disconnect(hsotg);
133
131 if (hsotg->op_state == OTG_STATE_B_HOST) { 134 if (hsotg->op_state == OTG_STATE_B_HOST) {
132 hsotg->op_state = OTG_STATE_B_PERIPHERAL; 135 hsotg->op_state = OTG_STATE_B_PERIPHERAL;
133 } else { 136 } else {
@@ -287,9 +290,11 @@ static void dwc2_handle_conn_id_status_change_intr(struct dwc2_hsotg *hsotg)
287 * Release lock before scheduling workq as it holds spinlock during 290 * Release lock before scheduling workq as it holds spinlock during
288 * scheduling. 291 * scheduling.
289 */ 292 */
290 spin_unlock(&hsotg->lock); 293 if (hsotg->wq_otg) {
291 queue_work(hsotg->wq_otg, &hsotg->wf_otg); 294 spin_unlock(&hsotg->lock);
292 spin_lock(&hsotg->lock); 295 queue_work(hsotg->wq_otg, &hsotg->wf_otg);
296 spin_lock(&hsotg->lock);
297 }
293 298
294 /* Clear interrupt */ 299 /* Clear interrupt */
295 writel(GINTSTS_CONIDSTSCHNG, hsotg->regs + GINTSTS); 300 writel(GINTSTS_CONIDSTSCHNG, hsotg->regs + GINTSTS);
@@ -312,6 +317,12 @@ static void dwc2_handle_session_req_intr(struct dwc2_hsotg *hsotg)
312 317
313 /* Clear interrupt */ 318 /* Clear interrupt */
314 writel(GINTSTS_SESSREQINT, hsotg->regs + GINTSTS); 319 writel(GINTSTS_SESSREQINT, hsotg->regs + GINTSTS);
320
321 /*
322 * Report disconnect if there is any previous session established
323 */
324 if (dwc2_is_device_mode(hsotg))
325 s3c_hsotg_disconnect(hsotg);
315} 326}
316 327
317/* 328/*