phy/realtek: fixup suspend failed issue
authorNick Xie <nick@khadas.com>
Sat, 13 Jul 2019 03:36:43 +0000 (11:36 +0800)
committerNick Xie <nick@khadas.com>
Sat, 13 Jul 2019 03:36:43 +0000 (11:36 +0800)
Signed-off-by: Nick Xie <nick@khadas.com>
drivers/net/phy/realtek.c

index 63fce86..68c27b5 100644 (file)
@@ -228,6 +228,14 @@ int rtl8211f_suspend(struct phy_device *phydev)
                printk("rtl8211f_suspend...\n");
                enable_wol((wol_enable << 0), false);
        } else {
+               int value;
+
+               /*pin 31 pull high*/
+               phy_write(g_phydev, RTL8211F_PAGE_SELECT, 0xd40);
+               value = phy_read(g_phydev, 0x16);
+               phy_write(g_phydev, 0x16, value | (1 << 5));
+               phy_write(g_phydev, RTL8211F_PAGE_SELECT, 0);
+
                genphy_suspend(phydev);
        }
        return 0;