diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/xhci.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 013e113b818a..8f2a56ece44f 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -1701,8 +1701,17 @@ int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) | |||
1701 | xhci_dbg_ctx(xhci, virt_dev->out_ctx, | 1701 | xhci_dbg_ctx(xhci, virt_dev->out_ctx, |
1702 | LAST_CTX_TO_EP_NUM(le32_to_cpu(slot_ctx->dev_info))); | 1702 | LAST_CTX_TO_EP_NUM(le32_to_cpu(slot_ctx->dev_info))); |
1703 | 1703 | ||
1704 | /* Free any rings that were dropped, but not changed. */ | ||
1705 | for (i = 1; i < 31; ++i) { | ||
1706 | if ((ctrl_ctx->drop_flags & (1 << (i + 1))) && | ||
1707 | !(ctrl_ctx->add_flags & (1 << (i + 1)))) | ||
1708 | xhci_free_or_cache_endpoint_ring(xhci, virt_dev, i); | ||
1709 | } | ||
1704 | xhci_zero_in_ctx(xhci, virt_dev); | 1710 | xhci_zero_in_ctx(xhci, virt_dev); |
1705 | /* Install new rings and free or cache any old rings */ | 1711 | /* |
1712 | * Install any rings for completely new endpoints or changed endpoints, | ||
1713 | * and free or cache any old rings from changed endpoints. | ||
1714 | */ | ||
1706 | for (i = 1; i < 31; ++i) { | 1715 | for (i = 1; i < 31; ++i) { |
1707 | if (!virt_dev->eps[i].new_ring) | 1716 | if (!virt_dev->eps[i].new_ring) |
1708 | continue; | 1717 | continue; |