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 F0945CF8840 for ; Fri, 4 Oct 2024 17:12: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: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=WFvkoN0tzzAFwJQTN+9OZPcm7C12bxp5VehHzezOGxs=; b=uyRbz2vX3ZHS/ZrrbfypmaVrME 6LhV05geFk06grGGORxt9a47Qav9daQeHtJ6fdWn3MZPuNu7el26m2pnTSuAiwPLHMFWgW5vqhD2T 83fEc/xgi56pzz59hXQ/FyhEJvXQD0qIAaRjRd8xQACIP+3RoWMoKDLHjVx0hXKTAFiS81wSB199r USfeRZZ+Y3TcovwyWXKI72LNLFw7QL8zU01Zt1oM+3h8FXmQ4f71wYezzSxGIyIBp82xSR2C1bWIU aPMytYnHpzdsNYP1RWnIZdFEby6QP/qXrW7vxZkbj7V98Z9koL3zXfnuvuybAjDSep8uYHqC8k+Zw 85QB9Rcw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1swlqe-0000000DSJy-0Fxe; Fri, 04 Oct 2024 17:12:12 +0000 Received: from relay7-d.mail.gandi.net ([217.70.183.200]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1swkyS-0000000DCgK-3rLo for linux-arm-kernel@lists.infradead.org; Fri, 04 Oct 2024 16:16:14 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id ACE122000A; Fri, 4 Oct 2024 16:16:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1728058571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WFvkoN0tzzAFwJQTN+9OZPcm7C12bxp5VehHzezOGxs=; b=nQ2zjjAQlt78dYOu0azZAA8LApDVs8sqGRzduRI0Q77ScZDM8EovGkfJup3Kt8KRk0SRDK FI35D4EVOm5eLhbjlxt7SrN9xB6Y/ldF72ZCCuDWhzjASUla+iNxbcAaODYABOELlZu0N4 HJUwdmPhjQm+iQHwZbs6oriIhb82MNfYTuRCowgg0frvQAOMxw+jhYajfL85RK7Z2Oe37l 3Cdxa9zyUQ5Lc4wU01d/Jd9lcDGMNu7AvZpP8/jEucICgW+oZ+obA2LWE2usGt8kX4lAXO PqSIvJeBoGo22TxqPFMJSke+eOfoTR876OO1S2hEDkNkMDNAXkS9jkgYSWIpsw== From: Maxime Chevallier To: davem@davemloft.net Cc: Maxime Chevallier , 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 , =?UTF-8?q?Marek=20Beh=C3=BAn?= , =?UTF-8?q?K=C3=B6ry=20Maincent?= , Oleksij Rempel Subject: [PATCH net-next v2 6/9] net: phy: marvell: mv88e1111 doesn't support isolate in SGMII mode Date: Fri, 4 Oct 2024 18:15:56 +0200 Message-ID: <20241004161601.2932901-7-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20241004161601.2932901-1-maxime.chevallier@bootlin.com> References: <20241004161601.2932901-1-maxime.chevallier@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-GND-Sasl: maxime.chevallier@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241004_091613_114707_F48E854A X-CRM114-Status: GOOD ( 10.55 ) 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 The 88e1111 datasheet indicates that it supports the isolate mode in GMII, RGMII and TBI modes, but doesn't mention what it does in the other modes. Testing showed that setting the isolate bit while the PHY is in SGMII mode has no effect. Reflect that behaviour in the .can_isolate() driver ops. Signed-off-by: Maxime Chevallier --- V2 : New patch drivers/net/phy/marvell.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index 9964bf3dea2f..912b08d9c124 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -1092,6 +1092,14 @@ static int m88e1111_set_tunable(struct phy_device *phydev, } } +static bool m88e1111_can_isolate(struct phy_device *phydev) +{ + if (phydev->interface == PHY_INTERFACE_MODE_SGMII) + return false; + + return true; +} + static int m88e1011_get_downshift(struct phy_device *phydev, u8 *data) { int val, cnt, enable; @@ -3704,6 +3712,7 @@ static struct phy_driver marvell_drivers[] = { .set_tunable = m88e1111_set_tunable, .cable_test_start = m88e1111_vct_cable_test_start, .cable_test_get_status = m88e1111_vct_cable_test_get_status, + .can_isolate = m88e1111_can_isolate, }, { .phy_id = MARVELL_PHY_ID_88E1111_FINISAR, -- 2.46.1