Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5886950rwd; Wed, 24 May 2023 08:04:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4shF5C058H0saZTTekuIs01yNgG3sYv+hiRdujqEVY5mitZjQfSaneZuA/6YU/T4C+TJ9H X-Received: by 2002:a17:902:ac86:b0:1af:a704:a65 with SMTP id h6-20020a170902ac8600b001afa7040a65mr10954182plr.10.1684940664854; Wed, 24 May 2023 08:04:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684940664; cv=none; d=google.com; s=arc-20160816; b=SD3e6r9bUGtQ41XXD/ubOER4gaHmYGm0ioybW+AcVz3JSITtLRB4oOzDu+fyDnTLao t7TIH2ZSQCKMGllB4lKBrxPqsiiaenHMIi0DiZUeVPfW90MF9hTHMfcUKIJLxrd5hFFT iSV946l5hhk3KtyWPqwSJdAPmw01+VH/MCNk5oBp4QG6HFHH5k2MXsUVUbwSfYm367JV 1hgPdt701fAO3WQL4xR9BvAhEsYi+oUC6jFgRvFril+FaXnCUd174bAWH8MX2KGUjNp3 uURiKfpzvTWlxHH9gMmERHyUBnYS1c8UNVVXHQA8e7ETrso9Wg9uhcY1fseOOjR28eLY FztQ== 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=XMA9OrU/15fPUa0Dy5HWt9/3JbIUzxDlly+e73u9etQ=; b=0rfJemDT1Ezd1vt+qsQEiqU9TyHcA/FwFpsShKSDk9Bat9N/V7BoAkRjGjl6TrZ9Wr xSUbxVYWFSjKhzhuoKn+p44a0bv6i166bx8tjRbXqOCvadlPjaTc3PGA3paiKBQhm3Ak /a/oENvEJnyvLdsFdYS/w70XzdFeisR2bg6Gyg8I0DyK6CyXRVnNKGMW6tQs46x622KD GbjOys68IVDpPwAgc7WjX2BAeTfEzhqukLllgjECpMFyRwV1OG2fq67gcdYeYP+88mqU MBo1Y0c7Khi0f94uvzL1XNnnv9DkU3VM4tmFv1VOYVfp0inlFHr30MN9Noyvzkffs/pF VdJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=SRGgeknf; 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 l2-20020a170903244200b001ac94b7f2f0si8903163pls.523.2023.05.24.08.04.11; Wed, 24 May 2023 08:04: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=@gmail.com header.s=20221208 header.b=SRGgeknf; 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 S234058AbjEXOs2 (ORCPT + 99 others); Wed, 24 May 2023 10:48:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234014AbjEXOsZ (ORCPT ); Wed, 24 May 2023 10:48:25 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CBB0130; Wed, 24 May 2023 07:48:24 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-4f3a166f8e9so1069993e87.0; Wed, 24 May 2023 07:48:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684939702; x=1687531702; 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=XMA9OrU/15fPUa0Dy5HWt9/3JbIUzxDlly+e73u9etQ=; b=SRGgeknfaJW9HxYvJDQYT3/MtL3CtkbovJiM1N4FuHjrfmsuijxccWeL8T6BZ8srnn B67fpywaBScdbX4GcRdGuZu9+uQcFIvdYrmuUY4lfx6++q0iUdE/J0mIAZ/0D7f14YpP h77AhZOR8avLjbV++eaHDlilOwr3Yn9StKQqMsVsEvZovwU1IL0b+HVgg++Xv4w1RRYN mLsmXdy2ZHn8Ltv1yQEXmYTBtZjzju/HSAg8hg8pJR3VkMm+/5pqG6WoHf//uxqcp+nY iiGopGp1bIbWstvn8UufMhd8O0tJV/pIO8kSJq11hZ9wBlT0wc+l0E1uqZgs0IcJPu3C wOJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684939702; x=1687531702; 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=XMA9OrU/15fPUa0Dy5HWt9/3JbIUzxDlly+e73u9etQ=; b=eWiu+Q2CW308vnDpsP4Hgg7Ga0VIl6WyFebjn8uyjBu1W3cuKpSMyFm0RWIbzS/hll Q08xLhaevcyLiOfqktRNSq68VzHAmBgFZCttzObE7fyO8rdr/1uFyVgLZ+wzzid1mazI obcZHPweK+/HqyePlhZLhMwiigzW4P8zpF7GD5KhuN7Ns2jkgodVEQVCItPTY5LFXNBc LwJX+OPR2fsm6E+ksh8lwgvrSs/qc2A5TLazZ21bKekvS3JupNA4PsNfPom47mXx8raa Tyu6f1z0bFoIELKSWmno/Vy7X5fjtr3L1K5erVN5YMTjjftVRI3JyG90fbGYo9tRNLJm AaPw== X-Gm-Message-State: AC+VfDwY0Nryz0cb8gJw4saC2mukfJhe6/NUEhT+FAXqyHIiWgAgzdp5 62E8VFQs315npLjkqnlbJS4= X-Received: by 2002:a05:6512:3d0d:b0:4f4:7a5:e800 with SMTP id d13-20020a0565123d0d00b004f407a5e800mr3788949lfv.10.1684939702123; Wed, 24 May 2023 07:48:22 -0700 (PDT) Received: from skbuf ([188.27.184.189]) by smtp.gmail.com with ESMTPSA id u22-20020ac243d6000000b004f14535a962sm1750995lfl.174.2023.05.24.07.48.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 07:48:21 -0700 (PDT) Date: Wed, 24 May 2023 17:48:17 +0300 From: Vladimir Oltean To: arinc9.unal@gmail.com 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 , =?utf-8?B?QXLEsW7DpyDDnE5BTA==?= , 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 03/30] net: dsa: mt7530: properly support MT7531AE and MT7531BE Message-ID: <20230524144817.dubqwmfbthes2ggh@skbuf> References: <20230522121532.86610-1-arinc.unal@arinc9.com> <20230522121532.86610-4-arinc.unal@arinc9.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230522121532.86610-4-arinc.unal@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 Mon, May 22, 2023 at 03:15:05PM +0300, arinc9.unal@gmail.com wrote: > From: Arınç ÜNAL > > Introduce the p5_sgmii field to store the information for whether port 5 > has got SGMII or not. > > Move the comment about MT7531AE and MT7531BE to mt7531_setup(), where the > switch is identified. > > Get rid of mt7531_dual_sgmii_supported() now that priv->p5_sgmii stores the > information. Address the code where mt7531_dual_sgmii_supported() is used. > > Get rid of mt7531_is_rgmii_port() which just prints the opposite of > priv->p5_sgmii. > > Remove P5_INTF_SEL_GMAC5_SGMII. The p5_interface_select enum is supposed to > represent the mode that port 5 is being used in, not the hardware > information of port 5. Set p5_intf_sel to P5_INTF_SEL_GMAC5 instead, if > port 5 is not dsa_is_unused_port(). > > Signed-off-by: Arınç ÜNAL > Acked-by: Daniel Golle > --- Pretty busy patch, and after reading it, I'm not sure: - why? (this seems to be absent from the commit message) - how are MT7531AE and MT7531BE supported any more properly after this change, as the commit title claims - what is the overall effect, other than just refactoring. If that's all, what's written on the tin needs to be a better representation of what's inside. Pure refactoring is not a bad goal in itself, as long as we're on the same page that there is a justification which makes the new code better than the old one.