Re: [PATCH] spi: spidev: only use up TX/RX bounce buffer space when needed

2015-02-16 Thread Ian Abbott
On 16/02/15 13:23, Mark Brown wrote: On Mon, Feb 16, 2015 at 10:18:01AM +, Ian Abbott wrote: On 16/02/15 04:13, Mark Brown wrote: >>> On Sun, Feb 15, 2015 at 10:30:22AM +, Ian Abbott wrote: The check against INT_MAX is there because a struct spi_ioc_transfer might have rx_buf==NULL, tx

Re: [PATCH] spi: spidev: only use up TX/RX bounce buffer space when needed

2015-02-16 Thread Mark Brown
On Mon, Feb 16, 2015 at 10:18:01AM +, Ian Abbott wrote: > On 16/02/15 04:13, Mark Brown wrote: > >Right, but it's not clear if you mean that this is something to do with > >the device drivers for SPI controllers or spidev itself. > Okay, how about if I used the term "spidev device" to disting

Re: [PATCH] spi: spidev: only use up TX/RX bounce buffer space when needed

2015-02-16 Thread Ian Abbott
On 16/02/15 04:13, Mark Brown wrote: On Sun, Feb 15, 2015 at 10:30:22AM +, Ian Abbott wrote: On 14/02/15 04:49, Mark Brown wrote: This is a bit hard to parse. I think you're talking about buffers in spidev here but it's unclear and you've not described in what way you're changing the cod

Re: [PATCH] spi: spidev: only use up TX/RX bounce buffer space when needed

2015-02-15 Thread Mark Brown
On Sun, Feb 15, 2015 at 10:30:22AM +, Ian Abbott wrote: > On 14/02/15 04:49, Mark Brown wrote: > >This is a bit hard to parse. I think you're talking about buffers in > >spidev here but it's unclear and you've not described in what way you're > >changing the code and we do currently only seem

Re: [PATCH] spi: spidev: only use up TX/RX bounce buffer space when needed

2015-02-15 Thread Ian Abbott
On 14/02/15 04:49, Mark Brown wrote: On Thu, Feb 12, 2015 at 12:13:08PM +, Ian Abbott wrote: Devices have separate, pre-allocated TX and RX bounce buffers of fixed size. Currently, each transfer uses up space in both buffers even if the user-supplied no TX data or no RX space. Change it to

Re: [PATCH] spi: spidev: only use up TX/RX bounce buffer space when needed

2015-02-15 Thread Ian Abbott
On 14/02/15 04:49, Mark Brown wrote: On Thu, Feb 12, 2015 at 12:13:08PM +, Ian Abbott wrote: Devices have separate, pre-allocated TX and RX bounce buffers of fixed size. Currently, each transfer uses up space in both buffers even if the user-supplied no TX data or no RX space. Change it to

Re: [PATCH] spi: spidev: only use up TX/RX bounce buffer space when needed

2015-02-13 Thread Mark Brown
On Thu, Feb 12, 2015 at 12:13:08PM +, Ian Abbott wrote: > Devices have separate, pre-allocated TX and RX bounce buffers of fixed > size. Currently, each transfer uses up space in both buffers even if > the user-supplied no TX data or no RX space. Change it to only use up > space in the TX and

[PATCH] spi: spidev: only use up TX/RX bounce buffer space when needed

2015-02-12 Thread Ian Abbott
Devices have separate, pre-allocated TX and RX bounce buffers of fixed size. Currently, each transfer uses up space in both buffers even if the user-supplied no TX data or no RX space. Change it to only use up space in the TX and RX bounce buffers as required. Since dummy transfers with no user-