]> 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)
commit75fe53c939827f2d9e17f5cc639e9b5d2fe0acbd
tree8d331b1509236d5bdf74e7f500d6b6682c2ec4d7
parent3e4e1ed01711e26010c93cf31ff869d7f8c3cf8e
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