Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7978721rwr; Wed, 10 May 2023 15:57:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ66CKdnAOJE+9q0sd0dzCwo9sXHFt6O/+tLobT0t47qG/mwjb1UB34z/PwqZVyDrhD32/AV X-Received: by 2002:a05:6a20:4320:b0:f4:24e6:1065 with SMTP id h32-20020a056a20432000b000f424e61065mr6946290pzk.39.1683759444677; Wed, 10 May 2023 15:57:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683759444; cv=none; d=google.com; s=arc-20160816; b=ygqB66sWWfhXSR5sMf8pJYzdOOD/eEASwM2q5ltRI2hGcBvnQz4IE3XDOONRYys4Ne Xf0RPSvnH6nFej3+zdgw8XhcQvbIv5cOQWFXfbzJWr4d2tKJtZGQpJasCwlp2ZiOCigu YSdUSqEK+QrrpBjd+QEVKJyk14xo2y2mOJVAKZEW6N00KYkzMtJ6rrEaLbkmiZ09wWqd wi5HmRwbIln47HJVS4BRfnB432XaDpYXl94vNsggAHJxYGp9r9tFIwFJreQ4o4mtU4nu MKOMa8iFCQzbNbmXv5ICvv959xMfzHTyivsHZ1tsfqAraAeTF9NRRUDODp9UpEVN4HW/ fVBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:to:from:date; bh=lXvHmYkYhWOmDfgz0ITycoUiB5vRzGmeujegcN0emew=; b=xPfrihPhZRqk+D9uRz0h4oR+1dfJNAHo+Gyz968ocWsGFxRvZ8sL3v51/lEW3pNzSX tKll15ozpRX+J0Z91QmYLZSZk5gwlO8BMjskjPFEXcX3uCq20HgPtRDxoJZDJ89ceknA jV1V3b8PdulMGv9XzYBOTh0LBmj7s4bBn9MICdEwx92UpiynR3mCwcRI2+YXww7WTxGZ rnwEE9G0eF+Vj9LKxVv3aP0PmxZ6wTT+j7qYpRYTzoM1VBETYgCO2tGfHKCdz7Ez9mOJ MKWNV8HF9LvGItBBYiUa0NpFcWfdIuwh6M2+KD7eDryl1fj0AMI20M0uaWkZ5plRt2Nc s31g== 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 t62-20020a638141000000b00517a4a75528si5091462pgd.162.2023.05.10.15.57.12; Wed, 10 May 2023 15:57:24 -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 S236150AbjEJWzV (ORCPT + 99 others); Wed, 10 May 2023 18:55:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232395AbjEJWzT (ORCPT ); Wed, 10 May 2023 18:55:19 -0400 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E4C140DC; Wed, 10 May 2023 15:55:18 -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 1pwsiJ-0004P1-27; Wed, 10 May 2023 22:55:15 +0000 Date: Thu, 11 May 2023 00:53:22 +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 0/8] Improvements for RealTek 2.5G Ethernet PHYs Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 Improve support for RealTek 2.5G Ethernet PHYs (RTL822x series). The PHYs can operate with Clause-22 and Clause-45 MDIO. When using Clause-45 it is desireable to avoid rate-adapter mode and rather have the MAC interface mode follow the PHY speed. The PHYs support 2500Base-X for 2500M, and Cisco SGMII for 1000M/100M/10M. Also prepare support for proprietary RealTek HiSGMII mode which will be needed for situations when used with RealTek switch or router SoCs such as RTL839x or RTL93xx. Add support for Link Down Power Saving Mode (ALDPS) which is already supported for older RTL821x series 1GbE PHYs. Make sure that link-partner advertised modes are only used if the advertisement can be considered valid. Otherwise we are seeing false-positives warning about downscaling eventhough higher speeds are not actually advertised by the link partner. While at it, use helper function for paged operation and make sure to use use locking for that as well. Changes since RFC: * Turns out paged read used to identify the PHY needs to be hardcoded for the simple reason that the function pointers for paged operations have not yet been populated at this point. Hence keep open-coding it, but use helper function and make sure it happening while the MDIO bus mutex is locked. Alexander Couzens (1): net: phy: realtek: rtl8221: allow to configure SERDES mode Chukun Pan (1): net: phy: realtek: switch interface mode for RTL822x series Daniel Golle (6): net: phy: realtek: use genphy_soft_reset for 2.5G PHYs net: phy: realtek: disable SGMII in-band AN for 2.5G PHYs net: phy: realtek: make sure paged read is protected by mutex net: phy: realtek: use inline functions for 10GbE advertisement net: phy: realtek: check validity of 10GbE link-partner advertisement net: phy: realtek: setup ALDPS on RTL8221B drivers/net/phy/realtek.c | 161 ++++++++++++++++++++++++++++++++------ 1 file changed, 138 insertions(+), 23 deletions(-) -- 2.40.0