* [PATCH] davinci_cpdma: Fix channel number written to teardown registers
@ 2012-02-23 7:58 Christian Riesch
[not found] ` <1329983880-23921-1-git-send-email-christian.riesch-3mrvs1K0uXizZXS1Dc/lvw@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Christian Riesch @ 2012-02-23 7:58 UTC (permalink / raw)
To: netdev-u79uwXL29TY76Z2rM5mHXA
Cc: davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/,
Ameya Palande, Ilya Yanok,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
chan->chan_num is 0..CPDMA_MAX_CHANNELS-1 for tx channels and
CPDMA_MAX_CHANNELS..2*CPDMA_MAX_CHANNELS-1 for rx channels. However,
the rx and tx teardown registers expect zero based channel numbering.
Since the upper bits of the registers are reserved, the teardown also
worked before, this patch is cleanup only.
Signed-off-by: Christian Riesch <christian.riesch-3mrvs1K0uXizZXS1Dc/lvw@public.gmane.org>
---
drivers/net/ethernet/ti/davinci_cpdma.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c
index c97d2f5..3455876 100644
--- a/drivers/net/ethernet/ti/davinci_cpdma.c
+++ b/drivers/net/ethernet/ti/davinci_cpdma.c
@@ -822,7 +822,7 @@ int cpdma_chan_stop(struct cpdma_chan *chan)
dma_reg_write(ctlr, chan->int_clear, chan->mask);
/* trigger teardown */
- dma_reg_write(ctlr, chan->td, chan->chan_num);
+ dma_reg_write(ctlr, chan->td, chan_linear(chan));
/* wait for teardown complete */
timeout = jiffies + HZ/10; /* 100 msec */
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] davinci_cpdma: Fix channel number written to teardown registers
[not found] ` <1329983880-23921-1-git-send-email-christian.riesch-3mrvs1K0uXizZXS1Dc/lvw@public.gmane.org>
@ 2012-02-24 8:23 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-02-24 8:23 UTC (permalink / raw)
To: christian.riesch-3mrvs1K0uXizZXS1Dc/lvw
Cc: davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/,
ameya.palande-l0cyMroinI0, yanok-qv+LCo8X3VpBDgjK7y7TUQ,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
From: Christian Riesch <christian.riesch-3mrvs1K0uXizZXS1Dc/lvw@public.gmane.org>
Date: Thu, 23 Feb 2012 08:58:00 +0100
> chan->chan_num is 0..CPDMA_MAX_CHANNELS-1 for tx channels and
> CPDMA_MAX_CHANNELS..2*CPDMA_MAX_CHANNELS-1 for rx channels. However,
> the rx and tx teardown registers expect zero based channel numbering.
>
> Since the upper bits of the registers are reserved, the teardown also
> worked before, this patch is cleanup only.
>
> Signed-off-by: Christian Riesch <christian.riesch-3mrvs1K0uXizZXS1Dc/lvw@public.gmane.org>
Applied to net-next.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-24 8:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-23 7:58 [PATCH] davinci_cpdma: Fix channel number written to teardown registers Christian Riesch
[not found] ` <1329983880-23921-1-git-send-email-christian.riesch-3mrvs1K0uXizZXS1Dc/lvw@public.gmane.org>
2012-02-24 8:23 ` David Miller
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).