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 59CF8C38147 for ; Wed, 18 Jan 2023 11:31:18 +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=fDaCb6Pl5IEt5gO8IlF9djgM39A6Jf4YuAu8ex+I7yc=; b=TMOViVdf7UpD6p p/q9LnWOC9BvWFmwkrwhp6Tf44tWEqnoE4dVa4xcU7rhmPGGSgAH3nNrIX314ZYeiuGkAwnqMkzRH YFnjNA8blS4NSyyVbP83ZovGavGKGzXe/CZP850TGu+ZdckGtP3Ba+jMoJfIDpNMv8azl+ZtQZhg4 ahRI8ZlalAJltR0Cs7qqHkGAttPMZyF5gtHH0/YlpdZOFJfBVJ1ysqHuIra+wTYM4JZFh+9VCSpkR 4VrknuNEStuDe3M+RPmj5Rs3a3ImYJQo/i613QAeK9WW5GsiE6uYh9YSP+XG4ezFo1OHQvRWjBG44 xubr1DtOSXQ9gH0a1MIw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pI6dz-000XaP-U7; Wed, 18 Jan 2023 11:30:16 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pI6dw-000XYi-RA for linux-arm-kernel@lists.infradead.org; Wed, 18 Jan 2023 11:30:14 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 67A6C61793; Wed, 18 Jan 2023 11:30:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3B4EC433F1; Wed, 18 Jan 2023 11:30:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674041403; bh=AHP0LcYttnqUZ4+wG/53i7rfpAMEuP+Lz9vHvX11KZ8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Y49XCDlG2rX3zfzVwQuJaNH+ERr6vrX9uln5ggGfcFklApsCqIfvJ2supnp5M7PgK A90P2AyUGb2eEaFQWgfxvcE/ioa8pPWCCaqvxB1iWfiM3jn5XX2o7cB7WLIhReJVpQ 8m0Ry/xMnW+iUkiytRh300QFwYO0N1wtrx827D1QNnrxijBgKSZw/3m1zP8gkWBKkl yLsgaR4mZsu8mUYuYlI+dqQEChc8vy93/Z5SwXXdOb7TUkOx/t8d1hBuMqVkYjCpGr ofwkTCG+DMIheoBmTw9gQgNl7JRhSZGw/0oZM/95xBNwQpxlpf9LIKtYQOhqaA+DzQ 6uVNmlHX1YdJA== Date: Wed, 18 Jan 2023 13:29:57 +0200 From: Leon Romanovsky To: Siddharth Vadapalli Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, linux@armlinux.org.uk, pabeni@redhat.com, rogerq@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, vigneshr@ti.com, srk@ti.com Subject: Re: [PATCH net-next v3 2/2] net: ethernet: ti: am65-cpsw/cpts: Fix CPTS release action Message-ID: References: <20230118095439.114222-1-s-vadapalli@ti.com> <20230118095439.114222-3-s-vadapalli@ti.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230118095439.114222-3-s-vadapalli@ti.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230118_033012_942181_F4D357BF X-CRM114-Status: GOOD ( 17.88 ) 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 On Wed, Jan 18, 2023 at 03:24:39PM +0530, Siddharth Vadapalli wrote: > The am65_cpts_release() function is registered as a devm_action in the > am65_cpts_create() function in am65-cpts driver. When the am65-cpsw driver > invokes am65_cpts_create(), am65_cpts_release() is added in the set of devm > actions associated with the am65-cpsw driver's device. > > In the event of probe failure or probe deferral, the platform_drv_probe() > function invokes dev_pm_domain_detach() which powers off the CPSW and the > CPSW's CPTS hardware, both of which share the same power domain. Since the > am65_cpts_disable() function invoked by the am65_cpts_release() function > attempts to reset the CPTS hardware by writing to its registers, the CPTS > hardware is assumed to be powered on at this point. However, the hardware > is powered off before the devm actions are executed. > > Fix this by getting rid of the devm action for am65_cpts_release() and > invoking it directly on the cleanup and exit paths. > > Fixes: f6bd59526ca5 ("net: ethernet: ti: introduce am654 common platform time sync driver") > Signed-off-by: Siddharth Vadapalli > --- > drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 ++ > drivers/net/ethernet/ti/am65-cpts.c | 15 +++++---------- > drivers/net/ethernet/ti/am65-cpts.h | 5 +++++ > 3 files changed, 12 insertions(+), 10 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel