Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3885229rwi; Sat, 22 Oct 2022 01:32:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5sfzhKcWqtNYrMePvpEq5wQ1HoPfJoSsMhkDDCM18H8AlIqx0ggEFLEOr7k/xxYZOg9s6k X-Received: by 2002:a63:5d12:0:b0:46e:cd38:3f76 with SMTP id r18-20020a635d12000000b0046ecd383f76mr3756309pgb.64.1666427559584; Sat, 22 Oct 2022 01:32:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666427559; cv=none; d=google.com; s=arc-20160816; b=vPOql9JVrM5RElUhgICPRdw1mABlxrIIs6eTvQXXLiPSS43UCwUNV8b9Eawvz356oP szY6hRcgG67s0Svn6Y2SlFWoWh/zXM65JbdzRBxS2IQtGtuIOfFco6WChraSrLSML/u8 fEqf7yWAJc2q4BDpZTXJ0yOCc/9l1q8/Oe1zpA1dttXzJHJLGEtHqpU+OKbhaqLoLQ7Y PiGSsrFTzaji8SCVNAlzYuCSLjGqof1NKV1IE8E1bdeBQlm1UvYMAmf01VgRbhCdvdK5 wR2ZkW7pyCqEeXL+K4/dgFr61P6W532wmzuRK/Orp8ZPXMCyoYpWzvsPYnQyi66YGDim 1lIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+zFa8brGdyiwgio9pC1Ae+ysVWZ8asWEUvWaf4xJCqE=; b=crHXFkfk51w/zA610GC9kLy4UTuMvz9XOYPLecsmiS6yPlFAmbAw78nex/KkIBWhcB D+Z4pb5FuTXpIGtSegR4TZBp2vfK63c+F66TPs8pU2d0SI4YCmkatcbIcF/R1ajWLyPk WN26edUiiO7ogelFSVjFaOv5kJPYYm57RYoQAwAb9bypmSeGS0idFfKqA/99ufJRwpkN cMNzWDGGQpnqRS8tSP3ESRD3DJGGkbtLIvUGxHxSIBMsPrdNYVQsKPopYGRKhLuxw2/o e/i6stC1nl3MmLiU7GDgO6WefDSMBGxBFdM1gVv+dRDwrWR4fJ23eT7yqkw23d7Coqsj jGRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HiJPfkP7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 32-20020a631160000000b0044ca7935603si26291806pgr.723.2022.10.22.01.32.27; Sat, 22 Oct 2022 01:32:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HiJPfkP7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230404AbiJVHiu (ORCPT + 99 others); Sat, 22 Oct 2022 03:38:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230400AbiJVHhd (ORCPT ); Sat, 22 Oct 2022 03:37:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6471D25CD94; Sat, 22 Oct 2022 00:35:54 -0700 (PDT) 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 192AD60ADD; Sat, 22 Oct 2022 07:35:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F629C433D6; Sat, 22 Oct 2022 07:35:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424152; bh=F1qb6aNL2yA+5EeMnl75jCleXjWKk7O5bQePHg9VgMQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HiJPfkP7epirFt17FWUvgQZWq9k+G65nSxm9KcaDYuGZqyfOC4XqFAwJOwrITgU5q n+ajHgRKGrKO6VxOcBizG1+FrukjvqRTaePI2Mr3wCR8T8Eal1bDLCAPRvaMOmMfGV Y8e3UVfiyi1VJH+s3x+iZiko6h68UrJX9dD7GISg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Krzysztof Kozlowski , Srinivas Kandagatla , Mark Brown Subject: [PATCH 5.19 044/717] ASoC: wcd9335: fix order of Slimbus unprepare/disable Date: Sat, 22 Oct 2022 09:18:43 +0200 Message-Id: <20221022072422.871174474@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Krzysztof Kozlowski commit ea8ef003aa53ad23e7705c5cab1c4e664faa6c79 upstream. Slimbus streams are first prepared and then enabled, so the cleanup path should reverse it. The unprepare sets stream->num_ports to 0 and frees the stream->ports. Calling disable after unprepare was not really effective (channels was not deactivated) and could lead to further issues due to making transfers on unprepared stream. Fixes: 20aedafdf492 ("ASoC: wcd9335: add support to wcd9335 codec") Cc: Signed-off-by: Krzysztof Kozlowski Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20220921145354.1683791-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- sound/soc/codecs/wcd9335.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -1983,8 +1983,8 @@ static int wcd9335_trigger(struct snd_pc case SNDRV_PCM_TRIGGER_STOP: case SNDRV_PCM_TRIGGER_SUSPEND: case SNDRV_PCM_TRIGGER_PAUSE_PUSH: - slim_stream_unprepare(dai_data->sruntime); slim_stream_disable(dai_data->sruntime); + slim_stream_unprepare(dai_data->sruntime); break; default: break;