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 7D22CFA3723 for ; Fri, 13 Sep 2024 07:45:24 +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=VbNBS11AUnkLj6P267FhnebVN+Afa/PIxo5XX6/e7v0=; b=pKeQNkNoFbSOwWnJ+/dc2JLCab McyCcB1hsndJuxgRi0c4ti6Is8SZE+y2Qyvwdebn2f0sIkw3kHtL/z0emghRW6NoO2fyy+HKLSS6X fe4MO7jxYpDNIT3aoC8FC2rSWEQKo7YXZcz3bYcKhfiVO0Zj1F+pjK2mggLEha1DrFhHrUzo7HJE/ HYZexc+4PZ3SxVAMdHW5FHVrSA/Dw3ErXKef12NU/g/o2ohdxcCdbuPLU4vtsKGyjx9/hL6ZLC1Z9 iemr1CoEr+Bp3mfpdGCstjH4l4wnQsFKOjuBI6WWLgQjjcp8aQpQcDx2cDSnw/soJA2ZuTHQmZkNE /0Shdjpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sp0zQ-0000000FD7I-3gPm; Fri, 13 Sep 2024 07:45:13 +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 1sp0xj-0000000FC9H-0mNU for linux-arm-kernel@bombadil.infradead.org; Fri, 13 Sep 2024 07:43: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=VbNBS11AUnkLj6P267FhnebVN+Afa/PIxo5XX6/e7v0=; b=Wkam8Z+kIY51ALjMZ2kM+hI23Q cpxQBOYDsXGC/4zEbIIXMjhzc5sDpeagMtIwKkjmSUoymM2J080e52tgNwAqypvw4ilhF+Svj5sPm ljCXcw7ArsLwhY9eKPsZ7CxqDpv3CEnGPomblOGZljEZrcmOHdvTOXNuprt+/EC4EUNNLOYr+f3i6 4iXxDlz3tVQadGzGFZnMKP6cw+wIwbGsxPrYHO1ViLPxNm6+pESD/aC6vd8ncWbWILym8BGwfMQMa DA0AFigX0Qxuj0DMY6c3HXDCKmMl0QxGJaydNERcitQJERBAO/hVy3bSefcKOibXxHZH/XsNkNXU0 ltQzVObg==; Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sp0xe-00000000cHR-35Th for linux-arm-kernel@lists.infradead.org; Fri, 13 Sep 2024 07:43:25 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 1C5A8240007; Fri, 13 Sep 2024 07:43:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1726213397; 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=VbNBS11AUnkLj6P267FhnebVN+Afa/PIxo5XX6/e7v0=; b=Q26Flae+FSPLgdiUA2lHNIiJX0f3LqcDsutVu4UhmJ3NmJQk/eZBfiTnwqkbQqQewaQvEA GG0PIc8zXAbtYqM9eN0Fa9zarr24lkOoGkTQD5/HEGFNsDiT/o3ZXVVJQoSx2OiXvzCHuM 6T9URrufOwTy6OHvHDNeNvhbBXG2phBFZdbnuGtApsCZqXoeGgt4kx9J6LT+OD0lbboVdz yvNzivWzqvRjvsKtWbKDLjTHXhD0wG50dRGq3bOx7WWwcPH/osADxoPq1DJ1UjRMfpiKvQ fjn+/6GKLV8BnAeWtt0FC8q+Da8IH1YjQjzyquvxEVSIeP85ydyuFlK1OJGtfQ== Date: Fri, 13 Sep 2024 09:43:13 +0200 From: Maxime Chevallier To: Florian Fainelli Cc: davem@davemloft.net, 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 , Heiner Kallweit , Vladimir Oltean , Marek =?UTF-8?B?QmVow7pu?= , =?UTF-8?B?S8O2cnk=?= Maincent , Oleksij Rempel Subject: Re: [PATCH net-next 1/7] net: phy: allow isolating PHY devices Message-ID: <20240913094313.6539264a@fedora.home> In-Reply-To: <7736f0f2-8a99-4329-b290-089454d56e36@gmail.com> References: <20240911212713.2178943-1-maxime.chevallier@bootlin.com> <20240911212713.2178943-2-maxime.chevallier@bootlin.com> <7736f0f2-8a99-4329-b290-089454d56e36@gmail.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-20240913_084323_848048_97F9B3CC X-CRM114-Status: GOOD ( 21.50 ) 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 Hello Florian, On Thu, 12 Sep 2024 11:30:26 -0700 Florian Fainelli wrote: > On 9/11/24 14:27, Maxime Chevallier wrote: > > The 802.3 specifications describes the isolation mode as setting the > > PHY's MII interface in high-impedance mode, thus isolating the PHY from > > that bus. This effectively breaks the link between the MAC and the PHY, > > but without necessarily disrupting the link between the PHY and the LP. > > > > This mode can be useful for testing purposes, but also when there are > > multiple PHYs on the same MII bus (a case that the 802.3 specification > > refers to). > > > > In Isolation mode, the PHY will still continue to respond to MDIO > > commands. > > > > Introduce a helper to set the phy in an isolated mode. > > > > Signed-off-by: Maxime Chevallier > > Not sure where that comment belongs so I will put it here, one thing > that concerns me is if you have hardware that is not strapped to be > isolated by default, and the PHY retains the state configured by Linux, > such that the PHY is in isolation mode. A boot loader that is not > properly taking the PHY out of isolation mode would be unavailable to > use it and that would be a bug that Linux would likely be on the hook to > fix. > > Would recommend adding a phy_shutdown() method which is called upon > reboot/kexec and which, based upon a quirk/flag can ensure that the > isolation bit is cleared. Very good point. I can see the same problem occuring with loopback then (if we use the 802.3 C22 PHY loopback bit). I have such a patch ready actually, for the 2-PHYs-on-the-same-MAC scenario, I will include it in the next iteration. Thanks for your feedback, Maxime