From: Bin Meng Date: Wed, 19 Jul 2017 13:49:56 +0000 (+0800) Subject: usb: xhci: Add input slot context in xhci_set_configuration() X-Git-Tag: v2017.09-rc1~32^2~41 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=aab0db08c07de0807d609f19c17dfb8eaf589231;p=oweals%2Fu-boot.git 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 Reviewed-by: Simon Glass Reviewed-by: Stefan Roese Tested-by: Stefan Roese --- diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index bd8f4c43b4..95a0fbab50 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -332,8 +332,8 @@ static int xhci_set_configuration(struct usb_device *udev) ifdesc = &udev->config.if_desc[0]; ctrl_ctx = xhci_get_input_control_ctx(in_ctx); - /* Zero the input context control */ - ctrl_ctx->add_flags = 0; + /* Initialize the input context control */ + ctrl_ctx->add_flags = cpu_to_le32(SLOT_FLAG); ctrl_ctx->drop_flags = 0; /* EP_FLAG gives values 1 & 4 for EP1OUT and EP2IN */