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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 18 Apr 2023 16:28:25 +0200
From:   Simon Horman <simon.horman@...igine.com>
To:     daire.mcnamara@...rochip.com
Cc:     nicholas.ferre@...rochip.com, claudiu.beznea@...rochip.com,
        davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com, netdev@...r.kernel.org,
        conor.dooley@...rochip.com
Subject: Re: [PATCH v2 1/1] net: macb: Shorten max_tx_len to 4KiB - 56 on mpfs

On Mon, Apr 17, 2023 at 03:00:41PM +0100, daire.mcnamara@...rochip.com wrote:
> From: Daire McNamara <daire.mcnamara@...rochip.com>
> 
> On mpfs, with SRAM configured for 4 queues, setting max_tx_len
> to GEM_TX_MAX_LEN=0x3f0 results multiple AMBA errors.
> Setting max_tx_len to (4KiB - 56) removes those errors.
> 
> The details are described in erratum 1686 by Cadence
> 
> The max jumbo frame size is also reduced for mpfs to (4KiB - 56).
> 
> Signed-off-by: Daire McNamara <daire.mcnamara@...rochip.com>

...

>  static const struct macb_config sama7g5_gem_config = {
> @@ -4986,8 +4985,17 @@ static int macb_probe(struct platform_device *pdev)
>  	bp->tx_clk = tx_clk;
>  	bp->rx_clk = rx_clk;
>  	bp->tsu_clk = tsu_clk;
> -	if (macb_config)
> +	if (macb_config) {
> +		if (hw_is_gem(bp->regs, bp->native_io)) {
> +			if (macb_config->max_tx_length)
> +				bp->max_tx_length = macb_config->max_tx_length;
> +			else
> +				bp->max_tx_length = GEM_MAX_TX_LEN;
> +		} else {
> +			bp->max_tx_length = MACB_MAX_TX_LEN;
> +		}

Hi Daire,

no need to refresh the patch on my account.
But can the above be simplified as:

               if (macb_is_gem(bp) && hw_is_gem(bp->regs, bp->native_io))
                       bp->max_tx_length = macb_config->max_tx_length;
               else
                       bp->max_tx_length = MACB_MAX_TX_LEN;

>  		bp->jumbo_max_len = macb_config->jumbo_max_len;
> +	}
>  
>  	bp->wol = 0;
>  	if (of_property_read_bool(np, "magic-packet"))
> -- 
> 2.25.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ