netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: ethernet: mtk_eth_soc: implement .{get,set}_pauseparam ethtool ops
@ 2024-07-04 10:14 Daniel Golle
  2024-07-04 11:09 ` Michal Kubiak
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Daniel Golle @ 2024-07-04 10:14 UTC (permalink / raw)
  To: John Crispin, Felix Fietkau, Sean Wang, Mark Lee,
	Lorenzo Bianconi, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Matthias Brugger, AngeloGioacchino Del Regno,
	Russell King, netdev, linux-kernel, linux-arm-kernel,
	linux-mediatek

Implement operations to get and set flow-control link parameters.
Both is done by simply calling phylink_ethtool_{get,set}_pauseparam().
Fix whitespace in mtk_ethtool_ops while at it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 13d78d9b3197..fbf5f566fdc5 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4464,6 +4464,20 @@ static int mtk_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
 	return ret;
 }
 
+static void mtk_get_pauseparam(struct net_device *dev, struct ethtool_pauseparam *pause)
+{
+	struct mtk_mac *mac = netdev_priv(dev);
+
+	phylink_ethtool_get_pauseparam(mac->phylink, pause);
+}
+
+static int mtk_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam *pause)
+{
+	struct mtk_mac *mac = netdev_priv(dev);
+
+	return phylink_ethtool_set_pauseparam(mac->phylink, pause);
+}
+
 static u16 mtk_select_queue(struct net_device *dev, struct sk_buff *skb,
 			    struct net_device *sb_dev)
 {
@@ -4492,8 +4506,10 @@ static const struct ethtool_ops mtk_ethtool_ops = {
 	.get_strings		= mtk_get_strings,
 	.get_sset_count		= mtk_get_sset_count,
 	.get_ethtool_stats	= mtk_get_ethtool_stats,
+	.get_pauseparam		= mtk_get_pauseparam,
+	.set_pauseparam		= mtk_set_pauseparam,
 	.get_rxnfc		= mtk_get_rxnfc,
-	.set_rxnfc              = mtk_set_rxnfc,
+	.set_rxnfc		= mtk_set_rxnfc,
 };
 
 static const struct net_device_ops mtk_netdev_ops = {
-- 
2.45.2

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

* Re: [PATCH net-next] net: ethernet: mtk_eth_soc: implement .{get,set}_pauseparam ethtool ops
  2024-07-04 10:14 [PATCH net-next] net: ethernet: mtk_eth_soc: implement .{get,set}_pauseparam ethtool ops Daniel Golle
@ 2024-07-04 11:09 ` Michal Kubiak
  2024-07-04 11:40 ` Russell King (Oracle)
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Michal Kubiak @ 2024-07-04 11:09 UTC (permalink / raw)
  To: Daniel Golle
  Cc: John Crispin, Felix Fietkau, Sean Wang, Mark Lee,
	Lorenzo Bianconi, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Matthias Brugger, AngeloGioacchino Del Regno,
	Russell King, netdev, linux-kernel, linux-arm-kernel,
	linux-mediatek

On Thu, Jul 04, 2024 at 11:14:55AM +0100, Daniel Golle wrote:
> Implement operations to get and set flow-control link parameters.
> Both is done by simply calling phylink_ethtool_{get,set}_pauseparam().
> Fix whitespace in mtk_ethtool_ops while at it.
> 
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> ---
>  drivers/net/ethernet/mediatek/mtk_eth_soc.c | 18 +++++++++++++++++-
>  1 file changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> index 13d78d9b3197..fbf5f566fdc5 100644
> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> @@ -4464,6 +4464,20 @@ static int mtk_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
>  	return ret;
>  }
>  
> +static void mtk_get_pauseparam(struct net_device *dev, struct ethtool_pauseparam *pause)
> +{
> +	struct mtk_mac *mac = netdev_priv(dev);
> +
> +	phylink_ethtool_get_pauseparam(mac->phylink, pause);
> +}
> +
> +static int mtk_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam *pause)
> +{
> +	struct mtk_mac *mac = netdev_priv(dev);
> +
> +	return phylink_ethtool_set_pauseparam(mac->phylink, pause);
> +}
> +
>  static u16 mtk_select_queue(struct net_device *dev, struct sk_buff *skb,
>  			    struct net_device *sb_dev)
>  {
> @@ -4492,8 +4506,10 @@ static const struct ethtool_ops mtk_ethtool_ops = {
>  	.get_strings		= mtk_get_strings,
>  	.get_sset_count		= mtk_get_sset_count,
>  	.get_ethtool_stats	= mtk_get_ethtool_stats,
> +	.get_pauseparam		= mtk_get_pauseparam,
> +	.set_pauseparam		= mtk_set_pauseparam,
>  	.get_rxnfc		= mtk_get_rxnfc,
> -	.set_rxnfc              = mtk_set_rxnfc,
> +	.set_rxnfc		= mtk_set_rxnfc,
>  };
>  
>  static const struct net_device_ops mtk_netdev_ops = {
> -- 
> 2.45.2
> 

The patch looks correct.

Thanks,
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>

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

* Re: [PATCH net-next] net: ethernet: mtk_eth_soc: implement .{get,set}_pauseparam ethtool ops
  2024-07-04 10:14 [PATCH net-next] net: ethernet: mtk_eth_soc: implement .{get,set}_pauseparam ethtool ops Daniel Golle
  2024-07-04 11:09 ` Michal Kubiak
@ 2024-07-04 11:40 ` Russell King (Oracle)
  2024-07-04 17:51 ` Rui Salvaterra
  2024-07-06  0:50 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 5+ messages in thread
From: Russell King (Oracle) @ 2024-07-04 11:40 UTC (permalink / raw)
  To: Daniel Golle
  Cc: John Crispin, Felix Fietkau, Sean Wang, Mark Lee,
	Lorenzo Bianconi, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Matthias Brugger, AngeloGioacchino Del Regno, netdev,
	linux-kernel, linux-arm-kernel, linux-mediatek

On Thu, Jul 04, 2024 at 11:14:55AM +0100, Daniel Golle wrote:
> Implement operations to get and set flow-control link parameters.
> Both is done by simply calling phylink_ethtool_{get,set}_pauseparam().
> Fix whitespace in mtk_ethtool_ops while at it.
> 
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Thanks!

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

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

* Re: [PATCH net-next] net: ethernet: mtk_eth_soc: implement .{get,set}_pauseparam ethtool ops
  2024-07-04 10:14 [PATCH net-next] net: ethernet: mtk_eth_soc: implement .{get,set}_pauseparam ethtool ops Daniel Golle
  2024-07-04 11:09 ` Michal Kubiak
  2024-07-04 11:40 ` Russell King (Oracle)
@ 2024-07-04 17:51 ` Rui Salvaterra
  2024-07-06  0:50 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 5+ messages in thread
From: Rui Salvaterra @ 2024-07-04 17:51 UTC (permalink / raw)
  To: Daniel Golle
  Cc: John Crispin, Felix Fietkau, Sean Wang, Mark Lee,
	Lorenzo Bianconi, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Matthias Brugger, AngeloGioacchino Del Regno,
	Russell King, netdev, linux-kernel, linux-arm-kernel,
	linux-mediatek

Hi, Daniel,


On Thu, 4 Jul 2024 at 11:14, Daniel Golle <daniel@makrotopia.org> wrote:
>
> Implement operations to get and set flow-control link parameters.
> Both is done by simply calling phylink_ethtool_{get,set}_pauseparam().
> Fix whitespace in mtk_ethtool_ops while at it.

[patch snipped]

Working flawlessly on my Redmi AC2100. This is thus

Tested-by: Rui Salvaterra <rsalvaterra@gmail.com>


Thanks,

Rui

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

* Re: [PATCH net-next] net: ethernet: mtk_eth_soc: implement .{get,set}_pauseparam ethtool ops
  2024-07-04 10:14 [PATCH net-next] net: ethernet: mtk_eth_soc: implement .{get,set}_pauseparam ethtool ops Daniel Golle
                   ` (2 preceding siblings ...)
  2024-07-04 17:51 ` Rui Salvaterra
@ 2024-07-06  0:50 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-07-06  0:50 UTC (permalink / raw)
  To: Daniel Golle
  Cc: john, nbd, sean.wang, Mark-MC.Lee, lorenzo, davem, edumazet, kuba,
	pabeni, matthias.bgg, angelogioacchino.delregno, linux, netdev,
	linux-kernel, linux-arm-kernel, linux-mediatek

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 4 Jul 2024 11:14:55 +0100 you wrote:
> Implement operations to get and set flow-control link parameters.
> Both is done by simply calling phylink_ethtool_{get,set}_pauseparam().
> Fix whitespace in mtk_ethtool_ops while at it.
> 
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> ---
>  drivers/net/ethernet/mediatek/mtk_eth_soc.c | 18 +++++++++++++++++-
>  1 file changed, 17 insertions(+), 1 deletion(-)

Here is the summary with links:
  - [net-next] net: ethernet: mtk_eth_soc: implement .{get,set}_pauseparam ethtool ops
    https://git.kernel.org/netdev/net-next/c/064fbc4e9b5a

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2024-07-06  0:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-04 10:14 [PATCH net-next] net: ethernet: mtk_eth_soc: implement .{get,set}_pauseparam ethtool ops Daniel Golle
2024-07-04 11:09 ` Michal Kubiak
2024-07-04 11:40 ` Russell King (Oracle)
2024-07-04 17:51 ` Rui Salvaterra
2024-07-06  0:50 ` patchwork-bot+netdevbpf

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).