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 18:53:29 +0200
From:	Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:	Bin Liu <binmlist@...il.com>
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

* Bin Liu | 2013-07-26 22:07:14 [-0500]:

>Sebastian,
Hi Bin,

>I have not tested it yet, but I believe I found why host mode works on
>TI 3.2 kernel but not on mainline. Please look at Line 786 in 3.2
>kernel musb_core.c [1].
>
>773         if ((int_usb & MUSB_INTR_DISCONNECT) && !musb->ignore_disconnect) {
>......
>785                                 if (musb->a_wait_bcon != 0 &&
>786                                                 is_otg_enabled(musb))
>787                                         musb_platform_try_idle(musb, jiffies
>788                                         +
>msecs_to_jiffies(musb->a_wait_bcon));
>
>So when the device is unplugged, *_try_idle() is not called in host
>mode, then the SESSION bit will stay set. But in mainline kernel,
>*_try_idle() will be called regardless.
>
>Please let me know your thoughts.

I am not too familiar with what should happen. The is_otg_enabled() part
is gone since v3.7-rc1 via:
|commit 032ec49f5351e9cb242b1a1c367d14415043ab95
|Author: Felipe Balbi <balbi@...com>
|Date:   Thu Nov 24 15:46:26 2011 +0200
|
|    usb: musb: drop useless board_mode usage
|    
|    we are compiling the driver always with full OTG
|    capabilities, so that board_mode trick becomes
|    useless.
|    
|    Signed-off-by: Felipe Balbi <balbi@...com>

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?

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 agree that without that try_idle part things keep working but it
seems, that it is also called in the other tree.

>
>Regards,
>-Bin.

Sebastian
--
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