summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/microchip/ksz8795.c
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2021-06-14 07:31:21 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-14 22:54:43 +0300
commit52939393bd682248a415de4c0439280aafaccd66 (patch)
tree19f6fce2d38b301313af8c3f8a40a25525237c3f /drivers/net/dsa/microchip/ksz8795.c
parent0033f890f95ba52dd7bf154d62aa9a5317456401 (diff)
downloadlinux-52939393bd682248a415de4c0439280aafaccd66.tar.xz
net: phy/dsa micrel/ksz886x add MDI-X support
Add support for MDI-X status and configuration Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz8795.c')
-rw-r--r--drivers/net/dsa/microchip/ksz8795.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microchip/ksz8795.c
index cfa2a5000cd3..690304c87b02 100644
--- a/drivers/net/dsa/microchip/ksz8795.c
+++ b/drivers/net/dsa/microchip/ksz8795.c
@@ -816,6 +816,11 @@ static void ksz8_r_phy(struct ksz_device *dev, u16 phy, u16 reg, u16 *val)
if (data & ~LPA_SLCT)
data |= LPA_LPACK;
break;
+ case PHY_REG_PHY_CTRL:
+ ksz_pread8(dev, p, regs[P_LINK_STATUS], &link);
+ if (link & PORT_MDIX_STATUS)
+ data |= KSZ886X_CTRL_MDIX_STAT;
+ break;
default:
processed = false;
break;