From cbf6ccd4296350c2d132898894cc969d484d379c Mon Sep 17 00:00:00 2001 From: Chandana Kishori Chiluveru Date: Tue, 4 Sep 2018 17:22:33 +0530 Subject: [PATCH] usb: gadget: Fix issue in config_desc with OS descriptor handling If a gadget provides "OS descriptors" from the userspace then composite gadget driver designates only one configuration which has OS descriptor support to be used always with the hosts. With this we are seeing enumeration issues in multi-config compositions where device does not allowing Host to identify preferred configuration to choose. Hence change the logic in config_desc for handling OS descriptor configuration. Change-Id: I5daa7631f9f2d634ee6b4b377b8d66283b21a497 Signed-off-by: Chandana Kishori Chiluveru --- drivers/usb/gadget/composite.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index bb47d39aa0ff..b797135728f3 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -612,18 +612,10 @@ static int config_desc(struct usb_composite_dev *cdev, unsigned w_value) w_value &= 0xff; pos = &cdev->configs; - c = cdev->os_desc_config; - if (c) - goto check_config; while ((pos = pos->next) != &cdev->configs) { c = list_entry(pos, typeof(*c), list); - /* skip OS Descriptors config which is handled separately */ - if (c == cdev->os_desc_config) - continue; - -check_config: /* ignore configs that won't work at this speed */ switch (speed) { case USB_SPEED_SUPER_PLUS: