From: Zhang Wei <wei.zhang@freescale.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, olof@lixom.net,
Zhang Wei <wei.zhang@freescale.com>
Subject: [PATCH] Fix the issue of fsldma driver's VIRT_TO_BUS dependence in Kconfig.
Date: Wed, 14 Nov 2007 18:44:29 +0800 [thread overview]
Message-ID: <119503706990-git-send-email-wei.zhang@freescale.com> (raw)
Remove virt_to_bus(), just using the saved phy address to match.
Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
---
drivers/dma/fsldma.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index 71e1c32..899b0c0 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -495,15 +495,20 @@ static struct dma_async_tx_descriptor *fsl_dma_prep_memcpy(
*/
static void fsl_dma_update_completed_cookie(struct fsl_dma_chan *fsl_chan)
{
- struct fsl_desc_sw *cur_desc;
+ struct fsl_desc_sw *cur_desc, *desc;
dma_addr_t ld_phy;
ld_phy = get_cdar(fsl_chan) & FSL_DMA_NLDA_MASK;
if (ld_phy) {
- cur_desc = (struct fsl_desc_sw *)bus_to_virt(ld_phy);
-
- if (cur_desc->async_tx.cookie) {
+ cur_desc = NULL;
+ list_for_each_entry(desc, &fsl_chan->ld_queue, node)
+ if (desc->async_tx.phys == ld_phy) {
+ cur_desc = desc;
+ break;
+ }
+
+ if (cur_desc && cur_desc->async_tx.cookie) {
if (dma_is_idle(fsl_chan))
fsl_chan->completed_cookie =
cur_desc->async_tx.cookie;
--
1.5.2
reply other threads:[~2007-11-14 10:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=119503706990-git-send-email-wei.zhang@freescale.com \
--to=wei.zhang@freescale.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olof@lixom.net \
/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
all inboxes | Powered by JetHome®