public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH 2/2] usb: dfu: correct dfu buffer inited value
Date: Wed, 6 Nov 2013 14:51:22 +0100	[thread overview]
Message-ID: <201311061451.22576.marex@denx.de> (raw)
In-Reply-To: <20131106095407.022e683c@amdc308.digital.local>

Dear Lukasz Majewski,

> Hi Bo,
> 
> First of all, sorry for a little delay.
> 
> > Hi Lukasz,
> > 
> > On 11/4/2013 18:17, Lukasz Majewski wrote:
> > > Hi Bo,
> > > 
> > >> After dfu buffer is initialized, the buffer should be all
> > >> available, while not 0. Initialize its value to min(dfu_buf_size,
> > >> dfu->r_left).
> > >> 
> > >> Signed-off-by: Bo Shen <voice.shen@atmel.com>
> > >> 
> > >> ---
> > >> 
> > >>   drivers/dfu/dfu.c |    2 +-
> > >>   1 file changed, 1 insertion(+), 1 deletion(-)
> > >> 
> > >> diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c
> > >> index 65c6984..b8c8aa4 100644
> > >> --- a/drivers/dfu/dfu.c
> > >> +++ b/drivers/dfu/dfu.c
> > >> @@ -288,7 +288,7 @@ int dfu_read(struct dfu_entity *dfu, void *buf,
> > >> int size, int blk_seq_num) dfu->offset = 0;
> > >> 
> > >>   		dfu->i_buf_end = dfu_get_buf() + dfu_buf_size;
> > >>   		dfu->i_buf = dfu->i_buf_start;
> > >> 
> > >> -		dfu->b_left = 0;
> > >> +		dfu->b_left = min(dfu_buf_size, dfu->r_left);
> > > 
> > > I've testd in on Trats. It causes dfu read to be performed two
> > > times.
> > 
> > Have you apply these two patches together:
> > [RFC PATCH 1/2] usb: dfu: decrease dfu->r_left along with the transfer
> > [RFC PATCH 2/2] usb: dfu: correct dfu buffer inited value
> 
> I did a "little" mistake when applying those patches. When both patches
> are applied dfu works fine.
> 
> I've tested it on Trats (Exynos4210).
> 
> For:
> [RFC PATCH 1/2] usb: dfu: decrease dfu->r_left along with the transfer
> [RFC PATCH 2/2] usb: dfu: correct dfu buffer inited value
> 
> Tested-by: Lukasz Majewski <l.majewski@samsung.com>
> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
> 
> @ Marek,
> 
> Since I'm still struggling with internal firewall - Marek could you
> apply those two patches to u-boot-usb tree?
> 
> Also please apply Heiko's patch:
> 
> [PATCH v3 3/5] usb, g_dnl: make iSerialNumber board configurable
> 
> Thanks in advance.

Roger that, all done, thanks!

Best regards,
Marek Vasut

  reply	other threads:[~2013-11-06 13:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-16  9:26 [U-Boot] [RFC PATCH 1/2] usb: dfu: decrease dfu->r_left along with the transfer Bo Shen
2013-10-16  9:26 ` [U-Boot] [RFC PATCH 2/2] usb: dfu: correct dfu buffer inited value Bo Shen
2013-11-04 10:17   ` Lukasz Majewski
2013-11-05  9:48     ` Bo Shen
2013-11-06  8:54       ` Lukasz Majewski
2013-11-06 13:51         ` Marek Vasut [this message]
2013-10-19  0:44 ` [U-Boot] [RFC PATCH 1/2] usb: dfu: decrease dfu->r_left along with the transfer Marek Vasut
2013-10-21 22:24   ` Lukasz Majewski
2013-10-22  2:42     ` Marek Vasut
2013-11-01  1:18       ` Bo Shen

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=201311061451.22576.marex@denx.de \
    --to=marex@denx.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox