From 4801d4ea559440b7d63babdac1b1b43a13ac7562 Mon Sep 17 00:00:00 2001 From: Mathias Nyman Date: Thu, 27 Nov 2014 18:19:15 +0200 Subject: [PATCH] xhci: clear extra bits from slot context when setting max exit latency If we need to change the max exit latency with a Evaluate Context command, we copy the old output slot context and use it as input context for the command. This also copies the dev_state bits which are supposed to be zero in the input slot context. Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/xhci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 033b46c470bd..0ea7e12d4765 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -4009,6 +4009,7 @@ static int __maybe_unused xhci_change_max_exit_latency(struct xhci_hcd *xhci, slot_ctx = xhci_get_slot_ctx(xhci, command->in_ctx); slot_ctx->dev_info2 &= cpu_to_le32(~((u32) MAX_EXIT)); slot_ctx->dev_info2 |= cpu_to_le32(max_exit_latency); + slot_ctx->dev_state = 0; xhci_dbg_trace(xhci, trace_xhci_dbg_context_change, "Set up evaluate context for LPM MEL change."); -- 2.20.1