[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d69527df-cbd8-3575-db70-e5f1166a5060@gmail.com>
Date: Mon, 27 May 2019 18:51:26 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Ioana Ciornei <ioana.ciornei@....com>, linux@...linux.org.uk,
andrew@...n.ch, hkallweit1@...il.com,
maxime.chevallier@...tlin.com, olteanv@...il.com,
thomas.petazzoni@...tlin.com, davem@...emloft.net,
vivien.didelot@...il.com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH 06/11] net: phylink: Add struct phylink_config to PHYLINK
API
On 5/27/2019 2:22 PM, Ioana Ciornei wrote:
> The phylink_config structure will encapsulate a pointer to a struct
> device and the operation type requested for this instance of PHYLINK.
> This patch does not make any functional changes, it just transitions the
> PHYLINK internals and all its users to the new API.
>
> A pointer to a phylink_config structure will be passed to
> phylink_create() instead of the net_device directly. Also, the same
> phylink_config pointer will be passed back to all phylink_mac_ops
> callbacks instead of the net_device. Using this mechanism, a PHYLINK
> user can get the original net_device using a structure such as
> 'to_net_dev(config->dev)' or directly the structure containing the
> phylink_config using a container_of call.
>
> At the moment, only the PHYLINK_NETDEV is defined as a valid operation
> type for PHYLINK. In this mode, a valid reference to a struct device
> linked to the original net_device should be passed to PHYLINK through
> the phylink_config structure.
>
> This API changes is mainly driven by the necessity of adding a new
> operation type in PHYLINK that disconnects the phy_device from the
> net_device and also works when the net_device is lacking.
>
> Signed-off-by: Ioana Ciornei <ioana.ciornei@....com>
> Signed-off-by: Vladimir Oltean <olteanv@...il.com>
The PHYLINK and DSA portions look good to me, and this is a lot nicer
than the notifier, thanks for coming up with that scheme:
Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
--
Florian
Powered by blists - more mailing lists