linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: musb: Fix trying to free already-free IRQ 4
@ 2016-11-23 16:51 Tony Lindgren
       [not found] ` <20161123165127.1795-1-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Tony Lindgren @ 2016-11-23 16:51 UTC (permalink / raw)
  To: Bin Liu
  Cc: Boris Brezillon, Greg Kroah-Hartman, Andreas Kemnade,
	Felipe Balbi, George Cherian, Kishon Vijay Abraham I,
	Ivaylo Dimitrov, Johan Hovold, Ladislav Michl, Laurent Pinchart,
	Sergei Shtylyov, linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA

When unloading omap2430, we can get the following splat:

WARNING: CPU: 1 PID: 295 at kernel/irq/manage.c:1478 __free_irq+0xa8/0x2c8
Trying to free already-free IRQ 4
...
[<c01a8b78>] (free_irq) from [<bf0aea84>]
(musbhs_dma_controller_destroy+0x28/0xb0 [musb_hdrc])
[<bf0aea84>] (musbhs_dma_controller_destroy [musb_hdrc]) from
[<bf09f88c>] (musb_remove+0xf0/0x12c [musb_hdrc])
[<bf09f88c>] (musb_remove [musb_hdrc]) from [<c056a384>]
(platform_drv_remove+0x24/0x3c)
...

This is because the irq number in use is 260 nowadays, and the dma
controller is using u8 instead of int.

Signed-off-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
---

Found one more issue.. This has been around for years so can probably
wait until after v4.10-rc1. Probably should be tagged stable to avoid
multiple people debugging this over and over.

---
 drivers/usb/musb/musbhsdma.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/musb/musbhsdma.h b/drivers/usb/musb/musbhsdma.h
--- a/drivers/usb/musb/musbhsdma.h
+++ b/drivers/usb/musb/musbhsdma.h
@@ -157,5 +157,5 @@ struct musb_dma_controller {
 	void __iomem			*base;
 	u8				channel_count;
 	u8				used_channels;
-	u8				irq;
+	int				irq;
 };
-- 
2.10.2
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: musb: Fix trying to free already-free IRQ 4
       [not found] ` <20161123165127.1795-1-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
@ 2016-11-29 21:53   ` Bin Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Bin Liu @ 2016-11-29 21:53 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Boris Brezillon, Greg Kroah-Hartman, Andreas Kemnade,
	Felipe Balbi, Kishon Vijay Abraham I, Ivaylo Dimitrov,
	Johan Hovold, Ladislav Michl, Laurent Pinchart, Sergei Shtylyov,
	linux-usb-u79uwXL29TY76Z2rM5mHXA,
	linux-omap-u79uwXL29TY76Z2rM5mHXA

On Wed, Nov 23, 2016 at 08:51:27AM -0800, Tony Lindgren wrote:
> When unloading omap2430, we can get the following splat:
> 
> WARNING: CPU: 1 PID: 295 at kernel/irq/manage.c:1478 __free_irq+0xa8/0x2c8
> Trying to free already-free IRQ 4
> ...
> [<c01a8b78>] (free_irq) from [<bf0aea84>]
> (musbhs_dma_controller_destroy+0x28/0xb0 [musb_hdrc])
> [<bf0aea84>] (musbhs_dma_controller_destroy [musb_hdrc]) from
> [<bf09f88c>] (musb_remove+0xf0/0x12c [musb_hdrc])
> [<bf09f88c>] (musb_remove [musb_hdrc]) from [<c056a384>]
> (platform_drv_remove+0x24/0x3c)
> ...
> 
> This is because the irq number in use is 260 nowadays, and the dma
> controller is using u8 instead of int.
> 
> Signed-off-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>

Applied. Thanks.
-Bin.

> ---
> 
> Found one more issue.. This has been around for years so can probably
> wait until after v4.10-rc1. Probably should be tagged stable to avoid
> multiple people debugging this over and over.
> 
> ---
>  drivers/usb/musb/musbhsdma.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/musb/musbhsdma.h b/drivers/usb/musb/musbhsdma.h
> --- a/drivers/usb/musb/musbhsdma.h
> +++ b/drivers/usb/musb/musbhsdma.h
> @@ -157,5 +157,5 @@ struct musb_dma_controller {
>  	void __iomem			*base;
>  	u8				channel_count;
>  	u8				used_channels;
> -	u8				irq;
> +	int				irq;
>  };
> -- 
> 2.10.2
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-29 21:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-23 16:51 [PATCH] usb: musb: Fix trying to free already-free IRQ 4 Tony Lindgren
     [not found] ` <20161123165127.1795-1-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2016-11-29 21:53   ` Bin Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).