]> git.baikalelectronics.ru Git - kernel.git/commit
xhci: xhci_mem_cleanup: make sure cmd_ring_reserved_trbs really is 0
authorHans de Goede <hdegoede@redhat.com>
Thu, 7 Nov 2013 07:19:45 +0000 (08:19 +0100)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Tue, 4 Mar 2014 23:38:13 +0000 (15:38 -0800)
commit84dd571709cb0352336c94610e2b391dd308db57
tree407111d59016596dd5729630c9386f67fa49906d
parent0392243c0fa0825b72cda70f0f347ba70578c002
xhci: xhci_mem_cleanup: make sure cmd_ring_reserved_trbs really is 0

cmd_ring_reserved_trbs gets decremented by xhci_free_stream_info(), so set it
to 0 after freeing all rings, otherwise it wraps around to a very large value
when rings with streams are free-ed.

Before this patch the wrap-around could be triggered when xhci_resume
calls xhci_mem_cleanup if the controller resume fails.

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