diff --git a/drivers/usbdev/cdcecm.c b/drivers/usbdev/cdcecm.c index 2ce7e93cadf8e..c39f84d422871 100644 --- a/drivers/usbdev/cdcecm.c +++ b/drivers/usbdev/cdcecm.c @@ -1916,6 +1916,17 @@ static void cdcecm_disconnect(FAR struct usbdevclass_driver_s *driver, FAR struct usbdev_s *dev) { uinfo("\n"); + + /* Perform the soft connect function so that we will we can be + * re-enumerated (unless we are part of a composite device). The USB + * device controller calls CLASS_DISCONNECT() on every bus reset, which + * is the first step of any enumeration, so without this the device is + * left soft-disconnected and never enumerates on the host. + */ + +#ifndef CONFIG_CDCECM_COMPOSITE + DEV_CONNECT(dev); +#endif } /**************************************************************************** diff --git a/drivers/usbdev/cdcncm.c b/drivers/usbdev/cdcncm.c index d528d8f0da4c2..3358d261ce6cd 100644 --- a/drivers/usbdev/cdcncm.c +++ b/drivers/usbdev/cdcncm.c @@ -2868,6 +2868,17 @@ static void cdcncm_disconnect(FAR struct usbdevclass_driver_s *driver, cdcncm_resetconfig(self); uinfo("\n"); + + /* Perform the soft connect function so that we can be + * re-enumerated (unless we are part of a composite device). The USB + * device controller calls CLASS_DISCONNECT() on every bus reset, which + * is the first step of any enumeration, so without this the device is + * left soft-disconnected and never enumerates on the host. + */ + +#ifndef CONFIG_CDCNCM_COMPOSITE + DEV_CONNECT(dev); +#endif } /****************************************************************************