* [U-Boot] [PATCH] drivers:dfu:dfu_sf: Fix upload - add partition/altsetting start address @ 2016-11-16 11:45 ` michael.hennerich at analog.com 2016-11-16 14:59 ` Lukasz Majewski 0 siblings, 1 reply; 2+ messages in thread From: michael.hennerich at analog.com @ 2016-11-16 11:45 UTC (permalink / raw) To: u-boot From: Michael Hennerich <michael.hennerich@analog.com> This fixes a bug seen with DFU Serial Flash upload/medium-read in case dfu->data.sf.start > 0. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> --- drivers/dfu/dfu_sf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/dfu/dfu_sf.c b/drivers/dfu/dfu_sf.c index 9702eee..51c9b7f 100644 --- a/drivers/dfu/dfu_sf.c +++ b/drivers/dfu/dfu_sf.c @@ -20,7 +20,8 @@ static long dfu_get_medium_size_sf(struct dfu_entity *dfu) static int dfu_read_medium_sf(struct dfu_entity *dfu, u64 offset, void *buf, long *len) { - return spi_flash_read(dfu->data.sf.dev, offset, *len, buf); + return spi_flash_read(dfu->data.sf.dev, dfu->data.sf.start + offset, + *len, buf); } static u64 find_sector(struct dfu_entity *dfu, u64 start, u64 offset) -- 2.7.4 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] drivers:dfu:dfu_sf: Fix upload - add partition/altsetting start address 2016-11-16 11:45 ` [U-Boot] [PATCH] drivers:dfu:dfu_sf: Fix upload - add partition/altsetting start address michael.hennerich at analog.com @ 2016-11-16 14:59 ` Lukasz Majewski 0 siblings, 0 replies; 2+ messages in thread From: Lukasz Majewski @ 2016-11-16 14:59 UTC (permalink / raw) To: u-boot Hi michael.hennerich at analog.com, > From: Michael Hennerich <michael.hennerich@analog.com> > > This fixes a bug seen with DFU Serial Flash upload/medium-read in case > dfu->data.sf.start > 0. > > > Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> > --- > drivers/dfu/dfu_sf.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/dfu/dfu_sf.c b/drivers/dfu/dfu_sf.c > index 9702eee..51c9b7f 100644 > --- a/drivers/dfu/dfu_sf.c > +++ b/drivers/dfu/dfu_sf.c > @@ -20,7 +20,8 @@ static long dfu_get_medium_size_sf(struct > dfu_entity *dfu) static int dfu_read_medium_sf(struct dfu_entity > *dfu, u64 offset, void *buf, long *len) > { > - return spi_flash_read(dfu->data.sf.dev, offset, *len, buf); > + return spi_flash_read(dfu->data.sf.dev, dfu->data.sf.start + > offset, > + *len, buf); > } > > static u64 find_sector(struct dfu_entity *dfu, u64 start, u64 offset) Thanks for the patch. Acked-by: Lukasz Majewski <l.majewski@samsung.com> Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-16 14:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20161116114458epcas3p2d504a3488df7bb90b7f0c2d705e7c91b@epcas3p2.samsung.com>
2016-11-16 11:45 ` [U-Boot] [PATCH] drivers:dfu:dfu_sf: Fix upload - add partition/altsetting start address michael.hennerich at analog.com
2016-11-16 14:59 ` Lukasz Majewski
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox