[PATCH 1/2] xyz-modem: Wait infinitely for initial y-modem packet

Pali Rohár pali at kernel.org
Sat Aug 27 13:50:48 CEST 2022


On Monday 13 September 2021 15:02:50 Wolfgang Denk wrote:
> Dear Pali Rohár,
> 
> In message <20210913122245.my6ik4yjy7rwlh65 at pali> you wrote:
> >
> > Timeout is not too slow, but sometimes user is (when is interrupted by
> > other things during selecting file). And then it is not obvious why
> > sx/sb command is failing... compared to transfer via gkermit which do
> > not have this "problem".
> 
> I see.
> 
> > > > So... I do not know what is better if current behavior or this new which
> > > > changes UI interaction.
> > > 
> > > We can do both, and still solve your problem: make the timeout
> > > adjustable so you can set it to something you can conveniently work
> > > with.
> >
> > Good point! env with timeout (or easier would be retry count?) seems
> > like a ideal solution how to "define" behavior without changing default
> > one. And e.g. negative value can mean infinite to support all possible
> > combinations.
> 
> I would recommend to define a timeout (in seconds), this is easier
> to understand for the end user - without looking at the source code
> they cannot know how a retry count translates into a time interval.
> And yes, setting the timeout to 0 could mean it waits forever.

This behavior is now implemented in v2. Current default timeout
(measured 90s) stay same for compatibility reasons.


More information about the U-Boot mailing list