Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7181133rwp; Tue, 18 Jul 2023 11:12:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlH8UBwNYdK+4ljnv0lH0vLQdGPM2Lt1Paan1YO1brSYG7wZ3rhiYEdBybbq4hY2iWkf1zjJ X-Received: by 2002:a17:906:2086:b0:992:387:44d1 with SMTP id 6-20020a170906208600b00992038744d1mr5963350ejq.7.1689703919700; Tue, 18 Jul 2023 11:11:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689703919; cv=none; d=google.com; s=arc-20160816; b=dvgn0QSe3dGvY1pyQba63bmSltp2xs7I9sr8c4zVracIJCZzT5rD2yyzyCT5xwZpVU pHsjAD1cHkOsr8kIEOhSMajQsp0IIAVl6kPibqZRPAdNpmEVZZdg7MvXIlYDONF+FE+Y ccKS14bry2ifPOafl/Nu9OcGv4EIxdhxmO8GVQExnOnLCL5AHq+9Q4RNk+MS7sRd2YgT HPM9/pYU/O2n1Fpgx5yHUr8AER0Xb7YcT8ru2HRdokGfizKDsi9mr8/8yQ2YnFBJIVia rWrHeFu130VjEznbu3cSeLhtSrMq0fWpRL7omgXgU/pyZrtFPT2+0C1mXZt+LnS4roBx 5opQ== 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:cc:to:from:date:dkim-signature; bh=3918YmLdUBB4GYWEtCfYavXvLujdLfhM5ZbLxQDFZQM=; fh=4Na2BilZ6VF6dXmDywSyCbvCivJ2qeBXENM4KArNk/A=; b=mcvX+ZhxIc4BVk5zq7lQTFTmhVUcQIsyXuta0EUosP6McsjP0jS+2kAeTE9MPNkxB0 Fga/hVU0hQDwaA7Pl956yjz4voQcv4RPlxbWU48AFC0p12+0SIkDUBlXJ/Zwy4W6+DoN vkxWSxX5GFT5QVsZioeefUgm34lca3rdq4mdml/lHVY6XsUx6j835srKDS380wk64pNA Grt98BEmZBHUoalKhPPZyA+cL4u4tmAFqt66DYNDw3tSSZZkQkeovvVCggqZ9HIXWwU7 SUib2yU07kswQRt1LWay9nHtu+sG9PU+/BtgITUx2+3WD4C+6hbKTZw8cOws7sAdko/T 8UAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=6PthlviA; 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=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gz6-20020a170906f2c600b00987d26a0998si1559961ejb.455.2023.07.18.11.11.36; Tue, 18 Jul 2023 11:11:59 -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=@lunn.ch header.s=20171124 header.b=6PthlviA; 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=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229886AbjGRRlM (ORCPT + 99 others); Tue, 18 Jul 2023 13:41:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229480AbjGRRlL (ORCPT ); Tue, 18 Jul 2023 13:41:11 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5F0CB3; Tue, 18 Jul 2023 10:41:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=3918YmLdUBB4GYWEtCfYavXvLujdLfhM5ZbLxQDFZQM=; b=6PthlviAF6BZw3Gc3+bpp1LHuo ovOJnWYb7m6KQLesheBYu7lSQkXk/GtNR+iuzAqmUSsPQWewzk9eQvgW37grCvSmlR63xW0n0DPlO RryE0v45L6mGEiQBdv8vMLNEXGlP7MwUmrt0Wj1YsNz26eb1kcM67Al7owsahHfoKRsI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qLogr-001drs-MB; Tue, 18 Jul 2023 19:40:49 +0200 Date: Tue, 18 Jul 2023 19:40:49 +0200 From: Andrew Lunn To: Michael Walle Cc: Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Yisen Zhuang , Salil Mehta , Florian Fainelli , Broadcom internal kernel review list , Marek =?iso-8859-1?Q?Beh=FAn?= , Xu Liang , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Simon Horman Subject: Re: [PATCH net-next v3 03/11] net: phy: replace is_c45 with phy_accces_mode Message-ID: <509889a3-f633-40b0-8349-9ef378818cc7@lunn.ch> References: <20230620-feature-c45-over-c22-v3-0-9eb37edf7be0@kernel.org> <20230620-feature-c45-over-c22-v3-3-9eb37edf7be0@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230620-feature-c45-over-c22-v3-3-9eb37edf7be0@kernel.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 > static inline bool phy_has_c45_registers(struct phy_device *phydev) > { > - return phydev->is_c45; > + return phydev->access_mode != PHY_ACCESS_C22; > } So this is making me wounder if we have a clean separation between register spaces and access methods. Should there be a phy_has_c22_registers() ? A PHY can have both C22 registers and C45 registers. It is up to the driver to decide which it wants to access when. Should phydev->access_mode really be phydev->access_mode_c45_registers to indicate how to access the C45 registers if phy_has_c45_registers() is true? Has there been a review of all uses of phydev->is_c45 to determine if the user wants to know if C45 registers exist, a.k.a. phy_has_c45_registers(), or if C45 bus transactions can be performed, and then later in this series, additionally if C45 over C22 can be performed. These are different things. I need to keep reading the patches... Andrew