From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01820C53210 for ; Tue, 3 Jan 2023 13:55:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237693AbjACNz0 (ORCPT ); Tue, 3 Jan 2023 08:55:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237645AbjACNzZ (ORCPT ); Tue, 3 Jan 2023 08:55:25 -0500 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A84FFF2; Tue, 3 Jan 2023 05:55:24 -0800 (PST) Received: by mail-ej1-x62b.google.com with SMTP id x22so73725769ejs.11; Tue, 03 Jan 2023 05:55:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ZtSxpSjX58ynpD01H51Yz32AIwKbxvwZO/htBdjgQhU=; b=NWvGHpwyDNWGPavMB83+2pIXyyjvNcMRZF7kNLcgZILW4LhyNZhueL9uCOFlYStAxX a5yChIeoLzAIk75K/SD7/Q6RmenE2Ie3nRtEN1YwUjEWUgzoUm2e/lc/WYLuV5BWrpnp cukx7TMS1vciDJqH1yho4Vd4gsunpPcGLS7+7LMwEGfoGhxODaGxVm0lEzbfSDbY+6dF jnVgQSrvead51nVPKMBVSmc70iMkIiVExjJBBARX1qoID8wQuJ9q+LgJBdmfU3gbAR/s hJ/j3B9j3VMqYr3OZ9z7yLXQAbMamIg0fWWnu4h56ZEfkZesTprxp3knCWqYs5GHsFAx d18A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ZtSxpSjX58ynpD01H51Yz32AIwKbxvwZO/htBdjgQhU=; b=Y7l2Rd46SRcjCr299Ng9FW1d4fHcK8O6q/LuC2kNgWFOx/iY5Fshl0xoThy0xg+hWW bzmuxwIKwLPNgXJnfL2gXv9EM+g64kog892/xCdkdjpFE7H7GPB0LRl5u5MTmYoiTkoW YvYkrAUvgblY6jh4cczNWZJBjQUE9s/kpwrShsjgeoqwQjKCltKp+GB2hq/LnEa/esq+ N7w0d2q1lD18CnlyBuXULHUOv0m9ikJlKxOCLVjUH5Dz27T9X3RJE7i+/NVKMyRI1gl4 9eT+EVFr/EoV8mQXR7hHrlxAp/GeeiACYlg8LIK9ao0H0bDM1ZlY3FTTDxGC2hPZJrbC kA1g== X-Gm-Message-State: AFqh2kpPQURzIQFDiwowId2hqIRhIT7orUFWSxNrVMCeV+ZU+jtUOuGw W/qJqNrPQ6G92A8TUMTpm8k= X-Google-Smtp-Source: AMrXdXul+Qhor0TFBD82nysJpNI3VhxWK05SAKn9RHHdHtJl9+gmsiDFWAngpR8gHsFYoJeQk44dqA== X-Received: by 2002:a17:907:7d8f:b0:7b5:911c:9b12 with SMTP id oz15-20020a1709077d8f00b007b5911c9b12mr46938748ejc.1.1672754122626; Tue, 03 Jan 2023 05:55:22 -0800 (PST) Received: from skbuf ([188.26.185.118]) by smtp.gmail.com with ESMTPSA id j18-20020a1709066dd200b0080345493023sm13998125ejt.167.2023.01.03.05.55.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Jan 2023 05:55:22 -0800 (PST) Date: Tue, 3 Jan 2023 15:55:19 +0200 From: Vladimir Oltean To: Michael Walle Cc: Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jose Abreu , Sergey Shtylyov , Wei Fang , Shenwei Wang , Clark Wang , NXP Linux Team , Sean Wang , Landen Chao , DENG Qingfang , Florian Fainelli , Matthias Brugger , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Andrew Lunn , Geert Uytterhoeven Subject: Re: [PATCH RFC net-next v2 08/12] net: ethernet: freescale: xgmac: Separate C22 and C45 transactions for xgmac Message-ID: <20230103135519.oai43rj3waigqi54@skbuf> References: <20221227-v6-2-rc1-c45-seperation-v2-0-ddb37710e5a7@walle.cc> <20221227-v6-2-rc1-c45-seperation-v2-8-ddb37710e5a7@walle.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221227-v6-2-rc1-c45-seperation-v2-8-ddb37710e5a7@walle.cc> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Commit message can be: "net/fsl: xgmac_mdio: Separate C22 and C45 transactions". On Wed, Dec 28, 2022 at 12:07:24AM +0100, Michael Walle wrote: > From: Andrew Lunn > > The xgmac MDIO bus driver can perform both C22 and C45 transfers. > Create separate functions for each and register the C45 versions using > the new API calls where appropriate. > > Signed-off-by: Andrew Lunn > Signed-off-by: Michael Walle > --- > v2: > - [al] Move the masking of regnum into the variable declarations > - [al] Remove a couple of blank lines Tested-by: Vladimir Oltean > > -/* > - * Reads from register regnum in the PHY for device dev, returning the value. > +/* Reads from register regnum in the PHY for device dev, returning the value. > * Clears miimcom first. All PHY configuration has to be done through the > * TSEC1 MIIM regs. > */ I have some reservations regarding the utility of the comments in this driver. It's surely not worth duplicating them between C22 and C45. It might also be more productive to just delete them, because: - miimcom is a register accessed by fsl_pq_mdio.c, not by xgmac_mdio.c - "device dev" doesn't really refer to anything (maybe "dev_addr"). - I don't understand what is meant by the comment "All PHY configuration has to be done through the TSEC1 MIIM regs". Or rather said, I think I understand, but it is irrelevant to the driver for 2 reasons: * TSEC devices use the fsl_pq_mdio.c driver, not this one * It doesn't matter to this driver whose TSEC registers are used for MDIO access. The driver just works with the registers it's given, which is a concern for the device tree. - barring the above, the rest just describes the MDIO bus API, which is superfluous