mynewt-nimble icon indicating copy to clipboard operation
mynewt-nimble copied to clipboard

transport/usb: Improve host de-synchronization recovery

Open kasjer opened this issue 3 years ago • 2 comments

In case when host did not waited for all events for past commands and send another command system would assert. This happens because for every command there is one event generated, and because this is one to one relation buffer for command and event is shared. When event that was generated by controller was not sent yet, and host stopped execution pending event would block any further host attempts to start over.

Now when command is received when event was no confirmed by USB yet, but new command is HCI reset. Code simply patches event queue so it no longer keeps track of event that occupies same buffer. When USB finally confirms that data was sent data length is not compared with already scratched buffer.

If any other command arrives when complete event is not confirmed by USB new command is silently dropped.

kasjer avatar Mar 24 '21 14:03 kasjer

Style check summary

No suggestions at this time!

apache-mynewt-bot avatar Mar 24 '21 18:03 apache-mynewt-bot

is this stil valid?

sjanc avatar Apr 13 '22 11:04 sjanc