summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehoon Chung <jh80.chung@samsung.com>2019-01-29 10:42:24 +0900
committerJaehoon Chung <jh80.chung@samsung.com>2019-01-31 13:18:35 +0900
commite66eb8943762d79893d2baabdcc456ba33a0ce41 (patch)
tree2633a7fc4dfcf6adb29a8e6b5a44b2c00a37cddb
parent9c5384b7b66990e8cd8c1f7f07d610f7576ed559 (diff)
downloadlinux-artik7-old/tizen_5.0_20190212.tar.gz
linux-artik7-old/tizen_5.0_20190212.tar.bz2
linux-artik7-old/tizen_5.0_20190212.zip
This patch is referred to Robert's commit cf54772b913b. (usb: dwc2: call dwc2_is_controller_alive() under spinlock) Below is commit message: This patch fixes the following problem: data transmission in direction IN break unless the GSNPSID register access is done with spinlock held. This issue occurs at least in Exynos4412 SoC, probably in many SoC's from Exynos familly. The problem is described here: https://lkml.org/lkml/2014/12/22/185 And there is linux mailing list discussion: https://lkml.org/lkml/2015/1/14/17 The one of SDB hang issues should be fixed with this patch. (Issue - Not triggered usb interrupt.) Change-Id: If05d3cedb738b8804659dc35b652154e5b634ed4 Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
-rw-r--r--drivers/usb/dwc2/hcd_intr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/dwc2/hcd_intr.c b/drivers/usb/dwc2/hcd_intr.c
index c8da432e2fbc..07c9846ed011 100644
--- a/drivers/usb/dwc2/hcd_intr.c
+++ b/drivers/usb/dwc2/hcd_intr.c
@@ -2138,13 +2138,13 @@ irqreturn_t dwc2_handle_hcd_intr(struct dwc2_hsotg *hsotg)
u32 gintsts, dbg_gintsts;
irqreturn_t retval = IRQ_NONE;
+ spin_lock(&hsotg->lock);
+
if (!dwc2_is_controller_alive(hsotg)) {
dev_warn(hsotg->dev, "Controller is dead\n");
- return retval;
+ goto out;
}
- spin_lock(&hsotg->lock);
-
/* Check if HOST Mode */
if (dwc2_is_host_mode(hsotg)) {
gintsts = dwc2_read_core_intr(hsotg);
@@ -2192,6 +2192,7 @@ irqreturn_t dwc2_handle_hcd_intr(struct dwc2_hsotg *hsotg)
}
}
+out:
spin_unlock(&hsotg->lock);
return retval;