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 DC5AFC25B0E for ; Fri, 12 Aug 2022 15:54:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238917AbiHLPyp (ORCPT ); Fri, 12 Aug 2022 11:54:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232003AbiHLPym (ORCPT ); Fri, 12 Aug 2022 11:54:42 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E70DA9F0CE; Fri, 12 Aug 2022 08:54:41 -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=pXdrFXjywfaStbc9howI1PB99kMV6m7M3ckGQvwmf8c=; b=mn648VQHtm3hZsyORlo/+PMv7G TLxeyDiskZqCB9pDQk5ZZt4adVUGmkxAs72rsysgFpzE5k7z8sxlmZnjCukcUA4C49/Fq/Ciw3AMw nABRfena85qrxerhmwxEK7WWNdgXR8lnWgzRjOl3wzXTQWSbLcPZja9/LQF+zLXfcbbo=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oMWzZ-00D8zA-5L; Fri, 12 Aug 2022 17:54:33 +0200 Date: Fri, 12 Aug 2022 17:54:33 +0200 From: Andrew Lunn To: Ravi Gunasekaran Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-omap@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kishon@ti.com, vigneshr@ti.com Subject: Re: [PATCH v2 net-next] net: ethernet: ti: davinci_mdio: Add workaround for errata i2329 Message-ID: References: <20220810111345.31200-1-r-gunasekaran@ti.com> <9d17ab9f-1679-4af1-f85c-a538cb330d7b@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > sh_eth is not configured for autosuspend and uses only pm_runtime_put(). I don't know the runtime power management code very well. We should probably ask somebody how does. However: https://elixir.bootlin.com/linux/latest/source/drivers/base/power/runtime.c#L168 This suggests it should be safe to perform an auto suspend on a device which is not configured for auto suspend. To me, it looks like is should directly suspend. Devices are in a tree. If you suspend a leaf, you can walk up the tree and suspend its parent as well, if it is not needed. Similarly, if you wake a leaf, you need its parents awake as well, so you need to walk up the tree and wake them. In order for this to work reliably, i expect runtime PM to be very tolerant. If a device is not configured for runtime PM, actions should be a NOP. If it is not configured for auto suspend, and you ask it to auto suspend, to me, it would make sense for it to immediately suspend, etc. > Please provide your views on this. Your inputs on the next course of action > would be helpful. I would suggest you talk to somebody who knows about runtime PM. Andrew 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A79E2C00140 for ; Fri, 12 Aug 2022 15:56:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pZhI8aGsIfMgbh9mP+CCL5mmgU3A0UszgI4+68T17iI=; b=uQzzOQaAcQ5c3N CC+kxCAhzemgTW5+Li8gT1mTgNp+YyY7TvkP9xrX7sFyfvXpWKneaVoiMsC3f+iPTifkJSkOLlZPv bSDE+m5r2bZfjKObVWRm2RGz0+mQrn4rPLmn2W9y6EYNzU30iDjuMR8ZL1B4kc75+wWAV94nNU8+W evJ0NbdH2rgpJpxntEPaH+nfrLOUVjcd+hT+eusiK3nBTjX9awstLMcA+/MxyOXtfwinORTtSZY4X 0WJxwwuvnxdJJ6IHi3Ky/NPyx+zWZ7RgO0Afd1COxLoH2xmap9bLVlfIi2gnwGcY13sdWNZBbQVg4 GndSqm/QWJqaigPxB9tA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oMWzr-00AQ48-TF; Fri, 12 Aug 2022 15:54:52 +0000 Received: from vps0.lunn.ch ([185.16.172.187]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oMWzo-00APmr-Km for linux-arm-kernel@lists.infradead.org; Fri, 12 Aug 2022 15:54:50 +0000 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=pXdrFXjywfaStbc9howI1PB99kMV6m7M3ckGQvwmf8c=; b=mn648VQHtm3hZsyORlo/+PMv7G TLxeyDiskZqCB9pDQk5ZZt4adVUGmkxAs72rsysgFpzE5k7z8sxlmZnjCukcUA4C49/Fq/Ciw3AMw nABRfena85qrxerhmwxEK7WWNdgXR8lnWgzRjOl3wzXTQWSbLcPZja9/LQF+zLXfcbbo=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oMWzZ-00D8zA-5L; Fri, 12 Aug 2022 17:54:33 +0200 Date: Fri, 12 Aug 2022 17:54:33 +0200 From: Andrew Lunn To: Ravi Gunasekaran Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-omap@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kishon@ti.com, vigneshr@ti.com Subject: Re: [PATCH v2 net-next] net: ethernet: ti: davinci_mdio: Add workaround for errata i2329 Message-ID: References: <20220810111345.31200-1-r-gunasekaran@ti.com> <9d17ab9f-1679-4af1-f85c-a538cb330d7b@ti.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220812_085448_699204_6BDF9120 X-CRM114-Status: GOOD ( 12.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org > sh_eth is not configured for autosuspend and uses only pm_runtime_put(). I don't know the runtime power management code very well. We should probably ask somebody how does. However: https://elixir.bootlin.com/linux/latest/source/drivers/base/power/runtime.c#L168 This suggests it should be safe to perform an auto suspend on a device which is not configured for auto suspend. To me, it looks like is should directly suspend. Devices are in a tree. If you suspend a leaf, you can walk up the tree and suspend its parent as well, if it is not needed. Similarly, if you wake a leaf, you need its parents awake as well, so you need to walk up the tree and wake them. In order for this to work reliably, i expect runtime PM to be very tolerant. If a device is not configured for runtime PM, actions should be a NOP. If it is not configured for auto suspend, and you ask it to auto suspend, to me, it would make sense for it to immediately suspend, etc. > Please provide your views on this. Your inputs on the next course of action > would be helpful. I would suggest you talk to somebody who knows about runtime PM. Andrew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel