Skip to content

Commit

Permalink
iop-adma: add a dummy read to flush next descriptor update
Browse files Browse the repository at this point in the history
The current dummy read references the wrong address allowing the next
descriptor address update to linger in the store buffer and get passed
by an 'append' event.

This issue was uncovered by the change from strongly-ordered to device
memory for the adma registers.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
  • Loading branch information
Dan Williams committed Nov 11, 2008
1 parent f21f237 commit 137cb55
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/dma/iop-adma.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ iop_adma_tx_submit(struct dma_async_tx_descriptor *tx)
int slot_cnt;
int slots_per_op;
dma_cookie_t cookie;
dma_addr_t next_dma;

grp_start = sw_desc->group_head;
slot_cnt = grp_start->slot_cnt;
Expand All @@ -425,11 +426,11 @@ iop_adma_tx_submit(struct dma_async_tx_descriptor *tx)
&old_chain_tail->chain_node);

/* fix up the hardware chain */
iop_desc_set_next_desc(old_chain_tail, grp_start->async_tx.phys);
next_dma = grp_start->async_tx.phys;
iop_desc_set_next_desc(old_chain_tail, next_dma);
BUG_ON(iop_desc_get_next_desc(old_chain_tail) != next_dma); /* flush */

/* 1/ don't add pre-chained descriptors
* 2/ dummy read to flush next_desc write
*/
/* check for pre-chained descriptors */
BUG_ON(iop_desc_get_next_desc(sw_desc));

/* increment the pending count by the number of slots
Expand Down

0 comments on commit 137cb55

Please sign in to comment.