Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp222535rdf; Thu, 2 Nov 2023 20:40:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGU9wDMs83thr6tH4OO7ywduaEaoWzF/CTmtycSJFRC+dfwhqkDE/0j3XXx2yoJkpj/Q0n9 X-Received: by 2002:a05:6808:649:b0:3a7:4876:6044 with SMTP id z9-20020a056808064900b003a748766044mr20813612oih.52.1698982806355; Thu, 02 Nov 2023 20:40:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698982806; cv=none; d=google.com; s=arc-20160816; b=cMzKVEdtQBnKpLEtanYoxw1jKBWImHkVHpkZ+idAm9Ef82w/EyjhmbPJOxF8nJr2Qh M6aqJiLpBJ6u4wBwUsU2Ya/OA5DtrjLmHZgJaJt3v2ACDd2qlGZa5tK4qr8rns7k9S3g bb7wHHkbhkkegiUHIn4g444BhIm8Zos1RxhHhiyqi7jKI/7gHoU715dAQ9kUbnamAeRK 3UHpTmVIv625U/LTXqZJRU6w80rzHnx7RsPG3/fitgRetA+g8SBGyXIFee0smwJf58yk jXFWKS28os9Bwbz4+b4ZtUkUKXEY3/bhwzdCmLaNlbs1VANjLn8hXNDqg91eop/0BLxY A9GA== 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:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=s39c0Q3vRJAr69pPcp1Cq/oOjffOhAjmF4C5gTe6n2g=; fh=UApnGlLqZdcivZPImViW+O0dnHZViTaXPX8bSp5O2LE=; b=w28G0hqcFPQOcfWeKCOqjk32fyDy7Li7CvdYaouAmdtXDsp4lmQssjE+UJeviVSbPf U2IzBtAbjsV5crtxbtNKhYooKqrWR11P6Po/IKUnkOn7eqxIYZoDX3cUqy6mmuZqLnIO SgAd8N7SqHJ0VljdzsQpGyDk8jzE0QZCWPnk4gBRYUHHbeQE4eqNSDpm9VfO1QEwXjew bHrwR/Rv85JcBx/C8S44LizPVrYlG+sU1PtDlVr9rqf1H3QjEromjPSgbjEdznRj3J61 lUbOKPLGyEQHoPZiLjVP8IJdWVrk9Vm6pEmWDHt1i8AzzMayTmYHguQOKew7cM+hrKbr t3ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PD2JE9+Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id f9-20020a056a00228900b00690cc6f7598si766216pfe.247.2023.11.02.20.40.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 20:40:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PD2JE9+Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 4AB1582FABF8; Thu, 2 Nov 2023 20:40:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231220AbjKCDkD (ORCPT + 99 others); Thu, 2 Nov 2023 23:40:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjKCDkB (ORCPT ); Thu, 2 Nov 2023 23:40:01 -0400 Received: from mail-ua1-x935.google.com (mail-ua1-x935.google.com [IPv6:2607:f8b0:4864:20::935]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADCBDCE; Thu, 2 Nov 2023 20:39:58 -0700 (PDT) Received: by mail-ua1-x935.google.com with SMTP id a1e0cc1a2514c-7ba170ac211so574876241.2; Thu, 02 Nov 2023 20:39:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698982798; x=1699587598; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=s39c0Q3vRJAr69pPcp1Cq/oOjffOhAjmF4C5gTe6n2g=; b=PD2JE9+YooOHpn0uTdMpwB3GqDJSgFERacV8171sp1ju7VsCAKrJh6Qyx5VMCSbce5 tbNPESO2MWrx5XyKssExUko8PH3ROG/rnpp2cIqJSQTXwRzqLIZqZaywB8yofxWClgNf d7+h490/4tChddJ+wZPZ9pzpPfJ9hsjze+zYHbmP40o89MOCYpiKN6ZDny9YFdcihsYh 85u0ablyRf2QkBA6cuc+EePwR/rY37hhBMeh8Ib0xwMsBZyEACF+Mvl1g6jFr6OaJ+xh oBY2ZtGUGIhsgre+sPd+uw2cEmKt1AIxNGgnJWqpFFckSOjPrF0CDt2PCMuzyPKMk4O8 hNpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698982798; x=1699587598; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=s39c0Q3vRJAr69pPcp1Cq/oOjffOhAjmF4C5gTe6n2g=; b=BBL4aqQRrQqGUOeMX6+SCFAd/oR+khjkATEyjGe0QUe7JKv47RWqv1A3xCc+QI/qPF FM1+YCq4X+DRdvrhy+7kcBOXzz/DmHYQ9bGc8j3DtfDLkteIwkgy8hlKlu+0epe4FSJb M1khsHM98MWi670c+GLJ/f5WuKWeo1devmt37CHCCflPU6jorTSILovp2zdf1dsFlUOK 1FBd95el2tWr3mtYzsaomqPB1dEY0SnEg0/uVLtj2wDhXkyeqMzrr2dAtJ6f91dCGDWJ uBm9tbMDh7OBnMsbrGUPsGp17d0fle2cozeRil45eniQhzxHH+my22ook+FD6cLUZhq1 k1Hw== X-Gm-Message-State: AOJu0YwvI1UazfuV2fnD1zIFYuwSyNqt3b124oZ2aniI248LEWSR9e0S CsQPtugrz5uXNbCJikOshN9/B+jUz0w= X-Received: by 2002:a67:c399:0:b0:452:c581:5a07 with SMTP id s25-20020a67c399000000b00452c5815a07mr20410738vsj.11.1698982797741; Thu, 02 Nov 2023 20:39:57 -0700 (PDT) Received: from [192.168.1.3] (ip72-194-116-95.oc.oc.cox.net. [72.194.116.95]) by smtp.gmail.com with ESMTPSA id m24-20020aa78a18000000b0068fcb70ccafsm437860pfa.129.2023.11.02.20.39.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Nov 2023 20:39:57 -0700 (PDT) Message-ID: <999020b2-692b-4582-8ca0-e19c7b45ee92@gmail.com> Date: Thu, 2 Nov 2023 20:39:55 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] net: phy: broadcom: Wire suspend/resume for BCM54612E Content-Language: en-US To: Marco von Rosenberg , Andrew Lunn Cc: Florian Fainelli , Broadcom internal kernel review list , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20231030225446.17422-1-marcovr@selfnet.de> <5414570.Sb9uPGUboI@5cd116mnfx> <4890615.31r3eYUQgx@5cd116mnfx> From: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5arMQorqTFWlEOgRA8OP47L9knl9i4xuR0euV6DChDrguup2aJVU8JPBBgRAgAPAhsMBQJU X9LxBQkeXB3fAAoJEGFXmRW1Y3YOj4UAn3nrFLPZekMeqX5aD/aq/dsbXSfyAKC45Go0YyxV HGuUuzv+GKZ6nsysJw== In-Reply-To: <4890615.31r3eYUQgx@5cd116mnfx> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 02 Nov 2023 20:40:05 -0700 (PDT) On 11/2/2023 6:47 PM, Marco von Rosenberg wrote: > On Wednesday, November 1, 2023 11:06:56 PM CET Andrew Lunn wrote: >> On Wed, Nov 01, 2023 at 10:42:52PM +0100, Marco von Rosenberg wrote: >>> On Tuesday, October 31, 2023 1:31:11 AM CET Andrew Lunn wrote: >>>> Are we talking about a device which as been suspended? The PHY has >>>> been left running because there is no suspend callback? Something then >>>> triggers a resume. The bootloader then suspends the active PHY? Linux >>>> then boots, detects its a resume, so does not touch the hardware >>>> because there is no resume callback? The suspended PHY is then >>>> useless. >>> >>> Hi Andrew, >>> >>> thanks for your feedback. I guess a bit of context is missing here. The >>> issue has nothing to do with an ordinary suspension of the OS. The main >>> point is that on initial power-up, the bootloader suspends the PHY before >>> booting Linux. With a resume callback defined, Linux would call it on >>> boot and make the PHY usable. >> >> Ah, so you rely on phy_attach_direct() calling phy_resume(phydev). >> >> This seems an odd way to solve the problem. It was not Linux which >> suspend the PHY, so using resume is asymmetric. >> >> I think soft_reset() or config_init() should be taking the PHY out of >> suspend. We have an unconditional call to __phy_resume() in phy_start() and we should always have a call to phy_start() regardless of the path though you have a point Andrew that we should ensure that by the time phy_init_hw() is called we have taken the device out of IDDQ-SR. > > I agree with all of your points. This is just one way which happens to solve > this specific problem. Of course it might be asymmetric to see the patch as > a solution to my problem. However is there anything fundamentally wrong with > adding suspend/resume callbacks? I see some other drivers having these > callbacks defined and some not (it seems a bit inconsistent throughout the > drivers in broadcom.c to be honest). > > I'm wondering if I should just omit this whole "motivation" paragraph in the > commit message and just use the commit message of commit 38b6a9073007 ("net: > phy: broadcom: Wire suspend/resume for BCM50610 and BCM50610M") as a template. > I mean, regardless of my motivation, I would say it makes sense for this PHY > to support suspend and resume. I would remove the motivation aspect from the paragraph and we could also improve the driver a bit to ensure that IDDQ-SR is disabled upon config_init(). Other than that your patch is just fine with me. Can you re-submit in a few days when net-next opens again? Thanks! -- Florian