From: Mark Brown <broonie@kernel.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>,
Linux-sh list <linux-sh@vger.kernel.org>,
linux-spi <linux-spi@vger.kernel.org>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Subject: Re: [PATCH] spi: sh-msiof: Fix limit maximum word transfer size of FIFO size
Date: Thu, 12 Mar 2015 16:00:47 +0000 [thread overview]
Message-ID: <20150312160047.GQ28806@sirena.org.uk> (raw)
In-Reply-To: <CAMuHMdXmr7QH8jSkyH2q6xCise7ew5YzyAFc6Zb0psHZt3mGrg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1491 bytes --]
On Thu, Mar 12, 2015 at 01:35:10PM +0100, Geert Uytterhoeven wrote:
> On Thu, Mar 12, 2015 at 3:31 AM, Nobuhiro Iwamatsu
> > This driver is the case of tx_buf was set or SPI_MASTER_MUST_TX is set to
> > master_flags, will be transmit mode. However, the current code, when
> > transmit mode and buffer is NULL, will be set to value of receive mode
> > size.
> If SPI_MASTER_MUST_TX is set, tx_buf will never be NULL.
> If an SPI slave driver submits a receive-only request, the SPI core will
> provide a dummy buffer (spi_master.dummy_tx).
Right, my reading of the changelog was that this was a red herring.
> > + int rx_words = min_t(int, words, p->rx_fifo_size);
> > + int tx_words = min_t(int, words, p->tx_fifo_size);
> Sorry, I fail to see what exactly this is fixing.
> If SPI_MASTER_MUST_TX is set, all hardware SPI transfers are either
> a) transmit-only.
> b) bidirectional (transmit buffer may be a dummy, provided by the SPI core).
> For case a, only the TX FIFO size matters.
> - The original code ignored the RX FIFO size (rx_buf == NULL),
> - After your change, it always uses the minimum of the TX and RX FIFO sizes
> (granted, the RX FIFO size is larger, so this doesn't make a difference on
> current hardware).
...
> What am I missing?
> Are you using a backport with broken SPI_MASTER_MUST_TX handling in the SPI
> core?
My understanding was that it was just about making sure that the driver
picked the minimum of the two FIFO sizes.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-03-12 16:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-12 2:31 [PATCH] spi: sh-msiof: Fix limit maximum word transfer size of FIFO size Nobuhiro Iwamatsu
2015-03-12 11:37 ` Mark Brown
2015-03-12 12:35 ` Geert Uytterhoeven
2015-03-12 16:00 ` Mark Brown [this message]
[not found] ` <CAMuHMdXmr7QH8jSkyH2q6xCise7ew5YzyAFc6Zb0psHZt3mGrg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-16 1:18 ` Nobuhiro Iwamatsu
2015-03-16 7:50 ` Geert Uytterhoeven
2015-03-18 3:50 ` Nobuhiro Iwamatsu
[not found] ` <5508F607.7010104-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2015-03-18 10:51 ` 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=20150312160047.GQ28806@sirena.org.uk \
--to=broonie@kernel.org \
--cc=geert@linux-m68k.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=nobuhiro.iwamatsu.yj@renesas.com \
--cc=yoshihiro.shimoda.uh@renesas.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