diff options
author | Christian Riesch <christian.riesch@omicron.at> | 2012-02-23 01:58:00 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-24 12:23:37 +0400 |
commit | b4ad0428139491355ea8742294c77942c312c5bb (patch) | |
tree | 83623ebd5d1b12e6da51962c87b1531e5b96ed4c | |
parent | d708f6039b21ca8f0508ba1da1aaf3d00a36446f (diff) | |
download | linux-b4ad0428139491355ea8742294c77942c312c5bb.tar.xz |
davinci_cpdma: Fix channel number written to teardown registers
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>
-rw-r--r-- | 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 c97d2f590855..34558766cbf0 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 */ |