Hoernchen has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/42179?usp=email )


Change subject: dfu: make resp buffer static
......................................................................

dfu: make resp buffer static

USB dma uses a buffer depending on alignment, so this can be safe,
but it should not be depend on reading and knowing the asf source code...

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



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

diff --git a/usb/class/dfu/device/dfudf.c b/usb/class/dfu/device/dfudf.c
index 5c5682e..c62cafb 100644
--- a/usb/class/dfu/device/dfudf.c
+++ b/usb/class/dfu/device/dfudf.c
@@ -153,7 +153,7 @@
        }

        int32_t to_return = ERR_NONE;
-       uint8_t response[6]; // buffer for the response to this request
+       static uint8_t response[6]; // static: usbdc_xfer stores a pointer for 
async DMA
        switch (req->bRequest) {
        case USB_DFU_UPLOAD: // upload firmware from flash not supported
                dfu_state = USB_DFU_STATE_DFU_ERROR; // unsupported class 
request

--
To view, visit https://gerrit.osmocom.org/c/osmo-asf4-dfu/+/42179?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: osmo-asf4-dfu
Gerrit-Branch: master
Gerrit-Change-Id: I2f9336143190350817e6352b00751b35b1600b62
Gerrit-Change-Number: 42179
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <[email protected]>

Reply via email to