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]
Date:	Sat, 28 Feb 2009 10:09:14 +0100
From:	Simon Kagstrom <simon.kagstrom@...il.com>
To:	Balaji Rao <balajirrao@...nmoko.org>
Cc:	linux-kernel@...r.kernel.org,
	David Brownell <dbrownell@...rs.sourceforge.net>,
	Andy Green <andy@...nmoko.com>,
	spi-devel-general@...ts.sourceforge.net
Subject: Re: [PATCH 2/2] spi_bitbang: Add support for non-blocking
 synchronous transfers

Thanks for taking this up Balaji!

In the comment below I'm assuming the Openmoko accelerometer use of
this functionality, which would include doing SPI transfers in the
interrupt handler.

On Sat, 28 Feb 2009 13:41:17 +0530
Balaji Rao <balajirrao@...nmoko.org> wrote:

> +/* Synchronous non blocking transfer */
> +int
> +spi_bitbang_transfer_sync(struct spi_device *spi, struct spi_message
> *m) +{
> [...]
> +		if (setup_transfer) {
> +			status = setup_transfer(spi, t);
> [...]
> +			if (!m->is_dma_mapped)
> +				t->rx_dma = t->tx_dma = 0;
> +			status = bitbang->txrx_bufs(spi, t);

Another thing that we'd need to take care of is that the stuff being
called from the synhronous transfer is actually callable from interrupt
context. Looking at txrx_bufs for s3c24xx (s3c24xx_spi_txrx), it's
using a wait_for_completion which is in turn completed by the s3c24xx
SPI interrupt handler.

Without trying, I'm guessing that that won't be possible from interrupt
context.

// Simon
--
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