Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3075225rwd; Mon, 22 May 2023 08:18:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ44NLLgHh/PojihH2RK8W4NAp9q8M91TUZoA1fcQ1PS/ExdL6Yc85HZpupInWywx0SKgyJN X-Received: by 2002:a17:902:7fc9:b0:1ab:63e:67b0 with SMTP id t9-20020a1709027fc900b001ab063e67b0mr9810237plb.54.1684768717621; Mon, 22 May 2023 08:18:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684768717; cv=pass; d=google.com; s=arc-20160816; b=q+LyOHNwEekn1YDpS0ja7loEiBYOX/5bkmWF+bDKgNPTsXnXrZPVXur61hSdUDzXgB aSRjb4ouygWeVNpmXKzdQwW4xZ8th4DrPIYCXP8ejiEjPEtwYj6E8l84KPBwftwEmp8x UNPE4afeQrsbFsncKjZrm336pG0HNgCZSXmM26sF205d6uf4+vJA/pwfAhfeM/AM7bmI FCtDAaGixPThqnv2Ti3EvyJ5QitvwdjKfjcNQ41DORX6DfPaBfdT48bJBDtltZHdrTAZ SyIjh1blXQLyuiuIuahkdUost+Uc+tSsSauLPF/2B0O2WYZTY1g4yRUvjEz3vpBMqOZL fhyw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to :content-transfer-encoding:content-disposition:references:message-id :subject:cc:to:from:date:dkim-signature; bh=YajzehwOiE+wMqUz72Bfse021I1j/buSrH3pmE7g6r8=; b=w1iLS+tUdj1c06DbKIyIitQFs/RwAegXSA1ZxE4sixYcWZ8zVtBquTitxxTErlxMDu L5nWGPPiMSF9QYDnRJfWNZe+84yXfTj+KLyf7GnuB/abOcsZHHy3TjRB+xKxm0ag6diS BH5CZ3hHUjMAYk3luHjsAUB6a6LPWNsGt2rmsb7y1xOQVRfc+vkSl3nWloNWRtn8E1Gn 5+ZU9SpxFzP/vvBikWGZjWb2T6U24S2eTvPTJKDd3Xl73cei0vrgQbjPQ+blGWpheuoz CIOEF8UpzkOipstudf8SJ7yr05Pr9J/B2liLnv3wAXgNaNJVaRpN77HTVdPqOEp82zlK OOrw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b="N/sOtF8V"; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.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=corigine.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jh4-20020a170903328400b001aaec7031b5si4593846plb.182.2023.05.22.08.18.25; Mon, 22 May 2023 08:18:37 -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; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b="N/sOtF8V"; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.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=corigine.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234480AbjEVPEC (ORCPT + 99 others); Mon, 22 May 2023 11:04:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234491AbjEVPDq (ORCPT ); Mon, 22 May 2023 11:03:46 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2138.outbound.protection.outlook.com [40.107.223.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E56D010C4; Mon, 22 May 2023 08:03:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b6Mm6XNtFzk3RDsvwCqtnGggRC6RD/DikHxDnIhZILudQM8ZSAvmEJ3i5viSsCB9Jw/HRr/ht0j/F1DvJ/XtQGZaCbfxiKv3I0sx3u48gAQpIkLCqVRwQzhoUk4PrddtxdieNNv8wKjOlBrrQyRpqM6jUJ8c3dK9P9FV8KCoGe23KN9TWFkVRasdYYW14Chbiki1L4IQAY/iMSpnVw/eaL2cek3oy4vlhI5sq7quILCW3fz1tVvL8KmqXjkHfsXxifRhGGleusJ1hfDTPaBRV7dR841VOr/V68pSeYd0R2Nys7O9C/pA6Ofxuz/w5IpTsec9W/AmF7YXrLf79Zs1IA== 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=YajzehwOiE+wMqUz72Bfse021I1j/buSrH3pmE7g6r8=; b=RMO1iW/PQspwEojzoXJwQIOvcqYS/Agq2+UTZRzhT9fCgafTj380IkwRnPwwKlrCmLh1IGuNCN1xPNhb/2kb89vyMFN45F53/O0PXInKlj+yEmwnB1d83kSWBY73A4yzgPbp+84zG7mxhp/YjgvrtrmWR0ITYYKkkq9k+7MB1Ra49QdSKHz9hlu8OdVo5pTJbzLsLDfGaA6llBYxTdWmGHXJ+jSdUwkNJgg4Tbr4M0jOKqC+axNGCXMJF7yw2cyEhydgNjPaL2qOkyHdrj1AqB2CrGnmT6DJNlFNoGFCf1Agw7Y3ScU+8JEN7l48+PgNZZ/pOtuqvFg7MlAQPgbh5A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YajzehwOiE+wMqUz72Bfse021I1j/buSrH3pmE7g6r8=; b=N/sOtF8VM5c+iV1keIysn7q36XcvycKzaLQiX4KDMC0hzFAHnXk4892CfuCmGRYrHsCFoB1/n9HlIuy9wsYg4hCs2KbsTY5878gkG7sW2IBX2jvqtilP4mhTtO6ZLwHJtFKGFLwH1OTO9UnxDfWCwLv9rbLoiwMjU7sI4Y4zPwU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) by DM6PR13MB3705.namprd13.prod.outlook.com (2603:10b6:5:24c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28; Mon, 22 May 2023 15:02:31 +0000 Received: from PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::f416:544d:18b7:bb34]) by PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::f416:544d:18b7:bb34%5]) with mapi id 15.20.6411.028; Mon, 22 May 2023 15:02:30 +0000 Date: Mon, 22 May 2023 17:02:21 +0200 From: Simon Horman To: Parthiban Veerasooran Cc: andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, ramon.nordin.rodriguez@ferroamp.se, horatiu.vultur@microchip.com, Woojung.Huh@microchip.com, Nicolas.Ferre@microchip.com, Thorsten.Kummermehr@microchip.com Subject: Re: [PATCH net-next v2 6/6] net: phy: microchip_t1s: add support for Microchip LAN865x Rev.B0 PHYs Message-ID: References: <20230522113331.36872-1-Parthiban.Veerasooran@microchip.com> <20230522113331.36872-7-Parthiban.Veerasooran@microchip.com> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230522113331.36872-7-Parthiban.Veerasooran@microchip.com> X-ClientProxiedBy: AS4PR09CA0001.eurprd09.prod.outlook.com (2603:10a6:20b:5e0::7) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR13MB4842:EE_|DM6PR13MB3705:EE_ X-MS-Office365-Filtering-Correlation-Id: 0ec88e6e-e8d7-461c-af74-08db5ad590b6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mZPegTl9Vl1BmnCB+D6K5aVYi0UAJsL3JS2P/G0sLzVvcH768dzduLc14JYk1D+SIWRPH9pgDLvv3pgljmzu1pL7K1cooTqo6kbXiPvFH5U31hJxEzwqmeI01j0NoR44hBIcGpFVyChtNEYQjDMyOj43LfaSRe+IXq/0OhORkToX/VghUEZ77FTx/UgwopJAhFFHVPRnPcNwxXNR9uRCCeQJbOvR+G/6/uMvpHZL4MkoA25P+tn+MZ7VYDjFF3wEc32Bl2wFW2yEr55A+xyJdUIo2CA0XB8S5Wjl5DaBCA1W3zK+FwrXygS2wGiiL43KvvOZQjB1Sr3erA1cFGEajawkQ1drcjPYxHipchk4jHxOIiv8HVq/cm9v4fdQrjsJ2NLorVKhzlYzbtOZRpe+C/aDRagW0uyaBEDEiW9BB/2WylXTs+6LFhI9ML84Q4LuPiCbvCyMwAlCAr/8gbf7dTp6QryXGNoAvQXOaJywkKKpR1EwNjnFfP/aYlRK60OhtYhAtWVi8LWQUVna8KZi8eDMMP806cFM29vkDUfW9eivxkyOhqtyTRgbF6ccE6iUeywwj9uMu5X/h9v9qhYmXYtNmEFA9hfuLGarR57z4uE= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR13MB4842.namprd13.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39840400004)(136003)(346002)(366004)(396003)(376002)(451199021)(8676002)(8936002)(5660300002)(7416002)(44832011)(186003)(6512007)(6506007)(83380400001)(86362001)(2616005)(38100700002)(41300700001)(6666004)(6486002)(66476007)(66556008)(66946007)(316002)(6916009)(36756003)(4326008)(478600001)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Z1RZQW5WNGQxTTBQRnVrZUUwSytIdUVjb2NrVHJvVVhjOHhTMlAzZjlLRVpy?= =?utf-8?B?N3dJaC9JZWFWdmtRc25kalBJSGdDcGpsZTRiNUF6NkFoQzYrZ0VDUjMxWjIv?= =?utf-8?B?WFE3bVpQSXd2RDdSMDdHVmdhVlF0SkZjVHUyMEp1NXRiL1lQMnhLejJ3M01R?= =?utf-8?B?eVpzQXRBRysxODB3QXdQdDMxVHRveHIzOUd3ZmluU3R4UnVGYklxa25WOHVP?= =?utf-8?B?UkVZd3J5cWI2RjFmUldENTFNbGsxcmg1VVNrd0RCYk14RE51TWYzbEJUV3Bo?= =?utf-8?B?Yy81cXpDYU0ya210VUpXaHVFTnJNVWtQeTFaSUxpT2dLNExHclZ2Y0NkNHJi?= =?utf-8?B?dzVOL2R3QXZ1amJ5dmlEYjJKWGYwSU0ydHE3cVFyU0hPTDd1VjlNWER1R3pQ?= =?utf-8?B?YWRPU0tBYXFUengyWlhwdEpJazQzVllSVDdhdVhxOHN0WjZCS1lmRXRFL2tK?= =?utf-8?B?cmllTUo5azJxQzArUk56S3NaejZWYkNPc2NkbHdLTnNTZTlP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-af74-08db5ad590b6 X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB4842.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 May 2023 15:02:30.8032 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bt6mys/uaCdDlXxB8UU9cGWWZucT5vBcqg/rXQSOOgelEuSbTlWlZqoWyqNZe9GDTkdGeOzxS9ig+oelqyTbGYSZFmdVgdHfx+lwREyOF6Y= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR13MB3705 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, 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 On Mon, May 22, 2023 at 05:03:31PM +0530, Parthiban Veerasooran wrote: > Add support for the Microchip LAN865x Rev.B0 10BASE-T1S Internal PHYs > (LAN8650/1). The LAN865x combines a Media Access Controller (MAC) and an > internal 10BASE-T1S Ethernet PHY to access 10BASE‑T1S networks. As > LAN867X and LAN865X are using the same function for the read_status, > rename the function as lan86xx_read_status. > > Signed-off-by: Parthiban Veerasooran Hi Parthiban, thanks for your patch. Some minor nits from my side. ... > +/* This is pulled straigt from AN1760 from 'calulation of offset 1' & > + * 'calculation of offset 2' > + */ nit: s/straigt/straight/ > +static int lan865x_generate_cfg_offsets(struct phy_device *phydev, s8 offsets[2]) > +{ > + const u16 fixup_regs[2] = {0x0004, 0x0008}; > + int ret; > + > + for (int i = 0; i < ARRAY_SIZE(fixup_regs); i++) { > + ret = lan865x_revb0_indirect_read(phydev, fixup_regs[i]); > + if (ret < 0) > + return ret; > + if (ret & BIT(4)) > + offsets[i] = ret | 0xE0; > + else > + offsets[i] = ret; > + } > + > + return 0; > +} ... > +static int lan865x_setup_cfgparam(struct phy_device *phydev) > +{ > + u16 cfg_results[5]; > + u16 cfg_params[ARRAY_SIZE(lan865x_revb0_fixup_cfg_regs)]; > + s8 offsets[2]; > + int ret; nit: Please use reverse xmas tree order - longest line to shortest - for local variable declarations in networking code. ...