From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A86C1ECAAD5 for ; Tue, 6 Sep 2022 15:50:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233380AbiIFPup (ORCPT ); Tue, 6 Sep 2022 11:50:45 -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> 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