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:34:04 +0900
commit7da4064cccca1f00a3c838515b9bfaed75bab16d (patch)
tree3cd00e34eae6bd3315404340a031f873019e279e
parenta3933748f0fd6377fdf50e0b77560d4689a14cb8 (diff)
downloadlinux-artik7-7da4064cccca1f00a3c838515b9bfaed75bab16d.tar.gz
linux-artik7-7da4064cccca1f00a3c838515b9bfaed75bab16d.tar.bz2
linux-artik7-7da4064cccca1f00a3c838515b9bfaed75bab16d.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: If97516bc94d84df611663f902267a5e3b75815f7 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 e0c613d000ca..ce3f1bb10e7c 100644
--- a/drivers/usb/dwc2/hcd_intr.c
+++ b/drivers/usb/dwc2/hcd_intr.c
@@ -2137,13 +2137,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);
@@ -2191,6 +2191,7 @@ irqreturn_t dwc2_handle_hcd_intr(struct dwc2_hsotg *hsotg)
}
}
+out:
spin_unlock(&hsotg->lock);
return retval;