From mboxrd@z Thu Jan 1 00:00:00 1970 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 EFB8DC0502A for ; Sat, 27 Aug 2022 14:48:01 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AB67580F60; Sat, 27 Aug 2022 16:47:59 +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="PND+Z+LW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 989108444D; Sat, 27 Aug 2022 16:47:57 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (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 AD02C80306 for ; Sat, 27 Aug 2022 16:47:54 +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 dfw.source.kernel.org (Postfix) with ESMTPS id EB1B460DBF; Sat, 27 Aug 2022 14:47:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32B5CC433C1; Sat, 27 Aug 2022 14:47:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661611672; bh=TItlqk5Frdy+yAwgQvbD8dNIwvZh7IDw/mF3M8hfUZI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PND+Z+LWuSFHz2DNhJ2Cudqjbc0YGNo3obQS69WO6W/g7aFY6NDrfCoRO09NN6EE6 tXgL8IlFXmPfjMF4xKNQUB4sqtArWPbyiDtC4liJZuJ4Y2EtDWpd9kW+mlEfIjpI/V BxV1VUXALz2aN3+znjjuSUV5tJJyDK5h1ouTQghCKxEfsbwFtve6Rtj34wqG5F04XM MARdNAe0Q2JaOlIieNUtUoohOwwnTsiprEkbNsISdjU3o6TcjZwbpZfiXiHp+u18JZ U8aL3XsEApvAD/SinNtocUw/EfuQNYd8W0r+9yfdxXxzk1FhVtF4Eo+3yGk1AxOsnk VaEW/vdNSRWIQ== Received: by pali.im (Postfix) id 6B8DFC7A; Sat, 27 Aug 2022 16:47:49 +0200 (CEST) Date: Sat, 27 Aug 2022 16:47:49 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Tom Rini Cc: Wolfgang Denk , Simon Glass , Heinrich Schuchardt , u-boot@lists.denx.de Subject: Re: [PATCH v2] xyz-modem: Allow to configure initial timeout for loadx and loady Message-ID: <20220827144749.4z346k6tv7cvqn2f@pali> References: <20210910204653.3066-1-pali@kernel.org> <20220827114835.22584-1-pali@kernel.org> <20220827125308.GI7942@bill-the-cat> <20220827125615.t4obqj43vb53raiy@pali> <20220827143005.GJ7942@bill-the-cat> <20220827143237.gxkn4zu4c5avuwpp@pali> <20220827144100.GK7942@bill-the-cat> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220827144100.GK7942@bill-the-cat> 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 Saturday 27 August 2022 10:41:00 Tom Rini wrote: > On Sat, Aug 27, 2022 at 04:32:37PM +0200, Pali Rohár wrote: > > On Saturday 27 August 2022 10:30:05 Tom Rini wrote: > > > On Sat, Aug 27, 2022 at 02:56:15PM +0200, Pali Rohár wrote: > > > > On Saturday 27 August 2022 08:53:08 Tom Rini wrote: > > > > > On Sat, Aug 27, 2022 at 01:48:35PM +0200, Pali Rohár wrote: > > > > > > > > > > > Now when loadx and loady commands could be aborted / cancelled by CTRL+C, > > > > > > allow to configure timeout for initial x/y-modem packet via env variable > > > > > > $loadxy_timeout and by default use value from new compile-time config > > > > > > option CONFIG_CMD_LOADXY_TIMEOUT. Value is in seconds and zero value means > > > > > > infinite timeout. Default value is 90s which is the measured value used > > > > > > before this change for loadx and loady commands. > > > > > > > > > > > > Other load commands loadb and loads already waits infinitely. Same behavior > > > > > > for loadx and loady commands can be achieved by setting $loadxy_timeout or > > > > > > CONFIG_CMD_LOADXY_TIMEOUT to 0. > > > > > > > > > > > > Signed-off-by: Pali Rohár > > > > > > --- > > > > > > Changes in v2: > > > > > > * Allow to set timeout via env instead of permanent infinite timeout > > > > > > > > > > This breaks platforms like "porter" where we have SPL_YMODEM support but > > > > > do not have environment support. > > > > > > > > By "breaks" do you mean compile error? Because if env is not set then > > > > CONFIG_CMD_LOADXY_TIMEOUT is used. Just I'm not sure if env_get() > > > > function returns NULL or what when there is no environment support. > > > > > > Yes, it fails to link. > > > > Then just #ifdef for env is needed. I will prepare v3. Which defconfig it is? > > It's the "porter" defconfig, sorry I thought it would be clearer. > There's probably others too in the case of SPL_YMODEM without SPL_ENV, > it was just the first one I guessed. Ou, I did not think that porter is defconfig. It sounds like code porting. Anyway I have already sent v3 and now I tested it with porter_defconfig that it compiles fine: https://patchwork.ozlabs.org/project/uboot/patch/20220827143755.21412-1-pali@kernel.org/