]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: Extract genphy_c45_pma_read_abilities from marvell10g
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Mon, 11 Feb 2019 14:25:28 +0000 (15:25 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Feb 2019 00:17:53 +0000 (19:17 -0500)
commit46026ef0bc4bfab67d4216a4ec1d56ecdfc60ae2
tree8d331b1509236d5bdf74e7f500d6b6682c2ec4d7
parent658c45a5222c9a3e0e8578c97bdddaf5e3f43cbf
net: phy: Extract genphy_c45_pma_read_abilities from marvell10g

Marvell 10G PHY driver has a generic way of initializing the supported
link modes by reading the PHY's C45 PMA abilities. This can be made
generic, since these registers are part of the 802.3 specifications.

This commit extracts the config_init link_mode initialization code from
marvell10g and uses it to introduce the genphy_c45_pma_read_abilities
function.

Only PMA modes are read, it's still up to the caller to set the Pause
parameters.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/marvell10g.c
drivers/net/phy/phy-c45.c
include/linux/phy.h