Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12858823 authored by Girish Mahadevan's avatar Girish Mahadevan
Browse files

spi: spi-geni-qcom: Modify GSI Rx transfer issue logic



In GSI mode, make the Rx channel dma_engine calls conditional to if
the current transfer being processed has any Rx related trasaction
rather than the total number of rx_eot accumulated by the master for
a given message.
This will impact cases where a message does a full-duplex transfer
followed by a half-duplex Tx only transfer.

Change-Id: I81a170451299011313277fd9af9e1118bb001ec0
Signed-off-by: default avatarGirish Mahadevan <girishm@codeaurora.org>
parent af4ea937
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -647,11 +647,11 @@ static int setup_gsi_xfer(struct spi_transfer *xfer,
					&mas->gsi[mas->num_xfers].desc_cb;
	mas->gsi[mas->num_xfers].tx_cookie =
			dmaengine_submit(mas->gsi[mas->num_xfers].tx_desc);
	if (mas->num_rx_eot)
	if (cmd & SPI_RX_ONLY)
		mas->gsi[mas->num_xfers].rx_cookie =
			dmaengine_submit(mas->gsi[mas->num_xfers].rx_desc);
	dma_async_issue_pending(mas->tx);
	if (mas->num_rx_eot)
	if (cmd & SPI_RX_ONLY)
		dma_async_issue_pending(mas->rx);
	mas->num_xfers++;
	return ret;