sabre(mx6): WOL is not working on kernel 4.9

cancel
Showing results for 
Search instead for 
Did you mean: 

sabre(mx6): WOL is not working on kernel 4.9

330 Views
isaachermida
Contributor II

In the latest kernel 4.9 (imx_4.9.11_1.0.0_ga), the WOL is failing. It is working fine on 4.1(imx_4.1.15_2.0.0_ga).

Does anyone has a fix or can point to the root cause of the problem on that? I can reproduce it on the sabre along in other platforms.

In order to enable the WOL support, I use the command "ethtool -s eth0 wol g" to allow the reception of WOL frames, I check it is enabled with "cat /sys/class/net/eth0/power/wakeup" and then put the device into sleep mode with "echo mem > /sys/power/state".

In order to wake up the system with a WOL packet, use etherwake using DUT mac, it is, "etherwake -i eth0 <MAC_ADDR>"

I added some debug messages and everything seems correct.

# ethtool -s eth0 wol g

# cat /sys/class/net/eth0/power/wakeup

enabled

# echo mem > /sys/power/state
PM: Syncing filesystems ... done.
PM: Preparing system for mem sleep
Freezing user space processes ... (elapsed 0.001 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
PM: Entering mem sleep
PM: suspend of devices complete after 93.672 msecs
PM: suspend devices took 0.100 seconds
PM: late suspend of devices complete after 0.981 msecs
PM: noirq suspend of devices complete after 0.999 msecs
Disabling non-boot CPUs ...
CPU1: shutdown
CPU2: shutdown
CPU3: shutdown

4 Replies

163 Views
jamesbone
NXP TechSupport
NXP TechSupport

Hello isaachermida‌,

We were able to reproduced the issue, and we submited a bug report to the BSP team, unfortunately they are in Holidays, and they return back by the end of Febraury, once we got an update from them I let you know.


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

163 Views
jamesbone
NXP TechSupport
NXP TechSupport

Hello Isaac,

We already have a solution for your issue, the issue was that fec_enet_private had another structure on 4.9 than on 4.1 kernel. Unfortunately, when the WOL feature was ported from 4.1, this aspect was missed and gpr register had another offset in the structure. Under these circumstances, when the board went to suspend, the ENET_STOP_REQ was not set in gpr register.

 

Please find attached the fix patch. 

 

It will be also available in next 4.9 release.

163 Views
isaachermida
Contributor II

Thanks guys, it is working fine in kernel 4.9.

0 Kudos

163 Views
jamesbone
NXP TechSupport
NXP TechSupport

Hello Isaac,

We are reviewing your question  internally, as soon as I get a response,  I will post our findings.  

Saludos,

Jaime