Attention is currently required from: Hoernchen, pespin.
lynxis lazus has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/42174?usp=email )
Change subject: dfu: rewrite firmware downloading ......................................................................
Patch Set 5:
(3 comments)
File usb/class/dfu/device/dfudf.c:
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/42174/comment/10305403_7482ee51... : PS2, Line 246: if (!(usb_dfu_func_desc->bmAttributes & USB_REQ_DFU_DNLOAD)) { // download is not enabled
this whole to_return should be also replaced.
Reverted the break back because of adding the else again.
File usb/class/dfu/device/dfudf.c:
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/42174/comment/ac2174af_8da2d60e... : PS4, Line 175: dfu_state = USB_DFU_STATE_DFU_DNBUSY;
at least move that assignment to case USB_DFU_STATE_DFU_DNLOAD_SYNC and don't just drop old comments […]
I've reverted the removal of the comment "// switch to busy state". I've added additional comments.
The code path for DNLOAD_SYNC and DNBUSY can be merged into one code path and don't need different handling. The main loop doesn't change anymore the dfu_state while flashing, so the state changes here and the comment "// download has not completed" doesn't describe the state of the device anymore.
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/42174/comment/10c26509_f2f29244... : PS4, Line 272: break;
why do we suddenly need superfluous break statements within else if chains?
Ack. I've reverted the else to keep the code more minimal in this change.