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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <adbcc0f7-31ed-5b92-27ef-8f6f4981a3e2@gmail.com>
Date:   Mon, 5 Dec 2022 13:08:42 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Rasmus Villemoes <linux@...musvillemoes.dk>,
        Joakim Zhang <qiangqing.zhang@....com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, Andrew Lunn <andrew@...n.ch>
Cc:     Greg Ungerer <gregungerer@...tnet.com.au>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: fec: properly guard irq coalesce setup

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@...tnet.com.au>
> Signed-off-by: Rasmus Villemoes <linux@...musvillemoes.dk>

Reviewed-by: Florian Fainelli <f.fainelli@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ