From 3502dc15f6034e01e577c9274ec7a8e31353d00a Mon Sep 17 00:00:00 2001 From: Sarah Sharp Date: Thu, 12 May 2011 18:06:37 -0700 Subject: [PATCH] --- yaml --- r: 248879 b: refs/heads/master c: 834cb0fc4712a3b21c6b8c5cb55bd13607191311 h: refs/heads/master i: 248877: 288287ee52e8d1d8ad27c171043f66d7ec87ff97 248875: 775bef6e145a407c901c1fb54ff6938811091d66 248871: 27786dc7066d35805cb5d6550cde0df19684a38f 248863: 90b32617faf7b87dbcab05a90b1fda46f8a14125 v: v3 --- [refs] | 2 +- trunk/drivers/usb/host/xhci.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index b1f95d2a3f65..5fc7207843bf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 30f89ca021c3e584b61bc5a14eede89f74b2e826 +refs/heads/master: 834cb0fc4712a3b21c6b8c5cb55bd13607191311 diff --git a/trunk/drivers/usb/host/xhci.c b/trunk/drivers/usb/host/xhci.c index 013e113b818a..8f2a56ece44f 100644 --- a/trunk/drivers/usb/host/xhci.c +++ b/trunk/drivers/usb/host/xhci.c @@ -1701,8 +1701,17 @@ int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) xhci_dbg_ctx(xhci, virt_dev->out_ctx, LAST_CTX_TO_EP_NUM(le32_to_cpu(slot_ctx->dev_info))); + /* Free any rings that were dropped, but not changed. */ + for (i = 1; i < 31; ++i) { + if ((ctrl_ctx->drop_flags & (1 << (i + 1))) && + !(ctrl_ctx->add_flags & (1 << (i + 1)))) + xhci_free_or_cache_endpoint_ring(xhci, virt_dev, i); + } xhci_zero_in_ctx(xhci, virt_dev); - /* Install new rings and free or cache any old rings */ + /* + * Install any rings for completely new endpoints or changed endpoints, + * and free or cache any old rings from changed endpoints. + */ for (i = 1; i < 31; ++i) { if (!virt_dev->eps[i].new_ring) continue;