From e9276263377840dd5741b30ba2adae7b690e3bd3 Mon Sep 17 00:00:00 2001 From: Steve Conklin Date: Wed, 1 Jun 2011 11:55:07 -0500 Subject: [PATCH] Revert "USB: xhci - also free streams when resetting devices" This reverts commit fc4c57e02daa2699f54cf2ae92986484264880a3. Due to a reported problem with USB3 after application of three patches from upstream stable, these patches are being reverted until they can be tested seperately and a determination made of whether there is a problem and how bad it is. The reporter has not yet responded to a request to test kernels with each of the most suspect patches reverted, so all will be reverted. Testing will proceed using these patches and hopefully they can be restored soon. The USB3 problem was reported in LP bug number 769042 --- drivers/usb/host/xhci.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 150349d..2083fc2 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -2335,18 +2335,10 @@ int xhci_discover_or_reset_device(struct usb_hcd *hcd, struct usb_device *udev) /* Everything but endpoint 0 is disabled, so free or cache the rings. */ last_freed_endpoint = 1; for (i = 1; i < 31; ++i) { - struct xhci_virt_ep *ep = &virt_dev->eps[i]; - - if (ep->ep_state & EP_HAS_STREAMS) { - xhci_free_stream_info(xhci, ep->stream_info); - ep->stream_info = NULL; - ep->ep_state &= ~EP_HAS_STREAMS; - } - - if (ep->ring) { - xhci_free_or_cache_endpoint_ring(xhci, virt_dev, i); - last_freed_endpoint = i; - } + if (!virt_dev->eps[i].ring) + continue; + xhci_free_or_cache_endpoint_ring(xhci, virt_dev, i); + last_freed_endpoint = i; } xhci_dbg(xhci, "Output context after successful reset device cmd:\n"); xhci_dbg_ctx(xhci, virt_dev->out_ctx, last_freed_endpoint); -- 1.7.10.4