]> git.baikalelectronics.ru Git - kernel.git/commit
phy: marvell: Fix and unify reg-init behavior
authorClemens Gruber <clemens.gruber@pqgruber.com>
Mon, 15 Feb 2016 22:46:45 +0000 (23:46 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Feb 2016 21:20:40 +0000 (16:20 -0500)
commit2d08e22ab0658f8e544c6ee97242f7ceb294988d
tree9b00795238d8390e4ec3d0aef554de35f9790c9e
parent6f5f70e43740ad75ebaa966a7c30aa44300d3e54
phy: marvell: Fix and unify reg-init behavior

For the Marvell 88E1510, marvell_of_reg_init was called too late, in the
config_aneg function.
Since commit 937e6b228025 ("net: phy: turn carrier off on phy attach"),
this lead to the link not coming up at boot anymore, due to the phy
state machine being stuck at waiting for interrupts (off by default on
the 88E1510).
For seven other Marvell PHYs, marvell_of_reg_init was not called at all.

Add a generic marvell_config_init function, which in turn calls
marvell_of_reg_init.
PHYs, which already have a specific config_init function with a call to
marvell_of_reg_init, are left untouched. The generic marvell_config_init
function is called for all the others, to get consistent behavior across
all Marvell PHYs.

Fixes: 937e6b228025 ("net: phy: turn carrier off on phy attach")
Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/marvell.c