Subject: Re: [PATCH net-next] lan78xx: Lan7801 Support for Fixed PHY

From: Andrew Lunn <[email-masked]>
Date: Wed, 25 Apr 2018 14:39:06 +0200

> OK. Will modify to netdev_dbg()
>  
> > > +			dev->interface = PHY_INTERFACE_MODE_RGMII;
> > > +			dev->fixedphy = phydev;
> > 
> > You can use
> > 
> > if (!phy_is_pseudo_fixed_link(phydev))
> > 
> > to determine is a PHY is a fixed phy. I think you can then do without
> > dev->fixedphy.
> > 
> dev->fixedphy stores the fixed phydev, which will be passed to the 
> fixed_phy_unregister routine , so I think phy_is_pseudo_fixed_link check is not necessary.

I'm saying you can get rid of dev->fixedphy, and just use
netdev->phydev, and phy_is_pseudo_fixed_link(netdev->phydev)

	Andrew