AnsweredAssumed Answered

imx53qsb: usb remote wakeup

Question asked by warl0rd on Feb 27, 2014
Latest reply on Mar 25, 2014 by Qiang Li - Mpu Se
Branched to a new discussion

IMX53QSB  (LOCO) board runs the 2.6.35.3 Linux kernel. Telit GSM modem HE910-G via USB interface is connected to IMX53QSB. The modem is capable of remote wakeup. It has been tested with WindowsXP and succeeded to wake up a desktop with incoming call. With IMX53QSB the modem wakes the board up, but something goes wrong and  USB hub executes reset-resume instead of reset procedure thus resetting the device connected. Here is the log of suspend:

 

[ 220.253224] PM: Syncing filesystems ... done.

[ 220.267388] dvfs: disable dvfs before suspend

[ 220.275139] Freezing user space processes ... (elapsed 0.01 seconds) done.

[ 220.294546] Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.

[ 220.315993] usb 1-1: usb_suspend: ++

[ 220.319652] usb 1-1: choose_wakeup: msg.event 2 state 7 ++

[ 220.325301] usb 1-1: choose_wakeup dev->power.can_wakeup 1 dev->power.should_wakeup 1 w 1

[ 220.333674] usb 1-1: choose_wakeup: --

[ 220.337629] usb 1-1: usb_suspend_both: state 7 ++

[ 220.342477] usb 1-1: usb_suspend_interface: state 7 ++

[ 220.347848] usb 1-1: usb_suspend_interface: status 0 --

[ 220.353353] usb 1-1: usb_suspend_interface: state 7 ++

[ 220.358514] usb 1-1: usb_suspend_interface: status 0 --

[ 220.363862] usb 1-1: usb_suspend_interface: state 7 ++

[ 220.369094] usb 1-1: usb_suspend_interface: status 0 --

[ 220.375458] usb 1-1: usb_suspend_interface: state 7 ++

[ 220.380618] usb 1-1: usb_suspend_interface: status 0 --

[ 220.385963] usb 1-1: usb_suspend_interface: state 7 ++

[ 220.391121] usb 1-1: usb_suspend_interface: status 0 --

[ 220.396479] usb 1-1: usb_suspend_interface: state 7 ++

[ 220.401630] usb 1-1: usb_suspend_interface: status 0 --

[ 220.406967] usb 1-1: usb_suspend_interface: state 7 ++

[ 220.412130] usb 1-1: usb_suspend_interface: status 0 --

[ 220.417454] usb 1-1: usb_suspend_interface: state 7 ++

[ 220.422617] usb 1-1: usb_suspend_interface: status 0 --

[ 220.427981] usb 1-1: usb_suspend_interface: state 7 ++

[ 220.433137] usb 1-1: usb_suspend_interface: status 0 --

[ 220.438451] usb 1-1: usb_suspend_interface: state 7 ++

[ 220.443605] usb 1-1: usb_suspend_interface: status 0 --

[ 220.448918] usb 1-1: usb_suspend_interface: state 7 ++

[ 220.454071] usb 1-1: usb_suspend_interface: status 0 --

[ 220.459384] usb 1-1: usb_suspend_interface: state 7 ++

[ 220.464536] usb 1-1: usb_suspend_interface: status 0 --

[ 220.469849] usb 1-1: usb_suspend_interface: state 7 ++

[ 220.476481] usb 1-1: usb_suspend_interface: status 0 --

[ 220.481815] usb 1-1: usb_suspend_interface: state 7 ++

[ 220.486955] usb 1-1: usb_suspend_interface: status 0 --

[ 220.492283] usb 1-1: usb_suspend_device: do_remote_wakeup 1 state 7 ++

[ 220.498816] hub 1-0:1.0: suspend port 1

[ 220.503399] usb usb1: set_port_feature port 1 feature 2

[ 220.508641] usb 1-1: usb_set_device_state new_state 8 ++

[ 220.513972] usb 1-1: usb_set_device_state --

[ 220.531763] usb 1-1: usb_suspend_device: status 0 --

[ 220.536824] usb 1-1: usb_suspend_both: status 0 --

[ 220.541702] usb 1-1: usb_suspend: --

[ 221.613605] usb usb1: usb_suspend: ++

[ 221.617321] usb usb1: choose_wakeup: msg.event 2 state 7 ++

[ 221.622966] usb usb1: choose_wakeup dev->power.can_wakeup 1 dev->power.should_wakeup 1 w 1

[ 221.631245] usb usb1: choose_wakeup: --

[ 221.635110] usb usb1: usb_suspend_both: state 7 ++

[ 221.639914] usb usb1: usb_suspend_interface: state 7 ++

[ 221.645262] hub 1-0:1.0: hub_suspend ++

[ 221.649122] hub 1-0:1.0: hub_suspend --

[ 221.652986] usb usb1: usb_suspend_interface: status 0 --

[ 221.658399] usb usb1: usb_suspend_device: do_remote_wakeup 1 state 7 ++

[ 221.665268] usb usb1: usb_set_device_state new_state 8 ++

[ 221.670681] usb usb1: usb_set_device_state --

[ 221.675065] usb usb1: usb_suspend_device: status 0 --

[ 221.680217] usb usb1: usb_suspend_both: status 0 --

[ 221.685375] usb usb1: usb_suspend: --

[ 221.691858] TZIC wake enabled=1 irq=24

[ 221.695672] PM: suspend of devices complete after 1380.215 msecs

[ 221.701683] suspend wp cpu=400000000

[ 221.708158] PM: late suspend of devices complete after 0.816 msecs

 

and here is of resume

 

[ 407.893079] PM: early resume of devices complete after 0.413 msecs

[ 407.899295] usb wakeup is here

[ 407.905077] TZIC wake enabled=0 irq=24

[ 407.908848] IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)

[ 407.914663] wakeup wake lock: mmc_delayed_work

[ 407.922519] usb usb1: usb_resume: ++

[ 407.926097] usb usb1: usb_resume_both: state 8 ++

[ 407.930803] usb usb1: usb_resume_device: state 8 ++

[ 407.971845] usb usb1: usb_set_device_state new_state 7 ++

[ 407.977251] usb usb1: usb_set_device_state --

[ 407.981610] usb usb1: usb_resume_device: status 0 --

[ 407.996765] usb usb1: usb_resume_interface: state 7 ++

[ 408.013965] hub 1-0:1.0: hub_resume ++

[ 408.017739] hub_port_status change 0 status 507

[ 408.023435] hub 1-0:1.0: hub_resume --

[ 408.027189] usb usb1: usb_resume_interface: status 0 --

[ 408.032520] usb usb1: usb_resume_both: status 0 --

[ 408.037404] usb usb1: usb_resume: status 0 --

[ 408.041791] usb 1-1: usb_resume: ++

[ 408.045529] usb 1-1: usb_resume_both: state 8 ++

[ 408.050170] usb 1-1: usb_resume_device: state 8 ++

[ 408.054993] usb 1-1: usb_port_resume

[ 408.058593] hub_port_status change 0 status 507

[ 408.063156] usb usb1: clear_port_feature port 1 feature 2

[ 408.101840] hub_port_status change 3 status 101

[ 408.121835] usb 1-1: check_port_resume_type status 0 portchange 3 portstatus 257 reset_resume 0 persist_enabled 1

[ 408.132116] usb usb1: clear_port_feature port 1 feature 16

[ 408.137611] usb usb1: clear_port_feature port 1 feature 17

[ 408.143118] usb 1-1: finish reset-resume

[ 408.147044] usb 1-1: usb_set_device_state new_state 7 ++

[ 408.152372] usb 1-1: usb_set_device_state --

[ 408.156643] usb_reset_and_verify_device

[ 408.160492] usb 1-1: hub_port_init ++

[ 408.164170] hub 1-0:1.0: hub_port_reset

[ 408.168009] usb usb1: set_port_feature port 1 feature 4

[ 408.173254] hub 1-0:1.0: hub_port_wait_reset

[ 408.231837] hub_port_status change 0 status 503

[ 408.291910] usb usb1: clear_port_feature port 1 feature 20

[ 408.297419] usb 1-1: usb_set_device_state new_state 5 ++

[ 408.302759] usb 1-1: usb_set_device_state device_set_wakeup_capable 0

[ 408.309214] usb 1-1: usb_set_device_state --

[ 408.313596] usb 1-1: reset high speed USB device using fsl-ehci and address 3

[ 408.321652] hub 1-0:1.0: hub_port_reset

[ 408.325520] usb usb1: set_port_feature port 1 feature 4

[ 408.330763] hub 1-0:1.0: hub_port_wait_reset

[ 408.391831] hub_port_status change 0 status 503

[ 408.451833] usb usb1: clear_port_feature port 1 feature 20

[ 408.457327] usb 1-1: usb_set_device_state new_state 5 ++

[ 408.462655] usb 1-1: usb_set_device_state device_set_wakeup_capable 0

[ 408.469099] usb 1-1: usb_set_device_state --

[ 408.474031] usb 1-1: usb_set_device_state new_state 6 ++

[ 408.479345] usb 1-1: usb_set_device_state device_set_wakeup_capable 0

[ 408.485801] usb 1-1: usb_set_device_state --

[ 408.512407] usb 1-1: hub_port_init --

[ 408.537152] usb 1-1: usb_set_device_state new_state 7 ++

[ 408.542485] usb 1-1: usb_set_device_state device_set_wakeup_capable 32

[ 408.549014] usb 1-1: usb_set_device_state --

[ 408.555403] usb 1-1: usb_resume_device: status 0 --

[ 408.560372] usb 1-1: usb_resume_interface: state 7 ++

[ 408.565528] usb 1-1: usb_resume_interface: status 0 --

[ 408.570796] usb 1-1: usb_resume_interface: state 7 ++

[ 408.575872] usb 1-1: usb_resume_interface: status 0 --

[ 408.581098] usb 1-1: usb_resume_interface: state 7 ++

[ 408.586173] usb 1-1: usb_resume_interface: status 0 --

[ 408.591400] usb 1-1: usb_resume_interface: state 7 ++

[ 408.596467] usb 1-1: usb_resume_interface: status 0 --

[ 408.601693] usb 1-1: usb_resume_interface: state 7 ++

[ 408.606760] usb 1-1: usb_resume_interface: status 0 --

[ 408.611999] usb 1-1: usb_resume_interface: state 7 ++

[ 408.617054] usb 1-1: usb_resume_interface: status 0 --

[ 408.622293] usb 1-1: usb_resume_interface: state 7 ++

[ 408.627347] usb 1-1: usb_resume_interface: status 0 --

[ 408.632588] usb 1-1: usb_resume_interface: state 7 ++

[ 408.637642] usb 1-1: usb_resume_interface: status 0 --

[ 408.642880] usb 1-1: usb_resume_interface: state 7 ++

[ 408.647934] usb 1-1: usb_resume_interface: status 0 --

[ 408.653173] usb 1-1: usb_resume_interface: state 7 ++

[ 408.658226] usb 1-1: usb_resume_interface: status 0 --

[ 408.663464] usb 1-1: usb_resume_interface: state 7 ++

[ 408.668518] usb 1-1: usb_resume_interface: status 0 --

[ 408.673757] usb 1-1: usb_resume_interface: state 7 ++

[ 408.678811] usb 1-1: usb_resume_interface: status 0 --

[ 408.684050] usb 1-1: usb_resume_interface: state 7 ++

[ 408.689103] usb 1-1: usb_resume_interface: status 0 --

[ 408.694342] usb 1-1: usb_resume_interface: state 7 ++

[ 408.699395] usb 1-1: usb_resume_interface: status 0 --

[ 408.704633] usb 1-1: usb_resume_both: status 0 --

[ 408.709428] usb 1-1: usb_resume: status 0 --

[ 408.713902] PM: resume of devices complete after 809.303 msecs

[ 408.719775] usb 1-1: usb_resume: ++

[ 408.723293] usb 1-1: usb_resume: status 0 --

[ 408.727635] usb usb1: usb_resume: ++

[ 408.731211] usb usb1: usb_resume: status 0 --

[ 408.736575] Restarting tasks ...

[ 408.739980] usb usb1: usb_remote_wakeup state 7

[ 408.744850] hub_port_status change 0 status 503

[ 408.766266] done.

[ 408.770369] dvfs: enable dvfs after resume

[ 408.793087] suspend: exit suspend, ret = 0 (1970-01-02 00:11:45.337744763 UTC)

[ 413.751951] mmc0: Starting deferred resume

[ 413.904547] mmc0: Deferred resume completed

 

  After usb hub had cleared the feature USB_PORT_FEAT_SUSPEND of its port, the bit USB_PORT_STAT_ENABLE of PortStatus of this port became cleared. And PortChange bits are USB_PORT_STAT_C_CONNECTION and USB_PORT_STAT_C_ENABLE. Apparently something goes wrong...

Outcomes