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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 29 Jul 2013 12:26:19 -0500
From:	Bin Liu <binmlist@...il.com>
To:	Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc:	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	balbi@...com, george.cherian@...com
Subject: Re: [PATCH 14/16] usb: musb: dsps: add MUSB_DEVCTL_SESSION back after removal

Sebastian,

On Mon, Jul 29, 2013 at 11:53 AM, Sebastian Andrzej Siewior
<bigeasy@...utronix.de> wrote:
> So you say, am335x-evm is not able to run OTG mode and may only run in
> host mode and as a consequence it must not call musb_platform_try_idle()
> because it throws that one bit away and there is no way to bring it back?

I did not say AM335xEVM is not able to run OTG mode. The problem is in
OTG mode the SESSION bit will be cleared once the device is unplugged,
then there is no way the SESSION bit will come back in the current
mainline kernel.

The TI 3.2 kernel works around this OTG issue by toggling the SESSION
bit in b_idle handling in otg_timer(). The workaround makes most users
happy but it causes VBUS voltage pulsing. That is why I said I don't
know an ideal solution without a ID pin interrupt support.

>
> However, if I look at the tree you reference, I see in
> arch/arm/mach-omap2/board-am335xevm.c:
> | static struct omap_musb_board_data musb_board_data = {
> |         .interface_type = MUSB_INTERFACE_ULPI,
> |         .mode           = MUSB_OTG,
> |         .power          = 500,
> |         .instances      = 1,
> | };
> …
> | static void __init am335x_evm_init(void)
> …
> |   usb_musb_init(&musb_board_data);
>
> and it creates a "ti81xx-usbss" device.
>
> So it creates a musb device with mode MUSB_OTG no matter what.

I think you looked at a wrong file, maybe a wrong branch. Please check
[1], which defines

2644          * mode[0:3] = USB0PORT's mode
2645          * mode[4:7] = USB1PORT's mode
2646          * AM335X beta EVM has USB0 in OTG mode and USB1 in host mode.
2647          */
2648         .mode           = (MUSB_HOST << 4) | MUSB_OTG,

> I agree that without that try_idle part things keep working but it
> seems, that it is also called in the other tree.
>

Then because AM335xEVM USB1 port does not call *try_idle() in this 3.2
kernel, its SESSION bit is always set.

But I don't have a clear idea how to solve this in the mainline kernel
since is_otg_enabled() has been cleaned.

>>
>>Regards,
>>-Bin.
>
> Sebastian


Regards,
-Bin.

[1]: http://arago-project.org/git/projects/?p=linux-am33x.git;a=blob;f=arch/arm/mach-omap2/board-am335xevm.c;h=aec37f371342455e06626c47e0e92beb51930ed2;hb=refs/heads/v3.2-staging
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ