Message ID | 20230209094405.12462-1-oliver.graute@kococonnector.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp239869wrn; Thu, 9 Feb 2023 01:51:58 -0800 (PST) X-Google-Smtp-Source: AK7set8bLo52jLLv4ygpcQSiz2iK/jNY8o1nQn5tRwenQKnTVYuVFjOoEgJkTR4y5DqgLjLcfm0N X-Received: by 2002:a17:907:3208:b0:8ac:f02b:7ea8 with SMTP id xg8-20020a170907320800b008acf02b7ea8mr6804194ejb.6.1675936317879; Thu, 09 Feb 2023 01:51:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1675936317; cv=pass; d=google.com; s=arc-20160816; b=naZHDSTXkrhx4gLB1QPcKpD1Acuf9VooMiPTQm2Oxjegr2xxTKRB8Y1H5P8btkCy2A OrI8O60/MY3Z8cK+GvApxLm7+25e6fC1jBUAXnR9IFGvw4OYr0xcUy7vCMtfYNODT0dX XDoMfzyrIR9jrvjFbD5QI2O75oJS2wBJ603nJd0p4XRYwMXlK63krhuJ9nk3oS03Beid VE2zATMRNxoaGRDHz0pZux0btUJHN6VhjVuTJ6JVKskmZJjkR5ZNjE40WAGQzOj2k+1G G1lxLW+DdDwQfa7OCIjKELGX3zEe2C/OSSsRtGrxnELSPGgNUWInk4U8SJOI5KteYpUO 5wug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=fbQDycB3yCj3fDKfXHckidCGcu0xfJ9Ud6rYn7EDieo=; b=PO3a1/RPnkbn2pdjwJpvgwHAtU5enS8qutPvB9cTLmvH1Ae2eq7tziW5lsgwMdiZJx Ryqom02ReG1HAuVoE9vL71GWVu6lLWmvjlhtaur2OuDT/4LWj3LcEZ5o4dcj/3zvJb95 9yFVStmCvxVlw8hzC+4nQRZQbpGUuih847exdR5mY6TdabhfXzpm5muf1qB81+ZuU4wn lGc4UuKLNzZC1Z1GMcwkFFq0ztFUlWPWZ4iLPaYi4XnP0u8KR8GoMbCDUN3rAVUovPeh YuifbihsKHk933sFUHOH4/rd2rpVWeccfKXRKwLK6Jeg8sWADhLUc7NIkpNXzFl/TgWA 9BMA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@KoCoConnector.onmicrosoft.com header.s=selector2-KoCoConnector-onmicrosoft-com header.b=RT2sDAZA; arc=pass (i=1 spf=pass spfdomain=kococonnector.com dkim=pass dkdomain=kococonnector.com dmarc=pass fromdomain=kococonnector.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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kococonnector.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fh20-20020a1709073a9400b008894ce2a178si2073621ejc.96.2023.02.09.01.51.33; Thu, 09 Feb 2023 01:51:57 -0800 (PST) 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; dkim=pass header.i=@KoCoConnector.onmicrosoft.com header.s=selector2-KoCoConnector-onmicrosoft-com header.b=RT2sDAZA; arc=pass (i=1 spf=pass spfdomain=kococonnector.com dkim=pass dkdomain=kococonnector.com dmarc=pass fromdomain=kococonnector.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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kococonnector.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230091AbjBIJuU (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Thu, 9 Feb 2023 04:50:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229770AbjBIJuS (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 9 Feb 2023 04:50:18 -0500 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2087.outbound.protection.outlook.com [40.107.241.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AAEF34C11; Thu, 9 Feb 2023 01:50:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d8MrloSrA14djWORZwbqyZsIRYAK2N9KLtDi96bgYs4OCe+7hv4vRGxt+GNl/tT3Bvuv5Kg6KJDZMzNqnZUHnId+F0sg3bWaZw58+NKRWCJX1ujmcv3IUGPNNgiVbrGSgDCiRX/ZJ58MBg0Nrr4H8ZuNVlGLhPP3OyeehAaeTyKOwH0YhrY8jQ8cu723fyPfhCjgI5va1VX9XqRuDFStQOuLx75SAshbFD55HzEGwZaVFDBtJ2LP+6X7Ll6IBZhiVYg/HL1g/Dl4rhUVmgYw9h9YvQ5r8tY4Q+n+lo/iy3bLB5LGu5NWgyUri5Jjf8rpo/18sh0K1hmwTNBftOK7sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fbQDycB3yCj3fDKfXHckidCGcu0xfJ9Ud6rYn7EDieo=; b=i2SShjhCLnoSvCiEEv9jBf9Mgz5VYwCfD3NTcvnZJaYvZI0CjUCtmXVxenjt4gtkgpC49GaikVU/duJLAfh1dnpnrjLegcg3efv7XvlwMpB9QWg9Fnvxa4tm/G1WsbLSwvumZGF66iwNFuNiJTNnpoXiowT6i71n05VXa89YGbU32tdyWhAN9s3MF5u9JLAY9RDMgW0OGbYuTs6zeKPQwVNFeNZS4xIEBfiaa88w+rbTxx87/xD54iYOZe6c1M0PMYqouTzEE34AOoRJDIhRo3L1gffu3zLl8r4Cb+DVxMZm5T149x9i1SoJKhlr3c/uaCo8dsDTqwQhO6veuxwYuw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=kococonnector.com; dmarc=pass action=none header.from=kococonnector.com; dkim=pass header.d=kococonnector.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=KoCoConnector.onmicrosoft.com; s=selector2-KoCoConnector-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fbQDycB3yCj3fDKfXHckidCGcu0xfJ9Ud6rYn7EDieo=; b=RT2sDAZAXr3iVRd+HF80eQCDqx1kZZDKfWF3fcXCdIbUyw7kWWtyzMlSRW4kXOX8WzX/QZfmRFg1f0Re8vw1mVPm/Zdm2RUi6Ahk/f41Uw85EBP2M0yJ5I3p+0MaUMpuixCL+uR1vxZSLRFW1FM3/kG39YYxiqDcGfPHMeiINuc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=kococonnector.com; Received: from AM9PR09MB4884.eurprd09.prod.outlook.com (2603:10a6:20b:281::9) by AS8PR09MB6065.eurprd09.prod.outlook.com (2603:10a6:20b:569::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.17; Thu, 9 Feb 2023 09:50:12 +0000 Received: from AM9PR09MB4884.eurprd09.prod.outlook.com ([fe80::e9ab:975f:f6cf:e641]) by AM9PR09MB4884.eurprd09.prod.outlook.com ([fe80::e9ab:975f:f6cf:e641%3]) with mapi id 15.20.6086.019; Thu, 9 Feb 2023 09:50:12 +0000 From: Oliver Graute <oliver.graute@kococonnector.com> To: andrew@lunn.ch Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Oliver Graute <oliver.graute@kococonnector.com>, Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com> Subject: [PATCH RFC] linux: net: phy: realtek: changing LED behaviour for RTL8211F Date: Thu, 9 Feb 2023 10:44:05 +0100 Message-Id: <20230209094405.12462-1-oliver.graute@kococonnector.com> X-Mailer: git-send-email 2.17.1 Content-Type: text/plain X-ClientProxiedBy: FR0P281CA0090.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1e::15) To AM9PR09MB4884.eurprd09.prod.outlook.com (2603:10a6:20b:281::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR09MB4884:EE_|AS8PR09MB6065:EE_ X-MS-Office365-Filtering-Correlation-Id: 7a3ee8b2-0c38-43e0-6dd6-08db0a8309b6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: w/w4JqZ0icF76pujTPTT0WSPpsFzj0yf7bp0Ip+ShtWSNpu5PbuTMa6I4K40VCsw+WqE/jFTHx1GXzuF/MiF0JyRclF0qY7BOWL9mRRq3/3fEI57NCy+9qUJN38i1pNLFH7UhcEXzuXMQuQFJJH240yHeeV3g9lFQzJqVzNtNQ0o1lRp1wW4/kgUuuUApZJTFseJ/+LdId8YMtwYJL6NPcavC/S/ymFf+a+HCjH05UoK2EIHSeQutP/rbd3ztoCvBQpjp4sh4zX0ZoihZYIi/XSVaOE4anzEZohKtOamfj3MlFIiWKNK2EDcLJQfgMGXhm5MSbRHAGI7B9Ugo5XzOxgGiP4/kn13qRoqFLbsY7+ipk3m66/juSARlxkIq3c40QNBz/eJurE8uc3H9U+jiyU7BRrNjkseYow/BP8gMf+LoqXl4Y/nVusq309IDExAlPLsVINeivU786xTbOdFNIyBwIcF8fWSg7VMG6bT32YoXDh9qmgf+8+aETOyrjm86HMe80tOcTP1A4jzS+vqw9Tr/csbe8BKLIHAguy+CyYdhUw2ctZ4IheLDn9BZOfWlxMbpk6RULqF4GCaRT60w2LU5yg7p+1+VmSUpmB2a22Bil24BkJTg/Xe2U2qeo7JnvXbHhfXs+44Mdrm4YjpU6MX/Ek/qPbfuxjmZtWNzWML8yCw8ItDjKSd3KUvgEITDFXLQuyTrnVuwNp8DnL3Og== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR09MB4884.eurprd09.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(366004)(136003)(346002)(396003)(39830400003)(376002)(451199018)(44832011)(5660300002)(4744005)(2906002)(86362001)(8936002)(6916009)(66556008)(41300700001)(66946007)(66476007)(4326008)(8676002)(36756003)(52116002)(6666004)(1076003)(6506007)(186003)(6512007)(26005)(478600001)(38100700002)(6486002)(2616005)(38350700002)(54906003)(316002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xYiY31sqHWSQxb951Wfonxt1tnwxResJz9KmKh+HCzaph0LLMcUZS4VphhyBZmw4a1a2ygEPHGogBHzZxhA5Q5ZjRb+MMVkS9AMrv4xV7saoOoGn1MNrg5wWiaWhClDMoHUo18lEDqr30kLnrV+IcstOOvVhrTn8njpGVY1UirwhP78MeAOYahBPFUekMmLnBw29ZBjTBP8jXF0DtiRTJLNoc/lKYtLc+uBOx/WX8xHt0hyrVsUoahJkk2tcwFi9CS0ZJJQ2Lcj54dR5Im4AQr0g88U1Elb00a6VgtWgaITY0H4GWLC8S21FTBR9+Q3trEJsBkpk0PUJZ1riUq65aN3OB+ryjqo0iTeIys8hjDwm/AvQ6uMo/4v4Bo+X3gZW8Uprs6AiN14aEfORLnNycYB81iA5bQHlu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0k3ZMapCXb/X3EOO36IplWx+2uWUtUCZf2lQP4e0MVPK613WgIJeFmmtzACKLUlQuoBcPzKsvDKgZQyR1kyTm/9TU5hJeemQ7syCBXi0E2qmct+aXi+nUXK+wYyw78LlkQC0Jhe12YCPrcd0h6/ZwlkxInS4= X-OriginatorOrg: kococonnector.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7a3ee8b2-0c38-43e0-6dd6-08db0a8309b6 X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4884.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2023 09:50:12.5500 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 59845429-0644-4099-bd7e-17fba65a2f2b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: E1KYzHGWzHiEW913bRPdA6x1BxYLDjRJ3/84dsn5/bClFImHM37B6bnQBK6JLjmjHuVzoIrXWB3nyG15ymXpC6gsAZY9h0QLP3DtyFqAMto= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR09MB6065 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757346600001074288?= X-GMAIL-MSGID: =?utf-8?q?1757346600001074288?= |
Series |
[RFC] linux: net: phy: realtek: changing LED behaviour for RTL8211F
|
|
Commit Message
Oliver Graute
Feb. 9, 2023, 9:44 a.m. UTC
This enable the LEDs for network activity and 100/1000Link for the RTL8211F
Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
---
drivers/net/phy/realtek.c | 5 +++++
1 file changed, 5 insertions(+)
Comments
On Thu, Feb 09, 2023 at 10:44:05AM +0100, Oliver Graute wrote: > This enable the LEDs for network activity and 100/1000Link for the RTL8211F > > Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com> > --- > drivers/net/phy/realtek.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c > index 3d99fd6664d7..5c796883cad3 100644 > --- a/drivers/net/phy/realtek.c > +++ b/drivers/net/phy/realtek.c > @@ -416,6 +416,11 @@ static int rtl8211f_config_init(struct phy_device *phydev) > } > } > > + phy_write(phydev, RTL821x_PAGE_SELECT, 0xd04); > + phy_write(phydev, 0x10, 0x15B); > + > + phy_write(phydev, RTL821x_PAGE_SELECT, 0x0); > + nit: it looks like the indentation in the new lines above should be using a single tab rather than 8 spaces. > return genphy_soft_reset(phydev); > } > > -- > 2.17.1 >
On 09/02/23, Simon Horman wrote: > On Thu, Feb 09, 2023 at 10:44:05AM +0100, Oliver Graute wrote: > > This enable the LEDs for network activity and 100/1000Link for the RTL8211F > > > > Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com> > > --- > > drivers/net/phy/realtek.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c > > index 3d99fd6664d7..5c796883cad3 100644 > > --- a/drivers/net/phy/realtek.c > > +++ b/drivers/net/phy/realtek.c > > @@ -416,6 +416,11 @@ static int rtl8211f_config_init(struct phy_device *phydev) > > } > > } > > > > + phy_write(phydev, RTL821x_PAGE_SELECT, 0xd04); > > + phy_write(phydev, 0x10, 0x15B); > > + > > + phy_write(phydev, RTL821x_PAGE_SELECT, 0x0); > > + > > nit: it looks like the indentation in the new lines above should > be using a single tab rather than 8 spaces. thx, I will fix the indentation. is this the right place to turn on the realtek phy LEDs for RTL8211F? Best regards, Oliver
> is this the right place to turn on the realtek phy LEDs for RTL8211F?
Probably not. There are a few issues. This will only work one particular
board. Therefore, you'd need some kind of runtime configuration to also
support other boards. But lately any LED related patches for PHYs were
NAK'd because they need to integrate with the LED subsystem. See [1].
-michael
[1] https://lore.kernel.org/r/YyxOTKJ8OTxXgWcA@lunn.ch/
On 09/02/23, Michael Walle wrote: > > is this the right place to turn on the realtek phy LEDs for RTL8211F? > > Probably not. There are a few issues. This will only work one particular > board. Therefore, you'd need some kind of runtime configuration to also > support other boards. But lately any LED related patches for PHYs were > NAK'd because they need to integrate with the LED subsystem. See [1]. > > -michael > > [1] https://lore.kernel.org/r/YyxOTKJ8OTxXgWcA@lunn.ch/ ok thx for this information. Best Regards, Oliver
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index 3d99fd6664d7..5c796883cad3 100644 --- a/drivers/net/phy/realtek.c +++ b/drivers/net/phy/realtek.c @@ -416,6 +416,11 @@ static int rtl8211f_config_init(struct phy_device *phydev) } } + phy_write(phydev, RTL821x_PAGE_SELECT, 0xd04); + phy_write(phydev, 0x10, 0x15B); + + phy_write(phydev, RTL821x_PAGE_SELECT, 0x0); + return genphy_soft_reset(phydev); }