xhci: clear extra bits from slot context when setting max exit latency
authorMathias Nyman <mathias.nyman@linux.intel.com>
Thu, 27 Nov 2014 16:19:15 +0000 (18:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Dec 2014 00:14:29 +0000 (16:14 -0800)
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 <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci.c

index 033b46c470bdff8120b1e903ee3debbb9b998218..0ea7e12d4765d2a87d242355ff21379ee473cc57 100644 (file)
@@ -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.");