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 71141C25B06 for ; Thu, 4 Aug 2022 20:53:19 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F36EB84898; Thu, 4 Aug 2022 22:52:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="QgoKaRS6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 120188489F; Thu, 4 Aug 2022 22:52:34 +0200 (CEST) Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B77E584895 for ; Thu, 4 Aug 2022 22:52:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x72d.google.com with SMTP id t28so546644qkm.5 for ; Thu, 04 Aug 2022 13:52:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc; bh=VpdOIS9zmgR9ka/mN0cacp7CpQ2GjhkWxM5erXEcywc=; b=QgoKaRS6w0QNvH+KZNkEiu1Qu9hvw8/fqW3q8BM0JCOEyumw9W3Jt2kBpkuQwdF3lg 6FTiJI9T3rm4jr+CsII+BubGKlH5Y6C8th9oEWcR2pU3nO7FOZ/iAK3yYZLJcwWHbkn/ brydhr5MPQLnRIfvQEGh8/y3mSFe9+mU9djIg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=VpdOIS9zmgR9ka/mN0cacp7CpQ2GjhkWxM5erXEcywc=; b=kFV7l5gi7nzT18AaND7dZzAr87hcjXZ0IPMW/mTiACATYvDV8+07+RgfiT/rjBYvS8 KReRZFbk+dzTHCm/cHHN5Geqci/vJGvFFcvPVtxQTjZLNSOCJ6re8dHlTB0Gc5gZgZbU fNHLogVrlNy/vZVc7QORoclJ0GlBN/xnd69Fm2MtjjSFRDtxP2vzv7YxL6Y8s16SvkZQ UXgL+zd6UsnUR+EGNw4QqefSzpEk9H3AeJipkaoQ5SpLK22HF7oqcEVJHQWuuiwkjmko 0rP4AVPN6tWwx07CXEjL7hZB4LLSJTiEhLufZwy3DYOxwYNrRRdOzz1PSU5GvT0lWIhw 9vCA== X-Gm-Message-State: ACgBeo3rioblSuEgASL2wxAaRgLLWOg38yzgUYnKe0bWtlwxRajPT+c/ aiGOmuF79lymRyt6UYZSH9MC1Q== X-Google-Smtp-Source: AA6agR4tHwBiGdt72VBSvQxGOCSOo11LvzYfiIgqzjWpWRGwujGyVMpEK4cK0yRQoe8131iYEISHrA== X-Received: by 2002:a05:620a:4542:b0:6b3:7c51:6177 with SMTP id u2-20020a05620a454200b006b37c516177mr2872768qkp.306.1659646350251; Thu, 04 Aug 2022 13:52:30 -0700 (PDT) Received: from bill-the-cat (cpe-65-184-195-139.ec.res.rr.com. [65.184.195.139]) by smtp.gmail.com with ESMTPSA id 202-20020a3706d3000000b006b8c575ce27sm1316014qkg.109.2022.08.04.13.52.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Aug 2022 13:52:29 -0700 (PDT) Date: Thu, 4 Aug 2022 16:52:27 -0400 From: Tom Rini To: Harald Seiler Cc: Peng Fan , Jaehoon Chung , Quentin Schulz , Marek Vasut , Pali =?iso-8859-1?Q?Roh=E1r?= , Andreas Dannenberg , u-boot@lists.denx.de Subject: Re: [PATCH v2] spl: mmc: Use correct MMC device when loading image Message-ID: <20220804205227.GJ1146598@bill-the-cat> References: <20220711123532.219426-1-hws@denx.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="VlqhI3I8j8oVK4nG" Content-Disposition: inline In-Reply-To: <20220711123532.219426-1-hws@denx.de> X-Clacks-Overhead: GNU Terry Pratchett 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 --VlqhI3I8j8oVK4nG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 11, 2022 at 02:35:32PM +0200, Harald Seiler wrote: > When attempting to load images from multiple MMC devices in sequence, > spl_mmc_load() chooses the wrong device from the second attempt onwards. >=20 > The reason is that MMC initialization is only done on its first call and > spl_mmc_load() will then continue using this same device for all future > calls. >=20 > Fix this by checking the devnum of the "cached" device struct against > the one which is requested. If they match, use the cached one but if > they do not match, initialize the new device. >=20 > This fixes specifying multiple MMC devices in the SPL's boot order to > fall back when U-Boot Proper is corrupted or missing on the first > attempted MMC device. >=20 > Fixes: e1eb6ada4e38 ("spl: Make image loader infrastructure more universa= l") > Signed-off-by: Harald Seiler Applied to u-boot/master, thanks! --=20 Tom --VlqhI3I8j8oVK4nG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmLsMYsACgkQFHw5/5Y0 tyxLZAv/QAEmReDDY0IvmAxiHLP3T47sJ3NFt5Rz5bxUgm5ArngRVmYf4lJzwtMT vBlA6uM2P2Q82OWjsWYYQbUVzCvVtMq5BCCKL2XPCDrClOJLvyeYfVeK8TN3VxYp NXDc9naUek10aV7it/iqd457tIvmCMN76glDUl1fH1W20a8Nd2mmrYkArwn1NMIi xfGF6Tzhg2skuepmVPmdf7s11/b7ijU3cjy60Iztu3JHO5j4RxWezcGRrilvgO/p 7nDWW0P2CvyrBJNE+mGqQAG0UscUe2iiZiWo4uhKx7lZ6znAC7EpjFjdr3acqjYw ujv+RTkfLT+x1oHTH4pctVB3cMBLhqUKCEaxhhqJ4zrB4y9hrar7bbRwxPaQvXSX maQlxSkxTwCPZ4ucHdRW2/UrLr5PalzhytNgRpvbh0kECTYfrNDX/oxcHWP27diV vE8Yo/wRUmidF9d7YfviiICaMXvIqRCgjA1wy5tvdcTfR11Bq9dV7rz9SaVbM7H/ XRIkbXCT =UflD -----END PGP SIGNATURE----- --VlqhI3I8j8oVK4nG--