------------------- This is a commit scheduled for the next v2.6.34 longterm release. If you see a problem with using this for longterm, please comment. -------------------

commit bcd2fde05341cef0052e49566ec88b406a521cf3 upstream.

The expression

while (running_total < sg_dma_len(sg))

does not take into account that the remaining data length can be lessthan sg_dma_len(sg). In that case, running_total can end up beinggreater than the total data length, so an extra TRB is counted.Changing the expression to