All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Thangaraj Samynathan <thangaraj.s@microchip.com>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	UNGLinuxDriver@microchip.com,
	kumaravel.thiagarajan@microchip.com,
	tharunkumar.pasumarthi@microchip.com
Subject: Re: [PATCH v2 SPI for-next 3/3] spi: mchp-pci1xxxx: DMA Write Support for copying data from SPI Buf
Date: Tue, 6 Feb 2024 12:46:32 +0000	[thread overview]
Message-ID: <ZcIqKP6cu+KThPBg@finisterre.sirena.org.uk> (raw)
In-Reply-To: <20240206034118.748801-4-thangaraj.s@microchip.com>

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

On Tue, Feb 06, 2024 at 09:11:18AM +0530, Thangaraj Samynathan wrote:

>  	if (regval & SPI_INTR) {
> -		rx_buf = p->rx_buf;
> -		memcpy_fromio(rx_buf + p->bytes_recvd, p->parent->reg_base +
> -				      SPI_MST_RSP_BUF_OFFSET(p->hw_inst), p->tx_sgl_len);
> -		p->bytes_recvd += p->tx_sgl_len;

Oh, so this is actually bidirectional - please merge this into the
previous patch, as noted on the prior patch there are issues with doing
unidirectional DMA.

As a general thing since this is a driver for the SPI controller it
would be *much* easier to tie the terms "read" and "write" to the SPI
bus read and write.  It's pretty hard to follow what's going on as
things stand since it is not clear if a given bit of code is talking
about the SPI controller or the DMA controller, and if when talking
about DMA it's talking about DMA to/from the device or to/from memory.

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

  reply	other threads:[~2024-02-06 12:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-06  3:41 [PATCH v2 SPI for-next 0/3] DMA Support for SPI in PCI1xxxx Thangaraj Samynathan
2024-02-06  3:41 ` [PATCH v2 SPI for-next 1/3] spi: mchp-pci1xxxx: Add support for DMA in SPI Thangaraj Samynathan
2024-02-06  3:41 ` [PATCH v2 SPI for-next 2/3] spi: mchp-pci1xxxx: DMA Read support for copying data into SPI Buf Thangaraj Samynathan
2024-02-06 12:38   ` Mark Brown
2024-02-06  3:41 ` [PATCH v2 SPI for-next 3/3] spi: mchp-pci1xxxx: DMA Write Support for copying data from " Thangaraj Samynathan
2024-02-06 12:46   ` Mark Brown [this message]
2024-02-07  5:25     ` Thangaraj.S

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=ZcIqKP6cu+KThPBg@finisterre.sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=kumaravel.thiagarajan@microchip.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=thangaraj.s@microchip.com \
    --cc=tharunkumar.pasumarthi@microchip.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 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.