Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5255195imu; Tue, 15 Jan 2019 14:10:50 -0800 (PST) X-Google-Smtp-Source: ALg8bN6f8TvRAtbXtl1nXO7TZH6AyzHE6i2rFIzSxC7uhMt+9eEZQMPOT0fqJUjljxe4VkYrQQKX X-Received: by 2002:a62:7086:: with SMTP id l128mr6279003pfc.68.1547590249922; Tue, 15 Jan 2019 14:10:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547590249; cv=none; d=google.com; s=arc-20160816; b=eUZQSJU5m+gb3HtD+Q3Be892wDIXiPTtfUisCye92PsTt2mYCbVi3baojwARB0cdh9 eXT7+rbpv6mmLV/1ZN3qluZeEGcosb7J/8WgiAOhJE+dlPuopbMBfibVJBLl+WYDcvRi oPzuRcKSGBE/wZFDLJiGBQLGnCoNIJC5VEb5ZD0JpzBt6OttMxyM/Buh2ox2kNXOXklQ dt1rWcJBYMX3L/pjiCCHqeoJMyPssj38O8G6uYkqRRDf2JAPHrwF11DQ9iwhnQHcc8K9 fSBeT/oGKrzfffESbNhKmAMr4BAPv2/VK2hSSWtBegXC3mWLJeU1iKaAzmmSn38CPyP9 U9OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=2y4o+6mJsGkK+PV2yCqMO7SbJ2MDZ2GrQ9Zsgwpscko=; b=GgWZ4MOVsrEDnbc3Ox0zuIX7iCpm5NCRbvW4mkKEsSPdtEdz1fPBSW8uaYzxoubmzL OZw8Pn5QZKgFlwn0EuUKv91zcUGkTgd56knwwwkzYtKwN0kqyeivpyDaEyqNXC73Ilk1 /BabImn/yEfHMlclIN59bi6NWGnjVzC6l6B9eDviexskhm7iW+8YZWwuyKlRM2ybMVGT bivXKbZhNOgNa59GJDh7N9JywfKjgsPp+LoGqURsPbAxFL7RJfle5TYxrFu4CIEwlKiv MzA2KwOZIXJA/4SngGh2Q+/9uTgpRV6tX8h0/RAHmAOq/usOb+u+5KOGSNCKZcfOu4rX lTog== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=HSfDUmwY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b21si2235766pfb.89.2019.01.15.14.10.31; Tue, 15 Jan 2019 14:10:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=HSfDUmwY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388007AbfAOQvi (ORCPT + 99 others); Tue, 15 Jan 2019 11:51:38 -0500 Received: from vern.gendns.com ([98.142.107.122]:59584 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730341AbfAOQsk (ORCPT ); Tue, 15 Jan 2019 11:48:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=2y4o+6mJsGkK+PV2yCqMO7SbJ2MDZ2GrQ9Zsgwpscko=; b=HSfDUmwYqUKR8HWuJ40/jxQDAl Ia9bu//xf6vNmoSX/OCivR18vJbsxEzmEVELXBlwvljFK52CLkYTee3U31+8gb3iKpP2ALn203KgH EFria1dl0ee30roLsk3mKiHetSkOScFQs4U4pkVjnQAkMW7csWf8dbqr4/fli9e4+Ry41CF67q5HS 9R1XQW/xPFcgILxj803lcNzfUlXM1AbQtHCea1SBBE2D/Xe11vSibowy3q3ygIxxjxTNplMOVCXLu GAlmYgOYva9bRzbzViOTGNUUOU7K8JLSrkZ20Hn65KR7BBm4xyBd/JlcxmfVkPqfnNjwYz5zT728C qdVfV0hQ==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:52774 helo=[192.168.0.134]) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1gjRqY-0008La-4u; Tue, 15 Jan 2019 11:45:50 -0500 Subject: Re: [PATCH] spi: omap2-mcspi: Fix DMA and FIFO event trigger size mismatch To: Vignesh R , Mark Brown Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org References: <20190115065832.23705-1-vigneshr@ti.com> From: David Lechner Message-ID: <6a923c36-2b61-9f9c-d965-b99dc6831070@lechnology.com> Date: Tue, 15 Jan 2019 10:48:35 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20190115065832.23705-1-vigneshr@ti.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/15/19 12:58 AM, Vignesh R wrote: > Commit b682cffa3ac6 ("spi: omap2-mcspi: Set FIFO DMA trigger level to word length") > broke SPI transfers where bits_per_word != 8. This is because of > mimsatch between McSPI FIFO level event trigger size (SPI word length) and > DMA request size(word length * maxburst). This leads to data > corruption, lockup and errors like: > > spi1.0: EOW timed out > > Fix this by setting DMA maxburst size to 1 so that > McSPI FIFO level event trigger size matches DMA request size. > > Fixes: b682cffa3ac6 ("spi: omap2-mcspi: Set FIFO DMA trigger level to word length") > Cc: stable@vger.kernel.org > Reported-by: David Lechner > Tested-by: David Lechner > Signed-off-by: Vignesh R > --- > drivers/spi/spi-omap2-mcspi.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c > index 2fd8881fcd65..8be304379628 100644 > --- a/drivers/spi/spi-omap2-mcspi.c > +++ b/drivers/spi/spi-omap2-mcspi.c > @@ -623,8 +623,8 @@ omap2_mcspi_txrx_dma(struct spi_device *spi, struct spi_transfer *xfer) > cfg.dst_addr = cs->phys + OMAP2_MCSPI_TX0; > cfg.src_addr_width = width; > cfg.dst_addr_width = width; > - cfg.src_maxburst = es; > - cfg.dst_maxburst = es; > + cfg.src_maxburst = 1; > + cfg.dst_maxburst = 1; > > rx = xfer->rx_buf; > tx = xfer->tx_buf; > Works for me.