aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2014-09-15 12:07:37 -0400
committerJohan Hovold <johan@kernel.org>2014-09-15 12:10:34 -0400
commit4b7154ba70bb20a3c024faabdd2bc207b550a813 (patch)
tree99a6e1204ec5deaca27bcbfc75ca16d3633433f2 /drivers/usb/host/xhci.c
parentadceac14166da8c466223a35ec59c4a4adeef976 (diff)
parent9e82bf014195d6f0054982c463575cdce24292be (diff)
Merge tag 'v3.17-rc5' into usb-next
USB fixes in Linux 3.17-rc5 are needed to build on top of for 3.18. Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r--drivers/usb/host/xhci.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index c020b094fe7d..c4a8fca8ae93 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -3971,13 +3971,21 @@ static int __maybe_unused xhci_change_max_exit_latency(struct xhci_hcd *xhci,
3971 int ret; 3971 int ret;
3972 3972
3973 spin_lock_irqsave(&xhci->lock, flags); 3973 spin_lock_irqsave(&xhci->lock, flags);
3974 if (max_exit_latency == xhci->devs[udev->slot_id]->current_mel) { 3974
3975 virt_dev = xhci->devs[udev->slot_id];
3976
3977 /*
3978 * virt_dev might not exists yet if xHC resumed from hibernate (S4) and
3979 * xHC was re-initialized. Exit latency will be set later after
3980 * hub_port_finish_reset() is done and xhci->devs[] are re-allocated
3981 */
3982
3983 if (!virt_dev || max_exit_latency == virt_dev->current_mel) {
3975 spin_unlock_irqrestore(&xhci->lock, flags); 3984 spin_unlock_irqrestore(&xhci->lock, flags);
3976 return 0; 3985 return 0;
3977 } 3986 }
3978 3987
3979 /* Attempt to issue an Evaluate Context command to change the MEL. */ 3988 /* Attempt to issue an Evaluate Context command to change the MEL. */
3980 virt_dev = xhci->devs[udev->slot_id];
3981 command = xhci->lpm_command; 3989 command = xhci->lpm_command;
3982 ctrl_ctx = xhci_get_input_control_ctx(xhci, command->in_ctx); 3990 ctrl_ctx = xhci_get_input_control_ctx(xhci, command->in_ctx);
3983 if (!ctrl_ctx) { 3991 if (!ctrl_ctx) {