lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-id: <00c101cdf369$9c366aa0$d4a33fe0$@samsung.com>
Date:	Tue, 15 Jan 2013 13:45:16 -0800
From:	Byungho An <bh74.an@...sung.com>
To:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	'Giuseppe CAVALLARO' <peppe.cavallaro@...com>, davem@...emloft.net,
	jeffrey.t.kirsher@...el.com, kgene.kim@...sung.com
Subject: [PATCH net-next 3/3] net: stmmac: add gmac autonego set for ethtool
 support


This patch adds gmac auto-negotiation setting for ethtool.
If interface is SGMII, TBI or RTBI, gmac's auto-negotiation
enable bit is need to set.

Signed-off-by: Byungho An <bh74.an@...sung.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
index 1372ce2..457c1a4 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
@@ -335,6 +335,7 @@ stmmac_set_pauseparam(struct net_device *netdev,
 	struct phy_device *phy = priv->phydev;
 	int new_pause = FLOW_OFF;
 	int ret = 0;
+	int interface = priv->plat->interface;
 
 	spin_lock(&priv->lock);
 
@@ -348,6 +349,10 @@ stmmac_set_pauseparam(struct net_device *netdev,
 
 	if (phy->autoneg) {
 		if (netif_running(netdev))
+			if (interface == PHY_INTERFACE_MODE_SGMII ||
+			    interface == PHY_INTERFACE_MODE_TBI ||
+			    interface == PHY_INTERFACE_MODE_RTBI)
+				priv->hw->mac->set_autoneg(priv->ioaddr);
 			ret = phy_start_aneg(phy);
 	} else
 		priv->hw->mac->flow_ctrl(priv->ioaddr, phy->duplex,
-- 
1.7.10.4


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ