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 11E2DC433F5 for ; Thu, 21 Apr 2022 10:34:42 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 06FA0830AF; Thu, 21 Apr 2022 12:34:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1650537280; bh=ssKq2CYXspP5+NCCa5CAdC6xfG640e8lRRtJs6a+BjQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=AjgSbi6Of9hHgkOnx9eBllK1o+SZf5g6BZXLZpwe38trYahv/sEM7W8EgyXQjLxFF dlhRqpMpEmVCvFeFVy/8DXebIa9OVntW0h/4q/3juuh7YQPChWDrsra3ANPpKQi1i7 zsRQU7YOgKJU6dqvaA2gEKseeMn2qoAMFUYUTT8PZmIH8TiE44agA3ivxXmPlBFdMI dUlfcBS0a6X45KGZkN5ksnWDARMTjqQlN9botqwrlD0ZqJN9X8UJPBDCLvltdsO/ZF 2yTZy+IcRoyP76OIN7uI7YgfHO1kTLykAT+crxmvim9wusi/c3YclmK5ZDO8LFZChg vKdNEmBTw1ZZg== Received: by phobos.denx.de (Postfix, from userid 109) id 7FFE58394D; Thu, 21 Apr 2022 12:34:38 +0200 (CEST) Received: from mout-u-204.mailbox.org (mout-u-204.mailbox.org [IPv6:2001:67c:2050:101:465::204]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0215381DB4 for ; Thu, 21 Apr 2022 12:34:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4KkYnR3DMGz9sQk; Thu, 21 Apr 2022 12:34:35 +0200 (CEST) Message-ID: <42545d56-8521-431b-935a-db75a5aa74e9@denx.de> Date: Thu, 21 Apr 2022 12:34:30 +0200 MIME-Version: 1.0 Subject: Re: [PATCH 2/2] Add SCSI scan for ENV in EXT4 or FAT Content-Language: en-US To: =?UTF-8?Q?Pali_Roh=c3=a1r?= , Rogier Stam , Simon Glass Cc: u-boot@lists.denx.de References: <1644362821-9002-1-git-send-email-rogier@unrailed.org> <1644362821-9002-3-git-send-email-rogier@unrailed.org> <20220228071349.5okyycl2czujh2z4@pali> From: Stefan Roese In-Reply-To: <20220228071349.5okyycl2czujh2z4@pali> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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.5 at phobos.denx.de X-Virus-Status: Clean Hi Rogier, On 2/28/22 08:13, Pali Rohár wrote: > + Simon, could you review this change? It would be nice to have this fix in upcoming U-Boot release. > > On Wednesday 09 February 2022 00:27:01 Rogier Stam wrote: >> When having environment stored in EXT4 or FAT >> and using an AHCI or SCSI device / partition >> the scan would not be performed early enough >> and hence the device would not be recognized. >> This change adds the scan when the interface >> is "scsi" in a similar way to mmc_initialize. >> >> Signed-off-by: Rogier Stam > > Reviewed-by: Pali Rohár While running some CI tests, this error occurs with this patch: $ make dra7xx_hs_evm_usb_defconfig ... $ make -s -j20 ... /opt/kernel.org/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ld.bfd: env/fat.o: in function `env_fat_load': /home/stefan/git/u-boot/u-boot-marvell/env/fat.c:134: undefined reference to `scsi_scan' make[1]: *** [scripts/Makefile.spl:512: spl/u-boot-spl] Error 1 make: *** [Makefile:2101: spl/u-boot-spl] Error 2 Could you please take a look? And send a fixed version which also passed a "world build" for all supported targets? Thanks, Stefan >> --- >> env/ext4.c | 5 +++++ >> env/fat.c | 5 +++++ >> 2 files changed, 10 insertions(+) >> >> diff --git a/env/ext4.c b/env/ext4.c >> index 9f65afb..47e05a4 100644 >> --- a/env/ext4.c >> +++ b/env/ext4.c >> @@ -31,6 +31,7 @@ >> #include >> #include >> #include >> +#include >> #include >> >> DECLARE_GLOBAL_DATA_PTR; >> @@ -146,6 +147,10 @@ static int env_ext4_load(void) >> if (!strcmp(ifname, "mmc")) >> mmc_initialize(NULL); >> #endif >> +#if defined(CONFIG_AHCI) || defined(CONFIG_SCSI) >> + if (!strcmp(ifname, "scsi")) >> + scsi_scan(true); >> +#endif >> >> part = blk_get_device_part_str(ifname, dev_and_part, >> &dev_desc, &info, 1); >> diff --git a/env/fat.c b/env/fat.c >> index fdccd6c..dbd6a13 100644 >> --- a/env/fat.c >> +++ b/env/fat.c >> @@ -17,6 +17,7 @@ >> #include >> #include >> #include >> +#include >> #include >> #include >> #include >> @@ -122,6 +123,10 @@ static int env_fat_load(void) >> if (!strcmp(CONFIG_ENV_FAT_INTERFACE, "mmc")) >> mmc_initialize(NULL); >> #endif >> +#if defined(CONFIG_AHCI) || defined(CONFIG_SCSI) >> + if (!strcmp(CONFIG_ENV_FAT_INTERFACE, "scsi")) >> + scsi_scan(true); >> +#endif >> >> part = blk_get_device_part_str(CONFIG_ENV_FAT_INTERFACE, >> env_fat_device_and_part(), >> -- >> 2.7.4 >> Viele Grüße, Stefan Roese -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de