Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions drivers/usbdev/cdcecm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/* Perform the soft connect function so that we will we can be
/* 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_CDCECM_COMPOSITE
DEV_CONNECT(dev);
#endif
}

/****************************************************************************
Expand Down
11 changes: 11 additions & 0 deletions drivers/usbdev/cdcncm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

/****************************************************************************
Expand Down
Loading