mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
|
Some checks are pending
MemBrowse Memory Report / changes-filter (push) Waiting to run
MemBrowse Memory Report / load-targets (push) Waiting to run
MemBrowse Memory Report / identical (push) Blocked by required conditions
MemBrowse Memory Report / analyze (push) Blocked by required conditions
The USB device controller drivers invoke CLASS_DISCONNECT() on every USB bus reset, and a bus reset is the first step of normal host enumeration. Every other class driver (cdcacm, usbmsc, rndis) re-asserts DEV_CONNECT() at the end of its disconnect() handler so that the device remains attached; cdcecm and cdcncm did not, so on controllers that soft-disconnect around bus reset (e.g. rp2040, which drops the pull-up in its bus-reset handler) a standalone CDC-ECM or CDC-NCM device is left soft-disconnected by the first bus reset and never enumerates on the host. Mirror the cdcacm behavior and perform the soft connect in the disconnect() methods, unless part of a composite device (composite.c already re-connects in its own disconnect handler). Fixes the standalone CDC-ECM case of issue #15880. Validated on raspberrypi-pico (RP2040): with this change a standalone CONFIG_NET_CDCECM device that previously never appeared on the host enumerates via cdc_ether and pings with 0% loss. cdcncm has the identical defect and receives the identical fix. Signed-off-by: Ricard Rosson <ricard@groundbits.com> Co-authored-by: Xiang Xiao <xiaoxiang781216@gmail.com> Assisted-by: Claude (Anthropic Claude Code) |
||
|---|---|---|
| .. | ||
| adb.c | ||
| cdcacm.c | ||
| cdcacm.h | ||
| cdcacm_desc.c | ||
| cdcecm.c | ||
| cdcecm.h | ||
| cdcncm.c | ||
| CMakeLists.txt | ||
| composite.c | ||
| composite.h | ||
| composite_desc.c | ||
| dfu.c | ||
| Kconfig | ||
| Make.defs | ||
| mtp.c | ||
| pl2303.c | ||
| rndis.c | ||
| rndis_std.h | ||
| usbdev_desc.c | ||
| usbdev_fs.c | ||
| usbdev_fs.h | ||
| usbdev_req.c | ||
| usbdev_strings.c | ||
| usbdev_trace.c | ||
| usbdev_trprintf.c | ||
| usbmsc.c | ||
| usbmsc.h | ||
| usbmsc_desc.c | ||
| usbmsc_scsi.c | ||
| uvc.c | ||