]> git.baikalelectronics.ru Git - kernel.git/commit
netdev/phy/icplus: Correct broken phy_init code
authorDavid McKay <david.mckay@st.com>
Tue, 21 Feb 2012 21:24:57 +0000 (21:24 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Feb 2012 22:14:26 +0000 (17:14 -0500)
commit452d9ec98175cbabb319cc6a27020d9691d12988
tree486ef40d3989e1abcaabe32666dc0615bd90740e
parente533de71c18a6b593492aab388ffc771ee1457fe
netdev/phy/icplus: Correct broken phy_init code

The code for ip1001_config_init() was totally broken if you were not
using RGMII. Instead of returning an error code or zero it actually
returned the value in the IP1001_SPEC_CTRL_STATUS_2 register. It was
also trying to set the IP1001_APS_ON bit , but never actually wrote
back the register.

The error checking was also incorrect in both this function and the
reset function, so this patch fixes that up in a consistent fashion.

Signed-off-by: David McKay <david.mckay@st.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/icplus.c