Message ID | bbdbc8df434dd2af74eb351b799a2812a1c1967e.1479706671.git.maitysanchayan@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hello Mark, On 16-11-21 19:18:47, Mark Brown wrote: > On Mon, Nov 21, 2016 at 11:24:01AM +0530, Sanchayan Maity wrote: > > Current DMA implementation had a bug where the DMA transfer would > > exit the loop in dspi_transfer_one_message after the completion of > > a single transfer. This results in a multi message transfer submitted > > with SPI_IOC_MESSAGE to terminate incorrectly without an error. > > Please don't resend already applied patches. If there are any changes > needed please send incremental changes on top of what's already applied. This is not a resend of an applied patch. The whole series applies on top of your topic/fsl-dspi branch and has fixes for the SPI DMA as incremental changes - Sanchaya.
On Mon, Nov 21, 2016 at 11:24:01AM +0530, Sanchayan Maity wrote: > Current DMA implementation had a bug where the DMA transfer would > exit the loop in dspi_transfer_one_message after the completion of > a single transfer. This results in a multi message transfer submitted > with SPI_IOC_MESSAGE to terminate incorrectly without an error. Please don't resend already applied patches. If there are any changes needed please send incremental changes on top of what's already applied.
Hello Mark, On 16-11-22 00:44:30, maitysanchayan@gmail.com wrote: > Hello Mark, > > On 16-11-21 19:18:47, Mark Brown wrote: > > On Mon, Nov 21, 2016 at 11:24:01AM +0530, Sanchayan Maity wrote: > > > Current DMA implementation had a bug where the DMA transfer would > > > exit the loop in dspi_transfer_one_message after the completion of > > > a single transfer. This results in a multi message transfer submitted > > > with SPI_IOC_MESSAGE to terminate incorrectly without an error. > > > > Please don't resend already applied patches. If there are any changes > > needed please send incremental changes on top of what's already applied. > > This is not a resend of an applied patch. The whole series applies on > top of your topic/fsl-dspi branch and has fixes for the SPI DMA as > incremental changes > Sorry. I take that back. I now see you applied the patch and I got the applied mail after I replied. - Sanchayan.
On Tue, Nov 22, 2016 at 12:48:50AM +0530, maitysanchayan@gmail.com wrote: > On 16-11-22 00:44:30, maitysanchayan@gmail.com wrote: > > This is not a resend of an applied patch. The whole series applies on > > top of your topic/fsl-dspi branch and has fixes for the SPI DMA as > > incremental changes > Sorry. I take that back. I now see you applied the patch and I got the applied > mail after I replied. Ah, I did apply it on Friday but somehow it didn't get pushed until yesterday. Sorry for the confusion.
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index bc64700..b1ee1f5 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c @@ -714,7 +714,7 @@ static int dspi_transfer_one_message(struct spi_master *master, SPI_RSER_TFFFE | SPI_RSER_TFFFD | SPI_RSER_RFDFE | SPI_RSER_RFDFD); status = dspi_dma_xfer(dspi); - goto out; + break; default: dev_err(&dspi->pdev->dev, "unsupported trans_mode %u\n", trans_mode); @@ -722,9 +722,13 @@ static int dspi_transfer_one_message(struct spi_master *master, goto out; } - if (wait_event_interruptible(dspi->waitq, dspi->waitflags)) - dev_err(&dspi->pdev->dev, "wait transfer complete fail!\n"); - dspi->waitflags = 0; + if (trans_mode != DSPI_DMA_MODE) { + if (wait_event_interruptible(dspi->waitq, + dspi->waitflags)) + dev_err(&dspi->pdev->dev, + "wait transfer complete fail!\n"); + dspi->waitflags = 0; + } if (transfer->delay_usecs) udelay(transfer->delay_usecs);