-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
patches/usb/0013-usb-musb-avoid-stopping-the-session-in-host-mode.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
From 9f20bcf11d775a86b021abea73cc63268770e202 Mon Sep 17 00:00:00 2001 | ||
From: Jan Luebbe <jlu@pengutronix.de> | ||
Date: Wed, 15 May 2013 16:41:04 +0200 | ||
Subject: [PATCH 13/13] usb: musb: avoid stopping the session in host mode | ||
|
||
Signed-off-by: Jan Luebbe <jlu@pengutronix.de> | ||
--- | ||
drivers/usb/musb/musb_dsps.c | 10 ++++++++-- | ||
1 file changed, 8 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c | ||
index 077c1e7..c9946b9 100644 | ||
--- a/drivers/usb/musb/musb_dsps.c | ||
+++ b/drivers/usb/musb/musb_dsps.c | ||
@@ -230,8 +230,14 @@ static void otg_timer(unsigned long _musb) | ||
spin_lock_irqsave(&musb->lock, flags); | ||
switch (musb->xceiv->state) { | ||
case OTG_STATE_A_WAIT_BCON: | ||
- devctl &= ~MUSB_DEVCTL_SESSION; | ||
- dsps_writeb(musb->mregs, MUSB_DEVCTL, devctl); | ||
+ /* | ||
+ * We need to avoid stopping the session in host mode, | ||
+ * otherwise we don't see any newly connected devices | ||
+ */ | ||
+ if (!is_host_active(musb)) { | ||
+ devctl &= ~MUSB_DEVCTL_SESSION; | ||
+ dsps_writeb(musb->mregs, MUSB_DEVCTL, devctl); | ||
+ } | ||
|
||
devctl = dsps_readb(musb->mregs, MUSB_DEVCTL); | ||
if (devctl & MUSB_DEVCTL_BDEVICE) { | ||
-- | ||
1.8.1.4 | ||
|