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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <511A8FFF.8020807@metafoo.de>
Date:	Tue, 12 Feb 2013 19:54:55 +0100
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Christophe Leroy <christophe.leroy@....fr>
CC:	Jonathan Cameron <jic23@....ac.uk>, linux-kernel@...r.kernel.org,
	linux-iio@...r.kernel.org, patrick.vasseur@....fr
Subject: Re: [PATCH v2] IIO ADC support for AD7923

On 02/12/2013 06:10 PM, Christophe Leroy wrote:
> This patch adds support for Analog Devices AD7923 ADC in the IIO Subsystem.
> 
> Signed-off-by: Patrick Vasseur <patrick.vasseur@....fr>
> Signed-off-by: Christophe Leroy <christophe.leroy@....fr>

Looks good to me except for one small, but important issue.

[...]
> diff -urN linux-next-e347c98/drivers/iio/adc/ad7923.c linux-next-e347c98.new/drivers/iio/adc/ad7923.c
> --- linux-next-e347c98/drivers/iio/adc/ad7923.c	1970-01-01 01:00:00.000000000 +0100
> +++ linux-next-e347c98.new/drivers/iio/adc/ad7923.c	2013-02-12 15:16:29.000000000 +0100
[...]
> +
> +struct ad7923_state {
> +	struct spi_device		*spi;
> +	struct spi_transfer		ring_xfer[6];

I think 5 is the max number of transfers, one for each channel and one extra to
read the last result.

> +	struct spi_transfer		scan_single_xfer[2];
> +	struct spi_message		ring_msg;
> +	struct spi_message		scan_single_msg;
> +	/*
> +	 * DMA (thus cache coherency maintenance) requires the
> +	 * transfer buffers to live in their own cache lines.
> +	 */
> +	__be16				rx_buf[4] ____cacheline_aligned;
> +	__be16				tx_buf[2];

The tx buffer also needs to be 4 elements.

> +};
[...]
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ