]> git.baikalelectronics.ru Git - kernel.git/commit
USB: xhci - also free streams when resetting devices
authorDmitry Torokhov <dtor@vmware.com>
Wed, 13 Apr 2011 06:06:28 +0000 (23:06 -0700)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Wed, 13 Apr 2011 23:57:31 +0000 (16:57 -0700)
commit5563ea14053e58a7d1fe5b194849aaba16a16440
tree5c96640b0f28191b536d918fa870926dc053b1c8
parent2a70730c96050acf0356b9590dcce8c43be73874
USB: xhci - also free streams when resetting devices

Currently, when resetting a device, xHCI driver disables all but one
endpoints and frees their rings, but leaves alone any streams that
might have been allocated. Later, when users try to free allocated
streams, we oops in xhci_setup_no_streams_ep_input_ctx() because
ep->ring is NULL.

Let's free not only rings but also stream data as well, so that
calling free_streams() on a device that was reset will be safe.

This should be queued for stable trees back to 2.6.35.

Reviewed-by: Micah Elizabeth Scott <micah@vmware.com>
Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@kernel.org
drivers/usb/host/xhci.c