From: Bryan Wu <bryan.wu@analog.com>
To: Tony Lindgren <tony@atomide.com>,
David Brownell <dbrownell@users.sourceforge.net>,
linux-omap-open-source <linux-omap-open-source@linux.omap.com>
Subject: [PATCH] [MUSB] fix bug: when no USB device is plugged into the port of EZKIT-BF548, USB OTG host mode got BUG()
Date: Fri, 30 Nov 2007 18:11:16 +0800 [thread overview]
Message-ID: <1196417476.9628.17.camel@roc-laptop> (raw)
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
next reply other threads:[~2007-11-30 10:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-30 10:11 Bryan Wu [this message]
2007-11-30 10:15 ` [PATCH] [MUSB] fix bug: when no USB device is plugged into theport of EZKIT-BF548, USB OTG host mode got BUG() Gadiyar, Anand
2007-12-05 23:14 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1196417476.9628.17.camel@roc-laptop \
--to=bryan.wu@analog.com \
--cc=dbrownell@users.sourceforge.net \
--cc=linux-omap-open-source@linux.omap.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox