This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch releases/13.1
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/releases/13.1 by this push:
new 7a87e1ae3af arch/arm/src/common/stm32: accept interface-recipient
GET/SET_DESCRIPTOR
7a87e1ae3af is described below
commit 7a87e1ae3afc3be9c4e0f00d253e1375d39f7b5e
Author: Huskya <[email protected]>
AuthorDate: Tue Sep 8 12:46:43 2026 +0000
arch/arm/src/common/stm32: accept interface-recipient GET/SET_DESCRIPTOR
HID class devices fetch the HID Report Descriptor with a
GET_DESCRIPTOR setup packet whose recipient is an interface
(bmRequestType 0x81, wValue 0x2200). stm32_ep0out_stdrequest() only
dispatches device-recipient descriptor requests and stalls the rest,
so HID class devices cannot enumerate. Dispatch interface-recipient
requests to the class driver as well.
Signed-off-by: Huskya <[email protected]>
---
arch/arm/src/common/stm32/stm32_otgfsdev_m3m4_v1.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm/src/common/stm32/stm32_otgfsdev_m3m4_v1.c
b/arch/arm/src/common/stm32/stm32_otgfsdev_m3m4_v1.c
index 34dd2e726c2..a9724600c61 100644
--- a/arch/arm/src/common/stm32/stm32_otgfsdev_m3m4_v1.c
+++ b/arch/arm/src/common/stm32/stm32_otgfsdev_m3m4_v1.c
@@ -2447,7 +2447,9 @@ static inline void stm32_ep0out_stdrequest(struct
stm32_usbdev_s *priv,
{
usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_GETSETDESC), 0);
if ((ctrlreq->type & USB_REQ_RECIPIENT_MASK) ==
- USB_REQ_RECIPIENT_DEVICE)
+ USB_REQ_RECIPIENT_DEVICE ||
+ (ctrlreq->type & USB_REQ_RECIPIENT_MASK) ==
+ USB_REQ_RECIPIENT_INTERFACE)
{
stm32_req_dispatch(priv, &priv->ctrlreq);
}