From: Arnd Bergmann <arnd@arndb.de>
To: Yao Yuan <yao.yuan@freescale.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>
Subject: Re: [PATCH] the eDMA support for the LPUART send driver
Date: Tue, 7 Jan 2014 09:53:51 +0100 [thread overview]
Message-ID: <201401070953.52207.arnd@arndb.de> (raw)
In-Reply-To: <0602455564214ab7986348ea985fc820@BL2PR03MB338.namprd03.prod.outlook.com>
On Tuesday 07 January 2014, Yao Yuan wrote:
> Thanks for your suggestion. It's important for me.
>
> I read the source code for dma_map_single again. I found that both of them(as first argument is
> dma or uart) worked well. But in my code I found that the *sport->port.dev->dma_mask is not
> zero. By contrast the dma_mask for dma device is zero.
Ah, it seems you found two more bugs then ;-)
> You are right. There should be dma device. But I also have a doubt here. Why I find many other
> driver use the first argument here rather than the dma device pointer.
It's a common mistake. Most other linux device driver interfaces require you to pass the
device you are working on, so it's understandable why people come to the wrong conclusion
here.
Arnd
WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] the eDMA support for the LPUART send driver
Date: Tue, 7 Jan 2014 09:53:51 +0100 [thread overview]
Message-ID: <201401070953.52207.arnd@arndb.de> (raw)
In-Reply-To: <0602455564214ab7986348ea985fc820@BL2PR03MB338.namprd03.prod.outlook.com>
On Tuesday 07 January 2014, Yao Yuan wrote:
> Thanks for your suggestion. It's important for me.
>
> I read the source code for dma_map_single again. I found that both of them(as first argument is
> dma or uart) worked well. But in my code I found that the *sport->port.dev->dma_mask is not
> zero. By contrast the dma_mask for dma device is zero.
Ah, it seems you found two more bugs then ;-)
> You are right. There should be dma device. But I also have a doubt here. Why I find many other
> driver use the first argument here rather than the dma device pointer.
It's a common mistake. Most other linux device driver interfaces require you to pass the
device you are working on, so it's understandable why people come to the wrong conclusion
here.
Arnd
next prev parent reply other threads:[~2014-01-07 8:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-27 11:24 [PATCH] the eDMA support for the LPUART send driver Yuan Yao
2013-12-27 11:24 ` Yuan Yao
2014-01-05 14:44 ` Arnd Bergmann
2014-01-05 14:44 ` Arnd Bergmann
2014-01-05 14:50 ` Russell King - ARM Linux
2014-01-05 14:50 ` Russell King - ARM Linux
2014-01-07 6:32 ` Yao Yuan
2014-01-07 6:32 ` Yao Yuan
2014-01-07 8:53 ` Arnd Bergmann [this message]
2014-01-07 8:53 ` Arnd Bergmann
2014-01-07 9:49 ` Yao Yuan
2014-01-07 9:49 ` Yao Yuan
2014-01-06 5:37 ` Shawn Guo
2014-01-06 5:37 ` Shawn Guo
2014-01-07 9:44 ` Yao Yuan
2014-01-07 9:44 ` Yao Yuan
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=201401070953.52207.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=yao.yuan@freescale.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.