Commit daf3ddbe authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

net: phy: realtek: add missing page operations

Add missing page operation callbacks to few Realtek drivers.
This also fixes a NPE after the referenced commit added code to the
RTL8211E driver that uses phy_select_page().

Fixes: f81dadbc ("net: phy: realtek: Add rtl8211e rx/tx delays config")
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Reported-by: default avatarVicente Bergas <vicencb@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9593dc35
...@@ -275,6 +275,8 @@ static struct phy_driver realtek_drvs[] = { ...@@ -275,6 +275,8 @@ static struct phy_driver realtek_drvs[] = {
.config_aneg = rtl8211_config_aneg, .config_aneg = rtl8211_config_aneg,
.read_mmd = &genphy_read_mmd_unsupported, .read_mmd = &genphy_read_mmd_unsupported,
.write_mmd = &genphy_write_mmd_unsupported, .write_mmd = &genphy_write_mmd_unsupported,
.read_page = rtl821x_read_page,
.write_page = rtl821x_write_page,
}, { }, {
PHY_ID_MATCH_EXACT(0x001cc912), PHY_ID_MATCH_EXACT(0x001cc912),
.name = "RTL8211B Gigabit Ethernet", .name = "RTL8211B Gigabit Ethernet",
...@@ -284,12 +286,16 @@ static struct phy_driver realtek_drvs[] = { ...@@ -284,12 +286,16 @@ static struct phy_driver realtek_drvs[] = {
.write_mmd = &genphy_write_mmd_unsupported, .write_mmd = &genphy_write_mmd_unsupported,
.suspend = rtl8211b_suspend, .suspend = rtl8211b_suspend,
.resume = rtl8211b_resume, .resume = rtl8211b_resume,
.read_page = rtl821x_read_page,
.write_page = rtl821x_write_page,
}, { }, {
PHY_ID_MATCH_EXACT(0x001cc913), PHY_ID_MATCH_EXACT(0x001cc913),
.name = "RTL8211C Gigabit Ethernet", .name = "RTL8211C Gigabit Ethernet",
.config_init = rtl8211c_config_init, .config_init = rtl8211c_config_init,
.read_mmd = &genphy_read_mmd_unsupported, .read_mmd = &genphy_read_mmd_unsupported,
.write_mmd = &genphy_write_mmd_unsupported, .write_mmd = &genphy_write_mmd_unsupported,
.read_page = rtl821x_read_page,
.write_page = rtl821x_write_page,
}, { }, {
PHY_ID_MATCH_EXACT(0x001cc914), PHY_ID_MATCH_EXACT(0x001cc914),
.name = "RTL8211DN Gigabit Ethernet", .name = "RTL8211DN Gigabit Ethernet",
...@@ -297,6 +303,8 @@ static struct phy_driver realtek_drvs[] = { ...@@ -297,6 +303,8 @@ static struct phy_driver realtek_drvs[] = {
.config_intr = rtl8211e_config_intr, .config_intr = rtl8211e_config_intr,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.read_page = rtl821x_read_page,
.write_page = rtl821x_write_page,
}, { }, {
PHY_ID_MATCH_EXACT(0x001cc915), PHY_ID_MATCH_EXACT(0x001cc915),
.name = "RTL8211E Gigabit Ethernet", .name = "RTL8211E Gigabit Ethernet",
...@@ -305,6 +313,8 @@ static struct phy_driver realtek_drvs[] = { ...@@ -305,6 +313,8 @@ static struct phy_driver realtek_drvs[] = {
.config_intr = &rtl8211e_config_intr, .config_intr = &rtl8211e_config_intr,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.read_page = rtl821x_read_page,
.write_page = rtl821x_write_page,
}, { }, {
PHY_ID_MATCH_EXACT(0x001cc916), PHY_ID_MATCH_EXACT(0x001cc916),
.name = "RTL8211F Gigabit Ethernet", .name = "RTL8211F Gigabit Ethernet",
...@@ -322,6 +332,8 @@ static struct phy_driver realtek_drvs[] = { ...@@ -322,6 +332,8 @@ static struct phy_driver realtek_drvs[] = {
.resume = genphy_resume, .resume = genphy_resume,
.read_page = rtl821x_read_page, .read_page = rtl821x_read_page,
.write_page = rtl821x_write_page, .write_page = rtl821x_write_page,
.read_page = rtl821x_read_page,
.write_page = rtl821x_write_page,
}, { }, {
PHY_ID_MATCH_EXACT(0x001cc961), PHY_ID_MATCH_EXACT(0x001cc961),
.name = "RTL8366RB Gigabit Ethernet", .name = "RTL8366RB Gigabit Ethernet",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment