devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yingjoe Chen <yingjoe.chen@mediatek.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: Jun Gao <jun.gao@mediatek.com>,
	devicetree@vger.kernel.org, srv_heupstream@mediatek.com,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
	linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 2/3] i2c: Add helper to ease DMA handling
Date: Thu, 9 Aug 2018 17:13:20 +0800	[thread overview]
Message-ID: <1533806000.3347.6.camel@mtksdaap41> (raw)
In-Reply-To: <20180808205752.llowh4bvu2wkuhga@ninjato>

On Wed, 2018-08-08 at 22:57 +0200, Wolfram Sang wrote:
> On Sat, Jul 07, 2018 at 05:29:54PM +0800, Jun Gao wrote:
> > From: Jun Gao <jun.gao@mediatek.com>
> > 
> > This function is needed by i2c_get_dma_safe_msg_buf() potentially.
> > It is used to free DMA safe buffer when DMA operation fails.
> > 
> > Signed-off-by: Jun Gao <jun.gao@mediatek.com>
> 
> Right, we need something like this. This leaks in the sh_mobile driver,
> too :(
> 
> I am still thinking if there is a nice way to put this functionality
> into i2c_release_dma_safe_msg_buf() itself somehow...

Wolfram,

I have second thought on these API now. Recently, we have saw similar
issue for spi device driver.

I believe the reason for these api is because some arch changed to can
not do DMA on stack recently. Maybe we should have dma_mapping to bounce
buffer like it bounce un-dma-able address for those arch? or we should
have a common driver API for this, not just for i2c?

Joe.C

  reply	other threads:[~2018-08-09  9:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-07  9:29 [PATCH v2 0/3] Register i2c adapter driver earlier and use DMA safe buffers Jun Gao
2018-07-07  9:29 ` [PATCH v2 1/3] i2c: mediatek: Register i2c adapter driver earlier Jun Gao
2018-08-08 20:40   ` Wolfram Sang
     [not found] ` <1530955795-17714-1-git-send-email-jun.gao-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2018-07-07  9:29   ` [PATCH v2 2/3] i2c: Add helper to ease DMA handling Jun Gao
2018-07-08 11:58     ` Peter Rosin
2018-07-08 12:46       ` Peter Rosin
2018-08-08 20:57     ` Wolfram Sang
2018-08-09  9:13       ` Yingjoe Chen [this message]
2018-08-09  9:23         ` Wolfram Sang
2018-07-07  9:29 ` [PATCH v2 3/3] i2c: mediatek: Use DMA safe buffers for i2c transactions Jun Gao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1533806000.3347.6.camel@mtksdaap41 \
    --to=yingjoe.chen@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jun.gao@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=srv_heupstream@mediatek.com \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).