usb: dfu: make nand upload working
PATCH v2 1/1 usb: dfu: make nand upload working
Nowhere pass a value to len, which always 0, make no transfer which cause uploading failed.
This patch make nand upload working. However it needs enough malloc buffer to store read data, that means the buffer at least equal to the upload partition size, or else it doesn't work.
---
Changes in v2:
- Move code to nand part, or else it will break mmc
drivers/dfu/dfu_nand.c | 1 + 1 file changed, 1 insertion(+)
drivers/dfu/dfu_nand.c +1 -0
@@ -121,6 +121,7 @@ static int dfu_read_medium_nand(struct dfu_entity *dfu, u64 offset, void *buf,switch (dfu->layout) {case DFU_RAW_ADDR : + *len = dfu->data.nand.size; ret =nand_block_read (dfu, offset, buf, len);break ;default :
Signature · 1 line
1.7.9.5
PATCH v2 1/1 usb: dfu: make nand upload working
Hello Bo,
Am 07.11.2013 07:29, schrieb Bo Shen:
Quoted 7 lines
Nowhere pass a value to len, which always 0, make no transfer which cause uploading failed.
This patch make nand upload working. However it needs enough malloc buffer to store read data, that means the buffer at least equal to the upload partition size, or else it doesn't work.
Quoted 7 lines
Signed-off-by Bo Shen<[email protected]>---
Changes in v2:
- Move code to nand part, or else it will break mmcdrivers/dfu/dfu_nand.c | 1 + 1 file changed, 1 insertion(+)
Thanks! Tested on the rut board.
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH v2 1/1 usb: dfu: make nand upload working
In reply to Bo ShenHi Bo,
Quoted 8 lines
Nowhere pass a value to len, which always 0, make no transfer which cause uploading failed.
This patch make nand upload working. However it needs enough malloc buffer to store read data, that means the buffer at least equal to the upload partition size, or else it doesn't work.
Signed-off-by Bo Shen <[email protected]>
I would kindly ask some users of NAND part of the DFU (Tom, Heiko) to test if this change doesn't break anything.
Quoted 12 lines
---
Changes in v2:
- Move code to nand part, or else it will break mmcdrivers/dfu/dfu_nand.c | 1 + 1 file changed, 1 insertion(+)drivers/dfu/dfu_nand.c +0
-0
drivers/dfu/dfu_nand.c static int dfu_read_medium_nand(struct dfu_entity · line 127
Quoted 7 lines
drivers/dfu/dfu_nand.c +1
-0@@ -121,6 +121,7 @@ static int dfu_read_medium_nand(struct dfu_entity *dfu, u64 offset, void *buf, switch (dfu->layout) {case DFU_RAW_ADDR : + *len = dfu->data.nand.size; ret =nand_block_read (dfu, offset, buf, len);break ;default :
Best regards,
Lukasz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131108/2c056ace/attachment.pgp>
PATCH v2 1/1 usb: dfu: make nand upload working
Hello Lukasz,
Am 08.11.2013 16:41, schrieb Lukasz Majewski:
Quoted 5 lines
Hi Bo,
Quoted 3 lines
Nowhere pass a value to len, which always 0, make no transfer which cause uploading failed.
Quoted 8 lines
Quoted 5 lines
This patch make nand upload working. However it needs enough malloc buffer to store read data, that means the buffer at least equal to the upload partition size, or else it doesn't work.
Signed-off-by Bo Shen<[email protected]>I would kindly ask some users of NAND part of the DFU (Tom, Heiko) to test if this change doesn't break anything.
I sent a tested-by for this patch, see:
http://lists.denx.de/pipermail/u-boot/2013-November/166552.html
without this patch nand upload didn;t worked on the rut board, with this patch it worked :-)
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH v2 1/1 usb: dfu: make nand upload working
Hi Heiko,
Quoted 17 lines · Heiko Schocher
Hello Lukasz,
Am 08.11.2013 16:41, schrieb Lukasz Majewski:
Quoted 5 lines
Hi Bo,
Quoted 3 lines
Nowhere pass a value to len, which always 0, make no transfer which cause uploading failed.
Quoted 8 lines
Quoted 5 lines
This patch make nand upload working. However it needs enough malloc buffer to store read data, that means the buffer at least equal to the upload partition size, or else it doesn't work.
Signed-off-by Bo Shen<[email protected]>I would kindly ask some users of NAND part of the DFU (Tom, Heiko) to test if this change doesn't break anything.
Quoted 6 lines
I sent a tested-by for this patch, see:
http://lists.denx.de/pipermail/u-boot/2013-November/166552.html
without this patch nand upload didn;t worked on the rut board, with this patch it worked :-)
Thanks for testing it.
Quoted 2 lines
bye,
Heiko
Best Regards,
Bo Shen
PATCH v2 1/1 usb: dfu: make nand upload working
Dear Bo Shen,
Quoted 20 lines
Hi Heiko,
Quoted 17 lines · Heiko Schocher
Hello Lukasz,
Am 08.11.2013 16:41, schrieb Lukasz Majewski:
Quoted 13 lines
Hi Bo,
Quoted 8 lines
Nowhere pass a value to len, which always 0, make no transfer which cause uploading failed.
This patch make nand upload working. However it needs enough malloc buffer to store read data, that means the buffer at least equal to the upload partition size, or else it doesn't work.
Signed-off-by Bo Shen<[email protected]>I would kindly ask some users of NAND part of the DFU (Tom, Heiko) to test if this change doesn't break anything.
Quoted 8 lines
Quoted 6 lines
I sent a tested-by for this patch, see:
http://lists.denx.de/pipermail/u-boot/2013-November/166552.html
without this patch nand upload didn;t worked on the rut board, with this patch it worked :-)
Thanks for testing it.
Thanks guys, PR is already on it's way to mainline.
Best regards,
Marek Vasut
Marek Vasut
AppliedPATCH v2 1/1 usb: dfu: make nand upload working
In reply to Bo ShenDear Bo Shen,
Quoted 7 lines
Nowhere pass a value to len, which always 0, make no transfer which cause uploading failed.
This patch make nand upload working. However it needs enough malloc buffer to store read data, that means the buffer at least equal to the upload partition size, or else it doesn't work.
Quoted 7 lines
Signed-off-by Bo Shen <[email protected]>---
Changes in v2:
- Move code to nand part, or else it will break mmcdrivers/dfu/dfu_nand.c | 1 + 1 file changed, 1 insertion(+)
Applied, thanks.
Best regards,
Marek Vasut