Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4309057rwd; Sun, 4 Jun 2023 02:23:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4ty9JOvj+Bko6RDWrI/llgLxn3vuQgh5LOyrB+2Cq2MZpjm4FbNPmFfk6zhJ6TIqNgVDQi X-Received: by 2002:a05:6a20:e619:b0:10c:80a:480c with SMTP id my25-20020a056a20e61900b0010c080a480cmr3759854pzb.41.1685870619410; Sun, 04 Jun 2023 02:23:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685870619; cv=pass; d=google.com; s=arc-20160816; b=JxPW4oqFoGfyfz3rnZR+wENywBlr9rrB+bc5eLbTK4Jt2tJXN1y0rDAxReqJthmL5J 0VEFsLk1VJWwHM+IKWZyvJlcmuqitaMNikPUs3jCfScQEGcqddfXArrTHuRtzrjAnAbN P8pAJ4zIzarclDe1EK/WSFT6y7bPZYwjZWFGRtpII598vFVvqp4pHbozgjL+rIz5D+LS bLY1/57S7zRmIuSTDo0kxDruIYHw0GEGGF5gN+WhM+Xw7330ydzLVxIeHRNYy6WL5gHH /ejdF4MuSdHdEfDv7oRmLVocOJkrU/XBFLHZYgGKG6qXrPbfH+UqqgppcqMy6ZvNUO/v J3hw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=eXArTeMtajRJZgcIvygJEd3UMrFsbSRTNGeqgF3+G08=; b=nInHocmpT7oFPnBtevGn4FCnNj8BGIZX5XLrZIVnnpxC08ShiuMG77+6i5LKO8bnP2 FG8OWGQKWSoAfrmya4P2RvF5roJ/lEGyPq3GiJYytGPHGETrWKl3AmCkRBXllb2okcpV t4F7ICY4RBod7+ZMXfw7TjOit2Sul/qyynCkbZxsRT2JpZaQxy5ATBlfu6rfprD6dtxI ouskujGij/0HNntTybTLVxENZy9yZJ2djaUqazi4PY2eVz/MLV0ScGlygg7qTMJ/wIiR YnczWWpcP0UCPf9duJu5nfDf9u3eTg2jEvo5OBBmpC1M5gJProJ8Hc+86I8mb6h+kflv 3bEA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arinc9.com header.s=zmail header.b=Lkc9JOkN; arc=pass (i=1 spf=pass spfdomain=arinc9.com dkim=pass dkdomain=arinc9.com dmarc=pass fromdomain=arinc9.com>); 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 n2-20020a6546c2000000b0053fb354c191si3981156pgr.861.2023.06.04.02.23.27; Sun, 04 Jun 2023 02:23:39 -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=@arinc9.com header.s=zmail header.b=Lkc9JOkN; arc=pass (i=1 spf=pass spfdomain=arinc9.com dkim=pass dkdomain=arinc9.com dmarc=pass fromdomain=arinc9.com>); 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 S230477AbjFDIek (ORCPT + 99 others); Sun, 4 Jun 2023 04:34:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229879AbjFDIej (ORCPT ); Sun, 4 Jun 2023 04:34:39 -0400 Received: from sender4-op-o10.zoho.com (sender4-op-o10.zoho.com [136.143.188.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBFCACF; Sun, 4 Jun 2023 01:34:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685867627; cv=none; d=zohomail.com; s=zohoarc; b=nKTLRYoNYP4cstW8Dk0eXjFqT7Jx1ch3Kp9VG7YHBd8N0pzN4X5CNAYoM44KTswLyUKUCZRciFus9ZSOdzcXP9IzJPPOsRTmI3Ik3jKdtsEAB63nkKeKpBC94zigYE9QXEaRVZOELr5CUVvPVQWWqjnRGY/hQwnPvYNTRBQ/o8U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685867627; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=eXArTeMtajRJZgcIvygJEd3UMrFsbSRTNGeqgF3+G08=; b=Ud9Wr0gh1LQ1H8fpG+Pop8dL3O5i77sXchuvDimITRkF7+0mFavfYX+hvjuOIpL9j1tEy62bXZB65PnAotNqUMQDYlV6nPTfpfd3M/JvEpNOeEV6VOb4+z48aSGjwp/y1Dm0I/TJhKk6L31UQ1cpANyMPEYGXOPwi6ah+pqbm2s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=arinc9.com; spf=pass smtp.mailfrom=arinc.unal@arinc9.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1685867627; s=zmail; d=arinc9.com; i=arinc.unal@arinc9.com; h=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:Cc:Cc:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=eXArTeMtajRJZgcIvygJEd3UMrFsbSRTNGeqgF3+G08=; b=Lkc9JOkNAPSzz1pr6j8GRIyBBA49zNH5D6tfCFG9aUYELYY19nqYvEja20xMqUaG MLRnikrd7GoSGd3lq+gUcccxCoIWj5oY0lH7O50tpPtTYy9qAnYg6GRg4eQ0pyAdIbN afNLmH0o1DWowFk/dmO8CYy4DwKJaqaFcATYQ+M8= Received: from [192.168.66.198] (178-147-169-233.haap.dm.cosmote.net [178.147.169.233]) by mx.zohomail.com with SMTPS id 1685867627229424.1337302219724; Sun, 4 Jun 2023 01:33:47 -0700 (PDT) Message-ID: <7d07e930-56a7-3517-c560-c10291dbe92e@arinc9.com> Date: Sun, 4 Jun 2023 11:33:30 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH net-next 26/30] net: dsa: mt7530: properly set MT7530_CPU_PORT Content-Language: en-US To: Vladimir Oltean 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 References: <20230522121532.86610-1-arinc.unal@arinc9.com> <20230522121532.86610-1-arinc.unal@arinc9.com> <20230522121532.86610-27-arinc.unal@arinc9.com> <20230522121532.86610-27-arinc.unal@arinc9.com> <20230526165548.d6ewov743orxviz3@skbuf> From: =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= In-Reply-To: <20230526165548.d6ewov743orxviz3@skbuf> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ZohoMailClient: External X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,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 26.05.2023 19:55, Vladimir Oltean wrote: > On Mon, May 22, 2023 at 03:15:28PM +0300, arinc9.unal@gmail.com wrote: >> From: Arınç ÜNAL >> >> The MT7530_CPU_PORT bits represent the CPU port to trap frames to for the >> MT7530 switch. There are two issues with the current way of setting these >> bits. ID_MT7530 which is for the standalone MT7530 switch is not included. > > It's best to say in the commit title what the change does, rather than > the equivalent of "here, this way is proper!". Commit titles should be > uniquely identifiable, and "properly set MT7530_CPU_PORT" doesn't say a > lot about how proper it is. It's enough to imagine a future person > finding something else that's perfectible and writing another "net: dsa: > mt7530: properly set MT7530_CPU_PORT" commit. Try to be less definitive > and at the same time more specific. > > If there are 2 issues, there should be 2 changes with individual titles > which each describes what was wrong and how that was changed. Got it, this is a bug fix for future devicetrees so I will send a 2-patch patch series to net. First one sets the MT7530_CPU_PORT bit to the active CPU port, the other adds the ID_MT7530 check. > >> When multiple CPU ports are being used, the trapped frames won't be >> received when the DSA conduit interface, which the frames are supposed to >> be trapped to, is down because it's not affine to any user port. This >> requires the DSA conduit interface to be manually set up for the trapped >> frames to be received. >> >> Address these issues by implementing ds->ops->master_state_change() on this >> subdriver and setting the MT7530_CPU_PORT bits there. Introduce the >> active_cpu_ports field to store the information of active CPU ports. >> Correct the macros, MT7530_CPU_PORT is bits 4 through 6 of the register. >> >> Any frames set for trapping to CPU port will be trapped to the numerically >> smallest CPU port which is affine to the DSA conduit interface that is set >> up. To make the understatement obvious, the frames won't necessarily be >> trapped to the CPU port the user port, which these frames are received >> from, is affine to. This operation is only there to make sure the trapped >> frames always reach the CPU. >> >> Tested-by: Arınç ÜNAL >> Co-developed-by: Vladimir Oltean >> Signed-off-by: Vladimir Oltean > > A single Suggested-by: is fine. As a rule of thumb, I would use Co-developed-by > when I'm working with a patch formally pre-formatted or committed by somebody else, > that I've changed in a significant manner. Since all I did was to comment with > a suggestion of how to handle this, and with a code snippet written in the email > client to a patch of yours, I don't believe that's necessary here. Will do, thanks. Arınç