[PATCH] usb: gadget: composite: Disable USB 2.0 LPM (Low Power Mode)

From: Ingo Rohloff

Date: Fri Aug 28 2026 - 13:06:31 EST


Make sure, that the BOS descriptor sent to the host indicates, that there
is no USB 2.0 LPM support.

Note 1: DONT'T do this via
dwc->gadget->lpm_capable = false; // in dwc3_gadget_init()
because this would also disable LPM (Low Power Mode) for SuperSpeed; but
LPM for SuperSpeed seems to work without a problem.

Note 2: USB 2.0 LPM seems to be a mess!
=> There seem to be LOTs of (SuperSpeed capable) devices which have non
working USB 2.0 LPM.

Signed-off-by: Ingo Rohloff <ingo.rohloff@xxxxxxxxxxxxxx>
---
drivers/usb/gadget/composite.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index 1b2238147cfe..59dcf5788f96 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -769,8 +769,10 @@ static int bos_desc(struct usb_composite_dev *cdev)
usb_ext->bLength = USB_DT_USB_EXT_CAP_SIZE;
usb_ext->bDescriptorType = USB_DT_DEVICE_CAPABILITY;
usb_ext->bDevCapabilityType = USB_CAP_TYPE_EXT;
- usb_ext->bmAttributes = cpu_to_le32(USB_LPM_SUPPORT |
- USB_BESL_SUPPORT | besl);
+// usb_ext->bmAttributes = cpu_to_le32(USB_LPM_SUPPORT |
+// USB_BESL_SUPPORT | besl);
+ // No USB 2.0 LPM support whatsoever please!
+ usb_ext->bmAttributes = 0;
}

/*
--
2.55.0


--MP_/pW_pSM03sPOE5BUUld6eaQX--