Skip to contentSkip to conversation

usb: musb: host: fixes for 3.14-rc

PATCH In review Roger Quadros 3 participants 7 messages Feb 4, 2014 – Feb 20, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover usb: musb: host: fixes for 3.14-rc

Hi Greg,

Patch 1 fixes SuperSpeed hub enumeration on beaglebone. Patch 2 fixes remote-wakeup resume on beaglebone.

Felipe has Acked the 1st patch but still needs to Ack the 2nd one.

Patches are based on 3.14-rc1

cheers,
-roger

Ajay Kumar Gupta (1):
usb: musb: host: Fix SuperSpeed hub enumeration

Roger Quadros (1):
usb: musb: core: Fix remote-wakeup resume

 drivers/usb/musb/musb_core.c | 10 +++++++++-
 drivers/usb/musb/musb_host.c |  3 +++
 2 files changed, 12 insertions(+), 1 deletion(-)
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 1/2 usb: musb: host: Fix SuperSpeed hub enumeration

From: Ajay Kumar Gupta <[email protected]>

Disables PING on status phase of control transfer.
PING token is not mandatory in status phase of control transfer and so some high speed USB devices don't support it. If such devices are connected to MUSB then they would not respond to PING token causing delayed or failed enumeration.

[Roger Q] Fixes enumeration issues with some Super-Speed USB hubs e.g. Dlink DUB-1340

---
 drivers/usb/musb/musb_host.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/usb/musb/musb_host.c +3 -0
index ed45572..abb38c3 100644
@@ -1183,6 +1183,9 @@ irqreturn_t musb_h_ep0_irq(struct musb *musb)
 				csr = MUSB_CSR0_H_STATUSPKT
 					| MUSB_CSR0_TXPKTRDY;
 
+			/* disable ping token in status phase */
+			csr |= MUSB_CSR0_H_DIS_PING;
+
 			/* flag status stage */
 			musb->ep0_stage = MUSB_EP0_STATUS;
 
Signature · 1 line
1.8.3.2
#2 lore raw

PATCH 2/2 usb: musb: core: Fix remote-wakeup resume

In reply to Roger Quadros

During resume don't touch SUSPENDM/RESUME bits of POWER register while restoring controller context. These bits might be changed by the controller during resume operation and so will be different than what they were during suspend.

e.g. SUSPENDM bit is set by software during USB global suspend but automatically cleared by the controller during remote wakeup or during resume. Setting this bit back while restoring context causes undesired behaviour. i.e. Babble interrupt is generated and USB is broken.

---
 drivers/usb/musb/musb_core.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/usb/musb/musb_core.c +9 -1
index fc192ad..a501542 100644
@@ -2157,11 +2157,19 @@ static void musb_restore_context(struct musb *musb)
 	void __iomem *musb_base = musb->mregs;
 	void __iomem *ep_target_regs;
 	void __iomem *epio;
+	u8 power;
 
 	musb_writew(musb_base, MUSB_FRAME, musb->context.frame);
 	musb_writeb(musb_base, MUSB_TESTMODE, musb->context.testmode);
 	musb_write_ulpi_buscontrol(musb->mregs, musb->context.busctl);
-	musb_writeb(musb_base, MUSB_POWER, musb->context.power);
+
+	/* Don't affect SUSPENDM/RESUME bits in POWER reg */
+	power = musb_readb(musb_base, MUSB_POWER);
+	power &= MUSB_POWER_SUSPENDM | MUSB_POWER_RESUME;
+	musb->context.power &= ~(MUSB_POWER_SUSPENDM | MUSB_POWER_RESUME);
+	power |= musb->context.power;
+	musb_writeb(musb_base, MUSB_POWER, power);
+
 	musb_writew(musb_base, MUSB_INTRTXE, musb->intrtxe);
 	musb_writew(musb_base, MUSB_INTRRXE, musb->intrrxe);
 	musb_writeb(musb_base, MUSB_INTRUSBE, musb->context.intrusbe);
Signature · 1 line
1.8.3.2
maintainer
#3 lore raw
In reply to Roger Quadros
Quoted 8 lines · Roger Quadros

Hi Greg,

Patch 1 fixes SuperSpeed hub enumeration on beaglebone. Patch 2 fixes remote-wakeup resume on beaglebone.

Felipe has Acked the 1st patch but still needs to Ack the 2nd one.

Patches are based on 3.14-rc1

Why wouldn't these come into my tree from Felipe like normal? Why should I take them?

confused,

greg k-h

#4 lore raw
Quoted 6 lines · Greg KH
Quoted 5 lines · Roger Quadros

Hi Greg,

Patch 1 fixes SuperSpeed hub enumeration on beaglebone. Patch 2 fixes remote-wakeup resume on beaglebone.

Quoted 8 lines
Quoted 3 lines

Felipe has Acked the 1st patch but still needs to Ack the 2nd one.

Patches are based on 3.14-rc1

Why wouldn't these come into my tree from Felipe like normal? Why should I take them?

confused,

I should have mentioned it earlier. Felipe told me to send it to you as he's out on vacations. But never-mind, I can wait till he picks it up.

cheers,
-roger

#5 lore raw
In reply to Roger Quadros

Hi Felipe,

Hope you had a good vacation :).

Could you please take a look at these two fixes? Thanks.

cheers,
-roger

Quoted 22 lines · Roger Quadros

Hi Greg,

Patch 1 fixes SuperSpeed hub enumeration on beaglebone. Patch 2 fixes remote-wakeup resume on beaglebone.

Felipe has Acked the 1st patch but still needs to Ack the 2nd one.

Patches are based on 3.14-rc1

cheers,
-roger

Ajay Kumar Gupta (1):
usb: musb: host: Fix SuperSpeed hub enumeration

Roger Quadros (1):
usb: musb: core: Fix remote-wakeup resume

 drivers/usb/musb/musb_core.c | 10 +++++++++-
 drivers/usb/musb/musb_host.c |  3 +++
 2 files changed, 12 insertions(+), 1 deletion(-)
#6 lore raw

Hi,

Quoted 3 lines · Roger Quadros

Hi Felipe,

Hope you had a good vacation :).

sure had.

Quoted 1 line

Could you please take a look at these two fixes? Thanks.

you should have received my confirmation email ;-)

Signature · 1 line
balbi