netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Sean Anderson <sean.anderson@seco.com>
Cc: netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Claudiu Beznea <claudiu.beznea@microchip.com>,
	Parshuram Thombare <pthombar@cadence.com>,
	Antoine Tenart <atenart@kernel.org>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Milind Parab <mparab@cadence.com>
Subject: Re: [net-next PATCH v6] net: macb: Fix several edge cases in validate
Date: Mon, 15 Nov 2021 16:44:38 +0000	[thread overview]
Message-ID: <YZKOdibmws3vlMUh@shell.armlinux.org.uk> (raw)
In-Reply-To: <20211112190400.1937855-1-sean.anderson@seco.com>

On Fri, Nov 12, 2021 at 02:04:00PM -0500, Sean Anderson wrote:
> There were several cases where validate() would return bogus supported
> modes with unusual combinations of interfaces and capabilities. For
> example, if state->interface was 10GBASER and the macb had HIGH_SPEED
> and PCS but not GIGABIT MODE, then 10/100 modes would be set anyway. In
> another case, SGMII could be enabled even if the mac was not a GEM
> (despite this being checked for later on in mac_config()). These
> inconsistencies make it difficult to refactor this function cleanly.
> 
> There is still the open question of what exactly the requirements for
> SGMII and 10GBASER are, and what SGMII actually supports. If someone
> from Cadence (or anyone else with access to the GEM/MACB datasheet)
> could comment on this, it would be greatly appreciated. In particular,
> what is supported by Cadence vs. vendor extension/limitation?
> 
> To address this, the current logic is split into three parts. First, we
> determine what we support, then we eliminate unsupported interfaces, and
> finally we set the appropriate link modes. There is still some cruft
> related to NA, but this can be removed in a future patch.
> 
> Signed-off-by: Sean Anderson <sean.anderson@seco.com>

Thanks - this looks good to me.

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

I've added it to my tree as I have patches that follow on which
entirely eliminate macb_validate(), replacing it with the generic
implementation that was merged into net-next today.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

  parent reply	other threads:[~2021-11-15 16:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-12 19:04 [net-next PATCH v6] net: macb: Fix several edge cases in validate Sean Anderson
2021-11-15 13:18 ` Parshuram Raju Thombare
2021-11-15 16:44 ` Russell King (Oracle) [this message]
2021-11-16  1:35   ` Jakub Kicinski
2021-11-16 22:56   ` Sean Anderson
2021-11-17  0:22     ` Russell King (Oracle)
2021-11-18 15:34       ` Russell King (Oracle)
2021-11-18 20:20         ` Sean Anderson
2021-11-19 18:56           ` Russell King (Oracle)
2021-11-22 19:15             ` Russell King (Oracle)
2021-11-22 21:06               ` Sean Anderson

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=YZKOdibmws3vlMUh@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=atenart@kernel.org \
    --cc=claudiu.beznea@microchip.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=mparab@cadence.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=pthombar@cadence.com \
    --cc=sean.anderson@seco.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;
as well as URLs for NNTP newsgroup(s).