Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1278875lfc; Wed, 1 Jun 2022 14:01:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvwFDhqhtDc3xWv35SyxJCtB49P5hGmU/kIVbnvMF49P1DA8UhTSEFI6UDmJKamPIJLtht X-Received: by 2002:a17:90a:e818:b0:1e3:3c67:7781 with SMTP id i24-20020a17090ae81800b001e33c677781mr11026298pjy.72.1654117283359; Wed, 01 Jun 2022 14:01:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654117283; cv=none; d=google.com; s=arc-20160816; b=EEuzzll2CA+YHmS8xfuS77mlHZSOp/w1/5aujYDaEagO7TLCwGiTE93O8xim+Gfya/ S3eOAsDHgAWWRh+fr4YE+tAyNGXznQSRnqjSAe1Ri10uLDJy7BNiCwFIDhRpJiVppuS4 2an+zES5iC23q/Pr4KfPPfk/PPC2vJQUgP9Z64Uvctf05vcq0YOhIeo8ZH/BLEuGHSWd yugl4JOwfZC8xNVJZV8nQMYkE2T4G1Ry0fVDGo9WlMmR1wyFjx+0ilnwAMfoE6G6NK3l przZCqytgo1aipFMrh7vatUDufdR9IuOnbfOxmOxbqH7RqSixs0pddMlB9K4vCTYSvrv /4Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=kUMBZgY8iX2iMdYNu+l03Qq//chFmyXyGt0+8brQTSk=; b=JYbyWFsfpR0UjDYX/k3RBVSb2+I+likOjEDKY1C2rYUwn58YO0vBL+CfR+yY4vGqXi IIBi9YxxdXhoJ/5L5eCRsMGJ1oFoD0E7A+PxgcCb0KKHiJ4ahWZYiTFazmrjqSMETN/T r0vmfWwR/yr62Fl6G+lc4qa2wGhjydXbjOMQi9dfzSmCKy+41azsqCdrShJdiLkbw+8P a7mzulX3JVUctUMjXQ5f+YxtYvhY3YGg08+PTcTKibmn6OWY5Yfiic0Y2ep81b3XO4G0 StamKoXH0RblzBsWq5fMqr1fgoG0QdzEQNfY3TEzGaL0J2bhWLCfQc6/NmadqSQ4mrIg v6BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=YNH32eHx; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u11-20020a170902a60b00b001641243dbb5si3438229plq.476.2022.06.01.14.01.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 14:01:23 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=YNH32eHx; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A69B62DB314; Wed, 1 Jun 2022 13:06:22 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343987AbiEaLza (ORCPT + 99 others); Tue, 31 May 2022 07:55:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242862AbiEaLz1 (ORCPT ); Tue, 31 May 2022 07:55:27 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F30B3A1A4; Tue, 31 May 2022 04:55:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=kUMBZgY8iX2iMdYNu+l03Qq//chFmyXyGt0+8brQTSk=; b=YNH32eHxS/BtFCzN1yaCjACuh0 uddqn/a6Y22J0eGRE4v6jngNh+Q+KTupeG11aTjhkcCNjB51jVLnqntXy7qbZSjLio1B1hKgHfTMY L9WIBD2zhCIb+2Z2aIiLcJJrVvcULHstOdaqGOWpLLP0UWeP0BlaZBd3UGkYUAByQ+HQskb0WNTJO gfSg8ExNfv9zDGoFrRIiZR8y272r9qt4dUeo2AQV9nA8618XDtEFrxlGJ4f0yUJFSumUncpEOAxET CQl9OBSC9Rg71jq+QKhcuIoy/5FAeD8+U0qXjUCBBK+htLofqzlXpjGohv6om2+Xz2CMNSW6J2OPs rvK5XLOw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:60902) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nw0T1-0004uB-Ks; Tue, 31 May 2022 12:55:19 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1nw0T0-0002Mh-RY; Tue, 31 May 2022 12:55:18 +0100 Date: Tue, 31 May 2022 12:55:18 +0100 From: "Russell King (Oracle)" To: Siddharth Vadapalli Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, vladimir.oltean@nxp.com, grygorii.strashko@ti.com, vigneshr@ti.com, nsekhar@ti.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kishon@ti.com Subject: Re: [PATCH 3/3] net: ethernet: ti: am65-cpsw: Move phy_set_mode_ext() to correct location Message-ID: References: <20220531113058.23708-1-s-vadapalli@ti.com> <20220531113058.23708-4-s-vadapalli@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220531113058.23708-4-s-vadapalli@ti.com> Sender: Russell King (Oracle) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Tue, May 31, 2022 at 05:00:58PM +0530, Siddharth Vadapalli wrote: > In TI's J7200 SoC CPSW5G ports, each of the 4 ports can be configured > as a QSGMII main or QSGMII-SUB port. This configuration is performed > by phy-gmii-sel driver on invoking the phy_set_mode_ext() function. > > It is necessary for the QSGMII main port to be configured before any of > the QSGMII-SUB interfaces are brought up. Currently, the QSGMII-SUB > interfaces come up before the QSGMII main port is configured. > > Fix this by moving the call to phy_set_mode_ext() from > am65_cpsw_nuss_ndo_slave_open() to am65_cpsw_nuss_init_slave_ports(), > thereby ensuring that the QSGMII main port is configured before any of > the QSGMII-SUB ports are brought up. This sounds like "if we're configured via port->slave.phy_if to be in QSGMII mode, then the serdes PHY needs to be configured before any of the QSGMII ports are used". Doesn't that mean that if port->slave.phy_if is QSGMII, then the port _only_ supports QSGMII mode, and conversely, the port doesn't support QSGMII unless firmware said it could be. So, doesn't that mean am65_cpsw_nuss_init_port_ndev() should indicate only QSGMII, or only the RGMII modes, but never both together? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!