Linux Tegra architecture development
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>
Cc: vadik likholetov <vadikas@gmail.com>,
	netdev@vger.kernel.org, Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Thierry Reding <thierry.reding@kernel.org>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Bhadram Varka <vbhadram@nvidia.com>,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: stmmac: enable the MAC on link up at 10G on 10GBASE-R
Date: Fri, 10 Jul 2026 18:49:18 +0200	[thread overview]
Message-ID: <fa9ea443-a8b5-433f-a4b4-e5c73afc4b25@lunn.ch> (raw)
In-Reply-To: <f23adbcc-6f9f-4828-8de9-b85c4450b4b7@bootlin.com>

> I suggest that instead of this fix (that is ommiting the 5G case btw), we rewrite
> the whole ctrl assignment as :
> 
> 	switch (speed) {
> 	case SPEED_100000:
> 		ctrl |= priv->hw->link.xlgmii.speed100000;
> 		break;
> 	case SPEED_50000:
> 		ctrl |= priv->hw->link.xlgmii.speed50000;
> 		break;
> 	case SPEED_40000:
> 		ctrl |= priv->hw->link.xlgmii.speed40000;
> 		break;
> 	case SPEED_25000:
> 		ctrl |= priv->hw->link.xlgmii.speed25000;
> 		break;
> 	case SPEED_10000:
> 		ctrl |= priv->hw->link.xgmii.speed10000;
> 		break;
> 	case SPEED_5000:
> 		ctrl |= priv->hw->link.xgmii.speed5000;
> 		break;
> 	case SPEED_2500:
> 		if (interface == PHY_INTERFACE_MODE_USXGMII)
> 			ctrl |= priv->hw->link.xgmii.speed2500;
> 		else
> 			ctrl |= priv->hw->link.speed2500;
> 		break;
> 	case SPEED_1000:
> 		ctrl |= priv->hw->link.speed1000;
> 	case SPEED_100:
> 		ctrl |= priv->hw->link.speed100;
> 		break;
> 	case SPEED_10:
> 		ctrl |= priv->hw->link.speed10;
> 		break;
> 	default:
> 		return;
> 	}

The bug description makes it sound like it was not obvious to
debug. So maybe put an error message in the default: to aid the next
developer who hits it with SPEED_14000, or whatever comes next.

	  Andrew

      reply	other threads:[~2026-07-10 16:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-10 12:09 [PATCH net] net: stmmac: enable the MAC on link up at 10G on 10GBASE-R vadik likholetov
2026-07-10 13:30 ` Maxime Chevallier
2026-07-10 16:49   ` Andrew Lunn [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=fa9ea443-a8b5-433f-a4b4-e5c73afc4b25@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jonathanh@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=thierry.reding@kernel.org \
    --cc=vadikas@gmail.com \
    --cc=vbhadram@nvidia.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