All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Edworthy <phil.edworthy@renesas.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] dfu: dfu_sf: Fix read offset
Date: Mon, 14 Nov 2016 15:19:29 +0000	[thread overview]
Message-ID: <1479136769-24051-1-git-send-email-phil.edworthy@renesas.com> (raw)

The offset was applied to write, but not read, now its applied to
both.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.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..b6d5fe2 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

             reply	other threads:[~2016-11-14 15:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20161114151939epcas4p2c3224ca07d14a8e3ea909b4c63164769@epcas4p2.samsung.com>
2016-11-14 15:19 ` Phil Edworthy [this message]
2016-11-14 15:23   ` [U-Boot] [PATCH] dfu: dfu_sf: Fix read offset Fabio Estevam
2016-11-14 16:11   ` Lukasz Majewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1479136769-24051-1-git-send-email-phil.edworthy@renesas.com \
    --to=phil.edworthy@renesas.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.