fix bug: when no USB device is plugged into the port of EZKIT-BF548, USB OTG host mode got BUG()
Subsystems (2)
PATCH 1/1 fix bug: when no USB device is plugged into the port of EZKIT-BF548, USB OTG host mode got BUG()
Subject: [PATCH] [MUSB] fix bug: when no USB device is plugged into the port of EZKIT-BF548, USB OTG host mode got BUG()
Move IRQ workqueue init before request_irq, otherwise host SUSPEND irq will call schedule_work() and BUG_ON() will fire because musb_irq_work did not initialised.
We recorded it at
https://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_id=141&tracker_item_id=3740
Although the Blackfin port of MUSB is not merged, this bug should be common for other platform with MUSB
--- drivers/usb/musb/musb_core.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/usb/musb/musb_core.c +3 -2
@@ -1992,6 +1992,9 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)if (status <0 ) goto fail2; +/* Init IRQ workqueue before request_irq */ +INIT_WORK (&musb->irq_work, musb_irq_work); +/* attach to the IRQ */ if (request_irq (nIrq, musb->isr,0 , dev->bus_id, musb)) {dev_err (dev,"request_irq %d failed!\n" , nIrq);
@@ -2071,8 +2074,6 @@ fail:return status; } -INIT_WORK (&musb->irq_work, musb_irq_work); -#ifdef CONFIG_SYSFS status =device_create_file (dev, &dev_attr_mode); status =device_create_file (dev, &dev_attr_vbus);
Signature · 1 line
1.5.3
RE: [PATCH] [MUSB] fix bug: when no USB device is plugged into theport of EZKIT-BF548, USB OTG host mode got BUG()
Ack. We caught this too.
Next time, I think I should send the fix as soon as we catch it :)
--Anand
Quoted 62 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Bryan Wu
Sent: Friday, November 30, 2007 3:41 PM
To: Tony Lindgren; David Brownell; linux-omap-open-source
Subject: [PATCH] [MUSB] fix bug: when no USB device is plugged into theport of EZKIT-BF548, USB OTG host mode gotBUG()Subject: [PATCH] [MUSB] fix bug: when no USB device is plugged into the port of EZKIT-BF548, USB OTG host mode got
BUG()Move IRQ workqueue init before
request_irq, otherwise host SUSPEND irq will callschedule_work()andBUG_ON()will fire becausemusb_irq_workdid
not initialised.We recorded it at
https://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?
action=TrackerItemEdit&tracker_id=141&tracker_item_id=3740Although the Blackfin port of MUSB is not merged, this bug should be common for other platform with MUSB
Signed-off-by Bryan Wu <[email protected]>--- drivers/usb/musb/musb_core.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)drivers/usb/musb/musb_core.c +3
-0@@ -1992,6 +1992,9 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)if (status <0 ) goto fail2; +/* Init IRQ workqueue before request_irq */ +INIT_WORK (&musb->irq_work, musb_irq_work); +/* attach to the IRQ */ if (request_irq (nIrq, musb->isr,0 , dev->bus_id, musb)) {drivers/usb/musb/musb_core.c +0
-2dev_err (dev,"request_irq %d failed!\n" , nIrq);@@ -2071,8 +2074,6 @@ fail:return status; } -INIT_WORK (&musb->irq_work, musb_irq_work); -#ifdef CONFIG_SYSFS status =device_create_file (dev, &dev_attr_mode); status =device_create_file (dev, &dev_attr_vbus);Signature · 6 lines
1.5.3 _______________________________________________ Linux-omap-open-source mailing list [email protected] http://linux.omap.com/mailman/listinfo/linux-omap-open-source
Re: [PATCH] [MUSB] fix bug: when no USB device is plugged into theport of EZKIT-BF548, USB OTG host mode got BUG()
Quoted 30 lines · Gadiyar, Anand
Ack. We caught this too.
Next time, I think I should send the fix as soon as we catch it :)
--Anand
Quoted 23 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Bryan Wu
Sent: Friday, November 30, 2007 3:41 PM
To: Tony Lindgren; David Brownell; linux-omap-open-source
Subject: [PATCH] [MUSB] fix bug: when no USB device is plugged into theport of EZKIT-BF548, USB OTG host mode gotBUG()Subject: [PATCH] [MUSB] fix bug: when no USB device is plugged into the port of EZKIT-BF548, USB OTG host mode got
BUG()Move IRQ workqueue init before
request_irq, otherwise host SUSPEND irq will callschedule_work()andBUG_ON()will fire becausemusb_irq_workdid
not initialised.We recorded it at
https://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?
action=TrackerItemEdit&tracker_id=141&tracker_item_id=3740Although the Blackfin port of MUSB is not merged, this bug should be common for other platform with MUSB
Pushing Today.
Tony