Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp940281rdd; Wed, 10 Jan 2024 04:19:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IEOVhbLM4qO1RAvP9qLEwfH2rRo6NXo0BEVAWPwPBvRijnYBzManzXGUvgTpR82cZKNG4xB X-Received: by 2002:a17:903:41c1:b0:1d4:b698:f7b3 with SMTP id u1-20020a17090341c100b001d4b698f7b3mr1061001ple.90.1704889155105; Wed, 10 Jan 2024 04:19:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704889155; cv=none; d=google.com; s=arc-20160816; b=yZ+xBkmNCc83nKuY71LNmdanPZZ8NN1BniRV+opAc3shRP8stJX7YWcSxVyMJmjQd5 d1mOIJx7JuQr/DnTaYKrEiZZNk3fY3MVqSOelg2OOTr819i9SZcViY8JaivPPJSlkNnA SvSoDAM4Gbm+a8UFztaczd8F2rsjwpy+J8XqkF4B0Zys1b97Svlr5yXyNwQgkpKjs5gG aDlJP3LHTXdBP8zxKOz2dfqZ8A6oOQS4PGCOmFVy7v4UyYoV/H3zHjpKP6tUBqoTo44y 0EFGhCK+qKGsbIDtUjjvpvlWQgZ8IqqeCrDoxMkbxf0J6NjnB3X+Z9NaeLckBEUXHNse BqDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=i1zK7gMFEDaJBzPaWdSQA2i995W/0/mK+MVlYIdQoGQ=; fh=tJzEp5tWbwC95IUv/iLlQqFWwtV9RbdY5MxDYrjx/ak=; b=Bg7GnsjdqbBkpcbEoY//3SkBhns3rQzX8TxK/CFigCE18IS1S+jKipQs8Dg6riVFMp umtQWOk8RA3Znl0icG37W4DnxjXMH6VRzxwnW0/iqJT9SPVktDUmdpP0Vr61sn++fO+E +lE7K+zhYVwH7uLu8ezqNqSPlZh7ChBhYcajRX8I0Xu49f+5ksS16ecAgk9JilhlZgPs r4csWdcj9UfA6wcsgtZwtD+FtSeEoq7nEJbuoGD3qKd7Ix9+4tm4Ry5ulpD5zwKSysfv T/Ivwyml4+xv+LeX65C0GJlsmPDHyI7Mhq+lkmi6ZggHutWnOyW10nrTYxL+mK6pRe3R SxfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=KRnE8B23; spf=pass (google.com: domain of linux-kernel+bounces-22161-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22161-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id jv3-20020a170903058300b001d495d738f0si3408580plb.20.2024.01.10.04.19.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 04:19:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22161-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=KRnE8B23; spf=pass (google.com: domain of linux-kernel+bounces-22161-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22161-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id BCF7928BC22 for ; Wed, 10 Jan 2024 12:19:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 491E8482D6; Wed, 10 Jan 2024 12:19:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="KRnE8B23" Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 22A5347F7D; Wed, 10 Jan 2024 12:19:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk 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=i1zK7gMFEDaJBzPaWdSQA2i995W/0/mK+MVlYIdQoGQ=; b=KRnE8B23fheJEM7RsDSmzMOCZY IHtF9KftesJrPhSF/toSxCOyamyOxbn8l55c+5PhLTvXfIZ95yvIBL/Yu7OxLpLtnBQJ3vSsOphnq l2QH+aXDPYsj/QDns+n99meY2u8Bx4O/J3vrLoJ8DwQZz5GQkOXwOGYiDbmXYrjqqXD2JGPEftB3i E1EUHzXMaO8G5fs2KfEyIEyoBVo6gEmqIGwwJfYeJgBB3/Eb7aTchhrTvq7NOx5yXEHj3NYN2JyKu 9EwcdYOe8WN8RO7B8jXfx0kfh83Di/1ODgy5kliEhX2iaEwwtc7JAoQz5Fnu506fwpH8JMQdzQJbC PabXhyvA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:35818) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rNXXW-0005Mr-0S; Wed, 10 Jan 2024 12:18:34 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rNXXW-0005Ib-Do; Wed, 10 Jan 2024 12:18:34 +0000 Date: Wed, 10 Jan 2024 12:18:34 +0000 From: "Russell King (Oracle)" To: Luo Jie Cc: agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, corbet@lwn.net, catalin.marinas@arm.com, will@kernel.org, p.zabel@pengutronix.de, shannon.nelson@amd.com, anthony.l.nguyen@intel.com, jasowang@redhat.com, brett.creeley@amd.com, rrameshbabu@nvidia.com, joshua.a.hay@intel.com, arnd@arndb.de, geert+renesas@glider.be, neil.armstrong@linaro.org, dmitry.baryshkov@linaro.org, nfraprado@collabora.com, m.szyprowski@samsung.com, u-kumar1@ti.com, jacob.e.keller@intel.com, andrew@lunn.ch, netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, ryazanov.s.a@gmail.com, ansuelsmth@gmail.com, quic_kkumarcs@quicinc.com, quic_suruchia@quicinc.com, quic_soni@quicinc.com, quic_pavir@quicinc.com, quic_souravp@quicinc.com, quic_linchen@quicinc.com, quic_leiwei@quicinc.com Subject: Re: [PATCH net-next 18/20] net: ethernet: qualcomm: Add PPE MAC support for phylink Message-ID: References: <20240110114033.32575-1-quic_luoj@quicinc.com> <20240110114033.32575-19-quic_luoj@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240110114033.32575-19-quic_luoj@quicinc.com> Sender: Russell King (Oracle) On Wed, Jan 10, 2024 at 07:40:30PM +0800, Luo Jie wrote: > +static void ppe_phylink_mac_link_up(struct ppe_device *ppe_dev, int port, > + struct phy_device *phy, > + unsigned int mode, phy_interface_t interface, > + int speed, int duplex, bool tx_pause, bool rx_pause) > +{ > + struct phylink_pcs *pcs = ppe_phylink_mac_select_pcs(ppe_dev, port, interface); > + struct ppe_uniphy *uniphy = pcs_to_ppe_uniphy(pcs); > + struct ppe_port *ppe_port = ppe_port_get(ppe_dev, port); > + > + /* Wait uniphy auto-negotiation completion */ > + ppe_uniphy_autoneg_complete_check(uniphy, port); Way too late... > @@ -352,6 +1230,12 @@ static int ppe_port_maxframe_set(struct ppe_device *ppe_dev, > } > > static struct ppe_device_ops qcom_ppe_ops = { > + .phylink_setup = ppe_phylink_setup, > + .phylink_destroy = ppe_phylink_destroy, > + .phylink_mac_config = ppe_phylink_mac_config, > + .phylink_mac_link_up = ppe_phylink_mac_link_up, > + .phylink_mac_link_down = ppe_phylink_mac_link_down, > + .phylink_mac_select_pcs = ppe_phylink_mac_select_pcs, > .set_maxframe = ppe_port_maxframe_set, > }; Why this extra layer of abstraction? If you need separate phylink operations, why not implement separate phylink_mac_ops structures? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!