TimJTi opened a new issue, #16345:
URL: https://github.com/apache/nuttx/issues/16345

   ### Description / Steps to reproduce the issue
   
   I have found that the CDC-NCM driver only works the first time my board's 
USB cable is connection to the host PC. If the USB is unplugged then replugged 
the host reports the connection as Disconnected.
   
   I have found:
   
   - This is true either for CDC-NCM as the only USB device driver, or if 
configured as a composite device.
   - If configured as a composite device, with MSD as the other composite 
driver, the MSD works correctly with USB unplug/re-plug cycles
   - Look at the MSD code, there are calls to disconnect functions that is also 
called at in cdc-ncm, but there is no meaningful code there
       - As an aside, the reset is actually called on a connect not a 
disconnect, both for MSD and CDC-NCM!!??
   - I hacked in some disconnect code loosely based on what the MSD driver does 
and called `cdcncm_resetconfig` but found:
       - The calls to EP_DISABLE caused the code to crash
       - commenting those out wasn't a magic fix as I suspect the configuration 
needs to be set up again with some call from somewhere
   
   I have admitted defeat as USB and CDC-NCM are out of my league.
   
   Can anyone:
   a) Confirm this behaviour on another board/arch as I only have access to my 
custom board which is a bit odd when it comes to USB
   b) and/or suggest a possible fix - happy to try things as always. Maybe a 
suggestion of what might need to go in that reset function?
   
   ### On which OS does this issue occur?
   
   [OS: Linux]
   
   ### What is the version of your OS?
   
   N/A
   
   ### NuttX Version
   
   Master
   
   ### Issue Architecture
   
   [Arch: arm]
   
   ### Issue Area
   
   [Area: Drivers]
   
   ### Host information
   
   _No response_
   
   ### Verification
   
   - [x] I have verified before submitting the report.


-- 
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.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to