Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp84057rdh; Sat, 23 Sep 2023 02:28:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHAg4IBHxthP1smj1PCAIsDJwCVSD0CxcrZjetiYXTEZ+qicrc2lJ+VnbStCH4keI5uTcDh X-Received: by 2002:a17:902:7885:b0:1b8:1bac:3782 with SMTP id q5-20020a170902788500b001b81bac3782mr1594822pll.6.1695461293617; Sat, 23 Sep 2023 02:28:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695461293; cv=none; d=google.com; s=arc-20160816; b=0w2Zn54RpXzruMCuiFt9GZpHWe9aA8wye3/O0u27kI8zF/5bB2wmAKC+7/50nYxP+H bNh267TIGUh+xn6rh72dbnuYVzpNWyEKapIhKZlP9ZiKRw7iEW1wASil5Rgn2OHV/sqr rS/VD6JQXHqlDi5cV0bGFnR9DFIPFXadY08nW7/P5rt78FIdUAKV1GiUVsSItuKKLvtf qZnqGYaZ1rVl4ov6g66eUMGSnoekZkR/gFCZIHL/59QorFP8eFkCQvRLYtvJP/avjwS5 QBz+5f5IANzHhfylr2wxylJ/kTVjLszcGLVxWUcXLSaFZLQCRALg17H9HV7QUsdSmRPO nG5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=OAps/X6vpxbgYNTDEh93GQiH1oj1Rsmu0/cgFBFZydk=; fh=YxNSOwdpBcLQnza5L3agq+6b+zthaZKN0KJ0M1x06YE=; b=YQ/EyiZhiBbTQIgNOEEMML8GSkXeNUZ6sTiOtHPEo1C8qlBQ2OmhJs73cnCCBhze6G AbRSU/ZY8kZKUaL0yh1yu6JQBB3KGaO3hmj/ATYjeTMcsO39oabtVXEZSQRGtvLFuoJr bkvgPkWE1B/Q9muCefCIJ70xbZ0RDh3hJQCqZRE8AQXothhddwagOhVrLKNmOmzCMaX5 GJAxCrRcTdevSh20OJmO4n0+eSMkhDM0WbGpgj7YWty6rs4P7NFpOgNRQv6e5++oPmtE ToqmxTkwLtggklfM2RG7TFmYJhxBtlnTe2eHE0tN414KBl/ftluGq4joCOqgGKpp3gLh dQCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=JCAnRGUx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id o9-20020a170902d4c900b001bdcd2e1706si3265417plg.196.2023.09.23.02.28.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 02:28:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=JCAnRGUx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 5440E835A6A3; Thu, 21 Sep 2023 22:47:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230195AbjIVFrj (ORCPT + 99 others); Fri, 22 Sep 2023 01:47:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229539AbjIVFrh (ORCPT ); Fri, 22 Sep 2023 01:47:37 -0400 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5782194; Thu, 21 Sep 2023 22:47:29 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 50BE6FF806; Fri, 22 Sep 2023 05:47:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1695361647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OAps/X6vpxbgYNTDEh93GQiH1oj1Rsmu0/cgFBFZydk=; b=JCAnRGUxGP6RiaYQwdoP7kdNAst4L9X+DS9e3HJevQ2KWGPibSLAFiq8CzdWAtkGc4GcM8 wmwEKyIECYyXH5JGqrZoE3u8VLuKAQ2rcXvuhAg7KNcXFoB+PyIMHXZHGSnHrzQrj+qPAB g8Z01S+FtsJLBXBDjHCW9SKJl5/joZ4NwO6EvQunGtrAv4dQJKmsxo56X8VKkRdWzZCaEU g7C8gTafjHaVzzrUu7ukYJZtVQf5kCytGKSWRhek6jLZMPqMycJTsw+aB7nXpRKgsxanTr 0PctrJ6IOEEz64qxjLygVXUDzmWoK7zZC0aP8Pr5TZ1xSs4nkdDoI714+e5T6g== Message-ID: Date: Fri, 22 Sep 2023 08:47:03 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v2 07/10] dt-bindings: net: enforce phylink bindings on certain ethernet controllers To: Andrew Lunn Cc: Rob Herring , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Krzysztof Kozlowski , Conor Dooley , George McCollister , Florian Fainelli , Vladimir Oltean , Kurt Kanzenbach , Matthias Brugger , AngeloGioacchino Del Regno , Woojung Huh , UNGLinuxDriver@microchip.com, Linus Walleij , =?UTF-8?Q?Alvin_=C5=A0ipraga?= , =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= , Marcin Wojtas , "Russell King (Oracle)" , Lars Povlsen , Steen Hegelund , Daniel Machon , Radhey Shyam Pandey , Daniel Golle , Landen Chao , DENG Qingfang , Sean Wang , Geert Uytterhoeven , Magnus Damm , Maxime Chevallier , Nicolas Ferre , Claudiu Beznea , Marek Vasut , Claudiu Manoil , Alexandre Belloni , John Crispin , Madalin Bucur , Ioana Ciornei , Lorenzo Bianconi , Felix Fietkau , Horatiu Vultur , Oleksij Rempel , Alexandre Torgue , Giuseppe Cavallaro , Jose Abreu , Grygorii Strashko , Sekhar Nori , Shyam Pandey , mithat.guner@xeront.com, erkin.bozoglu@xeront.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-renesas-soc@vger.kernel.org References: <20230916110902.234273-1-arinc.unal@arinc9.com> <20230916110902.234273-8-arinc.unal@arinc9.com> <20230918181319.GA1445647-robh@kernel.org> <16710cf9-8911-4fed-8e2d-b19b581446c1@arinc9.com> <85cc3b27-417e-4cf4-9f77-347a338c9d67@arinc9.com> <8935d431-be0c-43e0-a908-f7dff2048f7c@lunn.ch> Content-Language: en-US From: =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= In-Reply-To: <8935d431-be0c-43e0-a908-f7dff2048f7c@lunn.ch> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-Sasl: arinc.unal@arinc9.com X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 21 Sep 2023 22:47:51 -0700 (PDT) On 22.09.2023 02:29, Andrew Lunn wrote: > On Thu, Sep 21, 2023 at 09:21:40PM +0300, Arınç ÜNAL wrote: >> On 21.09.2023 16:00, Andrew Lunn wrote: >>>> - Link descriptions must be required on ethernet controllers. We don't care >>>> whether some Linux driver can or cannot find the PHY or set up a fixed >>>> link without looking at the devicetree. >>> >>> That can lead to future surprises, and breakage. >>> >>> Something which is not used is not tested, and so sometimes wrong, and >>> nobody knows. Say the driver is extended to a new device and actually >>> does need to use this never before used information. You then find it >>> is wrong, and you get a regression. >>> >>> We have had issues like this before. There are four rgmii phy-link >>> modes. We have had PHY drivers which ignored one of those modes, it >>> silently accepted it, but did not change the hardware to actually use >>> that mode. The PHY continues to use its reset defaults or strapping, >>> and it worked. A lot of device trees ended up using this mode. And it >>> was not the same as reset defaults/strapping. >>> >>> And then somebody needed that fourth mode, and made it actually >>> work. And all those boards wrongly using that mode broke. >>> >>> The lesson i learned from that episode is that anything in device tree >>> must actually be used and tested. >> >> It looks like the root cause here was the lack of dt-bindings to >> only allow the phy-mode values the hardware supports. > > That would not help. The hardware supported all 4 RGMII modes. So > listing all four in the dt-binding would be correct. But the driver > for the hardware had a bug, and so silently ignored one of the > modes. That then masked the bugs in board DT files. > >> What I see here is the driver change should've been tested on all >> different hardware the driver controls then the improper describing >> of hardware on the devicetree source file addressed. > > Which is what did happen. But it took a while to find all those broken > boards. For a period of time, we had regressions. > > Bugs happen. It is a fact of life. But we want those bugs to be easy > to find as possible. If we force DT writers to add properties which > the driver never uses, they are going to be bugs in those > properties. And those bugs are not going to be easy to find, and quite > likely, they will only be found a long time after they are added. We > should not be adding unused properties and bugs just to keep a yaml > checker happy. Understood. Then I will refrain from enforcing link descriptions altogether as I can't justify enforcing them on ethernet controllers selectively because certain Linux drivers don't make use of the link properties and may expose bugs if used. The link properties are still allowed for all ethernet controllers though, just not enforced. But I suppose it's better to optionally find the bug instead of causing a regression then finding the bug. Arınç