From: Tony Lindgren <tony@atomide.com>
To: linux-omap-open-source@linux.omap.com
Subject: [PATCH 5/7] musb_hdrc: Fix SRP locking
Date: Fri, 17 Aug 2007 04:44:42 -0700 [thread overview]
Message-ID: <11873510951742-git-send-email-tony@atomide.com> (raw)
In-Reply-To: <11873510931624-git-send-email-tony@atomide.com>
Remove unnecessary locking left over from earlier code
as it's done in musb_gadget_wakeup(). Also show debug
information for unhandled wake events to allow debugging
SRP.
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
drivers/usb/musb/musb_gadget.c | 3 ++-
drivers/usb/musb/plat_uds.c | 3 ---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index fa15c59..86a256a 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -1434,6 +1434,7 @@ static int musb_gadget_wakeup(struct usb_gadget *gadget)
status = 0;
goto done;
default:
+ DBG(2, "Unhandled wake: %s\n", otg_state_string(musb));
goto done;
}
@@ -1931,7 +1932,7 @@ void musb_g_suspend(struct musb *musb)
}
}
-/* Called during SRP. Caller must hold lock */
+/* Called during SRP */
void musb_g_wakeup(struct musb *musb)
{
musb_gadget_wakeup(&musb->g);
diff --git a/drivers/usb/musb/plat_uds.c b/drivers/usb/musb/plat_uds.c
index 8a2bb3e..c6ca9ea 100644
--- a/drivers/usb/musb/plat_uds.c
+++ b/drivers/usb/musb/plat_uds.c
@@ -1710,7 +1710,6 @@ musb_srp_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t n)
{
struct musb *musb=dev_to_musb(dev);
- unsigned long flags;
unsigned short srp;
if (sscanf(buf, "%hu", &srp) != 1
@@ -1719,10 +1718,8 @@ musb_srp_store(struct device *dev, struct device_attribute *attr,
return -EINVAL;
}
- spin_lock_irqsave(&musb->lock, flags);
if (srp == 1)
musb_g_wakeup(musb);
- spin_unlock_irqrestore(&musb->lock, flags);
return n;
}
--
1.5.2.3
next prev parent reply other threads:[~2007-08-17 11:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-17 11:44 [PATCH 0/7] musb_hdrc: Replace MGC_ with MUSB_, misc OPT test fixes Tony Lindgren
2007-08-17 11:44 ` [PATCH 1/7] musb_hdrc: Search and replace MGC_END0 with MUSB_EP0 Tony Lindgren
2007-08-17 11:44 ` [PATCH 2/7] musb_hdrc: Search and replace MGC_END_OFFSET with MUSB_EP_OFFSET Tony Lindgren
2007-08-17 11:44 ` [PATCH 3/7] musb_hdrc: Search and replace MGC_O_HSDMA with MUSB_HSDMA Tony Lindgren
2007-08-17 11:44 ` [PATCH 4/7] musb_hdrc: Search and replace MGC_HSDMA " Tony Lindgren
2007-08-17 11:44 ` Tony Lindgren [this message]
2007-08-17 11:44 ` [PATCH 6/7] musb_hdrc: Keep state as b_idle if disconnected as b_idle Tony Lindgren
2007-08-17 11:44 ` [PATCH 7/7] musb_hdrc: Fix doing HNP multiple times Tony Lindgren
2007-08-17 12:59 ` Tony Lindgren
2007-08-17 17:22 ` [PATCH 0/7] musb_hdrc: Replace MGC_ with MUSB_, misc OPT test fixes Kevin Hilman
2007-08-20 6:15 ` 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=11873510951742-git-send-email-tony@atomide.com \
--to=tony@atomide.com \
--cc=linux-omap-open-source@linux.omap.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