xhci: Check size rather then number of streams when allocating stream ctxs
authorHans de Goede <hdegoede@redhat.com>
Thu, 3 Oct 2013 22:29:46 +0000 (00:29 +0200)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Tue, 4 Mar 2014 23:38:01 +0000 (15:38 -0800)
commitee4aa54bce2ae27c36998da3d32d9f55cb48ca21
tree40dbe2943ab92a3c2175b554c47237d7fb6e5a6f
parentdf6138347bcde316e4d4b24ae4d9d0296461c79a
xhci: Check size rather then number of streams when allocating stream ctxs

Before this a device needing ie 32 stream ctxs would end up with an entry from
the small_streams_pool which has 256 bytes entries, where as 32 stream ctxs
need 512 bytes. Things actually keep running for a surprisingly long time
before crashing because of this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
drivers/usb/host/xhci-mem.c