From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: [RFC/PATCH] net: nixge: Add PHYLINK support Date: Wed, 5 Sep 2018 03:07:55 +0200 Message-ID: <20180905010755.GO29121@lunn.ch> References: <20180905001535.19168-1-mdf@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, davem@davemloft.net, f.fainelli@gmail.com, alex.williams@ni.com, moritz.fischer@ettus.com, linux-kernel@vger.kernel.org To: Moritz Fischer Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:52421 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725886AbeIEFfi (ORCPT ); Wed, 5 Sep 2018 01:35:38 -0400 Content-Disposition: inline In-Reply-To: <20180905001535.19168-1-mdf@kernel.org> Sender: netdev-owner@vger.kernel.org List-ID: > -static void nixge_handle_link_change(struct net_device *ndev) > -{ > - struct nixge_priv *priv = netdev_priv(ndev); > - struct phy_device *phydev = ndev->phydev; > - > - if (phydev->link != priv->link || phydev->speed != priv->speed || > - phydev->duplex != priv->duplex) { > - priv->link = phydev->link; > - priv->speed = phydev->speed; > - priv->duplex = phydev->duplex; > - phy_print_status(phydev); > - } > -} I think this is why you are having trouble with the phylink callbacks. You currently don't have any configuration of the MAC. You normally need to tell the MAC what speed it should be doing. What duplex it should be doing, if the link is up or down, if it should do pause, or asym pause or no pause, etc. Andrew