Re: [PATCH V2 18/20] dmaengine/amba-pl08x: Add support for sg lengreater than one for slave transfers

From: viresh kumar
Date: Thu Aug 04 2011 - 06:28:23 EST


On 08/01/2011 03:07 PM, Viresh KUMAR wrote:
> @@ -563,6 +565,7 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
> u32 cctl, early_bytes = 0;
> size_t max_bytes_per_lli, total_bytes = 0;

> + list_for_each_entry(dsg, &txd->dsg_list, node) {
> + cctl = txd->cctl;
>
> - /* We need to count this down to zero */
> - bd.remainder = txd->len;
> + bd.srcbus.addr = dsg->src_addr;
> + bd.dstbus.addr = dsg->dst_addr;
> + bd.remainder = dsg->len;
> + bd.srcbus.buswidth = bd.srcbus.maxwidth;
> + bd.dstbus.buswidth = bd.dstbus.maxwidth;
>

> + if (total_bytes != dsg->len) {
> + dev_err(&pl08x->adev->dev,
> + "%s size of encoded lli:s don't match total txd, transferred 0x%08zx from size 0x%08zx\n",
> + __func__, total_bytes, dsg->len);
> + return 0;
> + }
> }

Correction:

total_bytes must be reinitialized to zero inside list_for_each_entry loop.
As we are comparing it to dsg->len for every dsg.

Will fix this and send with V3.

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