lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 10 Aug 2013 00:30:37 +0400 From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com> To: Sebastian Andrzej Siewior <bigeasy@...utronix.de> CC: Bin Liu <binmlist@...il.com>, linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org, balbi@...com, george.cherian@...com Subject: Re: [PATCH] usb: musb: am335x: Do not remove the session bin HOST-only mode Hello. On 08/09/2013 08:03 PM, Sebastian Andrzej Siewior wrote: > This is what I observe: > On the first connect, the musb starts with DEVCTL.Session set. On > disconnect, musb_core calls try_idle. That functions removes the Session > bit signalize that the session is over (something that only in OTG is > required). A new device, that is plugged, is no longer recognized. > I've setup a timer and checked the DEVCTL register and I haven't seen a > change in VBus and I saw the B-Device bit set. After setting the IDDIG > into A mode and forcing the device to behave like I didn't see a change. > Neither VBUS goes to 0b11 nor does a session start request come. > The TI-v3.2 kernel they skip to call musb_platform_try_idle() in the > OTG_STATE_A_WAIT_BCON state while not in OTG mode. > Since the second port hast a standard A plug the patch changes the port > to run in host mode only, force the id-pin to host only and skip the > timer which would remove DEVCTL.Session. > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de> [...] > diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c > index 4ffbaac..b0752fa 100644 > --- a/drivers/usb/musb/musb_dsps.c > +++ b/drivers/usb/musb/musb_dsps.c [...] > @@ -388,6 +393,14 @@ static int dsps_musb_init(struct musb *musb) > val &= ~(1 << wrp->otg_disable); > dsps_writel(musb->ctrl_base, wrp->phy_utmi, val); > > + if (musb->port_mode == MUSB_PORT_MODE_HOST) { > + val = USBMODE_IDDIG_A; > + val |= USBMODE_ID_MUX_REG; Why not do the above in one line and save on {} {}? It will look more aesthetically pleasing IMHO. > + } else { > + val = USBMODE_ID_MUX_PHY; > + } > + dsps_writel(musb->ctrl_base, wrp->mode, val); > + WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists