]> git.openfabrics.org - ~emulex/infiniband.git/commit
net: stmmac: fix power management suspend-resume case
authorSrinivas Kandagatla <srinivas.kandagatla@st.com>
Thu, 16 Jan 2014 10:52:35 +0000 (10:52 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Jan 2014 23:23:43 +0000 (15:23 -0800)
commit623997fb90eab7a135c2c68a332c8450a488baca
treec7f247b8c6e631a7efdba0e4ebd3ff1948ddd5f3
parent073752aa59b3db120b2508d5bdd0598ada25fd25
net: stmmac: fix power management suspend-resume case

The driver PM resume assumes that the IP is still powered up and the
all the register contents are not disturbed when it comes out of low
power suspend case. This assumption is wrong, basically the driver
should not consider any state of registers after it comes out of low
power. However driver can keep the part of the IP powered up if its a
wake up source. But it can not assume the register state of the IP. Also
its possible that SOC glue layer can take the power off the IP if its
not wake-up source to reduce the power consumption.

This patch re initializes hardware by calling stmmac_hw_setup function in
resume case.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c