mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
usb: gadget: composite: Fix bcdUSB for non-SuperSpeed gadget
This patch set bcdUSB to 0x0200 for non-SuperSpeed gadget which disable LPM. It can avoid usb bus enter LPM. Test on RK356X platform, connect USB2.0 ADB to the PC USB host port, without this patch, the usb bus will enter LPM dynamically and trigger the USB DWC3 controller suspend interrupt event frequently (more than 1000 interrupts per second). Signed-off-by: William Wu <william.wu@rock-chips.com> Change-Id: Id0b9d54800e471512a417933868f76181c89e99d
This commit is contained in:
@@ -1745,7 +1745,10 @@ 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);
|
||||
if (gadget->lpm_capable)
|
||||
cdev->desc.bcdUSB = cpu_to_le16(0x0210);
|
||||
else
|
||||
cdev->desc.bcdUSB = cpu_to_le16(0x0200);
|
||||
}
|
||||
} else {
|
||||
if (gadget->lpm_capable)
|
||||
|
||||
Reference in New Issue
Block a user