From patchwork Fri Dec 2 16:18:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 630252 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3B368C4321E for ; Fri, 2 Dec 2022 16:20:08 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2E50E1840; Fri, 2 Dec 2022 17:19:16 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2E50E1840 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1669998006; bh=HUZrQfZ8zWBtxKbZ7tqB72s/BYGKYcuqFUcMZvFpy6I=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=g6Gha+Ah1b72h25BQq05YLJxA4Z0iORHXXRsg2vvyCL7JoYAxLZI87MO1SN30nB4H /P/sSLwYbIvaiHLX2G1dAWzwOb5PWVDdxIkOd9qLX9kH8Jm7U1bQjMWhzMx+B8Yx5R BSimNwL+DX9q1RBiLuOgMkNhCyrXO5KpKkxlwqys= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7FA9EF80559; Fri, 2 Dec 2022 17:18:27 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 60D31F8055B; Fri, 2 Dec 2022 17:18:26 +0100 (CET) Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B2828F8026A for ; Fri, 2 Dec 2022 17:18:15 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B2828F8026A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="mAE7Tqx7" Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2B28j12k022681; Fri, 2 Dec 2022 10:18:14 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=RIFCmyy6/4s76okPuZ7eQuTU58jGZcnvgrzMHZqxzxY=; b=mAE7Tqx7LOPHnchN2hJ3/2V2i231GtpO4kElveA8j+WCzOAc80n4NmkTlqEoSZD0gVnG be56TQwteIRDe1Z3RoOO+ZzPZ9x2RqzVIuAVjpiCy6wr01GfqAovyAUmSMbsWC2zqEul wzkWI1IetFJXQTCWNgNvRL6vc/JMi0nw3Gczy7Wvd6EmCQjXIia//LStczR2ubvptL++ Ezf+OgYtsGM/M+pgpmUDYXtPRYx3RZXOMg9a0R03xnEBani+6dcboONc2WuZEV1nXJCR z80hHYo/z8EdTHeLpkl6+fd2cGSMF9Ehk3KqTALxsRYeQ3zDXH3cGoLjbajN5PJmjBHE aA== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3m6k2vt0n6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 02 Dec 2022 10:18:14 -0600 Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.20; Fri, 2 Dec 2022 10:18:12 -0600 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.20 via Frontend Transport; Fri, 2 Dec 2022 10:18:12 -0600 Received: from edi-sw-dsktp-006.ad.cirrus.com (edi-sw-dsktp-006.ad.cirrus.com [198.90.251.111]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 71E17B10; Fri, 2 Dec 2022 16:18:12 +0000 (UTC) From: Richard Fitzgerald To: , Subject: [PATCH v2 0/3] soundwire: cadence: Fix oversized FIFO size define Date: Fri, 2 Dec 2022 16:18:09 +0000 Message-ID: <20221202161812.4186897-1-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Proofpoint-GUID: s3b6a1tc7ugk36PbSMbViYKf154AY-yy X-Proofpoint-ORIG-GUID: s3b6a1tc7ugk36PbSMbViYKf154AY-yy X-Proofpoint-Spam-Reason: safe Cc: alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, Richard Fitzgerald , sanyog.r.kale@intel.com, yung-chuan.liao@linux.intel.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" As determined by experimentation and asking a hardware person, the FIFO in the Cadence IP is actually only 8 entries long, not 32. This is fixed in patch #1. As a bonus, patches #2 and #3 fix two other things I noticed while debugging this. Changes since v1: - Rewrite commit message of patch #1 - Only reduce response_buf to 34 (32 + 2) - Trim RX_FIFO_AVAIL to length of response_buf instead of expected FIFO size Richard Fitzgerald (3): soundwire: cadence: Don't overflow the command FIFOs soundwire: cadence: Remove wasted space in response_buf soundwire: cadence: Drain the RX FIFO after an IO timeout drivers/soundwire/cadence_master.c | 46 +++++++++++++++++++----------- drivers/soundwire/cadence_master.h | 13 ++++++++- 2 files changed, 41 insertions(+), 18 deletions(-) Reviewed-by: Pierre-Louis Bossart