Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4957994rwb; Sun, 4 Dec 2022 11:22:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf6sY8OG1a9t0hu5/nqT5FPq49H6I3V+/vC2+Br8mD+VIWTFzz6iaaZLkA35rf1zwZRoWznt X-Received: by 2002:a17:906:9bc4:b0:7c0:e310:3193 with SMTP id de4-20020a1709069bc400b007c0e3103193mr4100791ejc.653.1670181753614; Sun, 04 Dec 2022 11:22:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670181753; cv=none; d=google.com; s=arc-20160816; b=WRx4npvko8QINFH94qH8TVc6jS4L0hj4s6jR1AIUFb8ryrfL9ZTM8cSU0kQ5XJM+l2 oFRkKxwhMNAhvfCjOhqVYdVRJpkelOZZSNPRgaYYPDQ7Wa8vCeuK60xApEtOX5weMSQn pKw11gU06caZjdRd3Bsj/7r7iKGmLgORf9jjpbZNxx3nXU7YAjnvJi/e6WSifiCJJ67J rXd8KC28h7IFpvOT+Ha2XbjcbEBVVmmDdUJ8jnWAeksnJgzo+9+VTNyTZ98nCxK9bXEY 5pHGo04cD4udXCbejQHiEhRgOx+OdAl1bSsR0DdiAa4IIseA3AbyNpFYL+c9QZ+rtR+i Jevg== 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=HMU5AHH9KKS1/AVVoeU+/FowDlxlFXjYr1vMNPrjg/E=; b=wj+XMYcqzx7nYZ/3lU6mMwGgSgIz+VXQn9/G8xP55ayM9O2rKiltby8yoIlWxiAgcj 81Q1P+0uOZR0WVsKP1sNVyF5C/hre4EofN+nLctsZ26GKDDnEo9oFGx1je+Vh2xZ230T NfM0exOs52UJZ1BA3kOUQ/29lGhY23pKEsFf75SBGkcDHltVH0z58LG93awDrGCFFRSd HdppnqBJ8cOUhSPvDlWX+ogSlGegPT/pgrrO9UKRn1GQb1/QTG7GDk/lelsT+w+NvZ9H 0l+oaZ2xpVKGOJ0UphjV+7RHwE9ICnqvmzCXNW9ZcBu4JPBvzqCMAcB8qOOi0s8skC/X 1FWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="c/DZmo20"; 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 e6-20020a056402190600b0045d8bff7afesi11681857edz.376.2022.12.04.11.22.13; Sun, 04 Dec 2022 11:22:33 -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=@lunn.ch header.s=20171124 header.b="c/DZmo20"; 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 S230234AbiLDS6S (ORCPT + 82 others); Sun, 4 Dec 2022 13:58:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230015AbiLDS6Q (ORCPT ); Sun, 4 Dec 2022 13:58:16 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77DDE13F04; Sun, 4 Dec 2022 10:58:15 -0800 (PST) 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=HMU5AHH9KKS1/AVVoeU+/FowDlxlFXjYr1vMNPrjg/E=; b=c/DZmo20g5S+4IX5mvuoBij6nG HDlYKukVVzQXUD/WhHzfLl/nBICffukblmqAF7Q8HG3zKFTpmJHOunLPI9wYJdDuGQ423U/pKtg1W fEqw9E81yT5UgQnPAlGeBmn/1BduNcKxAdGdYuj59NQG8+4/JgVAK3s1j11+fguaRXFU=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1p1uBj-004KzD-47; Sun, 04 Dec 2022 19:58:07 +0100 Date: Sun, 4 Dec 2022 19:58:07 +0100 From: Andrew Lunn To: Piergiorgio Beruto Cc: "Russell King (Oracle)" , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Oleksij Rempel Subject: Re: [PATCH net-next 3/4] drivers/net/phy: Add driver for the onsemi NCN26000 10BASE-T1S PHY Message-ID: References: <834be48779804c338f00f03002f31658d942546b.1670119328.git.piergiorgio.beruto@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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 int ncn26000_enable(struct phy_device *phydev) > > > +{ > > > > This is actually the config_aneg() implementation, it should be named > > as such. > I can certainly rename it, however I did this for a reason. The NCN26000 > only supports P2MP mode. Therefore, it does not support AN (this is > clearly indicated in the IEEE specifications as well). > > However, it is my understanding that the config_aneg() callback is > invoked also for PHYs that do not support AN, and this is actually the > only way to set a link_control bit to have the PHY enable the PMA/PCS > functions. So I thought to call this function "enable" to make it clear > we're not really implementing autoneg, but link_control. Anybody familiar with PHY drivers knows the name is not ideal, but when they see config_aneg() they have a good idea what it does without having to look at the code. All PHY drivers should have the same basic structure, naming etc, just to make knowledge transfer between drivers easy, maintenance easy, etc. Andrew