summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorPaul Zimmerman <Paul.Zimmerman@synopsys.com>2011-02-12 14:07:20 -0800
committerAK <andi@firstfloor.org>2011-03-31 11:58:14 -0700
commit3f2e65401564db89de1c91901287b483f38db5c6 (patch)
tree594431a5c2bc65f28a2d8f0a02151c832772d699 /drivers/base
parent25d6b22368f95c5ef83f1ee7313d3b66fbf027d3 (diff)
xhci: Fix errors in the running total calculations in the TRB math
commit 5807795bd4dececdf553719cc02869e633395787 upstream. Calculations like running_total = TRB_MAX_BUFF_SIZE - (sg_dma_address(sg) & (TRB_MAX_BUFF_SIZE - 1)); if (running_total != 0) num_trbs++; are incorrect, because running_total can never be zero, so the if() expression will never be true. I think the intention was that running_total be in the range of 0 to TRB_MAX_BUFF_SIZE-1, not 1 to TRB_MAX_BUFF_SIZE. So adding a running_total &= TRB_MAX_BUFF_SIZE - 1; fixes the problem. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'drivers/base')
0 files changed, 0 insertions, 0 deletions