aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2018-03-22 01:44:15 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2018-03-22 01:44:15 -0400
commit53736c2f3bfe7230758adc9a70238fb789ef8468 (patch)
treef4b40a32246d8e1a5fb4a58846c52b5eefcf0f8e
parent2fc9913a485c37429f9c2b55a870d91dc6fa0031 (diff)
parent12f3957167b0001adc7c2c8b3d45127aafc37e6b (diff)
downloadlinux-yocto-v4.15/base.tar.gz
linux-yocto-v4.15/base.tar.bz2
linux-yocto-v4.15/base.zip
Merge branch 'v4.15/standard/base' into v4.15/basev4.15/base
-rw-r--r--drivers/net/phy/phy_device.c17
-rw-r--r--drivers/net/phy/realtek.c2
-rw-r--r--include/linux/phy.h4
3 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index b15b31ca2618..6893dd2a681d 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1626,6 +1626,23 @@ int genphy_config_init(struct phy_device *phydev)
}
EXPORT_SYMBOL(genphy_config_init);
+/* This is used for the phy device which doesn't support the MMD extended
+ * register access, but it does have side effect when we are trying to access
+ * the MMD register via indirect method.
+ */
+int genphy_read_mmd_unsupported(struct phy_device *phdev, int devad, u16 regnum)
+{
+ return -EOPNOTSUPP;
+}
+EXPORT_SYMBOL(genphy_read_mmd_unsupported);
+
+int genphy_write_mmd_unsupported(struct phy_device *phdev, int devnum,
+ u16 regnum, u16 val)
+{
+ return -EOPNOTSUPP;
+}
+EXPORT_SYMBOL(genphy_write_mmd_unsupported);
+
int genphy_suspend(struct phy_device *phydev)
{
int value;
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
index eda0a6e86918..68b4a7c61bab 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -183,6 +183,8 @@ static struct phy_driver realtek_drvs[] = {
.read_status = &genphy_read_status,
.ack_interrupt = &rtl821x_ack_interrupt,
.config_intr = &rtl8211b_config_intr,
+ .read_mmd = &genphy_read_mmd_unsupported,
+ .write_mmd = &genphy_write_mmd_unsupported,
}, {
.phy_id = 0x001cc914,
.name = "RTL8211DN Gigabit Ethernet",
diff --git a/include/linux/phy.h b/include/linux/phy.h
index dc82a07cb4fd..e6d27bc80146 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -880,6 +880,10 @@ static inline int genphy_no_soft_reset(struct phy_device *phydev)
{
return 0;
}
+int genphy_read_mmd_unsupported(struct phy_device *phdev, int devad,
+ u16 regnum);
+int genphy_write_mmd_unsupported(struct phy_device *phdev, int devnum,
+ u16 regnum, u16 val);
/* Clause 45 PHY */
int genphy_c45_restart_aneg(struct phy_device *phydev);