Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1186145imw; Wed, 13 Jul 2022 15:25:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u7hQ9LAiceQWY7ZDvnmXBAiJSGkc/D07/xn6THQmVWS9G9tNqvv2W44NtwKER5MAKvHAtY X-Received: by 2002:a17:90a:4809:b0:1f0:59d7:7ee2 with SMTP id a9-20020a17090a480900b001f059d77ee2mr6051795pjh.240.1657751124501; Wed, 13 Jul 2022 15:25:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657751124; cv=none; d=google.com; s=arc-20160816; b=YBucloceeKmnzgebKAhPQvvKjbAkx9NnAosViMOsFjFuZ0JOZqaMzfsAaPTvIOmxMF gsFlQzXgRphuT2pvjj4+IEQtECFQOp6kEm5EOIYYiGoGdlbFkwRne2wdmVWsGmf6ESXp 0M9OKt38XkyDaYK6+clL4qj9QrokdM9N/0ZJhQQAjDdlOuTP/8oKYcE+wFiqtqQH9Ifo r7saSO8m38E0OFNBn0hFShQDVAnhAVlAT15YBaJPpXqFc7k9xFFgNbUka9iW/3T6mUMR lQhL3i1NgsGMIHeqvUVKSELYQvtONO++Bq4pB68VeZEW86ksHvAvKszTk33dG4yjz24J q9FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=G2ZOPGS1s/jNjHUZohK4oD7bAWGFIaLsK1fmshVdrLA=; b=0709PCZ5yc7wYXu44RhB+v/FoyRxzJuKF5T80K7jMHYqqCgd2D00cK1e9a3LtItf8J mfjdAlauZAOvg+5D0bXIswKiMySulBQGoXutgl+NsyZEwcVqWP1QqD4aTW5eLZxUQ42z wQgtpjVcCwqQUBsYWB4N1WjzxVesLwOyA5PUzVkEw5Cdrz4ONSve63Zqbk6yrYmnlt+W 8c3AAK8o9mE/0H3pafE6ypPhv+2CaKRBRSADQ17aT2rSW/Po8hKVm1WBkRxB9MKdIPmy Y/T3VLJcipKDjrp377iSZ5hj/QkRI1cQ1ihRVLEJHRPGuqmG2s05sKZwcA4VzbPKpiQj SVfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=lCP1Z88l; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n8-20020a170902d2c800b0016c512176adsi11660366plc.576.2022.07.13.15.25.11; Wed, 13 Jul 2022 15:25:24 -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=pass header.i=@lunn.ch header.s=20171124 header.b=lCP1Z88l; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237130AbiGMVws (ORCPT + 99 others); Wed, 13 Jul 2022 17:52:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236680AbiGMVwr (ORCPT ); Wed, 13 Jul 2022 17:52:47 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E37E31217; Wed, 13 Jul 2022 14:52:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=G2ZOPGS1s/jNjHUZohK4oD7bAWGFIaLsK1fmshVdrLA=; b=lCP1Z88lpIqV+na/2FY7KizYUu VEHdfudO26jYIrXf4IXcQT8Sbr9+Cswaq2oI1t01M5EQaC0ZJfSueHkRqj3dpTl740wRNmtPhN9e1 0/cDBxx1abEqG2Foug2G3wg+W2sV0xnmXMv6WqmwH1K81AjEKasejuPNoLuqELc4J4PU=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oBkHh-00ADyR-AM; Wed, 13 Jul 2022 23:52:41 +0200 Date: Wed, 13 Jul 2022 23:52:41 +0200 From: Andrew Lunn To: "Russell King (Oracle)" Cc: Oleksandr Mazur , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, yevhen.orlov@plvision.eu, taras.chornyi@plvision.eu 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: 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_PASS,SPF_PASS, 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 Wed, Jul 13, 2022 at 09:05:21PM +0100, Russell King (Oracle) wrote: > On Wed, Jul 13, 2022 at 08:20:13PM +0300, Oleksandr Mazur wrote: > > For SFP port prestera driver will use kernel > > phylink infrastucture to configure port mode based on > > the module that has beed inserted > > > > Co-developed-by: Yevhen Orlov > > Signed-off-by: Yevhen Orlov > > Co-developed-by: Taras Chornyi > > Signed-off-by: Taras Chornyi > > Signed-off-by: Oleksandr Mazur > > > > PATCH V2: > > - fix mistreat of bitfield values as if they were bools. > > - remove phylink_config ifdefs. > > - remove obsolete phylink pcs / mac callbacks; > > - rework mac (/pcs) config to not look for speed / duplex > > parameters while link is not yet set up. > > - remove unused functions. > > - add phylink select cfg to prestera Kconfig. > > I would appreciate answers to my questions, rather than just another > patch submission. So I'll repeat my question in the hope of an answer: > > First question which applies to everything in this patch is - why make > phylink conditional for this driver? Hi Oleksandr I agree with Russell here. This driver should depend on PHYLINK and remove all the #ifdefs. We try to avoid this sort of code, it hides bugs and does not get compile tested very well etc. You need to give us a good reason if you want to keep the code like this. Andrew