Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp21314pxv; Tue, 13 Jul 2021 20:24:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyq2kozy6OmTqv1ns6IeJbSrko8iJMtMhyqYPU20NeaBSTDxRIW/t67D2svAZfbeJXCH9LW X-Received: by 2002:a17:907:76b8:: with SMTP id jw24mr9660079ejc.375.1626233090375; Tue, 13 Jul 2021 20:24:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626233090; cv=none; d=google.com; s=arc-20160816; b=dgceFPGuP6D0m5qBPFxKvnM6Euri2MYE6uUlTVxDlOJTdxdZ5nqS5tFzEaM2Qzo3mL c8Q1Ervo68V8TKs6FVA6CUxyEck/Y4KguJGdkRuPMbGIQ3l8FLDZLbY7Dg+nRmNXQ63+ SQ/EKqgTT/lMAfLKHQxUaxHZXy+/e/doLlSkbIbDH2hI+MlXXt+hTzaOqKw7lwCjo56L gtZMeS6bDukTptett08MW5amYzkByw7pd/A3T1WVprwiJGXkUxsfGIpch+lXZLsd8o4p B2++o5pUHDxlYJh8QupkvdlgFydO1shD9RvRbd6tRwmdXsYw9l5zfQFvYZ3a7mXQJHtt s2qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=bio2LyUPPMSfmTQIYsjIP6MOFNUBMZ/M3kWTJktrQH4=; b=ZFpi/mTGLNdATTdUcVFNl5xqMCzSvPNCZqQUxD9UIws9Sj26ZMjAY0zRHm8q16fAGJ +ELPEYaaFa05ztXpRlu544uO5j1vxhTkzM1RhG945+EwBd5eEJFuvIMQg797RJtZZx1z ttJDDebEsTuRC3Aaa1BAZ9FHwADbLkNE1bXhF1cNUMaXhQ4wQiveF4wLYXW3zOKcCh/p fABA1Y4pkQQAZ3yl9JpU+3FjCMngvBFOegMQFZIoDu7qvN8VKYD+WTxFLWfGNM3bQFod JQ8ZUugWS9bpizbzY/DidG5OofCn1HsCvWmKuasBL0Zf6HTGsu/GJy07cOlxf2D5VPWl Yv5w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id d22si1053512eds.196.2021.07.13.20.24.28; Tue, 13 Jul 2021 20:24:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S237835AbhGNDZ2 (ORCPT + 99 others); Tue, 13 Jul 2021 23:25:28 -0400 Received: from mga14.intel.com ([192.55.52.115]:9187 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237831AbhGNDZ1 (ORCPT ); Tue, 13 Jul 2021 23:25:27 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10044"; a="210095747" X-IronPort-AV: E=Sophos;i="5.84,238,1620716400"; d="scan'208";a="210095747" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2021 20:22:36 -0700 X-IronPort-AV: E=Sophos;i="5.84,238,1620716400"; d="scan'208";a="459818164" Received: from bard-ubuntu.sh.intel.com ([10.239.185.57]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2021 20:22:34 -0700 From: Bard Liao To: alsa-devel@alsa-project.org, vkoul@kernel.org Cc: vinod.koul@linaro.org, linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org, gregkh@linuxfoundation.org, srinivas.kandagatla@linaro.org, pierre-louis.bossart@linux.intel.com, sanyog.r.kale@intel.com, bard.liao@intel.com Subject: [PATCH 05/10] soundwire: stream: don't abort bank switch on Command_Ignored/-ENODATA Date: Wed, 14 Jul 2021 11:22:04 +0800 Message-Id: <20210714032209.11284-6-yung-chuan.liao@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210714032209.11284-1-yung-chuan.liao@linux.intel.com> References: <20210714032209.11284-1-yung-chuan.liao@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This change is needed for support of mockup devices, which by construction will not provide any answer to a bank switch, but it's also legit for regular cases. If for some reason a device loses sync and cannot handle a bank switch, we should go ahead anyways. The devices can always resync later. The only case where the error flow should be used is when there is a Command_Aborted composite answer from SoundWire devices. Signed-off-by: Bard Liao Reviewed-by: Rander Wang --- drivers/soundwire/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c index 1a18308f4ef4..d84aaf115c13 100644 --- a/drivers/soundwire/stream.c +++ b/drivers/soundwire/stream.c @@ -697,7 +697,7 @@ static int sdw_bank_switch(struct sdw_bus *bus, int m_rt_count) else ret = sdw_transfer(bus, wr_msg); - if (ret < 0) { + if (ret < 0 && ret != -ENODATA) { dev_err(bus->dev, "Slave frame_ctrl reg write failed\n"); goto error; } -- 2.17.1