Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1468813lqj; Tue, 4 Jun 2024 02:30:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWSHRURijUMOxDKjgdW8RnCs6DnpwR6zTKnIp6jY+JfbXxXo2xLjTdW2h5tO3djuO9+b1W6nYMajxocG/fdeWxmduJxbMHrR5j0gvDkRA== X-Google-Smtp-Source: AGHT+IHPogjFUp7+DHSZDcuQFDxjVWZ4AA+l/7IOpBNjPWN/9BpBI+af3vROj1OJekIYMvTaMQYQ X-Received: by 2002:a17:906:4a1a:b0:a68:eacd:2b38 with SMTP id a640c23a62f3a-a68eacd2bcbmr386947166b.23.1717493447207; Tue, 04 Jun 2024 02:30:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717493447; cv=pass; d=google.com; s=arc-20160816; b=Gqy7SyjVBl/kHDKFNZmUoUyGTdOB97qKRS28RL3JdSzTMUU9cU9i2oEC3tT3FBQ2Q3 QCxq/1MIGwZX3mh0V1HRO5s8ke0UH0RAcypxPuM7nWCwqxlpTjYw+Hxw0hM1Qrc7wMIR q84A2AejDvcZG8Ns6M/Ul7y+iQDGP1GQwW2URbQANbKTIfWtDWfzh0bpsyCEMPa9xgLt pMb/BcRwpzTJZrqjBT9IEpNTdWh2xus3rtzepxNfe/hJlJNqu8CcuthQhR4WNl5BW7e3 MjBssuukRkHIlzqOzMp42j4VaqALuLFGxZvpaj/0dLljBEHBTDB3e3JQGHrFLoh8sNG6 ZIRw== ARC-Message-Signature: i=2; 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=cJHyOTgW8f0pN+pCyR+4SzbNPLvRm+LG1KsjKfxQdzA=; fh=X9HnjzwGIAFUnEPUJsbiTzl31Yp990cY1C8edNj7KTQ=; b=gtvLs/snZjJAm8F7/rHBDpWk42wnhYghIErPhGMQYryV97nwY+WWOnjaOaWTScugGJ rGwwz9gkSQ+9lsxRcyLTkghrEn8HiOXV9E20qnlMfeoYM80Kqniu5pABOkfKB5PymrjS ZxVhEzJMIcrpdZWDLLk+8lj8lxeeD7nWnV8uhk8erCA5CDmBg/YcZfvZIpvvFf87GxU4 Up5OgqsNWCdzGoLfVP84pwjBrxc6m0AAf2yIACBtw8sgj8edx9kfmadFCcKBkgTVD2xr XYOqWu+wPROH+5+LQ06SPC6WrdoaNnF2VdOhurxXDxosnYL5PzNHA3KZ6aJT0i7Hmi/C b2TQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=dxHUTOg0; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-200351-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200351-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 am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a68c055f9ecsi321448066b.453.2024.06.04.02.30.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 02:30:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200351-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=dxHUTOg0; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-200351-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200351-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 am.mirrors.kernel.org (Postfix) with ESMTPS id B4E8F1F22100 for ; Tue, 4 Jun 2024 09:30:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 622BB1442EF; Tue, 4 Jun 2024 09:30:31 +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="dxHUTOg0" 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 D2828143C64; Tue, 4 Jun 2024 09:30:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717493430; cv=none; b=XimmdBO87AfdNWgFEcSYsejk7A2XTVa+kvDWD6L74XPbIeIOH14H3wf1w6spY2OdGsrJjuZNTG6xIpn8+uESNBjBQ45EvM8J3gNMaTRvnY7eQ1jLTPLPfXyPRp3USb6LBqTlTJYPr7Dh6i+kRIc6pkog5cue2UnHTm1y14yVVsQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717493430; c=relaxed/simple; bh=hWAo4QYNiSwpEk0zOaWt5KaOgt7K7mWrytT/+CIK6x0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CZis9/L551StW/48LFIDGWhxdrAgYIFaBgE8s+DzzMZlRsUVpfgRo+8c3AWK3E38yxoR8QhMoF/YkdTUYNSuH9cWgeLyCvqoELR7XvUaopX7BseAT7k0lfELqPzZEoDOJkHNPGuKPQ7juKj9dNayp5v/aHfDxYjcC5GLsTrVsCc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=dxHUTOg0; arc=none smtp.client-ip=78.32.30.218 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=cJHyOTgW8f0pN+pCyR+4SzbNPLvRm+LG1KsjKfxQdzA=; b=dxHUTOg0VSgGtqy42SOW3p4CjT xELElaKATDvZn+4zAtgTGWkoldejd08xOyaxJnIVgQrlu8tIkMwvMKusSfH5yaJYR4ZwGpBBf0FAH Xx/+52i5aucCmHzD3vNYfLHSBr2DBCkYJIuir2Iwup7LzHLfVGH81x0O+yMQM31E70ybtpqcPgQON KD8qUlExo9NOnB0TWy+Gtj+/o4Pz3Vr1bM4mLE8d7amME2uyD9EiHLAXZ53LXPwxzJXRx79T3XBh6 VSNb3uuDcU9x+wM7+4GuK80w2hl5VMkilDZjm7QoOCZ4b05S10EOXS1E6XXblqfHNMGb24x/u1VUh KiaYStGQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:49244) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sEQUD-0003hA-0U; Tue, 04 Jun 2024 10:29:45 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1sEQU9-0001IS-3H; Tue, 04 Jun 2024 10:29:41 +0100 Date: Tue, 4 Jun 2024 10:29:40 +0100 From: "Russell King (Oracle)" To: Serge Semin Cc: Andrew Lunn , Heiner Kallweit , Alexandre Torgue , Jose Abreu , Jose Abreu , Vladimir Oltean , Florian Fainelli , Maxime Chevallier , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Sagar Cheluvegowda , Abhishek Chauhan , Andrew Halaney , Jiawen Wu , Mengyuan Lou , Tomer Maimon , openbmc@lists.ozlabs.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH net-next v2 10/10] net: stmmac: Add DW XPCS specified via "pcs-handle" support Message-ID: References: <20240602143636.5839-1-fancer.lancer@gmail.com> <20240602143636.5839-11-fancer.lancer@gmail.com> <2lpomvxhmh7bxqhkuexukztwzjfblulobepmnc4g4us7leldgp@o3a3zgnpua2a> 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: Sender: Russell King (Oracle) On Tue, Jun 04, 2024 at 12:04:57PM +0300, Serge Semin wrote: > On Mon, Jun 03, 2024 at 10:03:54AM +0100, Russell King (Oracle) wrote: > > I can't think of a reasonable solution to this at the moment. One > > solution could be pushing this down into the platform code to deal > > with as an interim solution, via the new .pcs_init() method. > > > > We could also do that with the current XPCS code, since we know that > > only Intel mGBE uses xpcs. This would probably allow us to get rid > > of the has_xpcs flag. > > Basically you suggest to move the entire stmmac_pcs_setup() to the > platforms, don't you? The patch 9 of this series indeed could have > been converted to just moving the entire PCS-detection loop from > stmmac_pcs_setup() to the Intel-specific pcs_init. Yes, it's not like XPCS is used by more than one platform, it's only Intel mGBE. So I don't see why it should have a privileged position over any other PCS implementation that stmmac supports (there's now three different PCS.) If you don't want the code in the Intel driver, then what could be done is provide a core implementation that gets hooked into the .pcs_init() method. The same is probably true of other PCSes if they end up being shared across several different platforms. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!