Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2398615rwd; Fri, 26 May 2023 06:11:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ760NaoBHy9wpzP6aELqs1kLssXGbLNoXaspmLKs4Oxf74vUpDisl+fN73RZ0+TfDcERJFx X-Received: by 2002:a05:6a00:1891:b0:646:1f13:7fce with SMTP id x17-20020a056a00189100b006461f137fcemr3441467pfh.2.1685106670415; Fri, 26 May 2023 06:11:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685106670; cv=none; d=google.com; s=arc-20160816; b=IWoRs7EM9UHbQ6QC1DpTdTukXxwiZ1N8gvKcXWaziVLZuz5H0bqGE0TUHHRD6/wdEo ilV+Y5QfxFXrHttjJbrLnvWCg2S51B259bRr0nW+2ngTUvo1tpPZKT8IShqGqh1E74qk I9mLqzhGhnPCvCyvpX+SnbxXwn3lMl8LoAM0bpZ+1zM2hNoXt9j+6VJHvEaaqfYqgcdv m3ZEbk/L22d1/peWPjvHG4qxXgI2rMxfbDXm4vAfZdFnLCW938Zdev2zDk5ykW05WY/c gpvZjQQgQNMoJ4mUZFAqHq7SnQqzeRqo8paCtdG7AYwsUwTpGjVa7d+U6jf/J1aVnWfk Td7A== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=+UkK3Ol11xLBzUOFBbpZXenRGfaW52LIpYuNVdpGopU=; b=KTFi6pmoe7b6PKADci6daPlZbDYpb2YtiwAASb19cDmXqd2ZiT9rr5rErjxQRq3V9R DtzuQH1zwTml/ycaBdKT5Pgyh4bP+cvahZ2Vl2Wjs8lmgwyFpxLRdk/p2dMvtiWHJ2ok tee8JPZ6VRoSidp0m5XwmfyU7NoKdDk5h1g5+rb7rQdLmE3A1KN/EW2qdjUsoGscFGsY rsVvHFlRzxAxeRqqfvzMUYW6U2uzqHe9vB+RK7MPSN9Dv5cnCw+z1VzR/FZHV2HtwVRk 4/K1jSEy4LvUJx3LkIxBLRhdu39sqj4EkJmh65Lm0cqYWTbWROKVEgXd3Gm12Sf25yD2 GDew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b="YT9VAl+/"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w8-20020aa79a08000000b0064d5dd5adbfsi4019047pfj.292.2023.05.26.06.10.43; Fri, 26 May 2023 06:11:10 -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=@gmail.com header.s=20221208 header.b="YT9VAl+/"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243394AbjEZNBx (ORCPT + 99 others); Fri, 26 May 2023 09:01:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231603AbjEZNBv (ORCPT ); Fri, 26 May 2023 09:01:51 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A0B2FB; Fri, 26 May 2023 06:01:50 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-510f525e06cso1179765a12.2; Fri, 26 May 2023 06:01:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685106109; x=1687698109; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=+UkK3Ol11xLBzUOFBbpZXenRGfaW52LIpYuNVdpGopU=; b=YT9VAl+/ZzJNxlLHYnjBgzgNEshcqoBEUpSFRIUDZR5ZcObO2G5ERynF8v/ElWHu9K 39ze1h7dpTBqIK/FlhNMxfMi7H2ypRQtuqY0qvPT2aCXKiE9BeUXsGQAoQlmaoEqj1EH jTurxdL0cnVywnDeluazuZmKAG8CCcFgO9UqDheXhX5MZf6Zr7SkE9gcig8jxzkaJHqQ QMpbt50BNsVaUuLyMfRBjZY2tMVAN8B9avpDpzp3D26+fFxh2p2d+j2B6CNStgYz/946 BDHXjXYrS0xTro2seuyrM7jn1HZWUh4O+EkDxGGtU8aJbN0LAfr5NgjZHaWQtoCzahRq B3Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685106109; x=1687698109; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+UkK3Ol11xLBzUOFBbpZXenRGfaW52LIpYuNVdpGopU=; b=RU3QoPKr0wfoqMDRmrH8DbhSOOxLyDVKv8e5/2Sj6M7TqL/nooloGb49ScXiH/hZxD uFLGoeJIAdboZIXr1jhEcwE4aQ9RBrE4VaVFXEGc4lRM8dXWPnK4YOPQQAqChxs4pqa8 RMit8rarKiQrvdAIQkaXIUukTLKewqzfTkS2Y/GUQd8KzH0Z63xxR68+btvCSsxDA8uW 5N/IfEeW4M2E4uLrPqzkrLm+cigB/F8uqZV0+MPbpNyCeMFjYq1ur6PiIvCzK5TDcRPc D6sQCDVDvPI5P6CxZKwi1iWFiMONunNull2XS0AqdCkzuW94FM8GJRyKYErnivuyRkXx fBiQ== X-Gm-Message-State: AC+VfDzntHz/DgjzcW57ZQ6A7vxaehHj1Wwib01KsXcSlFl4fTiKfTsC vhSZ554KdzIvBohQTdM6pZA= X-Received: by 2002:aa7:d9cc:0:b0:509:c6e6:c002 with SMTP id v12-20020aa7d9cc000000b00509c6e6c002mr970029eds.39.1685106108296; Fri, 26 May 2023 06:01:48 -0700 (PDT) Received: from skbuf ([188.27.184.189]) by smtp.gmail.com with ESMTPSA id c7-20020aa7c987000000b0050bc41352d9sm1551632edt.46.2023.05.26.06.01.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 06:01:47 -0700 (PDT) Date: Fri, 26 May 2023 16:01:45 +0300 From: Vladimir Oltean To: =?utf-8?B?QXLEsW7DpyDDnE5BTA==?= Cc: Sean Wang , Landen Chao , DENG Qingfang , Daniel Golle , Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Russell King , Richard van Schagen , Richard van Schagen , Frank Wunderlich , Bartel Eerdekens , erkin.bozoglu@xeront.com, mithat.guner@xeront.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH net-next 08/30] net: dsa: mt7530: change p{5,6}_interface to p{5,6}_configured Message-ID: <20230526130145.7wg75yoe6ut4na7g@skbuf> References: <20230522121532.86610-1-arinc.unal@arinc9.com> <20230522121532.86610-1-arinc.unal@arinc9.com> <20230522121532.86610-9-arinc.unal@arinc9.com> <20230522121532.86610-9-arinc.unal@arinc9.com> <20230524175107.hwzygo7p4l4rvawj@skbuf> <576f92b0-1900-f6ff-e92d-4b82e3436ea1@arinc9.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <576f92b0-1900-f6ff-e92d-4b82e3436ea1@arinc9.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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 Thu, May 25, 2023 at 09:49:58AM +0300, Arınç ÜNAL wrote: > On 24.05.2023 20:51, Vladimir Oltean wrote: > > On Mon, May 22, 2023 at 03:15:10PM +0300, arinc9.unal@gmail.com wrote: > > > diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c > > > index 710c6622d648..d837aa20968c 100644 > > > --- a/drivers/net/dsa/mt7530.c > > > +++ b/drivers/net/dsa/mt7530.c > > > @@ -2728,25 +2722,20 @@ mt753x_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode, > > > goto unsupported; > > > break; > > > case 5: /* Port 5, can be used as a CPU port. */ > > > - if (priv->p5_interface == state->interface) > > > + if (priv->p5_configured) > > > break; > > > if (mt753x_mac_config(ds, port, mode, state) < 0) > > > goto unsupported; > > > - > > > - if (priv->p5_intf_sel != P5_DISABLED) > > > - priv->p5_interface = state->interface; > > > > If you don't replace this bit with anything, who will set priv->p5_configured > > for mt7530? > > I intend priv->p5_configured and priv->p6_configured to be only used for > MT7531 as I have stated on the mt7530_priv description. Ok, but given the premise of this patch set, that phylink is always available, does it make sense for mt7531_cpu_port_config() and mt7988_cpu_port_config() to manually call phylink methods?