Paul Zimmerman bcd2fde053 xhci: Fix an error in count_sg_trbs_needed()
The expression

	while (running_total < sg_dma_len(sg))

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

	while (running_total < sg_dma_len(sg) && running_total < temp)

fixes that.

This patch should be queued for stable kernels back to 2.6.31.

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@kernel.org
2011-02-20 07:01:28 -08:00
..
2010-12-10 14:18:35 -08:00
2010-11-30 16:51:21 -08:00
2011-01-22 18:36:43 -08:00
2010-12-16 10:05:06 -08:00
2010-12-16 13:36:12 -08:00
2010-11-01 17:01:27 -04:00
2010-08-10 14:35:44 -07:00
2011-01-14 15:51:51 -08:00