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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F2208C77B72 for ; Fri, 14 Apr 2023 22:07:40 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4576F85E73; Sat, 15 Apr 2023 00:07:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="ATiONEYI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 54A2D85E45; Sat, 15 Apr 2023 00:07:06 +0200 (CEST) Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DC53485DEA for ; Sat, 15 Apr 2023 00:07:01 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=nm@ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 33EM6lvA064971; Fri, 14 Apr 2023 17:06:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1681510007; bh=cwiPO+kzOAhoAoyYUKJheK8MNduvqq0ctGcG8UjxwSc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ATiONEYIJ49vJO6laHaRoZ81Xg6Fs1x/Ct3EefPkNvA4FZg3+hte8nhlWHan9urry ENlk5awCv0t8RRTu20rcgnMSoiefb4qAnnkZann7cGUpb9A8c/JJezguiUb+v9TgLr XKi1jt7b3VTiQhb9eHWSkz8aMW5GFzCvCi2uaR7Q= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 33EM6kpJ092228 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 14 Apr 2023 17:06:47 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Fri, 14 Apr 2023 17:06:46 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Fri, 14 Apr 2023 17:06:46 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 33EM6keD059014; Fri, 14 Apr 2023 17:06:46 -0500 From: Nishanth Menon To: Marek Vasut , Tom Rini CC: Siddharth Vadapalli , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Vignesh Raghavendra , Michal Simek , Ramon Fried , , Nishanth Menon , =?UTF-8?q?Marek=20Beh=C3=BAn?= Subject: [PATCH V3 1/3] net: phy: dp83867: Explicitly check against sgmii Date: Fri, 14 Apr 2023 17:06:43 -0500 Message-ID: <20230414220645.37092-2-nm@ti.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230414220645.37092-1-nm@ti.com> References: <20230414220645.37092-1-nm@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean dp83867 driver only supports sgmii and not all the newer protocols. Drop the usage of the generic phy_interface_is_sgmii function and just matchup to the specific mode supported. Reported-by: Tom Rini Suggested-by: Marek Vasut Suggested-by: Marek BehĂșn Link: https://lore.kernel.org/all/b82ac325-4818-8e72-054b-640268dbf806@mailbox.org/ Signed-off-by: Nishanth Menon --- Changes since v2: * New patch. drivers/net/phy/dp83867.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index b861bf7cef36..7111e36aa0d0 100644 --- a/drivers/net/phy/dp83867.c +++ b/drivers/net/phy/dp83867.c @@ -330,7 +330,7 @@ static int dp83867_config(struct phy_device *phydev) DP83867_RGMIIDCTL, delay); } - if (phy_interface_is_sgmii(phydev)) { + if (phydev->interface == PHY_INTERFACE_MODE_SGMII) { if (dp83867->sgmii_ref_clk_en) phy_write_mmd(phydev, DP83867_DEVADDR, DP83867_SGMIICTL, DP83867_SGMII_TYPE); -- 2.40.0