From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [PATCHv2] gianfar: Add gfar_change_carrier() for Fixed PHYs Date: Wed, 12 Dec 2018 13:42:32 +0100 Message-ID: <20181212124232.GB1549@lunn.ch> References: <20181212123308.20100-1-joakim.tjernlund@infinera.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "netdev @ vger . kernel . org" , "claudiu . manoil @ nxp . com" , Florian Fainelli To: Joakim Tjernlund Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:44414 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727091AbeLLMmf (ORCPT ); Wed, 12 Dec 2018 07:42:35 -0500 Content-Disposition: inline In-Reply-To: <20181212123308.20100-1-joakim.tjernlund@infinera.com> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, Dec 12, 2018 at 01:33:08PM +0100, Joakim Tjernlund wrote: > This allows to control carrier from /sys/class/net/ethX/carrier for > Fixed PHYs. > > Signed-off-by: Joakim Tjernlund > --- > v2 - Only allow carrier changes for Fixed PHYs > > Florian: I have reimpl. this as I think you meant by registering > a Fixed PHY callback. > Andrew: Are happy with this as well? Hi Joakim The basic idea is O.K. > > If this is OK I will sent the other 2 drivers. Rather than replicating the code three times, how about putting all the code in the fixed phy driver, exporting a fixed_phy_change_carrier function which can be assigned to the .ndo. Andrew