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: <f777c7d5-346d-42d3-b328-45320b22aacc@microchip.com>
Date: Thu, 30 Oct 2025 15:32:35 +0100
From: Nicolas Ferre <nicolas.ferre@...rochip.com>
To: Théo Lebrun <theo.lebrun@...tlin.com>, Andrew Lunn
	<andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>, Eric
 Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
	<pabeni@...hat.com>, Rob Herring <robh@...nel.org>, Krzysztof Kozlowski
	<krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, Claudiu Beznea
	<claudiu.beznea@...on.dev>, Russell King <linux@...linux.org.uk>
CC: <netdev@...r.kernel.org>, <devicetree@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, Benoît Monin
	<benoit.monin@...tlin.com>, Grégory Clement
	<gregory.clement@...tlin.com>, Maxime Chevallier
	<maxime.chevallier@...tlin.com>, Tawfik Bayouk <tawfik.bayouk@...ileye.com>,
	Thomas Petazzoni <thomas.petazzoni@...tlin.com>, Vladimir Kondratiev
	<vladimir.kondratiev@...ileye.com>, Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH net-next v3 3/5] net: macb: add no LSO capability
 (MACB_CAPS_NO_LSO)

On 23/10/2025 at 18:22, Théo Lebrun wrote:
> LSO is runtime-detected using the PBUF_LSO field inside register DCFG6.
> Allow disabling that feature if it is broken by using bp->caps coming
> from match data.
> 
> Reviewed-by: Andrew Lunn <andrew@...n.ch>
> Signed-off-by: Théo Lebrun <theo.lebrun@...tlin.com>

Even if already applied:
Acked-by: Nicolas Ferre <nicolas.ferre@...rochip.com>

> ---
>   drivers/net/ethernet/cadence/macb.h      | 1 +
>   drivers/net/ethernet/cadence/macb_main.c | 7 +++++--
>   2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cadence/macb.h
> index 93e8dd092313..05bfa9bd4782 100644
> --- a/drivers/net/ethernet/cadence/macb.h
> +++ b/drivers/net/ethernet/cadence/macb.h
> @@ -778,6 +778,7 @@
>   #define MACB_CAPS_DMA_64B                      BIT(21)
>   #define MACB_CAPS_DMA_PTP                      BIT(22)
>   #define MACB_CAPS_RSC                          BIT(23)
> +#define MACB_CAPS_NO_LSO                       BIT(24)
> 
>   /* LSO settings */
>   #define MACB_LSO_UFO_ENABLE                    0x01
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index be3d0c2313a1..8b688a6cb2f9 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -4564,8 +4564,11 @@ static int macb_init(struct platform_device *pdev)
>          /* Set features */
>          dev->hw_features = NETIF_F_SG;
> 
> -       /* Check LSO capability */
> -       if (GEM_BFEXT(PBUF_LSO, gem_readl(bp, DCFG6)))
> +       /* Check LSO capability; runtime detection can be overridden by a cap
> +        * flag if the hardware is known to be buggy
> +        */
> +       if (!(bp->caps & MACB_CAPS_NO_LSO) &&
> +           GEM_BFEXT(PBUF_LSO, gem_readl(bp, DCFG6)))
>                  dev->hw_features |= MACB_NETIF_LSO;
> 
>          /* Checksum offload is only available on gem with packet buffer */
> 
> --
> 2.51.1
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ