Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

TI AM335x CPPI 4.1 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Bin Liu and committed by
Greg Kroah-Hartman
783f3b4e 7876320f

+1 -11
+1 -11
drivers/usb/musb/musb_dsps.c
··· 658 658 return controller; 659 659 } 660 660 661 - static void dsps_dma_controller_destroy(struct dma_controller *c) 662 - { 663 - struct musb *musb = c->musb; 664 - struct dsps_glue *glue = dev_get_drvdata(musb->controller->parent); 665 - void __iomem *usbss_base = glue->usbss_base; 666 - 667 - musb_writel(usbss_base, USBSS_IRQ_CLEARR, USBSS_IRQ_PD_COMP); 668 - cppi41_dma_controller_destroy(c); 669 - } 670 - 671 661 #ifdef CONFIG_PM_SLEEP 672 662 static void dsps_dma_controller_suspend(struct dsps_glue *glue) 673 663 { ··· 687 697 688 698 #ifdef CONFIG_USB_TI_CPPI41_DMA 689 699 .dma_init = dsps_dma_controller_create, 690 - .dma_exit = dsps_dma_controller_destroy, 700 + .dma_exit = cppi41_dma_controller_destroy, 691 701 #endif 692 702 .enable = dsps_musb_enable, 693 703 .disable = dsps_musb_disable,