From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 442CBC43461 for ; Wed, 16 Sep 2020 22:13:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EFE6D20732 for ; Wed, 16 Sep 2020 22:13:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726495AbgIPWNd (ORCPT ); Wed, 16 Sep 2020 18:13:33 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:39534 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726336AbgIPWNW (ORCPT ); Wed, 16 Sep 2020 18:13:22 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kIfft-00EzI2-S0; Thu, 17 Sep 2020 00:13:13 +0200 Date: Thu, 17 Sep 2020 00:13:13 +0200 From: Andrew Lunn To: Dan Murphy Cc: davem@davemloft.net, f.fainelli@gmail.com, hkallweit1@gmail.com, mkubecek@suse.cz, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next 2/3] net: dp83869: Add ability to advertise Fiber connection Message-ID: <20200916221313.GI3526428@lunn.ch> References: <20200915181708.25842-1-dmurphy@ti.com> <20200915181708.25842-3-dmurphy@ti.com> <20200915201718.GD3526428@lunn.ch> <4b297d8a-b4da-0e19-a5fb-6dda89ca4148@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4b297d8a-b4da-0e19-a5fb-6dda89ca4148@ti.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 16, 2020 at 03:54:34PM -0500, Dan Murphy wrote: > Andrew > > On 9/15/20 3:17 PM, Andrew Lunn wrote: > > > + linkmode_set_bit(ETHTOOL_LINK_MODE_100baseFX_Full_BIT, > > > + phydev->supported); > > > + linkmode_set_bit(ETHTOOL_LINK_MODE_100baseFX_Half_BIT, > > > + phydev->supported); > > > + > > > + /* Auto neg is not supported in 100base FX mode */ > > Hi Dan > > > > If it does not support auto neg, how do you decide to do half duplex? > > I don't see any code here which allows the user to configure it. > > Ethtool has the provisions to set the duplex and speed right?. What i'm getting at is you say you support ETHTOOL_LINK_MODE_100baseFX_Full_BIT & ETHTOOL_LINK_MODE_100baseFX_Half_BIT. If there is no auto neg in FX mode, i'm questioning how these two different modes code be used? I'm guessing the PHY defaults to ETHTOOL_LINK_MODE_100baseFX_Full_BIT? How does the user set it to ETHTOOL_LINK_MODE_100baseFX_Half_BIT? > The only call back I see which is valid is config_aneg which would still > require a user space tool to set the needed link modes. Correct. Maybe all you need to do is point me at the code in the driver which actually sets the PHY into half duplex in FX mode when the user asks for it. Is it just clearing BMCR_FULLDPLX? Andrew