From: Viresh Kumar <viresh.kumar@st.com>
To: <vinod.koul@intel.com>, <dan.j.williams@intel.com>
Cc: <linux-kernel@vger.kernel.org>, <armando.visconti@st.com>,
<shiraz.hashim@st.com>, <linux-arm-kernel@lists.infradead.org>,
<viresh.linux@gmail.com>, Viresh Kumar <viresh.kumar@st.com>
Subject: [PATCH V5 2/5] dmaengine/dw_dmac: set residue as total len in dwc_tx_status if status is !DMA_SUCCESS
Date: Mon, 9 May 2011 13:45:50 +0530 [thread overview]
Message-ID: <3e58409b899e9bfcf4aa56a49876fe7968e1a079.1304928776.git.viresh.kumar@st.com> (raw)
In-Reply-To: <cover.1304928776.git.viresh.kumar@st.com>
If transfer status is !=DMA_SUCCESS, return total transfer len as residue,
instead of zero.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
---
drivers/dma/dw_dmac.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 77fd01c7..2b147cf 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -860,7 +860,11 @@ dwc_tx_status(struct dma_chan *chan,
ret = dma_async_is_complete(cookie, last_complete, last_used);
}
- dma_set_tx_state(txstate, last_complete, last_used, 0);
+ if (ret != DMA_SUCCESS)
+ dma_set_tx_state(txstate, last_complete, last_used,
+ dwc_first_active(dwc)->len);
+ else
+ dma_set_tx_state(txstate, last_complete, last_used, 0);
return ret;
}
--
1.7.2.2
next prev parent reply other threads:[~2011-05-09 8:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-09 8:15 [PATCH V5 0/5] dmaengine/dw_dmac updates Viresh Kumar
2011-05-09 8:15 ` [PATCH V5 1/5] dmaengine/dw_dmac: don't call callback routine in case dmaengine_terminate_all() is called Viresh Kumar
2011-05-09 8:15 ` Viresh Kumar [this message]
2011-05-09 8:15 ` [PATCH V5 3/5] dmaengine/dw_dmac: Divide one sg to many desc, if sg len is greater than DWC_MAX_COUNT Viresh Kumar
2011-05-09 8:15 ` [PATCH V5 4/5] dmaengine/dw_dmac: Replace spin_lock* with irqsave variants and enable submission from callback Viresh Kumar
2011-05-09 8:15 ` [PATCH V5 5/5] dmaengine/dw_dmac: implement pause and resume in dwc_control Viresh Kumar
2011-05-16 16:04 ` [PATCH V5 0/5] dmaengine/dw_dmac updates Koul, Vinod
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=3e58409b899e9bfcf4aa56a49876fe7968e1a079.1304928776.git.viresh.kumar@st.com \
--to=viresh.kumar@st.com \
--cc=armando.visconti@st.com \
--cc=dan.j.williams@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shiraz.hashim@st.com \
--cc=vinod.koul@intel.com \
--cc=viresh.linux@gmail.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 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®