[PATCH 0/2] usb: gadget: f_ncm/f_ecm: do not notify from set_alt()
From: Massimo Toscanelli via B4 Relay
Date: Fri Oct 23 2026 - 08:16:41 EST
f_ncm and f_ecm queue a notification on the interrupt endpoint already
at SET_CONFIGURATION, when the data interface is in altsetting 0. If the
host loads no class driver, nobody reads it. While data is pending for
the host the device may answer NYET to an LPM request, and DWC3 does,
so the device never enters L1. The USB-IF USB3CV tool fails the
"L1 Suspend/Resume" test (TD 9.21) because of this.
For altsetting 1 the call in set_alt() is not needed: gether_connect()
already notifies through the open/close callbacks. The extra call also
makes the host see two connection notifications before the speed one.
Patch 1 fixes f_ncm, patch 2 makes the same change in f_ecm.
Signed-off-by: Massimo Toscanelli <massimo.toscanelli@xxxxxxxxxxxxxxxxxxxx>
---
Massimo Toscanelli (2):
usb: gadget: f_ncm: do not notify from ncm_set_alt()
usb: gadget: f_ecm: do not notify from ecm_set_alt()
drivers/usb/gadget/function/f_ecm.c | 8 --------
drivers/usb/gadget/function/f_ncm.c | 4 ----
2 files changed, 12 deletions(-)
---
base-commit: bdf12cde30830d46a8ef1ba93986356f1164b4f1
change-id: 20261023-ncm-ecm-lpm-d8bdaa05796e
Best regards,
--
Massimo Toscanelli <massimo.toscanelli@xxxxxxxxxxxxxxxxxxxx>