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 93964CEFC31 for ; Tue, 8 Oct 2024 16:42:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To: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=pjzLGE2IJYJwFsJ2m+a3HtCOhc52md5DhFFWrz4w1Qk=; b=c+Yv+ptzc0erHNRywXTz7MnNrQ XxZcrQaoKi8d+H01NDZVXAPMKJdnVHGa6X4jIEfp0sj1bTM5flypQCqLEJUlVlrpWp4+lYiiCLx4e CqwE/TnjsJWgeuAqKEIO0hyJx666WI8lVMs4k2Ks+090/0LhbBaOV/0j2RZYts/HXMRqF3SWs888O l5wAe/gCpQQ506XHkUYcB2i0+JIcMh96q5K+6scUEISoIq/WKZQ+4TWTyLQALyjIm3qLyMLnf1B3v YHliVknRVeqpXQIVjnVS0xArc7Sq7E1wUqSM/stqf0qdVe08aZ/6/eRtjgfv7BZKA1XQaC5mX21J+ u++3bdRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syDI9-00000006Wrr-0iMF; Tue, 08 Oct 2024 16:42:33 +0000 Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syDGl-00000006WWh-09VO for linux-arm-kernel@lists.infradead.org; Tue, 08 Oct 2024 16:41:09 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id DEB05FF803; Tue, 8 Oct 2024 16:41:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1728405663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pjzLGE2IJYJwFsJ2m+a3HtCOhc52md5DhFFWrz4w1Qk=; b=LLdrRS+lQ0s3NBVCsEHdtkl4iErajW+ktXz8f6LpdJxcoxaa1leGcH7akawTldRjRKXeWT Xh5vr1TctSzmBKgHEa1frSrhwcQW4qp8xXnB8TJuoODxLLYVDDYhzqwejhYYrTJNnIpTkp ys+e6JyahpY1x/036ZXFvhSnCmQHgK+0moxNFVw6lPWIPIwdQJsQj83uzkUBwkK3L68JSr 7UaQnOT25NnKAbR4kIxnh46dFv0FzYI6YDGBmJvUN7gQEqYqdOYlhydsZr/pLf3U47QCMV gNQTcV07TkS/CJtkMJk84nFLZhZlaL/jOU+ha9RLmtQvT/2TkuqrGYSJD062Sg== Date: Tue, 8 Oct 2024 18:41:02 +0200 From: Maxime Chevallier To: "Russell King (Oracle)" Cc: Andrew Lunn , davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Jakub Kicinski , Eric Dumazet , Paolo Abeni , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Herve Codina , Florian Fainelli , Heiner Kallweit , Vladimir Oltean , Marek =?UTF-8?B?QmVow7pu?= , =?UTF-8?B?S8O2cnk=?= Maincent , Oleksij Rempel Subject: Re: [PATCH net-next v2 7/9] net: phy: introduce ethtool_phy_ops to get and set phy configuration Message-ID: <20241008184102.5d1c3a9e@device-21.home> In-Reply-To: References: <20241004161601.2932901-8-maxime.chevallier@bootlin.com> <4d4c0c85-ec27-4707-9613-2146aa68bf8c@lunn.ch> <20241007123751.3df87430@device-21.home> <6bdaf8de-8f7e-42db-8c29-1e8a48c4ddda@lunn.ch> <20241007154839.4b9c6a02@device-21.home> <20241008092557.50db7539@device-21.home> <20241008165742.71858efa@device-21.home> Organization: Bootlin X-Mailer: Claws Mail 4.3.0 (GTK 3.24.43; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-GND-Sasl: maxime.chevallier@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241008_094108_047455_AEC300C3 X-CRM114-Status: GOOD ( 29.81 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 8 Oct 2024 16:27:43 +0100 "Russell King (Oracle)" wrote: > On Tue, Oct 08, 2024 at 04:57:42PM +0200, Maxime Chevallier wrote: > > Oh but I plan to add support for the marvell switch, mcbin, and turris > > first, > > What do you think needs adding for the mcbin? > > For the single-shot version, the serdes lines are hard-wired to the > SFP cages, so it's a MAC with a SFP cage directly connected. > > For the double-shot, the switching happens dynamically within the > 88x3310 PHY, so there's no need to fiddle with any isolate modes. Nothing related to isolate mode regarding the mcbin :) They aren't even implemented on the 3310 PHYs anyway :) > > The only thing that is missing is switching the 88x3310's fibre > interface from the default 10gbase-r to 1000base-X and/or SGMII, and > allowing PHYs to be stacked on top. The former I have untested > patches for but the latter is something that's waiting for > networking/phylib to gain support for stacked PHY. That's one part of it indeed > Switching the interface mode is very disruptive as it needs the PHY > to be software-reset, and if the RJ45 has link but one is simply > plugging in a SFP, hitting the PHY with a software reset will > disrupt that link. > > Given that the mcbin has one SFP cage that is capable of 2500base-X, > 1000base-X and SGMII, and two SFP cages that can do 10gbase-r, with > a PHY that can do 10/100/1G/2.5G/5G/10G over the RJ45, I'm not sure > adding more complexity really gains us very much other than... > additional complexity. What I mean is the ability for users to see, from tools like ethtool, that the MCBin doubleshot's eth0 and eth1 interfaces have 2 ports (copper + sfp), and potentially allow picking which one to use in case both ports are connected. There are mutliple devices out-there with such configurations (some marvell switches for example). Do you not see some value in this ? This isn't related at all to isolate, but rather the bigger picture of the type of topology I'm trying to improve support for. Setups with 2 PHYs connected to the same MAC are similar to the eth0/1 interfaces in the sense that they offer 2 front-facing ports for one single MAC. IMO it's easier to first deal with the MCBin setup first. Again that's a whole other topic, but my idea would be to be able, from ethtool, to see that mcbin eth0 has one port capable of 10/100/1000/2500/5000/10000BaseT, and another capable of 1000BaseX/2500BaseX/5GBaseR/10GBaseR or whatever the plugged SFP module offers. I do know that the MCBin has a large variety of interfaces easily accessible, but it also looks like a good board to introduce such multi-port support. Many people have it, it works well with an upstream kernel, making testing and review effort easier IMO. I know that this whole thing of dealing with 2 PHYs attached to the same MAC has lots of ramifications (the 1 PHY 2 ports setup I just mentionned, the phy_link_topology that has been added, the isolate mode, muxing support, etc.), that's why I tried to cover all the angles at netdevconf + LPC. I have code for most of that pretty-much ready to send. Thanks, Maxime