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 4F88CEE645D for ; Thu, 12 Sep 2024 08:17:49 +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=Dhi1nnvn70H7OcO5v9lRE1g1qsUgFUHYEvrguwUMnsE=; b=OiAD+iyq87CHIPRPHXm652irA6 uMhql69EYfodRGwgKXXrSpSZdwRW9Z1OiX1ni1lz2Kepkhc7iqA/tK1NdSEtwNkY06kVRbcHrHWv6 D+SN5taoUh3V35icDefIVLOYYtFHk8DM9dIPTwbq07RU1FuggWzA7bUtoHb9BdOpEp/vJXxvaOC39 0p17ypNh/IXfuubJhyXTDOT6KARTePD5Vp48AmGV3kKogQafeQT5hKVx4V0+1XddgsRExy5EQJZJt 0U7VVELitFxLwlTJQxUjabQWGAZ20tNA6v4fm+i1qOMKRMPoWAFk71p5+y2SIOxwBQGse9D0M3DN5 qK/EyRTg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sof1F-0000000CKoB-0cTe; Thu, 12 Sep 2024 08:17:37 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soez9-0000000CKTv-1IgZ for linux-arm-kernel@bombadil.infradead.org; Thu, 12 Sep 2024 08:15:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=Dhi1nnvn70H7OcO5v9lRE1g1qsUgFUHYEvrguwUMnsE=; b=YL4D8f5fX9OKVjCCr3VNuS/e9P nuX/5+Hc/wBOhkPAwmLtuK16jArsa7VM0C3LqfhvjRy8zqJOochd54eLtMH1aiR4fIYkiRO+XY6B8 0QOhlSKQcY+K4H4ZocdNKQNm/hRtvUkDfTt0O2Su8sDBusCfek1lKxvuFvrYIKjRMIgdsTmEQ1XOY BG4ZmQT7HNX99PMdx+p6uUWFNoi4tNXn6RMCVobITlFG74k8Hoo7YQdG8RoroWedfpJJ7M1ohuGav 36A54cOPVB+ENempJGnvKPlEoLFQC0/5ikD/27shV5uQfUoY8VPJyaoqKaRrvvFU/lTJOnP9MkcRV mlkufV3A==; Received: from relay8-d.mail.gandi.net ([217.70.183.201]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1soez5-00000000PTL-3NVo for linux-arm-kernel@lists.infradead.org; Thu, 12 Sep 2024 08:15:25 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id ED6201BF205; Thu, 12 Sep 2024 08:15:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1726128919; 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=Dhi1nnvn70H7OcO5v9lRE1g1qsUgFUHYEvrguwUMnsE=; b=Z5Jsz3MjcfDVKF1S6rrgjTSMYhysRHst3Yg3TBKEjXc78YPg2PmofKuu3n49MryzykKHfN jjrU2BOElDqPFVp75uQ3lwuPAP7DEAZpKEeLcA/oykI3j1HI6ouC/DM+BGiYUWu8ZUUaQZ Hx+78b3am6KVoijrbT4Fk2RmwLSOpxlRUozjrJCCrrlzVkfubhSQd4gAaixPFxd7rjE2n1 +8G07KlZ5XaY/2yC/hQkmDbtUydZOH/IAlaXOMUdIF7PmeUGbT+JBgGinRUk+LoNmeXMFO JN6gTUZJ+lRN8oX9MIUQbYzG5YievGi7Tv8gx8GRAHbTXbBRHwu0vvB4NOGl+A== Date: Thu, 12 Sep 2024 10:15:12 +0200 From: Maxime Chevallier To: davem@davemloft.net Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Russell King , 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 0/7] Allow controlling PHY loopback and isolate modes Message-ID: <20240912101512.5d33335d@fedora.home> In-Reply-To: <20240911212713.2178943-1-maxime.chevallier@bootlin.com> References: <20240911212713.2178943-1-maxime.chevallier@bootlin.com> 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-20240912_091524_037689_86FB7593 X-CRM114-Status: GOOD ( 25.54 ) 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 Wed, 11 Sep 2024 23:27:04 +0200 Maxime Chevallier wrote: > Hello everyone, > > This series brings support for controlling the isolation and loopback > modes for PHY devices, through a netlink interface. > > The isolation support work is made in preparation for the support of > interfaces that posesses multiple PHYs attached to the same MAC, on the > same MII bus. In this configuration, the isolation mode for the PHY is > used to avoid interferences on the MII bus, which doesn't support > multidrop topologies. > > This mode is part of the 802.3 spec, however rarely used. It was > discovered that some PHYs don't implement that mode correctly, and will > continue being active on the MII interface when isolated. This series > supports that case, and flags the LXT973 as having such a broken > isolation mode. The Marvell 88x3310/3340 PHYs also don't support this > mdoe, and are also flagged accordingly. > > The main part needed for the upcomping multi-PHY support really is the > internal kernel API to support this. > > The second part of the series (patches 5, 6 and 7) focus on allowing > userspace to control that mode. The only real benefit of controlling this > from userspace is to make it easier to find out if this mode really > works or not on the PHY being used. > > This relies on a new set of ethtool_phy_ops, set_config and get_config, > to toggle these modes. > > The loopback control from that API is added as it fits the API > well, and having the ability to easily set the PHY in MII-loopback > mode is a helpful tool to have when bringing-up a new device and > troubleshooting the link setup. > > The netlink API is an extension of the existing PHY_GET, reporting 2 new > attributes (one for isolate, one for loopback). A PHY_SET command is > introduced as well, allowing to configure the loopback and isolation. One thing I forgot to mention is that the phy-tunable API could also possibly be a place to set these parameters instead of this new command. Maybe this would be the preferred way ? Thanks, Maxime