public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Conor Dooley <conor.dooley@microchip.com>
To: <daire.mcnamara@microchip.com>
Cc: <nicholas.ferre@microchip.com>, <claudiu.beznea@microchip.com>,
	<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <netdev@vger.kernel.org>
Subject: Re: [PATCH v1 1/1] net: macb: Shorten max_tx_len to 4KiB - 56 on mpfs
Date: Fri, 14 Apr 2023 11:57:40 +0100	[thread overview]
Message-ID: <20230414-rumble-posing-74b2796e309f@wendy> (raw)
In-Reply-To: <20230413180337.1399614-2-daire.mcnamara@microchip.com>

[-- Attachment #1: Type: text/plain, Size: 1793 bytes --]

On Thu, Apr 13, 2023 at 07:03:37PM +0100, daire.mcnamara@microchip.com wrote:
> From: Daire McNamara <daire.mcnamara@microchip.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@microchip.com>

I guess this also needs to be given a CC: stable, but I am not really
sure what to pick as a fix commit for this. It should go back as far as
the mpfs compatible existed (it was introduced in 6.0), but the commit
adding the compatible didn't introduce the problem.
The default GEM limit, which we used before I added reset support, is
also too large for us.

>  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 (macb_is_gem(bp)) {

I don't think this here is correct. This is being done before we have
configured the caps, so macb_is_gem() is always going to return false.

AFAICT, this should instead use hw_is_gem(bp->regs, bp->native_io).

Cheers,
Conor.

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      parent reply	other threads:[~2023-04-14 10:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13 18:03 [PATCH v1 0/1] Adjust macb max_tx_len for mpfs daire.mcnamara
2023-04-13 18:03 ` [PATCH v1 1/1] net: macb: Shorten max_tx_len to 4KiB - 56 on mpfs daire.mcnamara
2023-04-13 20:36   ` Samudrala, Sridhar
2023-04-14  8:59   ` Nicolas.Ferre
2023-04-14  9:14     ` Katakam, Harini
2023-04-14 10:57   ` Conor Dooley [this message]

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=20230414-rumble-posing-74b2796e309f@wendy \
    --to=conor.dooley@microchip.com \
    --cc=claudiu.beznea@microchip.com \
    --cc=daire.mcnamara@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nicholas.ferre@microchip.com \
    --cc=pabeni@redhat.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