[PATCH] usb: renesas_usbhs: bugfix: use irqnum = -1 for usb_add_hcd()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



current renesas_usbhs host driver will get below WARNING when host was removed

WARNING: at /opt/usr/src/WORK/morimoto/gitlinux/linux-2.6/kernel/irq/manage.c:1)
Trying to free already-free IRQ 0
Modules linked in:
[<c000e25c>] (unwind_backtrace+0x0/0xe4) from [<c001695c>] (warn_slowpath_commo)
[<c001695c>] (warn_slowpath_common+0x4c/0x64) from [<c00169f4>] (warn_slowpath_)
[<c00169f4>] (warn_slowpath_fmt+0x2c/0x3c) from [<c004978c>] (__free_irq+0x88/0)
[<c004978c>] (__free_irq+0x88/0x148) from [<c00498a0>] (free_irq+0x54/0x78)
[<c00498a0>] (free_irq+0x54/0x78) from [<c01b023c>] (usb_remove_hcd+0x13c/0x170)
[<c01b023c>] (usb_remove_hcd+0x13c/0x170) from [<c01c7b1c>] (usbhsh_stop+0x44/0)
...

renesas_usbhs host hcd->irq should be -1 since
this driver doesn't have hcd->driver->irq.

But, from 68d07f64b8a11a852d48d1b05b724c3e20c0d94b,
(USB: Don't fail USB3 probe on missing legacy PCI IRQ.)
current renesas_usbhs didn't call usb_hcd_request_irqs()
which will set hcd->irq on usb_add_hcd().
Because the "irqnum" was 0.

This patch use irqnum = -1 for usb_add_hcd().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
---

>> Felipe

This patch is for linus/master


 drivers/usb/renesas_usbhs/mod_host.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/renesas_usbhs/mod_host.c b/drivers/usb/renesas_usbhs/mod_host.c
index 1834cf5..f9c668b 100644
--- a/drivers/usb/renesas_usbhs/mod_host.c
+++ b/drivers/usb/renesas_usbhs/mod_host.c
@@ -1441,7 +1441,7 @@ static int usbhsh_start(struct usbhs_priv *priv)
 	int ret;
 
 	/* add hcd */
-	ret = usb_add_hcd(hcd, 0, 0);
+	ret = usb_add_hcd(hcd, -1, 0);
 	if (ret < 0)
 		return 0;
 
-- 
1.7.5.4

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux