[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZZ6LGiSde4hHM+6j@shell.armlinux.org.uk>
Date: Wed, 10 Jan 2024 12:18:34 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Luo Jie <quic_luoj@...cinc.com>
Cc: agross@...nel.org, andersson@...nel.org, konrad.dybcio@...aro.org,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
corbet@....net, catalin.marinas@....com, will@...nel.org,
p.zabel@...gutronix.de, shannon.nelson@....com,
anthony.l.nguyen@...el.com, jasowang@...hat.com,
brett.creeley@....com, rrameshbabu@...dia.com,
joshua.a.hay@...el.com, arnd@...db.de, geert+renesas@...der.be,
neil.armstrong@...aro.org, dmitry.baryshkov@...aro.org,
nfraprado@...labora.com, m.szyprowski@...sung.com, u-kumar1@...com,
jacob.e.keller@...el.com, andrew@...n.ch, netdev@...r.kernel.org,
linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, ryazanov.s.a@...il.com,
ansuelsmth@...il.com, quic_kkumarcs@...cinc.com,
quic_suruchia@...cinc.com, quic_soni@...cinc.com,
quic_pavir@...cinc.com, quic_souravp@...cinc.com,
quic_linchen@...cinc.com, quic_leiwei@...cinc.com
Subject: Re: [PATCH net-next 18/20] net: ethernet: qualcomm: Add PPE MAC
support for phylink
On Wed, Jan 10, 2024 at 07:40:30PM +0800, Luo Jie wrote:
> +static void ppe_phylink_mac_link_up(struct ppe_device *ppe_dev, int port,
> + struct phy_device *phy,
> + unsigned int mode, phy_interface_t interface,
> + int speed, int duplex, bool tx_pause, bool rx_pause)
> +{
> + struct phylink_pcs *pcs = ppe_phylink_mac_select_pcs(ppe_dev, port, interface);
> + struct ppe_uniphy *uniphy = pcs_to_ppe_uniphy(pcs);
> + struct ppe_port *ppe_port = ppe_port_get(ppe_dev, port);
> +
> + /* Wait uniphy auto-negotiation completion */
> + ppe_uniphy_autoneg_complete_check(uniphy, port);
Way too late...
> @@ -352,6 +1230,12 @@ static int ppe_port_maxframe_set(struct ppe_device *ppe_dev,
> }
>
> static struct ppe_device_ops qcom_ppe_ops = {
> + .phylink_setup = ppe_phylink_setup,
> + .phylink_destroy = ppe_phylink_destroy,
> + .phylink_mac_config = ppe_phylink_mac_config,
> + .phylink_mac_link_up = ppe_phylink_mac_link_up,
> + .phylink_mac_link_down = ppe_phylink_mac_link_down,
> + .phylink_mac_select_pcs = ppe_phylink_mac_select_pcs,
> .set_maxframe = ppe_port_maxframe_set,
> };
Why this extra layer of abstraction? If you need separate phylink
operations, why not implement separate phylink_mac_ops structures?
--
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