Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273872
b: refs/heads/master
c: e071916
h: refs/heads/master
v: v3
  • Loading branch information
Viresh Kumar authored and Vinod Koul committed Aug 25, 2011
1 parent 59e149d commit e6f5f1e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 03af500f743f486648fc8afc38593e9844411945
refs/heads/master: e0719165801fad04073e7dcd90e4afd02aba3fb7
12 changes: 7 additions & 5 deletions trunk/drivers/dma/amba-pl08x.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,20 +669,22 @@ static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
* width left
*/
while (bd.remainder > (mbus->buswidth - 1)) {
size_t lli_len, tsize;
size_t lli_len, tsize, width;

/*
* If enough left try to send max possible,
* otherwise try to send the remainder
*/
lli_len = min(bd.remainder, max_bytes_per_lli);

/*
* Check against minimum bus alignment: Calculate actual
* Check against maximum bus alignment: Calculate actual
* transfer size in relation to bus width and get a
* maximum remainder of the smallest bus width - 1
* maximum remainder of the highest bus width - 1
*/
tsize = lli_len / min(mbus->buswidth, sbus->buswidth);
lli_len = tsize * min(mbus->buswidth, sbus->buswidth);
width = max(mbus->buswidth, sbus->buswidth);
lli_len = (lli_len / width) * width;
tsize = lli_len / bd.srcbus.buswidth;

dev_vdbg(&pl08x->adev->dev,
"%s fill lli with single lli chunk of "
Expand Down

0 comments on commit e6f5f1e

Please sign in to comment.