Skip to content

Commit

Permalink
usb: dwc2: Fix shutdown callback in platform
Browse files Browse the repository at this point in the history
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: a40a003 ("usb: dwc2: add shutdown callback to platform variant")
Tested-by: Frank Mori Hess <fmh6jj@gmail.com>
Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Frank Mori Hess <fmh6jj@gmail.com>
Signed-off-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
  • Loading branch information
Minas Harutyunyan authored and Felipe Balbi committed Jul 9, 2020
1 parent 65b7cf4 commit 4fdf228
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/usb/dwc2/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,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);
}

/**
Expand Down

0 comments on commit 4fdf228

Please sign in to comment.