All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v5 2/9] dfu: Support larger than memory transfers.
Date: Thu, 14 Mar 2013 09:22:11 +0100	[thread overview]
Message-ID: <20130314092211.3dc38c30@amdc308.digital.local> (raw)
In-Reply-To: <20130313195703.GT23324@bill-the-cat>

Hi Tom,

> On Wed, Mar 13, 2013 at 11:25:42AM -0400, Tom Rini wrote:
> 
> > On Mon, Mar 11, 2013 at 11:03:41AM +0100, Lukasz Majewski wrote:
> > 
> > [snip]
> > > > > -	if (blk_seq_num == 0) {
> > > > > -		i_buf = dfu_buf;
> > > > > -		ret = dfu->read_medium(dfu, i_buf, &r_size);
> > > > > -		debug("%s: %s %ld [B]\n", __func__,
> > > > > dfu->name, r_size);
> > > > > -		i_blk_seq_num = 0;
> > > > > -		/* Integrity check (if needed) */
> > > > > -		crc = crc32(0, dfu_buf, r_size);
> > > > > +	       __func__, dfu->name, buf, size, blk_seq_num,
> > > > > dfu->i_buf); +
> > > > > +	if (!dfu->inited) {
> > > > > +		ret = dfu->read_medium(dfu, 0, NULL,
> > > > > &dfu->r_left);
> > > 			   ^^^^^^^^^^^^ this call causes read
> > > error. I suppose, that it is an initial "read". Does
> > > 			   it read the whole file at once?
> > > 
> > > 		The problem is that the command is fromatted in a
> > > 		wrong way. 
> > 
> > And we're also passing NULL as the buffer to read into?  That also
> > can't be good.  I'll spend a little time here and see what's going
> > on.
> 
> OK, I see and have fixed some minor issues here, but without any of
> these patches, I'm not seeing DFU read work at all for raw.  I keep
> getting "Wrong sequence number!" errors on the U-Boot side.  Using
> dfu-util 0.5 from Ubuntu 12.04 still.  I'm inclined to push back and
> say, after fixing a few calls now that I re-read my code, DFU read is
> broken and set that aside as another problem to get fixed.
> 

Ok, lets first fix the download (with yours patch series).

The DFU read can be fixed later, for example after Marek sends pull
request for u-boot-usb branch.

Anyway thanks for looking into the problem.

-- 
Best regards,

Lukasz Majewski

Samsung R&D Poland (SRPOL) | Linux Platform Group

  reply	other threads:[~2013-03-14  8:22 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-08 17:37 [U-Boot] [PATCH v5 0/9] Improve DFU support, enable for am335x_evm Tom Rini
2013-03-08 17:37 ` [U-Boot] [PATCH v5 1/9] README: Document current DFU CONFIG options Tom Rini
2013-03-08 17:37 ` [U-Boot] [PATCH v5 2/9] dfu: Support larger than memory transfers Tom Rini
2013-03-11  9:38   ` Lukasz Majewski
2013-03-11 10:03     ` Lukasz Majewski
2013-03-11 12:55       ` Tom Rini
2013-03-13 15:05       ` Tom Rini
2013-03-13 15:25       ` Tom Rini
2013-03-13 19:57         ` Tom Rini
2013-03-14  8:22           ` Lukasz Majewski [this message]
2013-03-11 11:36     ` [U-Boot] Nand flash (supports ONFI) TigerLiu at viatech.com.cn
2013-03-11 11:56       ` Jagan Teki
2013-03-12  2:19         ` TigerLiu at viatech.com.cn
2013-03-08 17:37 ` [U-Boot] [PATCH v5 3/9] dfu: Change indentation of defines in <dfu.h> Tom Rini
2013-03-08 17:37 ` [U-Boot] [PATCH v5 4/9] nand: Extend nand_(read|write)_skip_bad with *actual and limit parameters Tom Rini
2013-03-09  1:00   ` Scott Wood
2013-03-08 17:37 ` [U-Boot] [PATCH v5 5/9] cmd_nand.c: Fix CONFIG_CMD_NAND_YAFFS Tom Rini
2013-03-08 17:37 ` [U-Boot] [PATCH v5 6/9] dfu: NAND specific routines for DFU operation Tom Rini
2013-03-09  1:08   ` Scott Wood
2013-03-13 20:04     ` Tom Rini
2013-03-08 17:37 ` [U-Boot] [PATCH v5 7/9] am335x_evm: Define CONFIG_SYS_CACHELINE_SIZE Tom Rini
2013-03-08 17:37 ` [U-Boot] [PATCH v5 8/9] am335x_evm: Add CONFIG_CMD_MTDPARTS and relevant defaults Tom Rini
2013-03-08 17:37 ` [U-Boot] [PATCH v5 9/9] am335x_evm: Enable DFU for NAND and MMC, provide example alt_infos Tom Rini

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=20130314092211.3dc38c30@amdc308.digital.local \
    --to=l.majewski@samsung.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.