netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: phy: Pass mdix ethtool setting through to phy driver
@ 2015-07-10  1:56 David Thomson
  2015-07-10  2:33 ` Florian Fainelli
  2015-07-11  6:17 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: David Thomson @ 2015-07-10  1:56 UTC (permalink / raw)
  To: f.fainelli; +Cc: netdev, David Thomson

Pass the mdix setting from ethtool down to the phy driver, to allow
driver specific implementations of manually setting the polarity.

Signed-off-by: David Thomson <david.thomson@alliedtelesis.co.nz>
---
 drivers/net/phy/phy.c | 2 ++
 include/linux/phy.h   | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index b2197b5..47693a9 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -353,6 +353,8 @@ int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd)
 
 	phydev->duplex = cmd->duplex;
 
+	phydev->mdix = cmd->eth_tp_mdix_ctrl;
+
 	/* Restart the PHY */
 	phy_start_aneg(phydev);
 
diff --git a/include/linux/phy.h b/include/linux/phy.h
index a26c3f8..e5fb1d4 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -424,6 +424,8 @@ struct phy_device {
 
 	struct net_device *attached_dev;
 
+	u8 mdix;
+
 	void (*adjust_link)(struct net_device *dev);
 };
 #define to_phy_device(d) container_of(d, struct phy_device, dev)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-11  6:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-10  1:56 [PATCH] net: phy: Pass mdix ethtool setting through to phy driver David Thomson
2015-07-10  2:33 ` Florian Fainelli
2015-07-11  6:17 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).