From b4bf1d6d54f98b86971eb67d5fc59a7f51b679d7 Mon Sep 17 00:00:00 2001 From: liuyc20 Date: Tue, 9 Jul 2019 09:54:37 +0800 Subject: [PATCH] gadget: bcdUSB version back to 2.0 when not SuperSpeed Some of PC USB3.0 port don't support bcdUSB 2.1 version. But the phone bcdUSB will focus on bcdUSB 2.1.then USB gadget will reset continually.Change bcdUSB to 2.0 to compat all PC USB port type. 07-02 08:05:34.853 0 0 D dwc3 a600000.dwc3: Notify OTG from dwc3_gadget_reset_interrupt 07-02 08:05:35.182 0 0 D dwc3 a600000.dwc3: Notify OTG from dwc3_gadget_reset_interrupt 07-02 08:05:35.415 0 0 D dwc3 a600000.dwc3: Notify OTG from dwc3_gadget_reset_interrupt 07-02 08:05:35.647 0 0 D dwc3 a600000.dwc3: Notify OTG from dwc3_gadget_reset_interrupt 07-02 08:05:44.171 0 0 D dwc3 a600000.dwc3: Notify OTG from dwc3_gadget_reset_interrupt origin-CR: (CR) Change-Id: Icb46a95226caecc9778c6889a85654f97fa85012 Signed-off-by: liuyc20 Reviewed-on: https://gerrit.mot.com/1383246 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Xiaojun Ji Reviewed-by: Huosheng Liao Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/1449152 Reviewed-by: Yuecai Liu Reviewed-on: https://gerrit.mot.com/1751275 Reviewed-by: Zonghua Liu Reviewed-on: https://gerrit.mot.com/1785341 --- drivers/usb/gadget/composite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 3730ea7f5d35..e107f2690b54 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -1743,7 +1743,7 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) cdev->desc.bcdUSB = cpu_to_le16(0x0320); cdev->desc.bMaxPacketSize0 = 9; } else { - cdev->desc.bcdUSB = cpu_to_le16(0x0210); + cdev->desc.bcdUSB = cpu_to_le16(0x0200); } } else { if (gadget->lpm_capable)