* [PATCH v2 3/3] net: stmmac: add gmac autonego set for ethtool support
@ 2013-01-08 23:32 Byungho An
2013-01-10 8:02 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Byungho An @ 2013-01-08 23:32 UTC (permalink / raw)
To: netdev, linux-kernel
Cc: 'Giuseppe CAVALLARO', davem, jeffrey.t.kirsher, kgene.kim
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@samsung.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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 3/3] net: stmmac: add gmac autonego set for ethtool support
2013-01-08 23:32 [PATCH v2 3/3] net: stmmac: add gmac autonego set for ethtool support Byungho An
@ 2013-01-10 8:02 ` David Miller
2013-01-10 23:54 ` Byungho An
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2013-01-10 8:02 UTC (permalink / raw)
To: bh74.an; +Cc: netdev, linux-kernel, peppe.cavallaro, jeffrey.t.kirsher,
kgene.kim
From: Byungho An <bh74.an@samsung.com>
Date: Tue, 08 Jan 2013 15:32:02 -0800
> @@ -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);
This is improperly indented and formatted, use this style:
if (A ||
B ||
C)
statement();
I can tell what you're trying to do, you are just trying to use TAB
characters exclusivly to indent because you are lazy. But that's not
the objective here.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH v2 3/3] net: stmmac: add gmac autonego set for ethtool support
2013-01-10 8:02 ` David Miller
@ 2013-01-10 23:54 ` Byungho An
2013-01-10 23:57 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Byungho An @ 2013-01-10 23:54 UTC (permalink / raw)
To: 'David Miller'
Cc: netdev, linux-kernel, peppe.cavallaro, jeffrey.t.kirsher,
kgene.kim
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@samsung.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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 3/3] net: stmmac: add gmac autonego set for ethtool support
2013-01-10 23:54 ` Byungho An
@ 2013-01-10 23:57 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2013-01-10 23:57 UTC (permalink / raw)
To: bh74.an; +Cc: netdev, linux-kernel, peppe.cavallaro, jeffrey.t.kirsher,
kgene.kim
From: Byungho An <bh74.an@samsung.com>
Date: Thu, 10 Jan 2013 15:54:24 -0800
> @@ -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);
This is still not properly formatted.
You also didn't submit this properly. Never use email thread replies
to submit new versions of patches.
Always use fresh, new, mailing list postings to submit new versions
of patches.
Also, when one patch has to change in a series, you must reubmit
the entire set of patches even if some of them have no changes
at all. I do not see patch #2 here at all.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-01-10 23:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-08 23:32 [PATCH v2 3/3] net: stmmac: add gmac autonego set for ethtool support Byungho An
2013-01-10 8:02 ` David Miller
2013-01-10 23:54 ` Byungho An
2013-01-10 23:57 ` 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).