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 4828EC0502A for ; Sat, 27 Aug 2022 12:56:28 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 32572841BC; Sat, 27 Aug 2022 14:56:26 +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="HZAjRNf2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8457084001; Sat, 27 Aug 2022 14:56:24 +0200 (CEST) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::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 E4B7F84220 for ; Sat, 27 Aug 2022 14:56:20 +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 7964CB8105F; Sat, 27 Aug 2022 12:56:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06C65C433D6; Sat, 27 Aug 2022 12:56:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661604979; bh=tD7iAWE8P6xaBAnVRSFs5NUWq+SmXuWn9l3o32cRqw4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HZAjRNf25iL+VDTRSp26o9rnusLp1XlGizyFYx86XJB/Fl2r/TM6qDWRXdn4ohrWL GQk0vKmtb8oYy8BS+xq8SvHhB7DoDnWSpOHkXTCpMzQvmKxhM2Fxqnj8FZaB0KtK2h 25ckinPqnRBmNkM9PRJVdBGOdcnPIKVhZKHdqpVYRnsC01bOysVRFwSu7+Za8iSt2G 431HlWQ8kFtAuVcY9MFcttT/6w4jTQkqrhVN0Zp6aojhtblGuBidvpjw8Hai9OPe+T XFUNK2XCYHrUn0zIwwKrkuDouqrMopZ5xvrN1dzD4T8eJk+a6PH7scpX7ykoChOVBv A1GnJCdLvShEQ== Received: by pali.im (Postfix) id EC156C7A; Sat, 27 Aug 2022 14:56:15 +0200 (CEST) Date: Sat, 27 Aug 2022 14:56:15 +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: <20220827125615.t4obqj43vb53raiy@pali> References: <20210910204653.3066-1-pali@kernel.org> <20220827114835.22584-1-pali@kernel.org> <20220827125308.GI7942@bill-the-cat> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220827125308.GI7942@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 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.