[PATCH 5/5] spi: sirf: fix spi full-duplex DMA transferring issue

Barry Song 21cnbao at gmail.com
Mon Apr 14 18:43:24 PDT 2014

2014-04-15 4:06 GMT+08:00 Mark Brown <broonie at kernel.org>:
> On Mon, Apr 14, 2014 at 02:30:01PM +0800, Barry Song wrote:
>> From: Qipan Li <Qipan.Li at csr.com>
>> sometimes t->tx can be equal with t->rx. for example, spidev will make
>> tx and rx point to spidev->buffer at the same time. currently, for this
>> case, we map the buffer BIDIRECTION to fix the cache consistency.
> I've applied this but such usage is out of spec - do we have any drivers
> doing this in mainline?

i felt strange too at the first look from internal gerrit. qipan told
me there is one:

static int spidev_message(struct spidev_data *spidev,
                struct spi_ioc_transfer *u_xfers, unsigned n_xfers)
buf = spidev->buffer;
k_tmp->rx_buf = buf;
k_tmp->tx_buf = buf;
spi_message_add_tail(k_tmp, &msg);

spidev_sync(spidev, &msg);


More information about the linux-arm-kernel mailing list