
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@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
To me, this looks OK, yes. We need to "commit" the packet into the hardware before calling ->complete.
Acked-by: Marek Vasut marex@denx.de
Best regards, Marek Vasut