Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp535390rwi; Wed, 26 Oct 2022 04:17:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4mcYv6TgcWxJm9AJjEtlEfwy/PIbXIBjOSsVVoXQ04r7GaeNUI8I9scL2UE4Y7cljcnl32 X-Received: by 2002:a17:902:c405:b0:181:83e4:490e with SMTP id k5-20020a170902c40500b0018183e4490emr42759703plk.4.1666783049897; Wed, 26 Oct 2022 04:17:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666783049; cv=none; d=google.com; s=arc-20160816; b=RpSP8MVj4vxohaoR8AQjMzvHY6ZyDWe7qqtW6U90mRcUGrw9oyn1+JYKDW3BvHFyFW 1WSUq1hIsJpShcJMr9WrzL+xnyxbEgVBPOA2ZbSV8PabzyHnarKPb7l6p7Kr7sk8gnuD SiaTR2YoCyZvMn7q9wzpczgZlq6YzTI593Blt+g5ILc7SHD6+tOVGIxF+SmH6K91QN/T FwrdMfehBwc06HGBTtasugSYTG67wGVrafSTxZ3UDQJTv2UNxN503Rqo+X41Bq8HvO3m 9GZmskgAnDqtWW/uei2QUJ1skrgQeMV2we+4S0LkZRFQdkCfbOmQVADtVVZ5+lP42sek 1pTQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Iq+UTjOWMyquGHaqNGU9bVUM+RbHUdDoO13dPtnzSfU=; b=QI51EOZ20f4rmiNzI6Ttc4QE0wSG+vMeRlSA+nfcdY9L5LPH9YrZegs0s3wnekTrSb ZDQLgppVZzuOHYVN4nB6524BjDvXdCKx40tJkT0swE1zLYuBhbh+jjzEHMcJ7zxPrf2I fIUxZCYC5NOo7cCez49IWPfsMlzisuTg7vlE1vJmCMUSFa7mzrs6NYrOnZiPvr2Jc0Tt Z0lzd2foOwUkNIQcdr1D3ej7wN2/IGSbplYqIimUb63CngdBk3j8seY7S+DunISIdpwW 5MXYVgQi8sQuGQ0aoHXllK7NF/bdn0M4I7LEVnWWwdnusEchs5GFLBtLB0lmdcTWSeDo S5qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kkr8je1+; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t14-20020a17090a448e00b00213193da68csi2113714pjg.139.2022.10.26.04.17.17; Wed, 26 Oct 2022 04:17:29 -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=@linaro.org header.s=google header.b=kkr8je1+; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233481AbiJZLCa (ORCPT + 99 others); Wed, 26 Oct 2022 07:02:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233265AbiJZLC0 (ORCPT ); Wed, 26 Oct 2022 07:02:26 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92E3EB515E for ; Wed, 26 Oct 2022 04:02:24 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id v130-20020a1cac88000000b003bcde03bd44so1186043wme.5 for ; Wed, 26 Oct 2022 04:02:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Iq+UTjOWMyquGHaqNGU9bVUM+RbHUdDoO13dPtnzSfU=; b=kkr8je1+7h37yq2UCQzx7bziwp9BgRGHNSqBb7MHWFDsWbjGPduEr3Jl4E1yYfBt0Q 2rH15nIYWCvOOnIr8WyHRKxRHoqQFq1ctID5UQJJ27i0gf4/9mbP647SAxtQEEd70ciO xE+gccJPfzpgshvNKQIhRcfy0mF3ECaew3cgZz7OeL8zh2jlodY2AeFhDGYLNK4BCj7i LfgT8ODc6dk9tcQcKjJzUIq2h3A515ZhcAmRFDopXRHNoNPCnbKneJOUv34RYE1KLypw r3Ro1TF5ufrWemVsjdkN3Q9NoZsxph7y2TBCpZvSpDmSaREstiDlBhBjg5zlNyYtWRTZ zlkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Iq+UTjOWMyquGHaqNGU9bVUM+RbHUdDoO13dPtnzSfU=; b=rycNqXX98jZ7D7BMHraj3yAw7eE+QA1jFFoyapJaoPjFEtgUBVKKQRfOFBs4x7AssS AfkV8wsKkguSyMdRbZObohSRNhhIaRgDGeFq7jdmiltvi/RmhFFx2ftc099KWhIgPGvo 30WzwM+AbiizSSuijKjRS/a1DRQX8SMVSDpK1EcjB4DqxsJRfS6CTrapJubnPNTUmMP/ LmgXje5PywJkfanXG2DaxXpXS8acCy3cfZiYvHrCzjfouOTk8ptywfUBiQKm/EX2E3x4 ifRi/ypeRq3cwTID//gyn+OG+aHLRvaiUkzd7nbnziuLCmq+v5WJUfsrT7/zFyJPIt33 j5Hw== X-Gm-Message-State: ACrzQf1SJg0RlZEu2yOVk5ps5wbp3AGCDAHCLLtn6louzVIRuDs6Ukg3 d4j9U55x4FPkNdQhW9t/mCHVNa53uIYZPw== X-Received: by 2002:a05:600c:3585:b0:3c7:9f:5f87 with SMTP id p5-20020a05600c358500b003c7009f5f87mr2101249wmq.76.1666782143122; Wed, 26 Oct 2022 04:02:23 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id z7-20020a5d44c7000000b0023672104c24sm5237415wrr.74.2022.10.26.04.02.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Oct 2022 04:02:22 -0700 (PDT) From: Srinivas Kandagatla To: vkoul@kernel.org, yung-chuan.liao@linux.intel.com Cc: andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, pierre-louis.bossart@linux.intel.com, sanyog.r.kale@intel.com, srinivas.kandagatla@linaro.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH 1/6] soundwire: qcom: reinit broadcast completion Date: Wed, 26 Oct 2022 12:02:05 +0100 Message-Id: <20221026110210.6575-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20221026110210.6575-1-srinivas.kandagatla@linaro.org> References: <20221026110210.6575-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 For some reason we never reinit the broadcast completion, there is a danger that broadcast commands could be treated as completed by driver from previous complete status. Fix this by reinitializing the completion before sending a broadcast command. Fixes: ddea6cf7b619 ("soundwire: qcom: update register read/write routine") Signed-off-by: Srinivas Kandagatla --- drivers/soundwire/qcom.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c index b33d5db494a5..8f1a1eb017a2 100644 --- a/drivers/soundwire/qcom.c +++ b/drivers/soundwire/qcom.c @@ -344,6 +344,9 @@ static int qcom_swrm_cmd_fifo_wr_cmd(struct qcom_swrm_ctrl *swrm, u8 cmd_data, if (swrm_wait_for_wr_fifo_avail(swrm)) return SDW_CMD_FAIL_OTHER; + if (cmd_id == SWR_BROADCAST_CMD_ID) + reinit_completion(&swrm->broadcast); + /* Its assumed that write is okay as we do not get any status back */ swrm->reg_write(swrm, SWRM_CMD_FIFO_WR_CMD, val); -- 2.21.0