Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7D76EECAAD2 for ; Sat, 27 Aug 2022 11:50:58 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1EC9384133; Sat, 27 Aug 2022 13:50:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="Tl8vgI8n"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4EAEE848F6; Sat, 27 Aug 2022 13:50:55 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0D5848412C for ; Sat, 27 Aug 2022 13:50:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 87AC2B80EDB; Sat, 27 Aug 2022 11:50:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0AF95C433C1; Sat, 27 Aug 2022 11:50:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661601051; bh=P34cmVEAosdMHLIJIYYtWFc7M1HK4Z3mN7yR2H8lVGM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Tl8vgI8np7496P15iuLusr5RGWH0xe+uWZtzyobKkJw595DFwpQLcTtBvH8kobmxb HDFOYs8OTbQdq/Wcmix2Hq4aCUJYe4IeblYzaUrQ65eC8WmEM6Xa01SGPGuFG0EUU8 glTUBHPSdSFz5VbFun2AzXpPnu5XdyDcBFHLW6Zoii0+ls1jBiiEtd8R7WyA/V7QFz 1TYHaRBReqK1yq0yA/eFe8IpSK+3ppdbnhe36/qUF1+p8KC2yyifBUzWuBBALoqfo+ 7qu7yoBRtHIPCgoqE5Ir4HJaiVsdAa8zWh4BH1fY9JnRd90v6MC46XRzbID0Oow7t9 BbPOuB6ooi9/w== Received: by pali.im (Postfix) id 72613C7A; Sat, 27 Aug 2022 13:50:48 +0200 (CEST) Date: Sat, 27 Aug 2022 13:50:48 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Wolfgang Denk Cc: Simon Glass , Heinrich Schuchardt , u-boot@lists.denx.de Subject: Re: [PATCH 1/2] xyz-modem: Wait infinitely for initial y-modem packet Message-ID: <20220827115048.hmqc43he5a2csqca@pali> References: <20210910204653.3066-1-pali@kernel.org> <1325940.1631529762@gemini.denx.de> <20210913110806.27hc36n6gmhw6uq4@pali> <1332387.1631535174@gemini.denx.de> <20210913122245.my6ik4yjy7rwlh65@pali> <1338201.1631538170@gemini.denx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1338201.1631538170@gemini.denx.de> User-Agent: NeoMutt/20180716 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On Monday 13 September 2021 15:02:50 Wolfgang Denk wrote: > Dear Pali Rohár, > > In message <20210913122245.my6ik4yjy7rwlh65@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.