Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4555072rwb; Tue, 6 Sep 2022 09:05:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR5f4SSpDICF2amhj6jUZg5hEYQd1I4MLIfED4dv3CCTxg/vreQwmLkDhxaC5jiDEHg8ruQa X-Received: by 2002:a17:907:16a6:b0:73d:de5f:8b22 with SMTP id hc38-20020a17090716a600b0073dde5f8b22mr38741770ejc.261.1662480334262; Tue, 06 Sep 2022 09:05:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662480334; cv=none; d=google.com; s=arc-20160816; b=o22abYsvLUctXm+Nzajq/AUBSnKgTaHIcbUPhrFH+NZyV7ZSJsVQ5RHqW2g4TE4kwH zPTLVjwS+sXWmxr5ZQlsMTyiT0Y2Zp3BQrlWpk975wUsVU8bptCZ/YZ5RGsr4YwkXBnT XnJcU1TNho/6zjEWgUsXDg3QRXX2GAswu+pJFup2RRXPWyPXjL0fTQAmP93g3VK79RKI dO23uOtXGODC3DHfrQXIAy/zD9SAGgJLyEmDcDMKbdpFZGv0creVi8sJjmZCLHBSPJVB pYP44c5QdNB0iL0HZ064mEJ4Wig1LOuYhabomsRs+Q0ooxPOTBBKPi/va0fFA6OO5yVQ 9+YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=QaoYaOYiVqm1O98wufvIivoefKadxL6DCZZ1oXS1h+Y=; b=g8HZjzSgd6rnJEItFnVhRmUvEAKM7DvrHCe7f2LX/3Of18xxwxqhJI1z7iK1TYPnqD 3u+fY7oAVi26U55mn01dOfaMlcjMxs50C52nwh0N5HzX1HRzdMpeAdDTsnKvH6+zvf/w MLTA588xSHk0e0eovtpoZU8baF2HS5yqE3Pt4Viog/xV5sT8tFvVllCMRCM7Bp5dNXPj 5X8prk3SJhaAjEI7dRmbGdoSoz0TBOOPQHjsrGYvVk6fah8l/nNMFWPnAGT+HULlk7/r usRfDCLxur3BZ2tRPGCxcE7PmvEAKv14xkv9nYTXxR4A2UomUX3/lZZ2bODgS3xhbdnM 3NrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=j6bQds7L; 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 b6-20020a056402278600b004486b3296aasi11338195ede.511.2022.09.06.09.05.09; Tue, 06 Sep 2022 09:05:34 -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=@lunn.ch header.s=20171124 header.b=j6bQds7L; 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 S234589AbiIFPuo (ORCPT + 99 others); Tue, 6 Sep 2022 11:50:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234565AbiIFPuM (ORCPT ); Tue, 6 Sep 2022 11:50:12 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CAE0FB78; Tue, 6 Sep 2022 08:02:57 -0700 (PDT) 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=QaoYaOYiVqm1O98wufvIivoefKadxL6DCZZ1oXS1h+Y=; b=j6bQds7LneyID5LjmWKC0/2o0c ilQKte7uNHk1ZKBSrvzZgtybjN6EplxD3yaICEnNkkLJrCp+JW0AbJU1wyxbe1b+37T+HRaUN1fmo FSPQ3PMKv4VyipjpZJwVSdsVF/wRCeqTBFyZVNzn0nDhe5se7ncepxhDwuGrY6PviZoo=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oVZm8-00FlBf-JH; Tue, 06 Sep 2022 16:42:04 +0200 Date: Tue, 6 Sep 2022 16:42:04 +0200 From: Andrew Lunn To: wei.fang@nxp.com Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] net: fec: add pm runtime force suspend and resume support Message-ID: References: <20220906083923.3074354-1-wei.fang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220906083923.3074354-1-wei.fang@nxp.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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 Tue, Sep 06, 2022 at 04:39:23PM +0800, wei.fang@nxp.com wrote: > From: Wei Fang > > Force mii bus into runtime pm suspend state during device suspends, > since phydev state is already PHY_HALTED, and there is no need to > access mii bus during device suspend state. Then force mii bus into > runtime pm resume state when device resumes. Have you tested this with an Ethernet switch hanging off the MDIO bus? It has a life cycle of its own, and i'm not sure it is guaranteed that the switch is suspended before the FEC. That is why the MDIO read/write functions have there own runtime PM calls, they can be used when the interface itself is down. Andrew