netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Joakim Zhang <qiangqing.zhang@nxp.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Andrew Lunn <andrew@lunn.ch>
Cc: Greg Ungerer <gregungerer@westnet.com.au>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: fec: properly guard irq coalesce setup
Date: Mon, 5 Dec 2022 13:08:42 -0800	[thread overview]
Message-ID: <adbcc0f7-31ed-5b92-27ef-8f6f4981a3e2@gmail.com> (raw)
In-Reply-To: <20221205204604.869853-1-linux@rasmusvillemoes.dk>

On 12/5/22 12:46, Rasmus Villemoes wrote:
> Prior to the Fixes: commit, the initialization code went through the
> same fec_enet_set_coalesce() function as used by ethtool, and that
> function correctly checks whether the current variant has support for
> irq coalescing.
> 
> Now that the initialization code instead calls fec_enet_itr_coal_set()
> directly, that call needs to be guarded by a check for the
> FEC_QUIRK_HAS_COALESCE bit.
> 
> Fixes: df727d4547de (net: fec: don't reset irq coalesce settings to defaults on "ip link up")
> Reported-by: Greg Ungerer <gregungerer@westnet.com.au>
> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

> ---
>   drivers/net/ethernet/freescale/fec_main.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index 2ca2b61b451f..23e1a94b9ce4 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -1220,7 +1220,8 @@ fec_restart(struct net_device *ndev)
>   		writel(0, fep->hwp + FEC_IMASK);
>   
>   	/* Init the interrupt coalescing */
> -	fec_enet_itr_coal_set(ndev);
> +	if (fep->quirks & FEC_QUIRK_HAS_COALESCE)
> +		fec_enet_itr_coal_set(ndev);

There is already a guard in fec_enet_set_coalesce() so this makes sense, 
thanks!
-- 
Florian


  reply	other threads:[~2022-12-05 21:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-05 20:46 [PATCH] net: fec: properly guard irq coalesce setup Rasmus Villemoes
2022-12-05 21:08 ` Florian Fainelli [this message]
2022-12-06  6:16 ` Alexander Stein
2022-12-06  8:23   ` Rasmus Villemoes
2022-12-07  4:30 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=adbcc0f7-31ed-5b92-27ef-8f6f4981a3e2@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gregungerer@westnet.com.au \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=qiangqing.zhang@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).