From: Frode Isaksen <fisaksen@baylibre.com> To: nsekhar@ti.com, khilman@baylibre.com, ptitiano@baylibre.com, linux-arm-kernel@lists.infradead.org Cc: Frode Isaksen <fisaksen@baylibre.com>, broonie@kernel.org, linux-spi@vger.kernel.org Subject: [PATCH] spi: davinci: add comment about dummy tx buffer usage Date: Fri, 17 Mar 2017 16:41:10 +0100 [thread overview] Message-ID: <1489765270-17950-1-git-send-email-fisaksen@baylibre.com> (raw) Add explanation about using the the rx buffer as the dummy tx buffer. Signed-off-by: Frode Isaksen <fisaksen@baylibre.com> --- drivers/spi/spi-davinci.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index f37bbdd..595acdc 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c @@ -660,7 +660,11 @@ static int davinci_spi_bufs(struct spi_device *spi, struct spi_transfer *t) goto err_desc; if (!t->tx_buf) { - /* use rx buffer as dummy tx buffer */ + /* To avoid errors when doing rx-only transfers with + * many SG entries (> 20), use the rx buffer as the + * dummy tx buffer so that dma reloads are done at the + * same time for rx and tx. + */ t->tx_sg.sgl = t->rx_sg.sgl; t->tx_sg.nents = t->rx_sg.nents; } -- 2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: fisaksen@baylibre.com (Frode Isaksen) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] spi: davinci: add comment about dummy tx buffer usage Date: Fri, 17 Mar 2017 16:41:10 +0100 [thread overview] Message-ID: <1489765270-17950-1-git-send-email-fisaksen@baylibre.com> (raw) Add explanation about using the the rx buffer as the dummy tx buffer. Signed-off-by: Frode Isaksen <fisaksen@baylibre.com> --- drivers/spi/spi-davinci.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index f37bbdd..595acdc 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c @@ -660,7 +660,11 @@ static int davinci_spi_bufs(struct spi_device *spi, struct spi_transfer *t) goto err_desc; if (!t->tx_buf) { - /* use rx buffer as dummy tx buffer */ + /* To avoid errors when doing rx-only transfers with + * many SG entries (> 20), use the rx buffer as the + * dummy tx buffer so that dma reloads are done at the + * same time for rx and tx. + */ t->tx_sg.sgl = t->rx_sg.sgl; t->tx_sg.nents = t->rx_sg.nents; } -- 2.7.4
next reply other threads:[~2017-03-17 15:41 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-03-17 15:41 Frode Isaksen [this message] 2017-03-17 15:41 ` [PATCH] spi: davinci: add comment about dummy tx buffer usage Frode Isaksen 2017-03-17 22:01 ` Applied "spi: davinci: add comment about dummy tx buffer usage" to the spi tree Mark Brown 2017-03-17 22:01 ` 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=1489765270-17950-1-git-send-email-fisaksen@baylibre.com \ --to=fisaksen@baylibre.com \ --cc=broonie@kernel.org \ --cc=khilman@baylibre.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-spi@vger.kernel.org \ --cc=nsekhar@ti.com \ --cc=ptitiano@baylibre.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.