From: Minas Harutyunyan Date: Sat, 30 May 2020 07:41:50 +0000 (+0400) Subject: usb: dwc2: Fix shutdown callback in platform X-Git-Tag: v4.9.231~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=46cfd55e8de177207b7ff41d18831749ca2322e4;p=platform%2Fkernel%2Flinux-amlogic.git usb: dwc2: Fix shutdown callback in platform commit 4fdf228cdf6925af45a2066d403821e0977bfddb upstream. To avoid lot of interrupts from dwc2 core, which can be asserted in specific conditions need to disable interrupts on HW level instead of disable IRQs on Kernel level, because of IRQ can be shared between drivers. Cc: stable@vger.kernel.org Fixes: a40a00318c7fc ("usb: dwc2: add shutdown callback to platform variant") Tested-by: Frank Mori Hess Reviewed-by: Alan Stern Reviewed-by: Doug Anderson Reviewed-by: Frank Mori Hess Signed-off-by: Minas Harutyunyan Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index 63178ed7f650..38926495c751 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -507,7 +507,8 @@ static void dwc2_driver_shutdown(struct platform_device *dev) { struct dwc2_hsotg *hsotg = platform_get_drvdata(dev); - disable_irq(hsotg->irq); + dwc2_disable_global_interrupts(hsotg); + synchronize_irq(hsotg->irq); } static const struct of_device_id dwc2_of_match_table[] = {