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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2015 12:22:30 +0000 (13:22 +0100)
commit20ba9f7595d0e1b6551422ad1503d4e9eb650504
treed28fb8b25e173c8af0c4a0cdc79be89c34150c5c
parent9bd014f32671970a89ae9a8ccb0f5dd171485a50
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>
drivers/usb/host/xhci.h