ja-rule
ja-rule copied to clipboard
Reset USB CDC transfers when the carrier disconnects
Right now, if you have a console (minicom) open to the device and disconnect the CDC layer is left in a partially completed state. This means if you later reconnect a console it fails to work.
We can detect the carrier dropping but need a way to cancel the in flight read / write transfers.
USB_DEVICE_IRPCancelAll() doesn't work as I expect. There seems to be some internal state that isn't being reset correctly. See the comments on usb_console.c