From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8C5C3D62 for ; Fri, 16 Jun 2023 15:52:49 +0000 (UTC) Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FCF4297E for ; Fri, 16 Jun 2023 08:52:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ogQmQ6wprTqZ/EyoXKfpzFfumwVkMG2afh0FIz5W3+E=; b=LFFyYZAJpurrFSKtW+ua6s3ute SoE9NmFfbWPphYthzFLbdF7CsTFMLbhfMcF3yqse2vNPBE/8rXj7/Hmb7q4R9Ikp3B4bw8hUXgJLS W0GWQYWurPZCgn0A1RUcut0BC3B6qZKxnog8paNmKKKUfYSF9y7d3TKY2CtvoXp0vIPWJfSJXPdOr V45TSyEd5Rw2082UXtQmEEF2k7Y459piCXEO95mMOv6XVwSHgpx/Dlkw8nhctoJiMfUjVUmVGa51B ZEWaNcq36zWiS2f6jDU2eXRoiRc+dRrLJ4DuU8fIZjAqrsdwqM9WZ5Tt8rDNgFeHTgmI4xh9syWBG hFRZ539w==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:48718) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qABkQ-0005R2-Je; Fri, 16 Jun 2023 16:52:26 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qABkL-0002e8-Ul; Fri, 16 Jun 2023 16:52:21 +0100 Date: Fri, 16 Jun 2023 16:52:21 +0100 From: "Russell King (Oracle)" To: Vladimir Oltean Cc: Andrew Lunn , Heiner Kallweit , Alexander Couzens , AngeloGioacchino Del Regno , Cc: Claudiu Beznea , Daniel Golle , Daniel Machon , "David S. Miller" , DENG Qingfang , Eric Dumazet , Florian Fainelli , Horatiu Vultur , Ioana Ciornei , Jakub Kicinski , Jose Abreu , Landen Chao , Lars Povlsen , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Madalin Bucur , Marcin Wojtas , Matthias Brugger , Michal Simek , netdev@vger.kernel.org, Nicolas Ferre , Paolo Abeni , Radhey Shyam Pandey , Sean Anderson , Sean Wang , Steen Hegelund , Taras Chornyi , Thomas Petazzoni , UNGLinuxDriver@microchip.com Subject: Re: [PATCH net-next 0/15] Add and use helper for PCS negotiation modes Message-ID: References: <20230616150055.kb7dyuwqqvfkfuh7@skbuf> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net On Fri, Jun 16, 2023 at 04:46:39PM +0100, Russell King (Oracle) wrote: > On Fri, Jun 16, 2023 at 06:00:55PM +0300, Vladimir Oltean wrote: > > Do you know for sure what this bit does and whether it makes sense for > > drivers to even distinguish between OUTBAND and INBAND_DISABLED in the > > way that this series is proposing? > > I have no idea, and I didn't bother investigating - I don't want to go > around trying to disect drivers to figure out whether they're buggy or > not. > > However, what I would say is that this is not where these modes came > from. They came from me asking myself the question "what would be the > logical set of information to give a PCS driver about the negotiation > state of the link?" and that's what I came up with _without_ reference > to this driver. The states are all documented in the first patch and > what they mean. > > So, no, the Microchip driver code is not the reason why these > definitions were chosen. They were chosen because it's the logical > set that gives PCS drivers what they need to know. > > Start from inband + autoneg. Then inband + !autoneg. Then inband > possible but not being used. Then "there's no inband possible for this > mode". That's the four states. > > I think having this level of detail is important if we want to think > about those pesky inband-AN bypass modes, which make sense for only > really the PHYLINK_PCS_NEG_INBAND_DISABLED state and not OUTBAND nor > NONE state. Bypass mode doesn't make sense for e.g. SGMII because > one needs to know the speed for the link to come up, and if you're > getting that through an out-of-band mechanism, you're into forcing > the configuration at the PCS end. I should also add... yes, I did _then_ subsequently use the microchip driver as a justification for it. I probably should've explained it without using that as justification. I could also have used the sja1105 driver as well, since: MLO_AN_INBAND => PHYLINK_PCS_NEG_INBAND_ENABLED MLO_AN_FIXED || MLO_AN_PHY => PHYLINK_PCS_NEG_OUTBAND are the conversions done there, which fits with: - if (!phylink_autoneg_inband(mode)) { + if (neg_mode == PHYLINK_PCS_NEG_OUTBAND) { since the opposite of !inband is outband. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!