Linux-SPI Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] spi: sun4i: update max transfer size reported
@ 2020-07-27  7:23 Jonathan Liu
  2020-07-27 12:18 ` Maxime Ripard
  2020-07-27 13:57 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Jonathan Liu @ 2020-07-27  7:23 UTC (permalink / raw)
  To: Mark Brown, Maxime Ripard, Chen-Yu Tsai
  Cc: Olliver Schinagl, Alexandru Gagniuc, linux-spi, linux-arm-kernel,
	linux-kernel, linux-sunxi, Jonathan Liu

The spi-sun4i driver already has the ability to do large transfers.
However, the max transfer size reported is still fifo depth - 1.

Update the max transfer size reported to the max value possible.

Fixes: 196737912da5 ("spi: sun4i: Allow transfers larger than FIFO size")
Signed-off-by: Jonathan Liu <net147@gmail.com>
---
 drivers/spi/spi-sun4i.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c
index cbfac6596fad..1fdfc6e6691d 100644
--- a/drivers/spi/spi-sun4i.c
+++ b/drivers/spi/spi-sun4i.c
@@ -198,7 +198,7 @@ static void sun4i_spi_set_cs(struct spi_device *spi, bool enable)
 
 static size_t sun4i_spi_max_transfer_size(struct spi_device *spi)
 {
-	return SUN4I_FIFO_DEPTH - 1;
+	return SUN4I_MAX_XFER_SIZE - 1;
 }
 
 static int sun4i_spi_transfer_one(struct spi_master *master,
-- 
2.27.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] spi: sun4i: update max transfer size reported
  2020-07-27  7:23 [PATCH] spi: sun4i: update max transfer size reported Jonathan Liu
@ 2020-07-27 12:18 ` Maxime Ripard
  2020-07-27 13:57 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Ripard @ 2020-07-27 12:18 UTC (permalink / raw)
  To: Jonathan Liu
  Cc: Mark Brown, Chen-Yu Tsai, Olliver Schinagl, Alexandru Gagniuc,
	linux-spi, linux-arm-kernel, linux-kernel, linux-sunxi


[-- Attachment #1: Type: text/plain, Size: 472 bytes --]

On Mon, Jul 27, 2020 at 05:23:28PM +1000, Jonathan Liu wrote:
> The spi-sun4i driver already has the ability to do large transfers.
> However, the max transfer size reported is still fifo depth - 1.
> 
> Update the max transfer size reported to the max value possible.
> 
> Fixes: 196737912da5 ("spi: sun4i: Allow transfers larger than FIFO size")
> Signed-off-by: Jonathan Liu <net147@gmail.com>

Acked-by: Maxime Ripard <mripard@kernel.org>

Thanks!
Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] spi: sun4i: update max transfer size reported
  2020-07-27  7:23 [PATCH] spi: sun4i: update max transfer size reported Jonathan Liu
  2020-07-27 12:18 ` Maxime Ripard
@ 2020-07-27 13:57 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2020-07-27 13:57 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Jonathan Liu
  Cc: Olliver Schinagl, linux-arm-kernel, Alexandru Gagniuc,
	linux-kernel, linux-spi, linux-sunxi

On Mon, 27 Jul 2020 17:23:28 +1000, Jonathan Liu wrote:
> The spi-sun4i driver already has the ability to do large transfers.
> However, the max transfer size reported is still fifo depth - 1.
> 
> Update the max transfer size reported to the max value possible.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: sun4i: update max transfer size reported
      commit: 241b888791ee2fa47b97b3b9dc0e857d241db18d

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27  7:23 [PATCH] spi: sun4i: update max transfer size reported Jonathan Liu
2020-07-27 12:18 ` Maxime Ripard
2020-07-27 13:57 ` Mark Brown

Linux-SPI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-spi/0 linux-spi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-spi linux-spi/ https://lore.kernel.org/linux-spi \
		linux-spi@vger.kernel.org
	public-inbox-index linux-spi

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-spi


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git