On Mon, Feb 09, 2015 at 03:22:17PM +0800, Peter Chen wrote: > On Mon, Feb 09, 2015 at 02:45:30PM +0800, Li Jun wrote: > > From: Li Jun <b47624@xxxxxxxxxxxxx> > > > > This patch adds runtime power management support for otg fsm mode, since > > A-device in a_idle state cannot detect data pulse irq after suspended, here > > enable wakeup by connection before suspend to make it can be resumed by DP; > > and handle wakeup from that state like SRP. > > > > Signed-off-by: Li Jun <jun.li@xxxxxxxxxxxxx> > > --- > > drivers/usb/chipidea/bits.h | 1 + > > drivers/usb/chipidea/core.c | 35 +++++++++++++++++++++++++++++++++++ > > drivers/usb/chipidea/otg_fsm.c | 22 +++++++++++++++++++--- > > 3 files changed, 55 insertions(+), 3 deletions(-) > > > > I meet system hang at my imx6sx board after running below commands > at B device, at A device, it did not meet the system hang during the > boots up with this patch. > > root@imx6sxsabresd:~# modprobe g_mass_storage file=/dev/mmcblk0p1 > removable=1 > [ 43.202180] Number of LUNs=8 > [ 43.205103] Mass Storage Function, version: 2009/09/11 > [ 43.211669] LUN: removable file: (no medium) > [ 43.217236] Number of LUNs=1 > [ 43.221121] LUN: removable file: /dev/mmcblk0p1 > [ 43.225802] Number of LUNs=1 > [ 43.231027] g_mass_storage gadget: Mass Storage Gadget, > version: 2009/09/11 > [ 43.238126] g_mass_storage gadget: userspace failed to > provide iSerialNumber > [ 43.245249] g_mass_storage gadget: g_mass_storage ready > Reproduced on my i.MX6SX-SDB board, I checked and found it's due to there is vbus glitch on otg port during another host-only port initialization, it should not hang and there is the same problem if load gadget driver with vbus on(e.g. connect to a PC host), I will submit another patch to fix it, but cannot cover vbus glitch case. Li Jun > -- > > Best Regards, > Peter Chen -- 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