Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp856810rwl; Wed, 5 Apr 2023 08:34:12 -0700 (PDT) X-Google-Smtp-Source: AKy350ba4m8PNuN+gK6UbD1HUt/Ne0IO7I5bQ979ddV4z3kITmaWFcreFBtUAc3eYSQcHWuVsQuH X-Received: by 2002:aa7:cb86:0:b0:4fb:5fe1:bc3b with SMTP id r6-20020aa7cb86000000b004fb5fe1bc3bmr2022414edt.0.1680708852492; Wed, 05 Apr 2023 08:34:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680708852; cv=none; d=google.com; s=arc-20160816; b=HXIUtAHV8YfZjvHiyUvrRyQnF6FtUqidm1RUC05yz7B+JE9MgLKjRYTfbMhERLu0ZK /Z0dsEqr9d/oLhDT9bkaWwU6dFnV8a2G/JCPrCzPludvlGdDpj9pS8+AP2MnQEWoeZNk ucYmce8o7pE276DLAIXDypb7UwGywYSZYXi9zjIFMWCkzvjfaMKa6FwQMZUIojb8ME4i T+Cn8p8nXKP9X9uetWB/DpsAzmLpI9sfs0PKkGeF2KT2Us9vNnkSc4FuBFIQrC7z28xH Li3H/bv2tReL1QtpT3EB+DEzSEwSUi/K5fBp75DoB73KZ5T6TMcd1W2LEjeeX84Ya3C+ uznA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=KbXieKWiKnyIGuHhsbY0jFOrFyEg9NKd+1kiHchqTx4=; b=UaaLpa/MYzt4cAf05jJ1mTnBQklHyhowuI7oG8gyG0dBKlHWd7pX0nB12Zf8DlXHXE /to72URMoxCDiIN0YR6AecE0NiJLTOAa2j6tPxsT2ZaBhZKWklpiRZ9KJjevTskGf+nd WhUt/mMKHhepDmQoap8J4zEHJU6igz3GeMdC/S0DGzJTT+U7y0LMMbmwAK6oO46V/EYw 64ooEhEtXMNx1uS9wxYpXuSl28kkLu6N/Wg4lRzDNhcUjKyv74YU2Vk2ctofHbcTlvj5 KYWyfRPqEHFHKxHNLiunkpEPU8fbY8w6sI/EzyZvx1As4lj9emOhzCozP8gykfDds34G Wjiw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u8-20020a50eac8000000b004acc25476e9si3398840edp.363.2023.04.05.08.33.47; Wed, 05 Apr 2023 08:34:12 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238299AbjDEPc7 (ORCPT + 99 others); Wed, 5 Apr 2023 11:32:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237845AbjDEPc6 (ORCPT ); Wed, 5 Apr 2023 11:32:58 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E45F411C for ; Wed, 5 Apr 2023 08:32:52 -0700 (PDT) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pk56z-0008CX-OP; Wed, 05 Apr 2023 17:31:49 +0200 Received: from mfe by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1pk56y-0001Ro-IB; Wed, 05 Apr 2023 17:31:48 +0200 Date: Wed, 5 Apr 2023 17:31:48 +0200 From: Marco Felsch To: Andrew Lunn Cc: Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Florian Fainelli , Broadcom internal kernel review list , Richard Cochran , Radu Pirea , Shyam Sundar S K , Yisen Zhuang , Salil Mehta , Jassi Brar , Ilias Apalodimas , Iyappan Subramanian , Keyur Chudgar , Quan Nguyen , "Rafael J. Wysocki" , Len Brown , Rob Herring , Frank Rowand , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, devicetree@vger.kernel.org, kernel@pengutronix.de Subject: Re: [PATCH 00/12] Rework PHY reset handling Message-ID: <20230405153148.f2pk2tya67uyweki@pengutronix.de> References: <20230405-net-next-topic-net-phy-reset-v1-0-7e5329f08002@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Hi Andrew, On 23-04-05, Andrew Lunn wrote: > On Wed, Apr 05, 2023 at 11:26:51AM +0200, Marco Felsch wrote: > > The current phy reset handling is broken in a way that it needs > > pre-running firmware to setup the phy initially. Since the very first > > step is to readout the PHYID1/2 registers before doing anything else. > > > > The whole dection logic will fall apart if the pre-running firmware > > don't setup the phy accordingly or the kernel boot resets GPIOs states > > or disables clocks. In such cases the PHYID1/2 read access will fail and > > so the whole detection will fail. > > > > I fixed this via this series, the fix will include a new kernel API > > called phy_device_atomic_register() which will do all necessary things > > and return a 'struct phy_device' on success. So setting up a phy and the > > phy state machine is more convenient. > > Please add a section explaining why the current API is broken beyond > repair. You need to justify adding a new call, rather than fixing the > existing code to just do what is necessary to allow the PHY to be > found. TIL from Florian that you use the cover-letter information in your merge commits. I will adapt the cover-letter accordingly and mention why this PR introduces a new API. Regards, Marco > > Andrew >