[PATCH 00/15] net: ftgmac100: Various probe cleanups

Jacky Chou posted 15 patches 1 month ago
There is a newer version of this series
drivers/net/ethernet/faraday/ftgmac100.c | 302 +++++++++++++++++--------------
1 file changed, 169 insertions(+), 133 deletions(-)
[PATCH 00/15] net: ftgmac100: Various probe cleanups
Posted by Jacky Chou 1 month ago
The probe function of the ftgmac100 is rather complex, due to the way
it has evolved over time, dealing with poor DT descriptions, and new
variants of the MAC.

Make use of DT match data to identify the MAC variant, rather than
looking at the compatible string all the time.

Make use of devm_ calls to simplify cleanup. This indirectly fixes
inconsistent goto label names.

Always probe the MDIO bus, when it exists. This simplifies the logic a
bit.

Move code into helpers to simply probe.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
---
Andrew Lunn (15):
      net: ftgmac100: List all compatibles
      net: ftgmac100: Add match data containing MAC ID
      net: ftgmac100: Replace all of_device_is_compatible()
      net: ftgmac100: Use devm_alloc_etherdev()
      net: ftgmac100: Use devm_request_memory_region/devm_ioremap
      net: ftgmac100: Use devm_clk_get_enabled
      net: ftgmac100: Simplify error handling for ftgmac100_initial_mac
      net: ftgmac100: Move NCSI probe code into a helper
      net: ftgmac100: Always register the MDIO bus when it exists
      net: ftgmac100: Simplify legacy MDIO setup
      net: ftgmac100: Move DT probe into a helper
      net: ftgmac100: Remove redundant PHY_POLL
      net: ftgmac100: Simplify error handling for ftgmac100_setup_mdio
      net: ftgmac100: Simplify condition on HW arbitration
      net: ftgmac100: Fix wrong netif_napi_del in release

 drivers/net/ethernet/faraday/ftgmac100.c | 302 +++++++++++++++++--------------
 1 file changed, 169 insertions(+), 133 deletions(-)
---
base-commit: c303e8b86d9dbd6868f5216272973292f7f3b7f1
change-id: 20251208-ftgmac-cleanup-20b223bf4681

Best regards,
-- 
Jacky Chou <jacky_chou@aspeedtech.com>
Re: [PATCH 00/15] net: ftgmac100: Various probe cleanups
Posted by Simon Horman 1 month ago
On Mon, Jan 05, 2026 at 03:08:46PM +0800, Jacky Chou wrote:
> The probe function of the ftgmac100 is rather complex, due to the way
> it has evolved over time, dealing with poor DT descriptions, and new
> variants of the MAC.
> 
> Make use of DT match data to identify the MAC variant, rather than
> looking at the compatible string all the time.
> 
> Make use of devm_ calls to simplify cleanup. This indirectly fixes
> inconsistent goto label names.
> 
> Always probe the MDIO bus, when it exists. This simplifies the logic a
> bit.
> 
> Move code into helpers to simply probe.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>

Hi,

I'm slightly unclear on the providence of this patchset.
But overall it looks good to me. And I particularly like
how it has been split up into bite-sized chunks.

I don't see anything that should block progress, but I do have a few
minor nits that I'll raise just in case there is a v2 for other reasons.

The first nit is that the patch-set should be targeted at net-next,
by including inet-next in the Subjects, like this:

  [PATCH net-net 00/15] ...

The other minor nits are patch-specifically, so I'll respond to those patches
accordingly.

Again, overall this looks good to me.
So for the series:

Reviewed-by: Simon Horman <horms@kernel.org>
Re: [PATCH 00/15] net: ftgmac100: Various probe cleanups
Posted by Andrew Lunn 1 month ago
> I'm slightly unclear on the providence of this patchset.

This driver needs a cleanup before aspeed fix up the mess they made
with RGMII delays, which is going to make the probe code even more
complex. In a fit of boredom on a train, i made these cleanup
patches. But i don't have the hardware, so passed them onto aspeed for
testing and bug fixing. I said they could submit them, appending their
own Signed-off-by:

	Andrew
Re: [PATCH 00/15] net: ftgmac100: Various probe cleanups
Posted by Simon Horman 3 weeks, 5 days ago
On Wed, Jan 07, 2026 at 05:09:00PM +0100, Andrew Lunn wrote:
> > I'm slightly unclear on the providence of this patchset.
> 
> This driver needs a cleanup before aspeed fix up the mess they made
> with RGMII delays, which is going to make the probe code even more
> complex. In a fit of boredom on a train, i made these cleanup
> patches. But i don't have the hardware, so passed them onto aspeed for
> testing and bug fixing. I said they could submit them, appending their
> own Signed-off-by:

Thanks Andrew,

That satisfies my curiosity.
All good from my side.