Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7395424rwi; Mon, 24 Oct 2022 14:06:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5J4aZQ5Da0uqinFcyXuP+ktVgbVNmPNC7vm99JHzyEmlo3U9VIoTzxj6uXYyFIhxmNizII X-Received: by 2002:a17:907:75e5:b0:78d:95d3:255d with SMTP id jz5-20020a17090775e500b0078d95d3255dmr27798006ejc.495.1666645581638; Mon, 24 Oct 2022 14:06:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666645581; cv=none; d=google.com; s=arc-20160816; b=gM/27k6s+p+U4yq3UKLGCIjjOYTIBe2OmaXLhWPVzjnhDSCU7m92+A/YKda2PwXKwa 0vXwGpmhZ4kNj2qF9liIohq2PczI/+k9CtQ4Lw/9qyqsDJh+G6KdG7dSAOtLTPw2XYQb 8kxeWEOIQs3g1d8NQbjiGsvOXz23tC6nR8piNaqKgqZ3WuuB2qob+wpGZ1q+6i10kbMO weuiI2rduQlVLNb7hPKnA5RIAO/zoIz/LoRcDBDFElBu+8le2UHnRtnk2z6Jzg6TEq9M z0frB/hOgEA2uhAskG+7zkUALClPV0h5vxDcBmH1VMnjf2OJQeyjaN3iVqSwI5rVtxPP 9how== 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=7aYTdLxkJfvgFXKK5jyo2Wg+8bZTYxbEYIU4B/jarto=; b=fxw4g8glKJ1sAMl/DwpSO0L9LhZzGqxEzRm1ghS5ZnbnbuCW6xq9m0c5pQjiiapN6W NgIwt+Qv/xK5YOD/rrRBQuy1gPxqlLiKIiC37dGzNJVEu+LSyBiT5ltnc7CgxUs8Gn/4 opVrF2vcXlXnQmq4rFfwSlCZWiDMl+fGqZfzLcdt23yhyyxxB87uO+zDRTTIbYqHcdNG 2mXk6RO3uck4U7V2wNwEcSh3U4x+SS+xx4ukSIl5reWZgNr8XKcCG0qNc2lJj7GwEIKd Re9cqnw0FO7FwUJxVwnKWs62BS7UOm9kVhqvn+uaBxj06RiwABCJR7kEZ3GnpC4wt4Hy hYzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZHSUXoJL; 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 x7-20020a05640225c700b00461e685ce72si843035edb.116.2022.10.24.14.05.55; Mon, 24 Oct 2022 14:06:21 -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=ZHSUXoJL; 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 S234674AbiJXUmv (ORCPT + 99 others); Mon, 24 Oct 2022 16:42:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234929AbiJXUlw (ORCPT ); Mon, 24 Oct 2022 16:41:52 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EDD8199896; Mon, 24 Oct 2022 11:50:46 -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 ams.source.kernel.org (Postfix) with ESMTPS id 20886B8159B; Mon, 24 Oct 2022 12:17:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F565C433D6; Mon, 24 Oct 2022 12:17:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666613823; bh=qpkhbREp+upQTVqTctmEWCOKn9PVcpaTOkNdIdq7NqU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZHSUXoJLLSltKgq3pfqTMAks4fjfphmYVFBtWJPSoktu1DpTskwKXzR/B6to2jhpw fdwi/JRl/7cBmJSTjyaDC0TnSLGwnfDGrwOZmDXOnvvaStC4wRmvp1CLVd+63irBZQ 3l9p/KOJenRbKR4sOjErbU+KBBx1ZPz4XGJmG0A8= 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.10 028/390] ASoC: wcd9335: fix order of Slimbus unprepare/disable Date: Mon, 24 Oct 2022 13:27:05 +0200 Message-Id: <20221024113023.772109112@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113022.510008560@linuxfoundation.org> References: <20221024113022.510008560@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.6 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 @@ -1971,8 +1971,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;