Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4538471rwd; Sun, 4 Jun 2023 07:24:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ZIQH3gRSYwNoA7HWb1TELHo6nl0C2EgfZC+7SPOiJ1s3kPJfcihqNefRhRUN+AmRjCoHW X-Received: by 2002:a17:902:d50c:b0:1b0:10a1:3da9 with SMTP id b12-20020a170902d50c00b001b010a13da9mr5300374plg.32.1685888673558; Sun, 04 Jun 2023 07:24:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685888673; cv=none; d=google.com; s=arc-20160816; b=ltygrJO6s+9WDTiBNI8CmeGLmUrvizENwm68j5Yh91u8Oh108RgwgxVZhKeXAFvcE3 ZrcWBeEJjwc8Iu7CUUUA3DZCbsJVtzC2kKukA7/br+dSuxE84t3xVza3WUJ3Hl0wK18k oML6h9gbqCzmuPljlLxU9vrz7rUH1OfvV/PRpMEx74Ooig6moz4WAkCG+BO6eiWL1jjJ M8N6Z/shRVpXtH49Z4qogB6KJc2plkFEbyr8N202QKkvy6e04RX9yK0Y3vwHE3nDzL8+ JLq5QbY50MOdz8R7c2OJ7cloJHBr8SjYvig4HsuhxVLioA2iUkkO0R29aL8M1gbT9dVx 9Tgg== 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=bIF2ahGzJpyo+TqeABEPHibTttnCkEMB3Njy7q/BSEo=; b=paLNNjM0igbLKbVxkSLbk2SSHOsMND/2tWfVcKNCKC/EZ9ATGoucFGrr5IyWp3+ecl KwWdCQvbMx6ADbM85DJrRcFeTj30g5VoQKGlAosgHj38f81V81Uh6+EbsbtMFH5msDnx R/Q1zZEE1q6bweVkG+x6ajG2s4xcMIhYRKQgjDRLLmdrG67asae3jttcY03S7RzmLPBc /+8WeKa1JsTIJ0NNq6FOt5HrjLtH6tl7Vp2Ky9jbPcYQRpKB4rz2+ZIoAkgUNnQt9Q0d YVUzwwmBLiy7FRmQIpJfjdLYAoQsL7j9qaxnFETPTzidVuLD8Rbpvn14KLDIdXO5iaGo P3fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=N4P+EYIE; 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 q4-20020a170902bd8400b001ae788e1660si3901420pls.441.2023.06.04.07.24.19; Sun, 04 Jun 2023 07:24:33 -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=N4P+EYIE; 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 S231981AbjFDNZ6 (ORCPT + 99 others); Sun, 4 Jun 2023 09:25:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbjFDNZ4 (ORCPT ); Sun, 4 Jun 2023 09:25:56 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A02D9CA; Sun, 4 Jun 2023 06:25:55 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-5147f4bbfdaso5204768a12.0; Sun, 04 Jun 2023 06:25:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685885154; x=1688477154; 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=bIF2ahGzJpyo+TqeABEPHibTttnCkEMB3Njy7q/BSEo=; b=N4P+EYIEs8NjOqM/Dmregn7Jp/GB1iY+W/H4AyYoNezm+92mg9UetM3yHca1fGjhZG /4854DPF5NfM/9eUZ9OtKL7xYKYqfH6/WMLcpyDJ99JJIWC0FfbhoAkH+XHa8kN3RGGF IinXBa20IFIEGo7ktOSH5SCo/YfLGjirKDKwBFrHvn+ez6wCqftSoQXBZkoAuiR/L6Jz SzbrfVawaQrL22pGLzYX+8d3G+1g1r3A5iPwhBFti7nZed3oE+p5csx0oY5Uc1BZRuoG UNxEZAE3M3+aQnaFi8fI3iEqLCyTOiU8fHXw+l2wkak1IVi1k9gIAWxEKr0ncVZYwTsn 3MXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685885154; x=1688477154; 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=bIF2ahGzJpyo+TqeABEPHibTttnCkEMB3Njy7q/BSEo=; b=ZGB9W7aI5Q844+YSO1rX4C1GtxSR+wig231XLfn3UVcneck4ZzXDxlze0qllvLg4Sv l9OEivejAcseAzirNY9cTZhdpFxsQst14hbs7mExAZ91vwSAJXty7uKbYcoH29SqzmK6 kR0Cz1lfVvD6r8DEBxBnMKONJdQ2YzNqE5syitWauZhFVN1OUTCHi21Eejbd9bTRH6dE XHXPJ3fRTdjbUhjxFlc9FZ6htCmVyxLqpm8hWc0vPPiJWQ77wLlw9TYQoZcyYuWdT5e2 QS/L7Z6M6YL5s1ZgAclwMIVhEDZ+yTgFgaH4FEnrdC5rcUARm+zbJhTzi1F9GmA7cwhK wsEA== X-Gm-Message-State: AC+VfDzVld7ElZ/WogiLae2TjSQJLKHPow9ZBqPw8zymgw9c/18c379p ebp0f0sS/zOrfm6dO+nN/WA= X-Received: by 2002:a17:907:608c:b0:933:868:413a with SMTP id ht12-20020a170907608c00b009330868413amr4349728ejc.15.1685885153871; Sun, 04 Jun 2023 06:25:53 -0700 (PDT) Received: from skbuf ([188.27.184.189]) by smtp.gmail.com with ESMTPSA id x13-20020a170906710d00b0096f694609f3sm3098369ejj.31.2023.06.04.06.25.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jun 2023 06:25:53 -0700 (PDT) Date: Sun, 4 Jun 2023 16:25:50 +0300 From: Vladimir Oltean To: =?utf-8?B?QXLEsW7DpyDDnE5BTA==?= Cc: "Russell King (Oracle)" , 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 , 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: <20230604132550.zi32bvniqg7ztd5o@skbuf> References: <20230524175107.hwzygo7p4l4rvawj@skbuf> <576f92b0-1900-f6ff-e92d-4b82e3436ea1@arinc9.com> <20230526130145.7wg75yoe6ut4na7g@skbuf> <7117531f-a9f2-63eb-f69d-23267e5745d0@arinc9.com> <826fd2fc-fbf8-dab7-9c90-b726d15e2983@arinc9.com> <20230604125517.fwqh2uxzvsa7n5hu@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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,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 Sun, Jun 04, 2023 at 04:14:31PM +0300, Arınç ÜNAL wrote: > On 4.06.2023 16:07, Russell King (Oracle) wrote: > > On Sun, Jun 04, 2023 at 03:55:17PM +0300, Vladimir Oltean wrote: > > > On Sun, Jun 04, 2023 at 01:18:04PM +0100, Russell King (Oracle) wrote: > > > > I don't remember whether Vladimir's firmware validator will fail for > > > > mt753x if CPU ports are not fully described, but that would be well > > > > worth checking. If it does, then we can be confident that phylink > > > > will always be used, and those bypassing calls should not be necessary. > > > > > > It does, I've just retested this: > > > > > > [ 8.469152] mscc_felix 0000:00:00.5: OF node /soc/pcie@1f0000000/ethernet-switch@0,5/ports/port@4 of CPU port 4 lacks the required "phy-handle", "fixed-link" or "managed" properties > > > [ 8.494571] mscc_felix 0000:00:00.5: error -EINVAL: Failed to register DSA switch > > > [ 8.502151] mscc_felix: probe of 0000:00:00.5 failed with error -22 > > > > ... which isn't listed in dsa_switches_apply_workarounds[], and > > neither is mt753x. Thanks. > > > > So, that should be sufficient to know that the CPU port will always > > properly described, and thus bypassing phylink in mt753x for the CPU > > port should not be necessary. > > Perfect! If I understand correctly, there's this code - specific to MT7531 > and MT7988 ports being used as CPU ports - which runs in addition to what's > in mt753x_phylink_mac_config(): > > mt7530_write(priv, MT7530_PMCR_P(port), > PMCR_CPU_PORT_SETTING(priv->id)); > > This should be put on mt753x_phylink_mac_config(), under priv->id == > ID_MT7531, priv->id == ID_MT7988, and dsa_is_cpu_port(ds, port) checks? > > Arınç Given that mt753x_phylink_mac_config() and mt753x_phylink_mac_link_up() also both modifies MT7530_PMCR_P(port), have you studied the code to see what really is changed compared to what's in the PMCR_CPU_PORT_SETTING() macro, after both phylink methods have run?