Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp12045076ybi; Fri, 26 Jul 2019 03:55:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqzUth2pL7L5iE70ggD0zMeSjtwwwJ1hsX7BxKC4vTzO8NG+GeueMigFh3BiwzfOHxebM2kV X-Received: by 2002:a17:90a:3247:: with SMTP id k65mr54201054pjb.49.1564138542235; Fri, 26 Jul 2019 03:55:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564138542; cv=none; d=google.com; s=arc-20160816; b=Xbk4ZhodS6CalAiZun9/5kvSES2+biUuM9fBS9eUOhRKdNKHNrOw/2zuTbDyTbqKix 7g7YAglVwAzSlbNPnUl7sKaRISGwBu5CU08LhtHbXMTTTWJoHnf6yX40iBpU/SPkuhqn j8OwcAQXMaI4F0VzjSHIM8hVyXF7HWhGtPRV01iW9pCAzHCotToes+aCF47tAD2V5mQC 1rRb4m0vQ7sipu1Ix0sbIzwlvPnC+BByPUUkpDb8TAyTs4rI/oWIqp8TUn7M5HRmxRlQ 0SG5oxVE+DpFyIlUckXBp1HvhZTx6Ijs9U0dSWXpEMSsYvtAoNEZ7QPRfQ8CxwsQ72it Jhww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=i6a6rLoa7NVYS6NE2qpZUySw9Ijzgi0DIOlfcIs5P0w=; b=o2fMlWKFJOJd+TqYg0xaL56ekoYJ0dWSP9Wg9nKGDrTOsM3LRTPG5eeLlr4UYJu+Sm zzPJL2FyHB3WpU7+UE4OKeXEhXTnc3FSWmq5/zcjq/xN1XM66R7ZH7OH4+dXdeVsUgNZ BmEWuRy9d/dyz58krk2nSFZwFzrPuHgUwhFtE3crWhoIrP8uFOcsPn40mz34zACiF2Bs y4wRp8ekLek5iPatbdJV/ZumaSefaFZx5vdaikaJmHyyEAMPa+yaw+/CXFC2qH4HOGY8 wZQlGogYObClKRonEx4HJpolrmyZCMruQ46HxdDcVWCYO70T7dGE6TskhtoYNuFiLEaP AeEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r11si21449869pjq.108.2019.07.26.03.55.26; Fri, 26 Jul 2019 03:55:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726139AbfGZKOX (ORCPT + 99 others); Fri, 26 Jul 2019 06:14:23 -0400 Received: from mga14.intel.com ([192.55.52.115]:50406 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725815AbfGZKOX (ORCPT ); Fri, 26 Jul 2019 06:14:23 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jul 2019 03:14:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,310,1559545200"; d="scan'208";a="175553798" Received: from crojewsk-mobl1.ger.corp.intel.com (HELO [10.251.89.116]) ([10.251.89.116]) by orsmga006.jf.intel.com with ESMTP; 26 Jul 2019 03:14:17 -0700 Subject: Re: [RFC PATCH 23/40] soundwire: stream: fix disable sequence To: Pierre-Louis Bossart Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org, gregkh@linuxfoundation.org, jank@cadence.com, srinivas.kandagatla@linaro.org, slawomir.blauciak@intel.com, Sanyog Kale References: <20190725234032.21152-1-pierre-louis.bossart@linux.intel.com> <20190725234032.21152-24-pierre-louis.bossart@linux.intel.com> From: Cezary Rojewski Message-ID: <492d7897-973d-f207-46d5-f2f554645df7@intel.com> Date: Fri, 26 Jul 2019 12:14:15 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190725234032.21152-24-pierre-louis.bossart@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-07-26 01:40, Pierre-Louis Bossart wrote: > > - return do_bank_switch(stream); > + ret = do_bank_switch(stream); > + if (ret < 0) { > + dev_err(bus->dev, "Bank switch failed: %d\n", ret); > + return ret; > + } > + > + /* make sure alternate bank (previous current) is also disabled */ > + list_for_each_entry(m_rt, &stream->master_list, stream_node) { > + bus = m_rt->bus; > + /* Disable port(s) */ > + ret = sdw_enable_disable_ports(m_rt, false); > + if (ret < 0) { > + dev_err(bus->dev, "Disable port(s) failed: %d\n", ret); > + return ret; > + } > + } > + > + return 0; > } > > /** > While not directly connected to this commit, I see that you do: link_for_each_entry(m_rt, &stream->master_list, stream_node) quite often in /stream.c code. Helpful macro would prove useful.