On Wed, Jun 17, 2020 at 08:24:48PM +0200, Daniel Glöckner wrote:
> Hello Sascha,
>
> Am 17.06.20 um 10:11 schrieb Sascha Hauer:
> > In fastboot UDP we can't send two messages without waiting for an ack
> > from the host in between. Do not send two messages directly after each
> > other in fastboot_download_finished() to make it safe to be called from
> > the fastboot UDD code.
>
> UDD -> UDP?
Yes.
>
> I see no reason for this patch. When this function is called, we have just
> managed to transfer a file where every data packet was sent only after the
> host has received our ack for the previous packet. And now you fear that the
> host won't ack our next packet?
The host indeed acks our next packet. The problem is that we are in
poller context and can't wait for the ack. See fastboot_write_net():
/*
* This function is either called in command context, in which
* case we may wait, or from the keepalive poller which explicitly
* only calls us when we don't have to wait here.
*/
ret = fastboot_net_wait_may_send(fbn);
if (ret)
return ret;
It actively waits for the ack, but we will never receive it because we
don't run a second poller in the background.
Another option would be to put calling of fastboot_download_finished()
into a workqueue, or just open code it as your original series did.
Regards,
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox