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>
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);
}
}
+out:
spin_unlock(&hsotg->lock);
return retval;