net: phy: implements probe for Cortina phy
authorShaohui Xie <Shaohui.Xie@nxp.com>
Thu, 28 Jan 2016 07:56:36 +0000 (15:56 +0800)
committerJoe Hershberger <joe.hershberger@ni.com>
Thu, 28 Jan 2016 19:20:31 +0000 (13:20 -0600)
Cortina phy cannot support soft reset, this commit implements probe
for Cortina PHY to tell phylib to skip phy soft reset by setting
PHY_FLAG_BROKEN_RESET in flags.

Signed-off-by: Shaohui Xie <Shaohui.Xie@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/phy/cortina.c

index 3a2b3bba995282ebd8a96fb61d9ad742df5c246b..ba1157fd1089ca38787671fda0ee405058646232 100644 (file)
@@ -256,6 +256,12 @@ int cs4340_config(struct phy_device *phydev)
        return 0;
 }
 
+int cs4340_probe(struct phy_device *phydev)
+{
+       phydev->flags = PHY_FLAG_BROKEN_RESET;
+       return 0;
+}
+
 int cs4340_startup(struct phy_device *phydev)
 {
        phydev->link = 1;
@@ -275,6 +281,7 @@ struct phy_driver cs4340_driver = {
                 MDIO_DEVS_PHYXS | MDIO_DEVS_AN |
                 MDIO_DEVS_VEND1 | MDIO_DEVS_VEND2),
        .config = &cs4340_config,
+       .probe  = &cs4340_probe,
        .startup = &cs4340_startup,
        .shutdown = &gen10g_shutdown,
 };