Re: [PATCH 4/4] i2c: rcar: check for DMA-capable buffers

2017-06-15 Thread Shuah Khan
On 06/15/2017 01:17 PM, Wolfram Sang wrote: > Hi, > >>> - /* Do not use DMA if it's not available or for messages < 8 bytes */ >>> - if (IS_ERR(chan) || msg->len < 8) >>> + if (IS_ERR(chan) || msg->len < RCAR_DMA_THRESHOLD || priv->flags & >>> ID_P_NODMA) >> >> Might be more eff

Re: [PATCH 4/4] i2c: rcar: check for DMA-capable buffers

2017-06-15 Thread Wolfram Sang
Hi, > > - /* Do not use DMA if it's not available or for messages < 8 bytes */ > > - if (IS_ERR(chan) || msg->len < 8) > > + if (IS_ERR(chan) || msg->len < RCAR_DMA_THRESHOLD || priv->flags & > > ID_P_NODMA) > > Might be more efficient to check for ID_P_NODMA first instead of m

Re: [PATCH 4/4] i2c: rcar: check for DMA-capable buffers

2017-06-15 Thread Shuah Khan
On Thu, Jun 15, 2017 at 12:30 PM, Wolfram Sang wrote: > Handling this is special for this driver. Because the hardware needs to > initialize the next message in interrupt context, we cannot use the > i2c_check_msg_for_dma() directly. This helper only works reliably in > process context. So, we nee

[PATCH 4/4] i2c: rcar: check for DMA-capable buffers

2017-06-15 Thread Wolfram Sang
Handling this is special for this driver. Because the hardware needs to initialize the next message in interrupt context, we cannot use the i2c_check_msg_for_dma() directly. This helper only works reliably in process context. So, we need to check during initial preparation of the whole transfer and

[RFC PATCH 4/4] i2c: rcar: check for DMA-capable buffers

2017-06-06 Thread Wolfram Sang
Handling this is special for this driver. Because the hardware needs to initialize the next message in interrupt context, we cannot use the i2c_check_msg_for_dma() directly. This helper only works reliably in process context. So, we need to check during initial preparation of the whole transfer and