From: Viresh Kumar <viresh.kumar@st.com>
To: <linux-kernel@vger.kernel.org>, <vinod.koul@intel.com>,
<dan.j.williams@intel.com>
Cc: <linux-arm-kernel@lists.infradead.org>, <armando.visconti@st.com>,
<shiraz.hashim@st.com>, <amit.goel@st.com>,
<viresh.linux@gmail.com>, <jamie@jamieiles.com>,
<linux@arm.linux.org.uk>, Viresh Kumar <viresh.kumar@st.com>
Subject: [PATCH 5/6] dmaengine/dw_dmac: set residue as total len in dwc_tx_status if status is !DMA_SUCCESS
Date: Mon, 18 Apr 2011 16:20:03 +0530 [thread overview]
Message-ID: <6264b8d24bf15b8aaff86c4d3fe8df5f777c552c.1303123511.git.viresh.kumar@st.com> (raw)
In-Reply-To: <e52c8e679fbf3007cf7e5e4bcfc86ea208a09d7c.1303123511.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 9d8ed35..92f4cb0 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -870,7 +870,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-04-18 10:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-18 10:49 [PATCH 1/6] dmaengine/dw_dmac: Replace spin_lock_bh with irqsave variants Viresh Kumar
2011-04-18 10:50 ` [PATCH 2/6] dmaengine/dw_dmac: Enable resubmission from callback routine Viresh Kumar
2011-04-19 6:12 ` Koul, Vinod
2011-04-19 6:23 ` viresh kumar
2011-04-19 6:33 ` Koul, Vinod
2011-04-19 6:46 ` viresh kumar
2011-04-26 20:31 ` Russell King - ARM Linux
2011-04-18 10:50 ` [PATCH 3/6] dmaengine/dw_dmac: call dwc_descriptor_complete from dwc_control with lock held Viresh Kumar
2011-04-18 10:50 ` [PATCH 4/6] dmaengine/dw_dmac: don't call callback routine in case dmaengine_terminate_all() is called Viresh Kumar
2011-04-18 10:50 ` Viresh Kumar [this message]
2011-04-18 10:50 ` [PATCH 6/6] dmaengine/dw_dmac: Divide one sg to many desc, if sg len is greater than DWC_MAX_COUNT Viresh Kumar
2011-04-19 6:25 ` [PATCH 1/6] dmaengine/dw_dmac: Replace spin_lock_bh with irqsave variants viresh kumar
2011-04-26 20:33 ` Russell King - ARM Linux
2011-04-27 3:47 ` viresh kumar
2011-04-27 5:59 ` viresh kumar
2011-04-27 7:28 ` Russell King - ARM Linux
2011-04-26 20:30 ` Russell King - ARM Linux
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=6264b8d24bf15b8aaff86c4d3fe8df5f777c552c.1303123511.git.viresh.kumar@st.com \
--to=viresh.kumar@st.com \
--cc=amit.goel@st.com \
--cc=armando.visconti@st.com \
--cc=dan.j.williams@intel.com \
--cc=jamie@jamieiles.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--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®