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

net: phy: Export gen10g_* functions

In order to remove a fair amount of duplication in the different 10G PHY
drivers, export all gen10g_* functions to be able to make use of those.
While we are at it, rename gen10g_soft_reset() to gen10g_no_soft_reset()
to illustrate what it does.

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

authored by

Florian Fainelli and committed by
David S. Miller
e8a714e0 6ed33d3a

+21 -7
+13 -7
drivers/net/phy/phy-c45.c
··· 268 268 269 269 /* The gen10g_* functions are the old Clause 45 stub */ 270 270 271 - static int gen10g_config_aneg(struct phy_device *phydev) 271 + int gen10g_config_aneg(struct phy_device *phydev) 272 272 { 273 273 return 0; 274 274 } 275 + EXPORT_SYMBOL_GPL(gen10g_config_aneg); 275 276 276 - static int gen10g_read_status(struct phy_device *phydev) 277 + int gen10g_read_status(struct phy_device *phydev) 277 278 { 278 279 u32 mmd_mask = phydev->c45_ids.devices_in_package; 279 280 int ret; ··· 292 291 293 292 return 0; 294 293 } 294 + EXPORT_SYMBOL_GPL(gen10g_read_status); 295 295 296 - static int gen10g_soft_reset(struct phy_device *phydev) 296 + int gen10g_no_soft_reset(struct phy_device *phydev) 297 297 { 298 298 /* Do nothing for now */ 299 299 return 0; 300 300 } 301 + EXPORT_SYMBOL_GPL(gen10g_no_soft_reset); 301 302 302 - static int gen10g_config_init(struct phy_device *phydev) 303 + int gen10g_config_init(struct phy_device *phydev) 303 304 { 304 305 /* Temporarily just say we support everything */ 305 306 phydev->supported = SUPPORTED_10000baseT_Full; ··· 309 306 310 307 return 0; 311 308 } 309 + EXPORT_SYMBOL_GPL(gen10g_config_init); 312 310 313 - static int gen10g_suspend(struct phy_device *phydev) 311 + int gen10g_suspend(struct phy_device *phydev) 314 312 { 315 313 return 0; 316 314 } 315 + EXPORT_SYMBOL_GPL(gen10g_suspend); 317 316 318 - static int gen10g_resume(struct phy_device *phydev) 317 + int gen10g_resume(struct phy_device *phydev) 319 318 { 320 319 return 0; 321 320 } 321 + EXPORT_SYMBOL_GPL(gen10g_resume); 322 322 323 323 struct phy_driver genphy_10g_driver = { 324 324 .phy_id = 0xffffffff, 325 325 .phy_id_mask = 0xffffffff, 326 326 .name = "Generic 10G PHY", 327 - .soft_reset = gen10g_soft_reset, 327 + .soft_reset = gen10g_no_soft_reset, 328 328 .config_init = gen10g_config_init, 329 329 .features = 0, 330 330 .config_aneg = gen10g_config_aneg,
+8
include/linux/phy.h
··· 994 994 int genphy_c45_an_disable_aneg(struct phy_device *phydev); 995 995 int genphy_c45_read_mdix(struct phy_device *phydev); 996 996 997 + /* The gen10g_* functions are the old Clause 45 stub */ 998 + int gen10g_config_aneg(struct phy_device *phydev); 999 + int gen10g_read_status(struct phy_device *phydev); 1000 + int gen10g_no_soft_reset(struct phy_device *phydev); 1001 + int gen10g_config_init(struct phy_device *phydev); 1002 + int gen10g_suspend(struct phy_device *phydev); 1003 + int gen10g_resume(struct phy_device *phydev); 1004 + 997 1005 static inline int phy_read_status(struct phy_device *phydev) 998 1006 { 999 1007 if (!phydev->drv)