Change in osmo-asf4-dfu[master]: enable flashing by providing real downloaded data length

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Kévin Redon gerrit-no-reply at lists.osmocom.org
Wed Jan 9 15:05:21 UTC 2019


Kévin Redon has uploaded this change for review. ( https://gerrit.osmocom.org/12514


Change subject: enable flashing by providing real downloaded data length
......................................................................

enable flashing by providing real downloaded data length

Change-Id: I6f16170a4b41a70d89954e2c4a841efc67a26786
---
M usb/class/dfu/device/dfudf.c
1 file changed, 1 insertion(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-asf4-dfu refs/changes/14/12514/1

diff --git a/usb/class/dfu/device/dfudf.c b/usb/class/dfu/device/dfudf.c
index aefcab4..41e235b 100644
--- a/usb/class/dfu/device/dfudf.c
+++ b/usb/class/dfu/device/dfudf.c
@@ -245,11 +245,9 @@
 		} else { // there is data to be flash
 			if (USB_SETUP_STAGE == stage) { // there will be data to be flash
 				to_return = usbdc_xfer(ep, dfu_download_data, req->wLength, false); // send ack to the setup request to get the data
-				//to_return = usbdc_xfer(ep, NULL, 0, false); // send ACK
 			} else { // now there is data to be flashed
 				dfu_download_progress = req->wValue * sizeof(dfu_download_data); // remember which block to flash
-				dfu_download_length = 0;
-				//dfu_download_length = req->wLength; // remember the data size to be flash
+				dfu_download_length = req->wLength; // remember the data size to be flash
 				dfu_state = USB_DFU_STATE_DFU_DNLOAD_SYNC; // go to sync state
 				to_return = usbdc_xfer(ep, NULL, 0, false); // ACK the data
 				// we let the main application flash the data because this can be long and would stall the USB ISR

-- 
To view, visit https://gerrit.osmocom.org/12514
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-asf4-dfu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f16170a4b41a70d89954e2c4a841efc67a26786
Gerrit-Change-Number: 12514
Gerrit-PatchSet: 1
Gerrit-Owner: Kévin Redon <kredon at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190109/25a41ca2/attachment.htm>


More information about the gerrit-log mailing list