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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33F9DC433DF for ; Tue, 18 Aug 2020 06:28:42 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B359920825 for ; Tue, 18 Aug 2020 06:28:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="tohzI4p5"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="wGw3PcUk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B359920825 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 34824171D; Tue, 18 Aug 2020 08:27:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 34824171D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1597732120; bh=JSK9ci9WhE9/2a+BcV+RJI/GZdayBc/8ZdvTiCoeTGw=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=tohzI4p5xOj24u5q60AlcBAxzKaXYryouNeO8tZsV4wCocA0s2I0QttCn5U0jhxpT EWsjeuy6UbYowhG6KfNbDS6rCQ3OaOXnfmUnNiqwUYjcY9jFgFd9mmNAcGBV/+5Ykx hEmgBMiNYr9I9Zf1qHxw64hPvY9/EdPJprmkdlbI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8CF8FF80228; Tue, 18 Aug 2020 08:27:49 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4814AF8023F; Tue, 18 Aug 2020 08:27:48 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BE2C5F800D3 for ; Tue, 18 Aug 2020 08:27:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BE2C5F800D3 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="wGw3PcUk" Received: from localhost (unknown [122.171.38.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0B66B20825; Tue, 18 Aug 2020 06:27:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597732053; bh=JSK9ci9WhE9/2a+BcV+RJI/GZdayBc/8ZdvTiCoeTGw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wGw3PcUkzKlVCGYV8eKWpkIal8/JUgTDCMtBdO7CCK31U/1VWTvCMAuy5BlpYJM1s ZKEEwXShBPr8QzhBWt6npd96Ftf4aS0BGnD/aGbueLot1Sqnwy9ehLXW1UwdYu1rFk iivNWMnAt4cQVMj3Ks84ZeiibfC1L3ZhkH2m4ask= Date: Tue, 18 Aug 2020 11:57:29 +0530 From: Vinod Koul To: Pierre-Louis Bossart Subject: Re: [PATCH 09/13] soundwire: intel: add CLK_STOP_BUS_RESET support Message-ID: <20200818062729.GS2639@vkoul-mobl> References: <20200721203723.18305-1-yung-chuan.liao@linux.intel.com> <20200721203723.18305-10-yung-chuan.liao@linux.intel.com> <20200817114729.GP2639@vkoul-mobl> <8aac898f-92d3-c907-ebb8-4642a618645b@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8aac898f-92d3-c907-ebb8-4642a618645b@linux.intel.com> Cc: alsa-devel@alsa-project.org, tiwai@suse.de, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, ranjani.sridharan@linux.intel.com, hui.wang@canonical.com, broonie@kernel.org, srinivas.kandagatla@linaro.org, jank@cadence.com, mengdong.lin@intel.com, slawomir.blauciak@intel.com, sanyog.r.kale@intel.com, Bard Liao , rander.wang@linux.intel.com, bard.liao@intel.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On 17-08-20, 09:30, Pierre-Louis Bossart wrote: > > > > > > + } else if (clock_stop_quirks & SDW_INTEL_CLK_STOP_BUS_RESET) { > > > + ret = sdw_cdns_clock_stop(cdns, true); > > > + if (ret < 0) { > > > + dev_err(dev, "cannot enable clock stop on suspend\n"); > > > + return ret; > > > + } > > > + > > > + ret = sdw_cdns_enable_interrupt(cdns, false); > > > + if (ret < 0) { > > > + dev_err(dev, "cannot disable interrupts on suspend\n"); > > > + return ret; > > > + } > > > + > > > + ret = intel_link_power_down(sdw); > > > + if (ret) { > > > + dev_err(dev, "Link power down failed: %d", ret); > > > + return ret; > > > + } > > > > no cleanup on all the error cases here? > > See above the 'else if' test, the clock stop on suspend will be followed by > a bus reset on resume. this is essentially a complete bus restart. ok > The only open here is whether we should actually return an error while > suspending, or just log the error and squelch it. We decided to return the > status so that the pm_runtime suspend does not proceed: the state remains > active which is easier to detect than a single line in a dmesg log. right, returning makes sense and is done correctly above -- ~Vinod