From: Tony Lindgren <tony@atomide.com>
To: linux-omap-open-source@linux.omap.com
Subject: [PATCH 7/7] musb_hdrc: Fix doing HNP multiple times
Date: Fri, 17 Aug 2007 04:44:44 -0700 [thread overview]
Message-ID: <11873511001036-git-send-email-tony@atomide.com> (raw)
In-Reply-To: <11873510973002-git-send-email-tony@atomide.com>
Without this patch OPT HS B TD.6.15 fails if run multiple
times in a row.
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
drivers/usb/musb/virthub.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/musb/virthub.c b/drivers/usb/musb/virthub.c
index 3509aa0..757da5e 100644
--- a/drivers/usb/musb/virthub.c
+++ b/drivers/usb/musb/virthub.c
@@ -85,11 +85,14 @@ static void musb_port_suspend(struct musb *musb, u8 bSuspend)
&& musb->xceiv.host->b_hnp_enable;
musb_platform_try_idle(musb, 0);
break;
+#ifdef CONFIG_USB_MUSB_OTG
case OTG_STATE_B_HOST:
- musb->xceiv.state = OTG_STATE_B_PERIPHERAL;
- MUSB_DEV_MODE(musb);
- /* REVISIT restore setting of MUSB_DEVCTL_HR */
+ musb->xceiv.state = OTG_STATE_B_WAIT_ACON;
+ musb->is_active = is_otg_enabled(musb)
+ && musb->xceiv.host->b_hnp_enable;
+ musb_platform_try_idle(musb, 0);
break;
+#endif
default:
DBG(1, "bogus rh suspend? %s\n",
otg_state_string(musb));
@@ -113,6 +116,12 @@ static void musb_port_reset(struct musb *musb, u8 bReset)
void __iomem *mbase = musb->mregs;
#ifdef CONFIG_USB_MUSB_OTG
+ if (musb->xceiv.state == OTG_STATE_B_IDLE) {
+ DBG(2, "HNP: Returning from HNP, not resetting hub as b_idle\n");
+ musb->port1_status &= ~USB_PORT_STAT_RESET;
+ return;
+ }
+
/* REVISIT this looks wrong for HNP */
u8 devctl = musb_readb(mbase, MUSB_DEVCTL);
--
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 ` [PATCH 5/7] musb_hdrc: Fix SRP locking Tony Lindgren
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 ` Tony Lindgren [this message]
2007-08-17 12:59 ` [PATCH 7/7] musb_hdrc: Fix doing HNP multiple times 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=11873511001036-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