From: David Lechner <david@lechnology.com>
To: Vignesh R <vigneshr@ti.com>, Mark Brown <broonie@kernel.org>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-omap@vger.kernel.org
Subject: Re: [PATCH] spi: omap2-mcspi: Fix DMA and FIFO event trigger size mismatch
Date: Tue, 15 Jan 2019 10:48:35 -0600 [thread overview]
Message-ID: <6a923c36-2b61-9f9c-d965-b99dc6831070@lechnology.com> (raw)
In-Reply-To: <20190115065832.23705-1-vigneshr@ti.com>
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 <david@lechnology.com>
> Tested-by: David Lechner <david@lechnology.com>
> Signed-off-by: Vignesh R <vigneshr@ti.com>
> ---
> 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.
next prev parent reply other threads:[~2019-01-15 16:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-15 6:58 Vignesh R
2019-01-15 16:48 ` David Lechner [this message]
2019-01-15 19:08 ` Applied "spi: omap2-mcspi: Fix DMA and FIFO event trigger size mismatch" to the spi tree Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6a923c36-2b61-9f9c-d965-b99dc6831070@lechnology.com \
--to=david@lechnology.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®