From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/3] usb, dfu: extract flush code into seperate function
Date: Tue, 18 Mar 2014 13:35:47 +0100 [thread overview]
Message-ID: <20140318133547.22d0d4bb@amdc2363> (raw)
In-Reply-To: <201403181233.56611.marex@denx.de>
Hi Marek,
> On Tuesday, March 18, 2014 at 07:51:05 AM, Lukasz Majewski wrote:
> > Hi Marek,
> >
> > > On Monday, March 17, 2014 at 11:56:16 AM, Heiko Schocher wrote:
> > > > move the flushing code into an extra function dfu_flush(),
> > > > so it can be used from other code.
> > > >
> > > > Signed-off-by: Heiko Schocher <hs@denx.de>
> > > > Cc: Lukasz Majewski <l.majewski@samsung.com>
> > > > Cc: Kyungmin Park <kyungmin.park@samsung.com>
> > > > Cc: Marek Vasut <marex@denx.de>
> > > > Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
> > >
> > > [...]
> > >
> > > > @@ -199,23 +221,7 @@ int dfu_write(struct dfu_entity *dfu, void
> > > > *buf, int size, int blk_seq_num)
> > > >
> > > > /* end? */
> > > > if (size == 0) {
> > > >
> > > > - /* Now try and flush to the medium if needed.
> > > > */
> > > > - if (dfu->flush_medium)
> > > > - ret = dfu->flush_medium(dfu);
> > > > - printf("\nDFU complete CRC32: 0x%08x\n",
> > > > dfu->crc); -
> > > > - /* clear everything */
> > > > - dfu_free_buf();
> > > > - dfu->crc = 0;
> > > > - dfu->offset = 0;
> > > > - dfu->i_blk_seq_num = 0;
> > > > - dfu->i_buf_start = dfu_buf;
> > > > - dfu->i_buf_end = dfu_buf;
> > > > - dfu->i_buf = dfu->i_buf_start;
> > > > -
> > > > - dfu->inited = 0;
> > > > -
> > > > - }
> > > > + ret = dfu_flush(dfu, buf, size, blk_seq_num);
> > >
> > > This seems broken, at least because you didn't close the opened
> > > brace (see 'if (size == 0) {' .... I can fix this up when
> > > applying.
> >
> > I was prepared to pull those patches to u-boot-dfu repo today and
> > test them :-).
> >
> > Afterwards, I would send PR to Tom.
> >
> > Are you OK with this?
>
> Doesn't -dfu go through -usb ? ;-)
As fair as I remember the dfu code from ./drivers/dfu/* shall go via
u-boot-dfu tree directly to Tom.
> Or do you want to send to Tom
> directly ? Either way WFM.
After writing the other message you waited for a response less than one
minute :-).
> Nonetheless, I picked the patches via
> -usb, they're in master now.
I've just tested them and they doesn't cause any regression.
Would you be so kind and apply one more patch, which was supposed to
go with u-boot-dfu PR (this patch waits for submission from 21.02.2014)?
http://patchwork.ozlabs.org/patch/322450/
It is solely drivers/dfu/dfu_mmc.c related.
And I don't want to send PR to Tom with only one patch included.
>
> > > Do you want this in 2014.04 or in -next ?
> >
> > After testing I would go for 2014.04, if Tom doesn't mind. All in
> > all it "fixes" the DFU state machine - by adding missing states. Up
> > till now we had short cut in the DFU state machine.
>
> OK
>
> Best regards,
> Marek Vasut
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
next prev parent reply other threads:[~2014-03-18 12:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-17 10:56 [U-Boot] [PATCH v2 0/3] usb: dfu: introduce dfuMANIFEST state Heiko Schocher
2014-03-17 10:56 ` [U-Boot] [PATCH v2 1/3] usb, dfu: extract flush code into seperate function Heiko Schocher
2014-03-18 0:21 ` Marek Vasut
2014-03-18 6:02 ` Heiko Schocher
2014-03-18 6:55 ` Lukasz Majewski
2014-03-18 11:32 ` Marek Vasut
2014-03-18 11:31 ` Marek Vasut
2014-03-18 6:51 ` Lukasz Majewski
2014-03-18 11:33 ` Marek Vasut
2014-03-18 12:35 ` Lukasz Majewski [this message]
2014-03-18 15:23 ` Marek Vasut
2014-03-18 15:53 ` Lukasz Majewski
2014-03-18 18:21 ` Marek Vasut
2014-03-17 10:56 ` [U-Boot] [PATCH v2 2/3] usb: dfu: introduce dfuMANIFEST state Heiko Schocher
2014-03-17 10:56 ` [U-Boot] [PATCH v2 3/3] am335x, dfu: add DFU_MANIFEST_POLL_TIMEOUT to the siemens boards Heiko Schocher
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=20140318133547.22d0d4bb@amdc2363 \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox