[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZHoOe9K/dZuW2pOe@shell.armlinux.org.uk>
Date: Fri, 2 Jun 2023 16:44:59 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Ioana Ciornei <ioana.ciornei@....com>,
Jakub Kicinski <kuba@...nel.org>,
Madalin Bucur <madalin.bucur@....com>, netdev@...r.kernel.org,
Paolo Abeni <pabeni@...hat.com>,
Sean Anderson <sean.anderson@...o.com>
Subject: [PATCH net-next 0/8] complete Lynx mdio device handling
Hi,
This series completes the mdio device lifetime handling for Lynx PCS
users which do not create their own mdio device, but instead fetch
it using a firmware description - namely the DPAA2 and FMAN_MEMAC
drivers.
In a previous patch set, lynx_pcs_create() was modified to increase
the mdio device refcount, and lynx_pcs_destroy() to drop that
refcount.
The first two patches change these two drivers to put the reference
which they hold immediately after lynx_pcs_create(), effectively
handing the responsibility for maintaining the refcount to the Lynx
PCS driver.
A side effect of the first two patches is that lynx_get_mdio_device()
is no longer used, so patch 3 removes it.
Patch 4 adds a new helper - lynx_pcs_create_fwnode(), which creates
a Lynx PCS instance from the fwnode.
Patch 5 and 6 convert the two drivers to make use of this new helper,
which simply has to find the mdio device, and then create the Lynx
PCS from that.
With those conversions done, lynx_pcs_create() is no longer required
outside pcs-lynx.c, so remove it from public view.
Finally, in patch 8 we change lynx_pcs_create() to return an
error-pointer rather than NULL to bring consistency to the return
style, and means that we can remove the NULL-to-error-pointer
conversion from both lynx_pcs_create_fwnode() and
lynx_pcs_create_mdiodev().
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 21 ++++++-------
drivers/net/ethernet/freescale/fman/fman_memac.c | 18 +++--------
drivers/net/pcs/pcs-lynx.c | 40 ++++++++++++++----------
include/linux/pcs-lynx.h | 4 +--
4 files changed, 39 insertions(+), 44 deletions(-)
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists