Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 07 Apr 2016 06:28 AM by  Chris Cope
USB host/OTG standby causes crash/reset/rediscovery of devices
 4 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Kai Scharwies
New Member
New Member
Posts:2


--
02 Apr 2014 09:28 AM

    I am testing the USB host and standby functionality of the DM3730 Torpdeo Eval board for a planned design, using BSP 2.4.2.

    So far ISP1763 seems to work as expected when the SoM goes into standby, e.g. connected USB devices resume their work.

    Here is a typical suspend/wakeup log:

    [  263.283111] PM: Syncing filesystems ... done.
    [  263.301849] PM: Preparing system for mem sleep
    [  263.340209] mmc0: card b368 removed
    [  263.423980] omap_device: omap_i2c.1: new worst case activate latency 0: 183105
    [  263.547149] Freezing user space processes ... (elapsed 0.01 seconds) done.
    [  263.573608] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) done.
    [  263.604187] PM: Entering mem sleep
    [  263.608489] omap_device: smartreflex.0: new worst case deactivate latency 0: 183105
    [  263.639984] ISP1763 resuming
    [  263.653289] Phy: Stopping machine
    [  263.750579] ISP1763 suspended
    [  263.758941] PM: suspend of devices complete after 123.718 msecs
    [  263.772796] PM: late suspend of devices complete after 7.507 msecs
    [  263.780700] omap_device: omap_uart.2: new worst case deactivate latency 0: 244140
    [  265.124847] omap_device: omap_uart.0: new worst case activate latency 0: 61035
    [  265.140594] Successfully put all powerdomains to target state
    [  265.151031] PM: early resume of devices complete after 4.058 msecs
    [  265.167694] omap_device: omap2_mcspi.1: new worst case activate latency 0: 122070
    [  265.178009] ISP1763 resuming
    [  265.196472] Phy: Starting machine
    [  265.268096] PM: resume of devices complete after 106.292 msecs
    [  265.284484] PM: Finishing wakeup.
    [  265.287963] Restarting tasks ... done.
    [  265.600189] mmc0: host does not support reading read-only switch. assuming write-enable.
    [  265.624999] mmc0: new SDHC card at address b368
    [  265.641815] mmcblk0: mmc0:b368 NCard 3.73 GiB
    [  265.659759]  mmcblk0: p1
    [  267.195739] eth0: link down
    [  268.195709] eth0: link up, 100Mbps, full-duplex

     

    However when using the OMAP´s OTG port (using a proper OTG-host cable; with pin 5 pulled to GND) the behavior is different:

    When the MUSB_HDRC part of the kernel is set to Host Mode all connected devices are disconnected and reconnected after suspend:

    [   69.845886] Phy: Starting machine
    [   69.926025] PM: resume of devices complete after 121.490 msecs
    [   69.942474] PM: Finishing wakeup.
    [   69.945953] Restarting tasks ...
    [   69.951660] omap_device: musb-omap2430.-1: new worst case activate latency 0: 152587
    [   69.972351] done.
    [   69.985870] omap_device: omap_i2c.1: new worst case deactivate latency 0: 61035
    [   70.019073] hub 1-0:1.0: activate --> -22
    [   70.314575] mmc0: host does not support reading read-only switch. assuming write-enable.
    [   70.337646] mmc0: new SDHC card at address b368
    [   70.354125] mmcblk0: mmc0:b368 NCard 3.73 GiB
    [   70.372039]  mmcblk0: p1
    [   70.517791] usb 1-1: new high speed USB device number 2 using musb-hdrc
    [   70.679077] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
    [   70.686279] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
    [   70.693847] usb 1-1: Product: USB2.0 Hub
    [   70.710968] hub 1-1:1.0: USB hub found
    [   70.719482] hub 1-1:1.0: 4 ports detected
    [   71.010437] usb 1-1.4: new full speed USB device number 3 using musb-hdrc
    [   71.129364] usb 1-1.4: New USB device found, idVendor=1546, idProduct=01a8
    [   71.136749] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0


    When it is configured to OTG mode devices are discovered after loading a gadget module (Why is that needed?), but are not working after suspend at all:

    [   37.768249] PM: Entering mem sleep
    [   37.772552] omap_device: smartreflex.0: new worst case deactivate latency 0: 183105
    [   37.815368] ISP1763 resuming
    [   37.822631] Phy: Stopping machine
    [   37.930267] ISP1763 suspended
    [   37.938659] PM: suspend of devices complete after 139.282 msecs
    [   37.957458] omap_device: musb-omap2430.-1: new worst case deactivate latency 0: 213623
    [   37.966339] PM: late suspend of devices complete after 21.362 msecs
    [   40.765686] omap_device: omap_uart.0: new worst case activate latency 0: 61035
    [   40.773620] Successfully put all powerdomains to target state
    [   40.795379] PM: early resume of devices complete after 15.411 msecs
    [   40.857604] omap_device: omap2_mcspi.1: new worst case activate latency 0: 152587
    [   40.868103] ISP1763 resuming
    [   40.886840] Phy: Starting machine
    [   41.103210] usb 2-1: reset high speed USB device number 2 using musb-hdrc
    [   41.228149] usb 2-1: device descriptor read/64, error -19
    [   41.462524] usb 2-1: device descriptor read/64, error -19
    [   42.884918] eth0: link down
    [   43.885070] eth0: link up, 100Mbps, full-duplex
    [   44.650024] hub 2-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
    [   47.736022] hub 2-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
    [   50.821868] hub 2-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
    [   50.830078] PM: resume of devices complete after 9978.638 msecs
    [   50.846405] PM: Finishing wakeup.
    [   50.849884] Restarting tasks ...
    [   50.855590] usb 2-1: USB disconnect, device number 2
    [   50.922271] done.
    [   50.960510] omap_device: omap_uart.2: new worst case deactivate latency 0: 61035
    [   51.219238] mmc0: host does not support reading read-only switch. assuming write-enable.
    [   51.244079] mmc0: new SDHC card at address b368
    [   51.260620] mmcblk0: mmc0:b368 NCard 3.73 GiB
    [   51.278625]  mmcblk0: p1
    [   53.970550] hub 2-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?


    Only when issuing rmmod g_zero and modprobe g_zero the devices are detected again.

     

     

    Kai Scharwies
    New Member
    New Member
    Posts:2


    --
    03 Apr 2014 09:36 AM
    Let me repeat my question: Is the linux kernel from the current BSP able to resume the musb_hdrc Controller with devices connected, or is the kernel is just too old and it is expected the usb resets occur?

    This, and other issues (marked <<<< below) are fixed in mainline OMAP-tree as far as I can see, but the BSP LogicPD provides is rather old...

    [ 119.853027] PM: Syncing filesystems ... done.
    [ 119.863464] PM: Preparing system for mem sleep
    [ 119.870697] mmc0: card b368 removed
    [ 120.013885] Freezing user space processes ... (elapsed 0.01 seconds) done.
    [ 120.039947] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) done.
    [ 120.071258] PM: Entering mem sleep
    [ 120.095397] ISP1763 resuming
    [ 120.106811] Phy: Stopping machine
    [ 120.209320] ISP1763 suspended
    [ 120.342163] usb 1-1: reset high speed USB device number 4 using musb-hdrc
    [ 135.412261] musb_h_ep0_irq 1035: no URB for end 0 <<<<<
    [ 135.417846] hub 1-0:1.0: port 1 nyet suspended
    [ 135.422729] musb_bus_suspend 2293: trying to suspend as a_host while active <<<<<
    [ 135.435516] PM: suspend of devices complete after 15343.139 msecs
    [ 135.453338] PM: late suspend of devices complete after 11.383 msecs
    [ 151.875427] Powerdomain (core_pwrdm) didn't enter target state 1
    [ 151.881774] Could not enter target state in pm_suspend <<<<<
    [ 151.901824] PM: early resume of devices complete after 14.404 msecs
    [ 151.920379] ISP1763 resuming
    [ 152.032531] Phy: Starting machine
    [ 152.041320] PM: resume of devices complete after 129.211 msecs
    [ 152.057373] PM: Finishing wakeup.
    [ 152.061004] Restarting tasks ...
    [ 152.065826] usb 1-1: USB disconnect, device number 4 <<<<<
    [ 152.109497] done.
    [ 152.354980] usb 1-1: new high speed USB device number 5 using musb-hdrc
    [ 152.408477] mmc0: host does not support reading read-only switch. assuming write-enable.
    [ 152.417358] mmc0: new SDHC card at address b368
    [ 152.432098] mmcblk0: mmc0:b368 NCard 3.73 GiB
    [ 152.449188] mmcblk0: p1
    [ 152.515441] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
    [ 152.522613] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
    [ 152.530181] usb 1-1: Product: USB2.0 Hub
    [ 152.539642] hub 1-1:1.0: USB hub found
    [ 152.544769] hub 1-1:1.0: 4 ports detected
    bradb
    Basic Member
    Basic Member
    Posts:203


    --
    16 Apr 2014 11:51 AM
    This issue has been duplicated and filed as DM37LINUX-1020. Kai has communicated this issue is not seen in DM37 Linux 2.1 BSP. This issue is also not seen when using the DM37x Torpedo + Wireless module. At this time this issue is believed to be isolated to changes to the DM37x Linux 2.4-2 BSP to support the DM37x Torpedo module.
    Chris Cope
    New Member
    New Member
    Posts:5


    --
    07 Apr 2016 05:05 AM

    Hi

    I noticed this issue is still listed under the 2-4-4 BSP release notes.  We are having a similar issue where a USB device is not entering an error state after DM3730 + Wireless RESUMES from the SUSPEND state.

    [] usb 2-1: reset high speed USB device number 2 using musb-hdrc

    [] usb 2-1: device descriptor read/64, error -19

    [] usb 2-1: device descriptor read/64, error -19

    [] hub-2-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?

     

    Is the status of this issue known?  Is there the possibility of a patch to 2-4-4 kernel?

    Thanks

     

    Chris

    Chris Cope
    New Member
    New Member
    Posts:5


    --
    07 Apr 2016 06:28 AM

    Correction: 

    I noticed this issue is still listed under the 2-4-4 BSP release notes.  We are having a similar issue where a USB device is not entering an error state after DM3730 + Wireless RESUMES from the SUSPEND state.

    **

    I noticed this issue is still listed under the 2-4-4 BSP release notes.  We are having a similar issue where a USB device is entering an error state after DM3730 + Wireless RESUMES from the SUSPEND state.


    You are not authorized to post a reply.