From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCH net-next] lan78xx: Lan7801 Support for Fixed PHY Date: Wed, 25 Apr 2018 14:39:06 +0200 Message-ID: <20180425123906.GA13486@lunn.ch> References: <20180423044630.2672-1-raghuramchary.jallipalli@microchip.com> <20180423124203.GC25919@lunn.ch> <0573C9D4B793EF43BF95221F2F4CC85153DA07@CHN-SV-EXMX06.mchp-main.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: davem@davemloft.net, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com, Woojung.Huh@microchip.com To: RaghuramChary.Jallipalli@microchip.com Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:39989 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752785AbeDYMjK (ORCPT ); Wed, 25 Apr 2018 08:39:10 -0400 Content-Disposition: inline In-Reply-To: <0573C9D4B793EF43BF95221F2F4CC85153DA07@CHN-SV-EXMX06.mchp-main.com> Sender: netdev-owner@vger.kernel.org List-ID: > 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