Re: net: stmmac: dwmac-rk: fixes for Wake-on-Lan on RK3288

2016-06-16 Thread Vincent Palatin
Hi Giuseppe, On Thu, Jun 16, 2016 at 6:37 AM, Giuseppe CAVALLARO <peppe.cavall...@st.com> wrote: > > Hi Vincent > > > On 6/15/2016 7:04 PM, Vincent Palatin wrote: >> >> On Sun, Jun 12, 2016 at 11:46 PM, Giuseppe CAVALLARO >> <peppe.cavall...@st.com>

[PATCH v2 1/3] net: stmmac: allow to split suspend/resume from init/exit callbacks

2016-06-15 Thread Vincent Palatin
to perform only a partial power-down on suspend if Wake-on-Lan is enabled but always perform the full shutdown sequence if the module is unloaded. Signed-off-by: Vincent Palatin <vpala...@chromium.org> --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 8 ++-- include/linux/st

[PATCH v2 0/3] net: stmmac: dwmac-rk: fixes for Wake-on-Lan on RK3288

2016-06-15 Thread Vincent Palatin
add the PMT interrupt to the MAC device tree configuration, so we can wake up the core from it when the PHY has received the magic packet. Changes since v1: * rename 'powered_down' variable into 'suspended'. * fix the logic recording the PHY suspended state according to Heiko comments. Vincent

[PATCH v2 2/3] net: stmmac: dwmac-rk: keep the PHY up for WoL

2016-06-15 Thread Vincent Palatin
-down on the lack of need to wake-up from the LAN but do it unconditionally when unloading the module. Signed-off-by: Vincent Palatin <vpala...@chromium.org> --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 48 +++--- 1 file changed, 43 insertions(+), 5 deletions(-)

[PATCH v2 3/3] ARM: dts: rockchip: add interrupt for Wake-on-Lan on RK3288

2016-06-15 Thread Vincent Palatin
In order to use Wake-on-Lan on RK3288 integrated MAC, we need to wake-up the CPU on the PMT interrupt when the MAC and the PHY are in low power mode. Adding the interrupt declaration. Signed-off-by: Vincent Palatin <vpala...@chromium.org> --- arch/arm/boot/dts/rk3288.dtsi | 5 +++--

Re: net: stmmac: dwmac-rk: fixes for Wake-on-Lan on RK3288

2016-06-15 Thread Vincent Palatin
On Sun, Jun 12, 2016 at 11:46 PM, Giuseppe CAVALLARO <peppe.cavall...@st.com> wrote: > On 6/11/2016 3:00 AM, Vincent Palatin wrote: >> >> In order to support Wake-On-Lan when using the RK3288 integrated MAC >> (with an external RGMII PHY), we need to avoid

Re: [PATCH 2/3] net: stmmac: dwmac-rk: keep the PHY up for WoL

2016-06-15 Thread Vincent Palatin
On Fri, Jun 10, 2016 at 6:57 PM, Heiko Stuebner <he...@sntech.de> wrote: > Am Freitag, 10. Juni 2016, 18:00:38 schrieb Vincent Palatin: >> When suspending the machine, do not shutdown the external PHY by cutting >> its regulator in the mac platform driver suspend code if Wake

[PATCH 3/3] ARM: dts: rockchip: add interrupt for Wake-on-Lan on RK3288

2016-06-10 Thread Vincent Palatin
In order to use Wake-on-Lan on RK3288 integrated MAC, we need to wake-up the CPU on the PMT interrupt when the MAC and the PHY are in low power mode. Adding the interrupt declaration. Signed-off-by: Vincent Palatin <vpala...@chromium.org> --- arch/arm/boot/dts/rk3288.dtsi | 5 +++--

[PATCH 2/3] net: stmmac: dwmac-rk: keep the PHY up for WoL

2016-06-10 Thread Vincent Palatin
-down on the lack of need to wake-up from the LAN but do it unconditionally when unloading the module. Signed-off-by: Vincent Palatin <vpala...@chromium.org> --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 49 +++--- 1 file changed, 44 insertions(+), 5 deletions(-)

net: stmmac: dwmac-rk: fixes for Wake-on-Lan on RK3288

2016-06-10 Thread Vincent Palatin
In order to support Wake-On-Lan when using the RK3288 integrated MAC (with an external RGMII PHY), we need to avoid shutting down the regulator of the external PHY when the MAC is suspended as it's currently done in the MAC platform code. As a first step, create independant callbacks for

[PATCH 1/3] net: stmmac: allow to split suspend/resume from init/exit callbacks

2016-06-10 Thread Vincent Palatin
to perform only a partial power-down on suspend if Wake-on-Lan is enabled but always perform the full shutdown sequence if the module is unloaded. Signed-off-by: Vincent Palatin <vpala...@chromium.org> --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 8 ++-- include/linux/st

Re: [PATCH] net: stmmac: dwmac-rk: keep PHY up for WoL

2016-06-09 Thread Vincent Palatin
On Wed, Jun 8, 2016 at 5:17 PM, Andrew Lunn <and...@lunn.ch> wrote: > On Wed, Jun 08, 2016 at 03:25:38PM -0700, Vincent Palatin wrote: >> On Tue, Jun 7, 2016 at 12:23 AM, Giuseppe CAVALLARO >> <peppe.cavall...@st.com> wrote: >> > Hello >> > &g

Re: [PATCH] net: stmmac: dwmac-rk: keep PHY up for WoL

2016-06-08 Thread Vincent Palatin
On Tue, Jun 7, 2016 at 12:23 AM, Giuseppe CAVALLARO <peppe.cavall...@st.com> wrote: > Hello > > On 6/3/2016 7:29 PM, Vincent Palatin wrote: >> >> Do not shutdown the PHY if Wake-on-Lan is enabled, else it cannot wake >> us up. >> > > I do not unders

Re: [PATCH] net: stmmac: dwmac-rk: keep PHY up for WoL

2016-06-06 Thread Vincent Palatin
On Mon, Jun 6, 2016 at 1:45 PM, Heiko Stübner <he...@sntech.de> wrote: > Hi, > > Am Freitag, 3. Juni 2016, 10:29:20 schrieb Vincent Palatin: >> Do not shutdown the PHY if Wake-on-Lan is enabled, else it cannot wake >> us up. >> >> Signed-off-by:

[PATCH] net: stmmac: dwmac-rk: keep PHY up for WoL

2016-06-03 Thread Vincent Palatin
Do not shutdown the PHY if Wake-on-Lan is enabled, else it cannot wake us up. Signed-off-by: Vincent Palatin <vpala...@chromium.org> --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-r

[PATCH] stmmac: do not sleep in atomic context for mdio_reset

2016-06-01 Thread Vincent Palatin
to protect the access to the MAC registers / DMA structures rather than the MDIO bus or the PHY (which have separate locking), so we can push the spin_lock after the stmmac_mdio_reset call. Signed-off-by: Vincent Palatin <vpala...@chromium.org> --- drivers/net/ethernet/stmicro/