Commit aab0db08c07de0807d609f19c17dfb8eaf589231

Authored by Bin Meng
Committed by Marek Vasut
1 parent 209b98de01

usb: xhci: Add input slot context in xhci_set_configuration()

A valid input slot context for a 'configure endpoint' command requires
the 'Context Entries' field to be initialized to the index of the last
valid endpoint context that is defined by the target configuration. We
set up the 'Context Entries' field, but we forget to include the input
slot context in the input control context 'Add Context flags' bitmap.
So xHC will simply ignore input slot context and continue using its own
which contains old information of the device.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

drivers/usb/host/xhci.c
... ... @@ -332,8 +332,8 @@
332 332 ifdesc = &udev->config.if_desc[0];
333 333  
334 334 ctrl_ctx = xhci_get_input_control_ctx(in_ctx);
335   - /* Zero the input context control */
336   - ctrl_ctx->add_flags = 0;
  335 + /* Initialize the input context control */
  336 + ctrl_ctx->add_flags = cpu_to_le32(SLOT_FLAG);
337 337 ctrl_ctx->drop_flags = 0;
338 338  
339 339 /* EP_FLAG gives values 1 & 4 for EP1OUT and EP2IN */