[U-Boot] [PATCH 1/2] musb-new, dfu: first send request answer then call completions

Marek Vasut marex at denx.de
Thu Apr 10 09:50:55 CEST 2014


On Thursday, April 10, 2014 at 07:08:05 AM, Heiko Schocher wrote:
> comment in ep0_txstate() states:
> 
> "report completions as soon as the fifo's loaded; there's no win
>  in waiting till this last packet gets acked".
> 
> This is wrong for using dfu. In the dfu usecase we must send
> a PollTimeout to the host, so the host can wait until the
> U-Boot Code is ready for answering new usb requests. So the
> answer which contains the PollTimeout must send *before*
> U-Boot calls req->complete.
> 
> The req->complete is used in the dfu case for flushing the
> medium, when entering DFU_STATE_dfuMANIFEST_SYNC state.
> 
> Signed-off-by: Heiko Schocher <hs at denx.de>
> Cc: Lukasz Majewski <l.majewski at samsung.com>
> Cc: Kyungmin Park <kyungmin.park at samsung.com>
> Cc: Marek Vasut <marex at denx.de>
> Cc: Pantelis Antoniou <panto at antoniou-consulting.com>

To me, this looks OK, yes. We need to "commit" the packet into the hardware 
before calling ->complete.

Acked-by: Marek Vasut <marex at denx.de>

Best regards,
Marek Vasut


More information about the U-Boot mailing list