Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp15171rwa; Fri, 19 Aug 2022 21:00:40 -0700 (PDT) X-Google-Smtp-Source: AA6agR718K8GLQkKZyudHvs9pEEml8trIsEa6zv3Z2Aw5GmfqTgVb//tKSN7LCAQ359ZUr1zzrlK X-Received: by 2002:a17:907:762f:b0:73d:6859:da8a with SMTP id jy15-20020a170907762f00b0073d6859da8amr340563ejc.647.1660968040216; Fri, 19 Aug 2022 21:00:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660968040; cv=none; d=google.com; s=arc-20160816; b=0YDNXH/ZIIkx0LiWlGU09e5iSOcGbVtKFHHVKAi7GmwyvGP3J5RNHq0WOybGOFWnBM 859HQ1+pHIRmPgb2pk3umJnCQMcr1SWnds0HeThj0HEEcj3xCtNJo1tQOJjqhtzCRS8+ fq0/wpDthMEreGUQeKDdHNrrXSO99BhaibNYVEAzZJhlEbf3akNqgTsNE58VkzkPSbuZ 5W6TLhYMv0BJJVQME2qd+nMovtB4gZq1LMjV7Cijs1ssrNrktBmOlmsPhVgO6NBXc2ui mSl90+z/SCPlD+DAfGXJ1HcPY+DRaExwCUDVwyI/zJtLT5YFI20DQlssxvimAsPBies/ qGaA== 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 :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=8nQrH+5egSaKXmqGf2DeUinczEZu8mYWEg+gHBiviSU=; b=QlGzndOLkavrI5UZLabAFt7sishnRPiBFDEwjClNSuddkUoLYOuSsIa48IdKpb95am mbzLtxyyyxPIYK8Fm/Yt7jJIfDBMMlz6HqJc/ujQGqNu4MSs8D55WKXULP1rOkAyQtpC Cab15HfIrnQujSNqqJRgoUBlo7j6Y/ziSBa75yl9H3dXgNZ20AssmxT+/TuNXr45d/XK Ijsya6duejvX8N3u4dP2WdeZNpIRnyP9vS5gxnIlTU2tclK8r+pvWAzMn9J5bLPi4ybA X1Rv4hwPUlpIXGvvlXWThuNq4b5wPyq31ir4CJpCHdsF+7Tz5RB4R2cH93crmGa7+0Bg YwhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Gtf0A/jK"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sg39-20020a170907a42700b00730a4246dd0si4649120ejc.593.2022.08.19.21.00.12; Fri, 19 Aug 2022 21:00:40 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Gtf0A/jK"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241323AbiHTC5u (ORCPT + 99 others); Fri, 19 Aug 2022 22:57:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233969AbiHTC5r (ORCPT ); Fri, 19 Aug 2022 22:57:47 -0400 Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 667DEC2758; Fri, 19 Aug 2022 19:57:47 -0700 (PDT) Received: by mail-qt1-x82c.google.com with SMTP id y18so4604987qtv.5; Fri, 19 Aug 2022 19:57:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=8nQrH+5egSaKXmqGf2DeUinczEZu8mYWEg+gHBiviSU=; b=Gtf0A/jKvkV2vWwClpTd0jS/+xh+stTbAaObdMDVXVCSMC1kH4oX+3EvemiQMv0Cu8 1LGawVSnPEOm4Hp5oAWCUxa5RKXH07Ppz1HTDMaVcMK6bSr/vB+BrMqXy4oEFImM4h0f 7JBp4QFRl3Jvvz/p8V74YfNl4xSZ8EY63pmSCG64BmRQe25jzsknraUjVdIQdz/OC3cy UuLRw7VuZ0UdTkl+TndOCd+r2J3MAJ2DIuZgLuuav26yBEfl9LmnV0LiUhQ/1PIzImRh m/zfH4d3VhCFI97veWqToobKVYWlHUTgkEqDXyfsBrKSsAEz/88G3vy4DDs6lJBRt7HV 7Kww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=8nQrH+5egSaKXmqGf2DeUinczEZu8mYWEg+gHBiviSU=; b=SKKCb201MlDlxuSZz0PQTisc7d8iUKIUi8zHGjgXi/PBBE/AByX4t3INvrw5BK8mox YxZWnwPV5Gw9rftZgzG6SK0VxoL/NsNIzHvg9a1PAt0t4QuXj0GOGh47gdLPBcwkud/U QJYj5e9SrH0M44kPCL+EQ9YWNP1rAOpHQ/nmNFqD6y7pkRfDXBj3pzBOsJIFdqv4C1qT vPz3NvtH9D0SFC7/hzTtJ/vk2JAG5Wnz6xfbHMDzafyP5aUlqXzc4SAIaai/M/SS2jjJ KhSmuFw+p6DtPEwyNghOk58i16be0me8dDvc+nxvJ/d6G6sotpd4fsc6H40kih7mz4Aq LcRg== X-Gm-Message-State: ACgBeo1q7zZ0pqk4JzTe+jPm7XK9jNY6D6fWl8JhFe8/MVAic3xBW5K3 C4851TbosmK+y5xr8bPHmjI= X-Received: by 2002:ac8:7dc1:0:b0:344:6104:eab6 with SMTP id c1-20020ac87dc1000000b003446104eab6mr8674172qte.455.1660964266497; Fri, 19 Aug 2022 19:57:46 -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 h10-20020a05620a284a00b006b98315c6fbsm5176381qkp.1.2022.08.19.19.57.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 Aug 2022 19:57:46 -0700 (PDT) Message-ID: Date: Fri, 19 Aug 2022 19:57:43 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [v2][PATCH] net: phy: Don't WARN for PHY_READY state in mdio_bus_phy_resume() Content-Language: en-US To: Xiaolei Wang , andrew@lunn.ch, hkallweit1@gmail.com Cc: linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220819082451.1992102-1-xiaolei.wang@windriver.com> From: Florian Fainelli In-Reply-To: <20220819082451.1992102-1-xiaolei.wang@windriver.com> 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,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,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 On 8/19/2022 1:24 AM, Xiaolei Wang wrote: > For some MAC drivers, they set the mac_managed_pm to true in its > ->ndo_open() callback. So before the mac_managed_pm is set to true, > we still want to leverage the mdio_bus_phy_suspend()/resume() for > the phy device suspend and resume. In this case, the phy device is > in PHY_READY, and we shouldn't warn about this. It also seems that > the check of mac_managed_pm in WARN_ON is redundant since we already > check this in the entry of mdio_bus_phy_resume(), so drop it. > > Fixes: 744d23c71af3 ("net: phy: Warn about incorrect mdio_bus_phy_resume() state") > Signed-off-by: Xiaolei Wang Acked-by: Florian Fainelli I see the use case you have and it does make sense to me, thanks! -- Florian