From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC24BC43460 for ; Thu, 1 Apr 2021 18:32:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BD81460FDB for ; Thu, 1 Apr 2021 18:32:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236069AbhDAScq (ORCPT ); Thu, 1 Apr 2021 14:32:46 -0400 Received: from mga18.intel.com ([134.134.136.126]:38549 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240295AbhDASaB (ORCPT ); Thu, 1 Apr 2021 14:30:01 -0400 IronPort-SDR: 46tFSyiTBFbTHqm+ajNzuWyDPv/0bczOl41VolkhQT0x2QUIi4Y8uwP4x2pjSsPbwHBEmJW5UG UDBLtlFboryg== X-IronPort-AV: E=McAfee;i="6000,8403,9941"; a="179810992" X-IronPort-AV: E=Sophos;i="5.81,296,1610438400"; d="scan'208";a="179810992" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2021 09:03:23 -0700 IronPort-SDR: 4QbDotXZHHyUF/mrZZU6rz0IbZ67UA7GraB1G+XBmuOpxgxG6yCnqIzxdEruyJ/dy5KQHEcu7x 1keblEV6B3zA== X-IronPort-AV: E=Sophos;i="5.81,296,1610438400"; d="scan'208";a="439265765" Received: from mooreale-mobl.amr.corp.intel.com (HELO [10.255.229.43]) ([10.255.229.43]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2021 09:03:22 -0700 Subject: Re: [PATCH v2] soundwire: qcom: wait for fifo space to be available before read/write To: Srinivas Kandagatla , vkoul@kernel.org Cc: robh@kernel.org, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, sanyog.r.kale@intel.com, yung-chuan.liao@linux.intel.com References: <20210401090058.24041-1-srinivas.kandagatla@linaro.org> From: Pierre-Louis Bossart Message-ID: Date: Thu, 1 Apr 2021 09:36:22 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210401090058.24041-1-srinivas.kandagatla@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 4/1/21 4:00 AM, Srinivas Kandagatla wrote: > If we write registers very fast we can endup in a situation where some > of the writes will be dropped without any notice. > > So wait for the fifo space to be available before reading/writing the > soundwire registers. Out of curiosity, do you actually need to do a check in the read case as well? The commit message talks about writes getting dropped, is the opposite also a problem?