Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1562211rdb; Mon, 19 Feb 2024 23:01:00 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU//mui05vwZmLeaOsW8wxGQVm1XmxAyWNWHPw1qiEn1AzdvlqQN3eyhKlRb0ZgdByz7BR3Cu+jYkTxiUKdMpUfORtuRhz4bZyd7SNCZg== X-Google-Smtp-Source: AGHT+IF5wxgr+iOYct//Fo6HhZT7ZdA/pIxne4y38AHTKs4UPy+WgqzWmrtZ4qSffZwsKXA9Tfa0 X-Received: by 2002:ac8:4e8d:0:b0:42e:22d2:ca33 with SMTP id 13-20020ac84e8d000000b0042e22d2ca33mr2325050qtp.65.1708412460477; Mon, 19 Feb 2024 23:01:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708412460; cv=pass; d=google.com; s=arc-20160816; b=dHyDyBdoB6Yic7I3de8SAhu1VZRll22SCSaWCQfnfmyPvDoKtxXwzUajDvgzNcwfcR P2lhIEr6ynzbWHI4+3Wd4yXJ/pvfx4WDlmLKHaYblvfqElZ8YptGfBz2l5+zIhVX5Xqf /IHfKCYs0N4Hh03EgXi1Qpv2Tg7iqRN6uDmDefibgNqforM4tADfY7KbwuPCT8et+hXM b8NXcWrbDtDklfpHSlClwIIt5dNfBmVKj3JR9mli21CCXk3R+QjWRTbnWLi+KNGbmk/1 M/dO/sseu1XJtzjYFR5vunEcp3KR1fwLBFipo2iowJHG+zUZxjS1IRko8kBqmeVV+n0e oVxg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=eOu4aLrM1YRAOvpL6/4U7J43lEjo9JIYMBbcRY42UAE=; fh=msT9aBwKX/159ZZ5EDmLzU85aLhkamVymghvdWNyDlU=; b=yo67Y9DzcZvtSClUylkU3B3cDyS/TvnoiiH31uzlYqRMcaMtRVydDoJjW/HT4DOvFK hCnqipfFV5+R0DYTWxHnHZOs+M5R+4kGgSVg2A7rXS7RfDw1X2IcY4F2Okw25Nlr6YeG IZNuRnv5/sIt7F45RVloiZjqIut29pEMLl3KIv/pyP+4aGSi/+l2NaKDQgTqbvtxf1Y7 Jd7Oz3DqvRbhSrIOC+mVCglH9SHVDdt/ZhTCZFu9qo+JBbJCZatjdiWnDoO5CXFO3y8v DpUfCEmQG65Ymld45va1anoHuWI8diOzOyiqLRpsAubamz+v8ERx+/ocQ0P+No9vKTHB kvPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=vMWloydP; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-72445-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72445-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h17-20020ac85491000000b0042ddd55819fsi7499008qtq.555.2024.02.19.23.01.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 23:01:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72445-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=vMWloydP; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-72445-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72445-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 13E5C1C21319 for ; Tue, 20 Feb 2024 07:01:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 110755A0FA; Tue, 20 Feb 2024 07:00:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="vMWloydP" Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA1E153812; Tue, 20 Feb 2024 07:00:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708412448; cv=none; b=Kh1R8Ak+hUxtHp0N4MH16RTxsgvGJtMoScPqujtVej0VAh3FYipOCws2L6jTFSEe6zKqM49u2MO1lLbOYSGZBEH5ychT8p9+js3kthq3+8I3XEwb8HPseNr1ZhuJ9QjncL/QYVasRJWqZSAT+BUrHGq71Qm5f8BAEyjmOvGAJs4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708412448; c=relaxed/simple; bh=jxIlQYigUmHuOaov+aiNZ47WFgeZO8qV3VlbmDtBFLI=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=ewSqBtWHBCb/l+Ml5gJWXLoCvYwhk5NFUzlZb5D0yGi03OJUDq6v9mfwzlJbsrkH3iGqB5WOKmZiDmAJsSNhFonMdvAwPvmKDORXVU6a3fl75JP2IS7tXKJ0EQ8QVAmNt0CW0q/LJWwOHyk4rojuJ76q6eyljIHyN0XXJlLJN2U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=vMWloydP; arc=none smtp.client-ip=198.47.19.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 41K70Dja099600; Tue, 20 Feb 2024 01:00:13 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1708412413; bh=eOu4aLrM1YRAOvpL6/4U7J43lEjo9JIYMBbcRY42UAE=; h=From:To:CC:Subject:Date; b=vMWloydP6ErKhsvUPQuMt0hrQgYukHQ23sX+50dmpC8cPe9RXmu5aQYFhH6XeO9Tb rQOiarsVowLrA8pvVZV0fSKtB2SyGcIZOx5UolMt7DkHPsqEKN2dDZNmY5MduhRA4P buNvqZDSMIDpDQp+v3NK48lJB96ufEkg1QEKwKjA= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 41K70DYH029934 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 20 Feb 2024 01:00:13 -0600 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 20 Feb 2024 01:00:12 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 20 Feb 2024 01:00:12 -0600 Received: from uda0492258.dhcp.ti.com (uda0492258.dhcp.ti.com [172.24.227.9]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 41K708WG049784; Tue, 20 Feb 2024 01:00:09 -0600 From: Siddharth Vadapalli To: , , , , , , CC: , , , , , , Subject: [PATCH net] net: phy: realtek: Fix rtl8211f_config_init() for RTL8211F(D)(I)-VD-CG PHY Date: Tue, 20 Feb 2024 12:30:07 +0530 Message-ID: <20240220070007.968762-1-s-vadapalli@ti.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Commit bb726b753f75 ("net: phy: realtek: add support for RTL8211F(D)(I)-VD-CG") extended support of the driver from the existing support for RTL8211F(D)(I)-CG PHY to the newer RTL8211F(D)(I)-VD-CG PHY. While that commit indicated that the RTL8211F_PHYCR2 register is not supported by the "VD-CG" PHY model and therefore updated the corresponding section in rtl8211f_config_init() to be invoked conditionally, the call to "genphy_soft_reset()" was left as-is, when it should have also been invoked conditionally. This is because the call to "genphy_soft_reset()" was first introduced by the commit 0a4355c2b7f8 ("net: phy: realtek: add dt property to disable CLKOUT clock") since the RTL8211F guide indicates that a PHY reset should be issued after setting bits in the PHYCR2 register. As the PHYCR2 register is not applicable to the "VD-CG" PHY model, fix the rtl8211f_config_init() function by invoking "genphy_soft_reset()" conditionally based on the presence of the "PHYCR2" register. Fixes: bb726b753f75 ("net: phy: realtek: add support for RTL8211F(D)(I)-VD-CG") Signed-off-by: Siddharth Vadapalli --- Hello, This patch is based on Linux 6.8-rc5. Regards, Siddharth. drivers/net/phy/realtek.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index 481c79fbd6eb..1fa70427b2a2 100644 --- a/drivers/net/phy/realtek.c +++ b/drivers/net/phy/realtek.c @@ -413,9 +413,11 @@ static int rtl8211f_config_init(struct phy_device *phydev) ERR_PTR(ret)); return ret; } + + return genphy_soft_reset(phydev); } - return genphy_soft_reset(phydev); + return 0; } static int rtl821x_suspend(struct phy_device *phydev) -- 2.34.1