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 D95DAC64EC7 for ; Tue, 28 Feb 2023 14:53:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229771AbjB1Oxh (ORCPT ); Tue, 28 Feb 2023 09:53:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjB1Oxb (ORCPT ); Tue, 28 Feb 2023 09:53:31 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33353AD00; Tue, 28 Feb 2023 06:53:26 -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=I+jweXh8GnLUA7TGMUfgns+0G0Qnn1Pm3HLp2jqbB9Q=; b=GJKNtuOBdz0ef2Sns9ohq8vOf2 TrddWczgIaMFLTOy3KMvvvEQhrT+TK6tKS1dmbXj6zO0AXAM1Cj6o7B+XuR78IIoogfUf98rXh7Xs 1XPFcVsZuq5lHrRXGQzSasP4CzQZg64CCHh1plZPXVn1N6LUyaWMLAk0vkZh4gkNNKfU=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1pX1Lr-006AJQ-9Y; Tue, 28 Feb 2023 15:53:11 +0100 Date: Tue, 28 Feb 2023 15:53:11 +0100 From: Andrew Lunn To: Ken Sloat Cc: Michael Hennerich , Heiner Kallweit , Russell King , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1] net: phy: adin: Add flags to disable enhanced link detection Message-ID: References: <20230228144056.2246114-1-ken.s@variscite.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230228144056.2246114-1-ken.s@variscite.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 28, 2023 at 09:40:56AM -0500, Ken Sloat wrote: > Enhanced link detection is an ADI PHY feature that allows for earlier > detection of link down if certain signal conditions are met. This > feature is for the most part enabled by default on the PHY. This is > not suitable for all applications and breaks the IEEE standard as > explained in the ADI datasheet. > > To fix this, add override flags to disable enhanced link detection > for 1000BASE-T and 100BASE-TX respectively by clearing any related > feature enable bits. > > This new feature was tested on an ADIN1300 but according to the > datasheet applies equally for 100BASE-TX on the ADIN1200. > > Signed-off-by: Ken Sloat Hi Ken > +static int adin_config_fld_en(struct phy_device *phydev) Could we have a better name please. I guess it means Fast Link Down, but the commit messages talks about Enhanced link detection. This function is also not enabling fast link down, but disabling it, so _en seems wrong. > +{ > + struct device *dev = &phydev->mdio.dev; > + int reg; > + > + reg = phy_read_mmd(phydev, MDIO_MMD_VEND1, ADIN1300_FLD_EN_REG); > + if (reg < 0) > + return reg; > + > + if (device_property_read_bool(dev, "adi,disable-fld-1000base-t")) You need to document these two properties in the device tree binding. Please also take a read of https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html#netdev-faq Andrew