Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp509883imw; Thu, 14 Jul 2022 05:47:25 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vXEMmDi0tJJBIPyG2EZRpS9jPk/2fcL2HslmhStzJoFX1KlFeHjx1Jx1M1cxZO9Fb+NYcg X-Received: by 2002:a05:6402:795:b0:43a:6cc5:8886 with SMTP id d21-20020a056402079500b0043a6cc58886mr12165915edy.174.1657802845713; Thu, 14 Jul 2022 05:47:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657802845; cv=none; d=google.com; s=arc-20160816; b=YbGvYajvdZ4cjE8IYTAiWFVqJfFz5EU9lRNSveuqhNRi+cbJQC/a8jYiZJSpIAF8H3 HDubULIMWqmvmnwv4anx+isqhOMofJVVHdaHlljz+z1XAt63j6c8OosHtiKiW4+XBfbm 3S8CMr37x30lE4d9hQLy3a/WjFeOuqqi5QWxUPBKSyVzKEQEMNqHQyhcpU9g0ebzZPCy 9xesDW60cIhJIqRz7rD2PuA3jVhSYpdNnXg8pa6Mf0odmxJsNzCB3rbl+9zOZB90pMlb q1Qh3xLSwl6iL++R7yFxeXJf8Dfm/wz1Gf6ussMZ5JDintrRmhiGQnv8COA4x5qySQEV TejQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Xkzo1+jLdTW3x5JYk91+0YIKJPcQat2K2Pu8MNHVjIk=; b=PPah1dDSX5UMwBHX9ReZPlxL13SdiuJp8uLsUzDQvgv5lMZhLcdppVfolS1eIQXR71 cfvt3PSQ7W6wg/kRdm36/s1RE7IFtFCtiX/9rVwAsujSfMldffBXLwBENOml0jegM/Eg YTpMek5gy22kUjA8U++bpd7MWgYrzV8e87Vn0ysnEt32mVpmBomxuNISTEXBpJdXQJp9 8vOCVBlIir/gVK4YZaqJtCeHS6lSQX/e24WMA0R2/5JEXyE7TBSCpI7B0uqY/cPMm6lX w3LjlDx8gRxXLVReGoJDosytqiQLQnxYXkk6aF2d8Tol0Y+TnzWTVWGYNGJGUZTwTayi Opig== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=fm00aGxY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dd22-20020a1709069b9600b0072b6a93c5ebsi2017290ejc.60.2022.07.14.05.47.01; Thu, 14 Jul 2022 05:47:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=fm00aGxY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239070AbiGNMjV (ORCPT + 99 others); Thu, 14 Jul 2022 08:39:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239253AbiGNMjF (ORCPT ); Thu, 14 Jul 2022 08:39:05 -0400 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 E5277205CC; Thu, 14 Jul 2022 05:39:03 -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=Xkzo1+jLdTW3x5JYk91+0YIKJPcQat2K2Pu8MNHVjIk=; b=fm00aGxYAWOz/V5wq0e/7M+CSX cxK+ClAkV4i4c57CkoufhpM9hvmKH5SpHaP+F48llBMpZpUCbGd32M2EbpBXyunIjx4MEbM0GtDOu vCFQG2kyGoXzC0MfaxLc4xvyFfZJfoj/C+7wTyxmfyU9BKc+cupqhomFTwczXTkAYjFYehq9qZ+2m 6Kx12pm9bELbHJEyHbyAt7DOqeaUnWoa7Z1JqULzAMT/Oy6VBZPHOmV7lJIoI25rbJ/+hHeC1/V98 w6hvIyZ7LoeXztI5bQZ9s/yRuWeaAE9P2oStSMqxKaX6m41638joLshSNTn6FwwDYtk9e0gM05suP iXa8RPMA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:33338) 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 1oBy7S-0005nL-4f; Thu, 14 Jul 2022 13:39:02 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1oBy7Q-0006bs-CC; Thu, 14 Jul 2022 13:39:00 +0100 Date: Thu, 14 Jul 2022 13:39:00 +0100 From: "Russell King (Oracle)" To: Oleksandr Mazur Cc: Andrew Lunn , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , Yevhen Orlov , Taras Chornyi Subject: Re: [PATCH V2 net-next] net: marvell: prestera: add phylink support Message-ID: References: <20220713172013.29531-1-oleksandr.mazur@plvision.eu> 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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 14, 2022 at 08:56:26AM +0000, Oleksandr Mazur wrote: > Hello Andrew, Russel, > Thanks for the input and sorry for the inconviniences. > > >First question which applies to everything in this patch is - why make > >phylink conditional for this driver? > > 1. As for the phylink ifdefs: > The original idea was to support mac config on devices (DB boards) that don't have full sfp support on board, however we scrapped out > this idea as we could simply use fixed-link DTS configs; also due to this solution being non-upstream-friendly. > Please note that V2 holds no phylink ifdefs; I didn't specifically ask about the ifdefs - I asked the general question about "why make phylink conditional for this driver". Yes, v1 had ifdefs. v2 does not, but phylink is _still_ conditional. You are introduing lots of this pattern of code: if (blah->phy_link) do something phylink related else do something else And I want to know why. > >In SGMII mode, it is normal for the advertising > >mask to indicate the media modes on the PHY to advertise > 2. As for the SGMII mode, yes, Russel, you're right; V3 will hold a fix for this, and keep the inband enabled for SGMII. > > >No way to restart 1000base-X autoneg? > 3. As for AN restart, no, it's not yet supported by our FW as of now. Maybe put a comment in the code to that effect? > >I think you should be calling phylink_mac_change() here, rather than > >below. > > 4. V3 is gonna fix this, thanks for the input. Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!