From 3ef3a660142f3a9c9ab7f4760587d4d48d3b3a8b Mon Sep 17 00:00:00 2001 From: Russell King - ARM Linux Date: Tue, 6 Mar 2012 22:36:07 +0000 Subject: [PATCH] --- yaml --- r: 297523 b: refs/heads/master c: 2a926e46022ad7a03e0ac167d8c2b0d88c12c5a8 h: refs/heads/master i: 297521: a113942e7b64a7d066a41c078e94a8acae8d8ce3 297519: 9efe5ea75c480173dd5606a78b8074ebd5fc4859 v: v3 --- [refs] | 2 +- trunk/drivers/dma/iop-adma.c | 12 ++---------- trunk/drivers/dma/ppc4xx/adma.c | 6 +----- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/[refs] b/[refs] index 4defd85fd1e1..60deed960ea7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d3ee98cdcd6198ea1cf75c603178acc8a805b69b +refs/heads/master: 2a926e46022ad7a03e0ac167d8c2b0d88c12c5a8 diff --git a/trunk/drivers/dma/iop-adma.c b/trunk/drivers/dma/iop-adma.c index b1e3be089c52..4370b1015f73 100644 --- a/trunk/drivers/dma/iop-adma.c +++ b/trunk/drivers/dma/iop-adma.c @@ -1622,16 +1622,12 @@ static void iop_chan_start_null_memcpy(struct iop_adma_chan *iop_chan) iop_desc_set_dest_addr(grp_start, iop_chan, 0); iop_desc_set_memcpy_src_addr(grp_start, 0); - cookie = iop_chan->common.cookie; - cookie++; - if (cookie <= 1) - cookie = 2; + cookie = dma_cookie_assign(&sw_desc->async_tx); /* initialize the completed cookie to be less than * the most recently used cookie */ iop_chan->common.completed_cookie = cookie - 1; - iop_chan->common.cookie = sw_desc->async_tx.cookie = cookie; /* channel should not be busy */ BUG_ON(iop_chan_is_busy(iop_chan)); @@ -1679,16 +1675,12 @@ static void iop_chan_start_null_xor(struct iop_adma_chan *iop_chan) iop_desc_set_xor_src_addr(grp_start, 0, 0); iop_desc_set_xor_src_addr(grp_start, 1, 0); - cookie = iop_chan->common.cookie; - cookie++; - if (cookie <= 1) - cookie = 2; + cookie = dma_cookie_assign(&sw_desc->async_tx); /* initialize the completed cookie to be less than * the most recently used cookie */ iop_chan->common.completed_cookie = cookie - 1; - iop_chan->common.cookie = sw_desc->async_tx.cookie = cookie; /* channel should not be busy */ BUG_ON(iop_chan_is_busy(iop_chan)); diff --git a/trunk/drivers/dma/ppc4xx/adma.c b/trunk/drivers/dma/ppc4xx/adma.c index 86239ea01898..975206257f6e 100644 --- a/trunk/drivers/dma/ppc4xx/adma.c +++ b/trunk/drivers/dma/ppc4xx/adma.c @@ -4022,16 +4022,12 @@ static void ppc440spe_chan_start_null_xor(struct ppc440spe_adma_chan *chan) async_tx_ack(&sw_desc->async_tx); ppc440spe_desc_init_null_xor(group_start); - cookie = chan->common.cookie; - cookie++; - if (cookie <= 1) - cookie = 2; + cookie = dma_cookie_assign(&sw_desc->async_tx); /* initialize the completed cookie to be less than * the most recently used cookie */ chan->common.completed_cookie = cookie - 1; - chan->common.cookie = sw_desc->async_tx.cookie = cookie; /* channel should not be busy */ BUG_ON(ppc440spe_chan_is_busy(chan));