Attention is currently required from: lynxis lazus.
Hoernchen has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/42176?usp=email )
Change subject: dfu: protect USB_DFU_STATE_DFU_MANIFEST by a critical section ......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2: The ISR only reads these variables when dfu_state == DFU_MANIFEST_SYNC, the main loop only writes them when dfu_state == DFU_MANIFEST, these are mutually exclusive. - for manifest-tolerant devices: the host polls again after bwPollTimeout (10ms). The main loops two writes take microseconds -> this window is practically unreachable. - if it does happen: the GETSTATUS response reports bState=dfuMANIFEST with no state transition, a correct response, the device is still in manifestation. The host polls again after 10ms, and by then the main loop has completed both writes.
The "inconsistency" basically does not matter.