RE: [md-accel PATCH 16/19] dmaengine: driver for the iop32x, iop33x, and iop13xx raid engines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: saeed bishara [mailto:[email protected]]
> Hi Dan,
> I think you have a bug in this function, the list_splice_init adds the
> new slots in the head of the chain_node, but you get the
> old_chain_tail (latest descriptor) from the tail of the chain!!
> 
>  > +static dma_cookie_t
>  > +iop_adma_tx_submit(struct dma_async_tx_descriptor *tx)
>  > +{
>  > +
>  > +       old_chain_tail = list_entry(iop_chan->chain.prev,
>  > +               struct iop_adma_desc_slot, chain_node);
>  > +       list_splice_init(&sw_desc->group_list, &old_chain_tail-
> >chain_node);
>  > +
>  > +       /* fix up the hardware chain */
>  > +       iop_desc_set_next_desc(old_chain_tail, grp_start->phys);
>  > +
[ dropped akpm, davem, jeff, and chris from the cc ]

This looks ok to me.  &sw_desc->group_list is the head of a new list of
descriptors to be added to the chain.  old_chain_tail is youngest
descriptor at the end of the current channel chain.

Before list_splice_init:
old_chain_tail->next = channel_chain_head
channel_chain_head->prev = old_chain_tail
new_chain_start->prev = sw_desc->group_list;
new_chain_end->next = sw_desc->group_list;

After list_splice_init:
new_chain_start->prev = old_chain_tail
old_chain_tail->next = new_chain_start
new_chain_end->next = channel_chain_head
channel_chain_head->prev = new_chain_end

sw_desc->group_list is empty

--
Dan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux