diff mbox series

usb: musb: dsps: do not disable CPPI41 irq in driver teardown

Message ID 20180821185523.30788-1-b-liu@ti.com (mailing list archive)
State New, archived
Headers show
Series usb: musb: dsps: do not disable CPPI41 irq in driver teardown | expand

Commit Message

Bin Liu Aug. 21, 2018, 6:55 p.m. UTC
TI AM335x CPPI41 module uses a single register bit for CPPI interrupts in
both musb controllers. So disabling the CPPI irq in one musb driver breaks
the other musb module.

Since musb is already disabled before tearing down dma controller in
musb_remove(), it is safe to not disable CPPI irq in
musb_dma_controller_destroy().

Fixes: 255348289f71 ("usb: musb: dsps: Manage CPPI 4.1 DMA interrupt in DSPS")

Cc: stable@vger.kernel.org
Signed-off-by: Bin Liu <b-liu@ti.com>
---
 drivers/usb/musb/musb_dsps.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

Comments

Sergei Shtylyov Aug. 22, 2018, 4:19 p.m. UTC | #1
Hello!

On 08/21/2018 09:55 PM, Bin Liu wrote:

> TI AM335x CPPI41 module uses a single register bit for CPPI interrupts in

   It's CPPI 4.1. :-)

> both musb controllers. So disabling the CPPI irq in one musb driver breaks
> the other musb module.
> 
> Since musb is already disabled before tearing down dma controller in
> musb_remove(), it is safe to not disable CPPI irq in
> musb_dma_controller_destroy().
> 
> Fixes: 255348289f71 ("usb: musb: dsps: Manage CPPI 4.1 DMA interrupt in DSPS")
> 

   Should be no empty line here...

> Cc: stable@vger.kernel.org
> Signed-off-by: Bin Liu <b-liu@ti.com>
[...]

MBR, Sergei
diff mbox series

Patch

diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index df827ff57b0d..23a0df79ef21 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -658,16 +658,6 @@  dsps_dma_controller_create(struct musb *musb, void __iomem *base)
 	return controller;
 }
 
-static void dsps_dma_controller_destroy(struct dma_controller *c)
-{
-	struct musb *musb = c->musb;
-	struct dsps_glue *glue = dev_get_drvdata(musb->controller->parent);
-	void __iomem *usbss_base = glue->usbss_base;
-
-	musb_writel(usbss_base, USBSS_IRQ_CLEARR, USBSS_IRQ_PD_COMP);
-	cppi41_dma_controller_destroy(c);
-}
-
 #ifdef CONFIG_PM_SLEEP
 static void dsps_dma_controller_suspend(struct dsps_glue *glue)
 {
@@ -697,7 +687,7 @@  static struct musb_platform_ops dsps_ops = {
 
 #ifdef CONFIG_USB_TI_CPPI41_DMA
 	.dma_init	= dsps_dma_controller_create,
-	.dma_exit	= dsps_dma_controller_destroy,
+	.dma_exit	= cppi41_dma_controller_destroy,
 #endif
 	.enable		= dsps_musb_enable,
 	.disable	= dsps_musb_disable,