From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E6314C25B78 for ; Tue, 4 Jun 2024 09:30:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PuZzFKygpwWrmioYbHN3bEQDsGrzBOdpLKmI3xm/mkI=; b=z9tVK8cf0knMIO PHLIqpAW8Zc+NLcl8mdErNmytmjz1faQBcfTWab9ylkZw5Msh/QguJyhsla6MBDuwMUv9m3JbvdBh SrILGskPrzj8BJk3pqu62Jo8tlQP+iHLR2n+pEXtepP2gCagLIOVXoMdp/bI5pYhKNCUzyToz1bfH ZFbM1Ru3PkkYZnd4QLNWo4tW/9cGMM+aP2yv92InGxDoi6hXUcryfaN0MKjceZiT6I3fsG5d7igdh NH12uFHHn4xMyFAoq5h2P7py7+LtOGUWofuORQcEmy+AmbfcG6OZn2lB9/QHc+zrG2fcdWpkzXgTv n2a9j5W4zB4W7R5iPMkA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sEQV3-00000001r1x-2JDB; Tue, 04 Jun 2024 09:30:37 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sEQUz-00000001qyQ-3sv3 for linux-arm-kernel@lists.infradead.org; Tue, 04 Jun 2024 09:30:35 +0000 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240604_023034_018625_4008712C X-CRM114-Status: GOOD ( 22.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel