* 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@xxxxxx> |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@xxxxxx> 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-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html