Skip to content

Commit

Permalink
davinci_cpdma: Fix channel number written to teardown registers
Browse files Browse the repository at this point in the history
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@omicron.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Christian Riesch authored and David S. Miller committed Feb 24, 2012
1 parent d708f60 commit b4ad042
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/ti/davinci_cpdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit b4ad042

Please sign in to comment.