lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZcIqKP6cu+KThPBg@finisterre.sirena.org.uk>
Date: Tue, 6 Feb 2024 12:46:32 +0000
From: Mark Brown <broonie@...nel.org>
To: Thangaraj Samynathan <thangaraj.s@...rochip.com>
Cc: linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org,
	UNGLinuxDriver@...rochip.com, kumaravel.thiagarajan@...rochip.com,
	tharunkumar.pasumarthi@...rochip.com
Subject: Re: [PATCH v2 SPI for-next 3/3] spi: mchp-pci1xxxx: DMA Write
 Support for copying data from SPI Buf

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.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ