jlaitine commented on code in PR #17010: URL: https://github.com/apache/nuttx/pull/17010#discussion_r2344650211
########## boards/boardctl.c: ########## @@ -133,16 +133,25 @@ static inline int case BOARDIOC_USBDEV_CONNECT: /* Connect the CDC/ACM device */ #ifndef CONFIG_CDCACM_COMPOSITE { - DEBUGASSERT(ctrl->handle != NULL); ret = cdcacm_initialize(ctrl->instance, ctrl->handle); } #endif break; case BOARDIOC_USBDEV_DISCONNECT: /* Disconnect the CDC/ACM device */ { - DEBUGASSERT(ctrl->handle != NULL && *ctrl->handle != NULL); - cdcacm_uninitialize(*ctrl->handle); +#ifdef CONFIG_SYSTEM_CDCACM + if (ctrl->instance == CONFIG_SYSTEM_CDCACM_DEVMINOR) + { + ret = cdcacm_uninitialize_system_cdcacm(); + } + else +#endif + { + DEBUGASSERT(ctrl->handle != NULL && + *ctrl->handle != NULL); + cdcacm_uninitialize(*ctrl->handle); Review Comment: There is no place to store the ctrl->handle in "sercon" or any other user side app when it is a standalone process. So the handle can't be passed in by "serdis". So this doesn't work in CONFIG_BUILD_KERNEL: https://github.com/apache/nuttx-apps/blob/df711238fee7423ead0f44e1ca039d1d003175bf/system/cdcacm/cdcacm_main.c#L137 An NSH command "serdis" would be creating a new process with a NULL handle. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org