Skip to contentSkip to conversation

usb: musb: Fix trying to free already-free IRQ 4

PATCH Applied Tony Lindgren 2 participants 2 messages Nov 23, 2016 – Nov 29, 2016 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: musb: Fix trying to free already-free IRQ 4

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.

---

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(-)
drivers/usb/musb/musbhsdma.h +1 -1
@@ -157,5 +157,5 @@ struct musb_dma_controller {
 	void __iomem			*base;
 	u8				channel_count;
 	u8				used_channels;
-	u8				irq;
+	int				irq;
 };
Signature · 5 lines
2.10.2
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Applied
#2 lore raw
In reply to a message not in the archive
Quoted 13 lines · Tony Lindgren

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)
...

Quoted 4 lines

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

Applied. Thanks.
-Bin.

Quoted 22 lines

---

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(-)
drivers/usb/musb/musbhsdma.h +1 -1
@@ -157,5 +157,5 @@ struct musb_dma_controller {
 	void __iomem			*base;
 	u8				channel_count;
 	u8				used_channels;
-	u8				irq;
+	int				irq;
 };
Signature · 1 line
2.10.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html