提交 634ec36c 编写于 作者: D David Thomson 提交者: David S. Miller

net: phy: Pass mdix ethtool setting through to phy driver

Pass the mdix setting from ethtool down to the phy driver, to allow
driver specific implementations of manually setting the polarity.
Signed-off-by: NDavid Thomson <david.thomson@alliedtelesis.co.nz>
Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a4e2405c
...@@ -353,6 +353,8 @@ int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd) ...@@ -353,6 +353,8 @@ int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd)
phydev->duplex = cmd->duplex; phydev->duplex = cmd->duplex;
phydev->mdix = cmd->eth_tp_mdix_ctrl;
/* Restart the PHY */ /* Restart the PHY */
phy_start_aneg(phydev); phy_start_aneg(phydev);
......
...@@ -424,6 +424,8 @@ struct phy_device { ...@@ -424,6 +424,8 @@ struct phy_device {
struct net_device *attached_dev; struct net_device *attached_dev;
u8 mdix;
void (*adjust_link)(struct net_device *dev); void (*adjust_link)(struct net_device *dev);
}; };
#define to_phy_device(d) container_of(d, struct phy_device, dev) #define to_phy_device(d) container_of(d, struct phy_device, dev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册