Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: phy: cortina: Utilize generic functions

cortina_soft_reset() does the same thing as gen10g_soft_reset(), and
cortina_config_aneg() is actually doing what gen10g_config_init() does
for 10G capable PHYs.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

authored by

Florian Fainelli and committed by
David S. Miller
0adfdb66 aebc78a4

+3 -15
+3 -15
drivers/net/phy/cortina.c
··· 30 30 MII_ADDR_C45 | regnum); 31 31 } 32 32 33 - static int cortina_config_aneg(struct phy_device *phydev) 34 - { 35 - phydev->supported = SUPPORTED_10000baseT_Full; 36 - phydev->advertising = SUPPORTED_10000baseT_Full; 37 - 38 - return 0; 39 - } 40 - 41 33 static int cortina_read_status(struct phy_device *phydev) 42 34 { 43 35 int gpio_int_status, ret = 0; ··· 51 59 52 60 err: 53 61 return ret; 54 - } 55 - 56 - static int cortina_soft_reset(struct phy_device *phydev) 57 - { 58 - return 0; 59 62 } 60 63 61 64 static int cortina_probe(struct phy_device *phydev) ··· 88 101 .phy_id = PHY_ID_CS4340, 89 102 .phy_id_mask = 0xffffffff, 90 103 .name = "Cortina CS4340", 91 - .config_aneg = cortina_config_aneg, 104 + .config_init = gen10g_config_init, 105 + .config_aneg = gen10g_config_aneg, 92 106 .read_status = cortina_read_status, 93 - .soft_reset = cortina_soft_reset, 107 + .soft_reset = gen10g_no_soft_reset, 94 108 .probe = cortina_probe, 95 109 }, 96 110 };