* [PATCH] cpsw: ethtool: add support for nway reset
@ 2016-11-28 9:47 yegorslists
2016-11-28 15:25 ` Yegor Yefremov
2016-11-30 0:41 ` David Miller
0 siblings, 2 replies; 5+ messages in thread
From: yegorslists @ 2016-11-28 9:47 UTC (permalink / raw)
To: netdev; +Cc: linux-omap, grygorii.strashko, mugunthanvnm, davem,
Yegor Yefremov
From: Yegor Yefremov <yegorslists@googlemail.com>
This patch adds support for ethtool's '-r' command. Restarting
N-WAY negotiation can be useful to activate newly changed EEE
settings etc.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
drivers/net/ethernet/ti/cpsw.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index df87bff..caec6ac 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -2261,6 +2261,18 @@ static int cpsw_set_eee(struct net_device *ndev, struct ethtool_eee *edata)
return -EOPNOTSUPP;
}
+static int cpsw_nway_reset(struct net_device *ndev)
+{
+ struct cpsw_priv *priv = netdev_priv(ndev);
+ struct cpsw_common *cpsw = priv->cpsw;
+ int slave_no = cpsw_slave_index(cpsw, priv);
+
+ if (cpsw->slaves[slave_no].phy)
+ return genphy_restart_aneg(cpsw->slaves[slave_no].phy);
+ else
+ return -EOPNOTSUPP;
+}
+
static const struct ethtool_ops cpsw_ethtool_ops = {
.get_drvinfo = cpsw_get_drvinfo,
.get_msglevel = cpsw_get_msglevel,
@@ -2286,6 +2298,7 @@ static const struct ethtool_ops cpsw_ethtool_ops = {
.set_link_ksettings = cpsw_set_link_ksettings,
.get_eee = cpsw_get_eee,
.set_eee = cpsw_set_eee,
+ .nway_reset = cpsw_nway_reset,
};
static void cpsw_slave_init(struct cpsw_slave *slave, struct cpsw_common *cpsw,
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] cpsw: ethtool: add support for nway reset
2016-11-28 9:47 [PATCH] cpsw: ethtool: add support for nway reset yegorslists
@ 2016-11-28 15:25 ` Yegor Yefremov
2016-11-30 0:41 ` David Miller
1 sibling, 0 replies; 5+ messages in thread
From: Yegor Yefremov @ 2016-11-28 15:25 UTC (permalink / raw)
To: netdev
Cc: linux-omap@vger.kernel.org, Grygorii Strashko, N, Mugunthan V,
David Miller, Yegor Yefremov
On Mon, Nov 28, 2016 at 10:47 AM, <yegorslists@googlemail.com> wrote:
> From: Yegor Yefremov <yegorslists@googlemail.com>
>
> This patch adds support for ethtool's '-r' command. Restarting
> N-WAY negotiation can be useful to activate newly changed EEE
> settings etc.
>
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
This patch applies on top of
http://marc.info/?l=linux-netdev&m=148032251729251&w=2
Yegor
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cpsw: ethtool: add support for nway reset
2016-11-28 9:47 [PATCH] cpsw: ethtool: add support for nway reset yegorslists
2016-11-28 15:25 ` Yegor Yefremov
@ 2016-11-30 0:41 ` David Miller
2016-11-30 9:31 ` Yegor Yefremov
1 sibling, 1 reply; 5+ messages in thread
From: David Miller @ 2016-11-30 0:41 UTC (permalink / raw)
To: yegorslists; +Cc: netdev, linux-omap, grygorii.strashko, mugunthanvnm
From: yegorslists@googlemail.com
Date: Mon, 28 Nov 2016 10:47:52 +0100
> From: Yegor Yefremov <yegorslists@googlemail.com>
>
> This patch adds support for ethtool's '-r' command. Restarting
> N-WAY negotiation can be useful to activate newly changed EEE
> settings etc.
>
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
This doesn't apply cleanly to net-next.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cpsw: ethtool: add support for nway reset
2016-11-30 0:41 ` David Miller
@ 2016-11-30 9:31 ` Yegor Yefremov
2016-11-30 15:13 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Yegor Yefremov @ 2016-11-30 9:31 UTC (permalink / raw)
To: David Miller
Cc: netdev, linux-omap@vger.kernel.org, Grygorii Strashko,
N, Mugunthan V
Hi David,
On Wed, Nov 30, 2016 at 1:41 AM, David Miller <davem@davemloft.net> wrote:
> From: yegorslists@googlemail.com
> Date: Mon, 28 Nov 2016 10:47:52 +0100
>
>> From: Yegor Yefremov <yegorslists@googlemail.com>
>>
>> This patch adds support for ethtool's '-r' command. Restarting
>> N-WAY negotiation can be useful to activate newly changed EEE
>> settings etc.
>>
>> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
>
> This doesn't apply cleanly to net-next.
My previous patch [1] doesn't show up in net-next. This could explain,
why nway patch doesn't apply.
Should I resend them both as series?
[1] http://marc.info/?l=linux-omap&m=148036822211869&w=2
Yegor
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cpsw: ethtool: add support for nway reset
2016-11-30 9:31 ` Yegor Yefremov
@ 2016-11-30 15:13 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2016-11-30 15:13 UTC (permalink / raw)
To: yegorslists; +Cc: netdev, linux-omap, grygorii.strashko, mugunthanvnm
From: Yegor Yefremov <yegorslists@googlemail.com>
Date: Wed, 30 Nov 2016 10:31:30 +0100
> Hi David,
>
> On Wed, Nov 30, 2016 at 1:41 AM, David Miller <davem@davemloft.net> wrote:
>> From: yegorslists@googlemail.com
>> Date: Mon, 28 Nov 2016 10:47:52 +0100
>>
>>> From: Yegor Yefremov <yegorslists@googlemail.com>
>>>
>>> This patch adds support for ethtool's '-r' command. Restarting
>>> N-WAY negotiation can be useful to activate newly changed EEE
>>> settings etc.
>>>
>>> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
>>
>> This doesn't apply cleanly to net-next.
>
> My previous patch [1] doesn't show up in net-next. This could explain,
> why nway patch doesn't apply.
> Should I resend them both as series?
>
> [1] http://marc.info/?l=linux-omap&m=148036822211869&w=2
My bad, I sorted this out and applied the nway-reset patch too.
Sorry about that.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-11-30 15:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-28 9:47 [PATCH] cpsw: ethtool: add support for nway reset yegorslists
2016-11-28 15:25 ` Yegor Yefremov
2016-11-30 0:41 ` David Miller
2016-11-30 9:31 ` Yegor Yefremov
2016-11-30 15:13 ` 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).