xhci: Allocate correct amount of scratchpad buffers
authorMathias Nyman <mathias.nyman@linux.intel.com>
Tue, 24 Feb 2015 16:27:01 +0000 (18:27 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 9 May 2015 22:16:21 +0000 (23:16 +0100)
commit3642863aa0889c89bc10e55d03c5342d1d8621cd
tree0047e28e48d51c84e34995d3737863a97360e30d
parent63f719b77750d26445779f042f8fe39940795e46
xhci: Allocate correct amount of scratchpad buffers

commit 6596a926b0b6c80b730a1dd2fa91908e0a539c37 upstream.

Include the high order bit fields for Max scratchpad buffers when
calculating how many scratchpad buffers are needed.

I'm suprised this hasn't caused more issues, we never allocated more than
32 buffers even if xhci needed more. Either we got lucky and xhci never
really used past that area, or then we got enough zeroed dma memory anyway.

Should be backported as far back as possible

Reported-by: Tim Chen <tim.c.chen@linux.intel.com>
Tested-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/host/xhci.h