From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753279AbdGNBer (ORCPT ); Thu, 13 Jul 2017 21:34:47 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:53688 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752776AbdGNBep (ORCPT ); Thu, 13 Jul 2017 21:34:45 -0400 Date: Fri, 14 Jul 2017 03:34:35 +0200 From: Andrew Lunn To: Moritz Fischer Cc: Moritz Fischer , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, davem@davemloft.net, mark.rutland@arm.com, robh+dt@kernel.org Subject: Re: [PATCH 2/2] net: ethernet: nixge: Add support for National Instruments XGE netdev Message-ID: <20170714013435.GA9065@lunn.ch> References: <1499980909-11702-1-git-send-email-mdf@kernel.org> <1499980909-11702-2-git-send-email-mdf@kernel.org> <20170713223636.GF3120@lunn.ch> <20170714003111.GA13512@tyrael.ni.corp.natinst.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170714003111.GA13512@tyrael.ni.corp.natinst.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > + /* not sure if this is the correct way of dealing with this ... */ > > > + ndev->phydev->supported &= ~(SUPPORTED_Autoneg); > > > + ndev->phydev->advertising = ndev->phydev->supported; > > > + ndev->phydev->autoneg = AUTONEG_DISABLE; > > > > What are you trying to achieve? > > Basically can't do Autoneg, I'll need to take a closer look. Hi Moritz What i actually think you mean, is it can only do 1Gbps. So you could autoneg, but only advertise 1Gbps. Look at masking out PHY_10BT_FEATURES and PHY_100BT_FEATURES. Take a look at: http://elixir.free-electrons.com/linux/latest/source/drivers/net/ethernet/renesas/ravb_main.c#L1045 It might actually make sense to add a phy_set_min_speed(), a mirror to phy_set_max_speed(). Andrew