* [PATCH] [MUSB] fix bug: when no USB device is plugged into the port of EZKIT-BF548, USB OTG host mode got BUG()
@ 2007-11-30 10:11 Bryan Wu
2007-11-30 10:15 ` [PATCH] [MUSB] fix bug: when no USB device is plugged into theport " Gadiyar, Anand
0 siblings, 1 reply; 3+ messages in thread
From: Bryan Wu @ 2007-11-30 10:11 UTC (permalink / raw)
To: Tony Lindgren, David Brownell, linux-omap-open-source
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
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
---
drivers/usb/musb/musb_core.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 33774a6..008f42c 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -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);
--
1.5.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] [MUSB] fix bug: when no USB device is plugged into theport of EZKIT-BF548, USB OTG host mode got BUG()
2007-11-30 10:11 [PATCH] [MUSB] fix bug: when no USB device is plugged into the port of EZKIT-BF548, USB OTG host mode got BUG() Bryan Wu
@ 2007-11-30 10:15 ` Gadiyar, Anand
2007-12-05 23:14 ` Tony Lindgren
0 siblings, 1 reply; 3+ messages in thread
From: Gadiyar, Anand @ 2007-11-30 10:15 UTC (permalink / raw)
To: bryan.wu, Tony Lindgren, David Brownell, linux-omap-open-source
Ack. We caught this too.
Next time, I think I should send the fix as soon as we catch it :)
--Anand
> -----Original Message-----
> From: linux-omap-open-source-bounces@linux.omap.com
> [mailto:linux-omap-open-source-bounces@linux.omap.com] 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 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
>
> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
> ---
> drivers/usb/musb/musb_core.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/musb/musb_core.c
> b/drivers/usb/musb/musb_core.c
> index 33774a6..008f42c 100644
> --- a/drivers/usb/musb/musb_core.c
> +++ b/drivers/usb/musb/musb_core.c
> @@ -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);
> --
> 1.5.3
>
> _______________________________________________
> Linux-omap-open-source mailing list
> Linux-omap-open-source@linux.omap.com
> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [MUSB] fix bug: when no USB device is plugged into theport of EZKIT-BF548, USB OTG host mode got BUG()
2007-11-30 10:15 ` [PATCH] [MUSB] fix bug: when no USB device is plugged into theport " Gadiyar, Anand
@ 2007-12-05 23:14 ` Tony Lindgren
0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2007-12-05 23:14 UTC (permalink / raw)
To: Gadiyar, Anand; +Cc: David Brownell, linux-omap-open-source
* Gadiyar, Anand <gadiyar@ti.com> [071130 02:15]:
> Ack. We caught this too.
>
> Next time, I think I should send the fix as soon as we catch it :)
>
> --Anand
>
>
> > -----Original Message-----
> > From: linux-omap-open-source-bounces@linux.omap.com
> > [mailto:linux-omap-open-source-bounces@linux.omap.com] 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 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
Pushing Today.
Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-12-05 23:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-30 10:11 [PATCH] [MUSB] fix bug: when no USB device is plugged into the port of EZKIT-BF548, USB OTG host mode got BUG() Bryan Wu
2007-11-30 10:15 ` [PATCH] [MUSB] fix bug: when no USB device is plugged into theport " Gadiyar, Anand
2007-12-05 23:14 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox