Re: [PATCH net-next V2 3/4] net: lan743x: Migrate phylib to phylink

From: Raju Lakkaraju
Date: Thu Jul 25 2024 - 05:38:12 EST


Hi Andrew,

Thank you for review the patches.

The 07/18/2024 05:43, Andrew Lunn wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On Tue, Jul 16, 2024 at 05:03:48PM +0530, Raju Lakkaraju wrote:
> > Migrate phy support from phylib to phylink.
> > Fixed phy support is still used together with phylink since we need to support
> > dynamic fallback when a phy is not found over mdio. While phylink's FIXED mode
> > supports fixed phys that, it's dynamic and requires device tree entries which
> > are most of the time not present for LAN743x devices
>
> > +static int lan743x_phylink_connect(struct lan743x_adapter *adapter)
> > +{
> > + struct device_node *dn = adapter->pdev->dev.of_node;
> > + struct net_device *dev = adapter->netdev;
> > + struct fixed_phy_status fphy_status = {
> > + .link = 1,
> > + .speed = SPEED_1000,
> > + .duplex = DUPLEX_FULL,
> > + };
>
>
> So you are happy to limit it to 1G, even thought it can do more? That
> is the problem with fixed PHY done this way. If you were to use
> PHYLINK fixed PHY you can use the full bandwidth of the hardware.
>

I accept your comments. Fixed PHY hard coded to 1Gpbs.

Currenly, LAN743x chip don't have Device Tree implemented.
As part of SFP support, I would like to add software nodes.
After SFP support development, I will add "fixed-link" option in software nodes.

> You might want to look at what the wangxun drivers do for some ideas
> how you can make use of PHYLINK fixed link without having DT.

I refer the wangxun drivers for "fixed-link". currently wangxun driver did not
implement "fixed-link" in software node.

>
> Andrew
>

--
Thanks,
Raju