Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7984653rwr; Wed, 10 May 2023 16:02:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5FEt+9LoSTMx0VflCeW+GRASXDz9EtP+Wo9skbBUFeHz1Gc3he+MFq0xeWyNYw6WAsX4bL X-Received: by 2002:a17:90b:390c:b0:24f:52ec:da17 with SMTP id ob12-20020a17090b390c00b0024f52ecda17mr18368462pjb.35.1683759778628; Wed, 10 May 2023 16:02:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683759778; cv=none; d=google.com; s=arc-20160816; b=07Gc98aXlDaGhJYJDsfa3HBVkg5Qbb5+fRzBlHWEFsq1PE9ios9+2sSecKZXSXDOjd nLMUSon5CrZUeD/XhcyC2DzYENchTL/B/biLsb2KmMqZc0mcPpPAKl7lH4BtHw4k6W7n vyvSIbMawh50RQom1R+culVhmpLyljWCU4l7dyryul5l+7tRqMG/belfyPRFW3Bhdycl ijA5wqBj9atv716iDqWXlcEAj3XLyQH92Sd8k08nnFwQUg8TAWQTyQGQ9kO3pGWWqhZ9 fAS3QaISk75YRNXmVfdQdbkF6gVWnWIMq13wXY0n6bKfJFlJTnOqnjCyat2ybvtljJVA YRYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date; bh=6qCndzjD/Ojhsa1S9OAfiPDCl5hixonzrj77+/sbsLo=; b=qeT54AOkEGrGMZWT2nQpHsnZZ1rpCISnEszNKhaX+bncpvY63SoM1BM0uhKfWJrCHx KPmqhqzbypQojI4MXdxZV/hAtVHC4kGCSg5HXQiZXg9UrzzkzFDYlaqyosL+1Ik0O7+Q UtmXy8xL0xjzmp8JbtSpntk7AKF0NIMLdg5tSpypbE8subNbPYgHuq/Zmmj6UahRK4Ey Huiz0e7KTIIMhWyDQvRuh8NDx3+AGqhKpyKlYcY6B2TaOo2M3JVGumlSsNJLk/mmzj20 xDYgrIu+pfl5s4UyYX3fqsqnoDiLFQaGAmMd10VNdm2qa8wygN2V3wBap7liS7hj/6FL Ckpg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z1-20020a170902708100b001ab233bb792si4702693plk.441.2023.05.10.16.02.46; Wed, 10 May 2023 16:02:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230410AbjEJW51 (ORCPT + 99 others); Wed, 10 May 2023 18:57:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232030AbjEJW5Z (ORCPT ); Wed, 10 May 2023 18:57:25 -0400 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F8ED4690; Wed, 10 May 2023 15:57:17 -0700 (PDT) Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1pwskF-0004Qx-2b; Wed, 10 May 2023 22:57:16 +0000 Date: Thu, 11 May 2023 00:55:11 +0200 From: Daniel Golle To: netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , AngeloGioacchino Del Regno Subject: [PATCH net-next 3/8] net: phy: realtek: use genphy_soft_reset for 2.5G PHYs Message-ID: <0c1e578a5b02fe49e1114ea75e3c6282eb230ad3.1683756691.git.daniel@makrotopia.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some vendor bootloaders do weird things with those PHYs which result in link modes being reported wrongly. Start from a clean sheet by resetting the PHY. Reported-by: Yevhen Kolomeiko Signed-off-by: Daniel Golle --- drivers/net/phy/realtek.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index 4a2c1ad02d48..0cf7846c9812 100644 --- a/drivers/net/phy/realtek.c +++ b/drivers/net/phy/realtek.c @@ -1038,6 +1038,7 @@ static struct phy_driver realtek_drvs[] = { .write_page = rtl821x_write_page, .read_mmd = rtl822x_read_mmd, .write_mmd = rtl822x_write_mmd, + .soft_reset = genphy_soft_reset, }, { PHY_ID_MATCH_EXACT(0x001cc840), .name = "RTL8226B_RTL8221B 2.5Gbps PHY", @@ -1051,6 +1052,7 @@ static struct phy_driver realtek_drvs[] = { .write_page = rtl821x_write_page, .read_mmd = rtl822x_read_mmd, .write_mmd = rtl822x_write_mmd, + .soft_reset = genphy_soft_reset, }, { PHY_ID_MATCH_EXACT(0x001cc838), .name = "RTL8226-CG 2.5Gbps PHY", @@ -1061,6 +1063,7 @@ static struct phy_driver realtek_drvs[] = { .resume = rtlgen_resume, .read_page = rtl821x_read_page, .write_page = rtl821x_write_page, + .soft_reset = genphy_soft_reset, }, { PHY_ID_MATCH_EXACT(0x001cc848), .name = "RTL8226B-CG_RTL8221B-CG 2.5Gbps PHY", @@ -1072,6 +1075,7 @@ static struct phy_driver realtek_drvs[] = { .resume = rtlgen_resume, .read_page = rtl821x_read_page, .write_page = rtl821x_write_page, + .soft_reset = genphy_soft_reset, }, { PHY_ID_MATCH_EXACT(0x001cc849), .name = "RTL8221B-VB-CG 2.5Gbps PHY", @@ -1083,6 +1087,7 @@ static struct phy_driver realtek_drvs[] = { .resume = rtlgen_resume, .read_page = rtl821x_read_page, .write_page = rtl821x_write_page, + .soft_reset = genphy_soft_reset, }, { PHY_ID_MATCH_EXACT(0x001cc84a), .name = "RTL8221B-VM-CG 2.5Gbps PHY", @@ -1094,6 +1099,7 @@ static struct phy_driver realtek_drvs[] = { .resume = rtlgen_resume, .read_page = rtl821x_read_page, .write_page = rtl821x_write_page, + .soft_reset = genphy_soft_reset, }, { PHY_ID_MATCH_EXACT(0x001cc961), .name = "RTL8366RB Gigabit Ethernet", -- 2.40.0