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 133E7C433EF for ; Fri, 17 Jun 2022 20:31:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5471D84407; Fri, 17 Jun 2022 22:31:21 +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="QcK912ue"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C50598440C; Fri, 17 Jun 2022 22:31:19 +0200 (CEST) Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) (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 79BF584383 for ; Fri, 17 Jun 2022 22:31:17 +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-x734.google.com with SMTP id d23so3972284qke.0 for ; Fri, 17 Jun 2022 13:31:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=1wjMM9ucUcGmpPNvbCGam4iUERF52FaKCkdKwKikzds=; b=QcK912ueu2XAo/6yjy87RzfKKkwzbdjWVLPltk52+3eyme9hOhvOlWfsCsmTiL8Ex3 CfJCJmZmKizj/F5s7eKCotem3ox0GOFiRWuPvnW6MjyEGHFIhoISigzw+BkTcIRtXKOT 0+WPXGoybaiVH0QTf9/SjlufLUxGuyys2PGKQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=1wjMM9ucUcGmpPNvbCGam4iUERF52FaKCkdKwKikzds=; b=Ji3bNIJe5oZnAG0rFDM0DrpR4APEUg5SHcQnA2uIdeZDFLtIJ18V2M836zf6ZLqlsB xY1JvfnaTt89tZdQGPhSNsZNeVz+nJNXhOZNFeAkFOFs74TyKSkDg2VwORLIpaLimfTR gQNRISpW2czJLafosuKzeesOFlnc/jYs+jIX32YfoSZk16OLsqA5OMQ1UO7hxINPNUSY 371qgpGYZZgb3pKQ2fzbEvonjN7cM8AJrG+gi89fCrz8VohxhW3Z9lSGCLSjeFXmZPkX h+pJw5F0q14h8XAczWS34BN1F5oPKekW/n3mD0lRVJi+QV800qPtsn/WPcNVQcQvPfWR q67w== X-Gm-Message-State: AJIora+kTJXZ4hBY0MDfIDZNLNTzpoic4n70163FMVOZIOZCH+t98VpH EmR4SyXQwY67mXQzqL3rDJGpWA== X-Google-Smtp-Source: AGRyM1tKMpOJMd6ZAQ39xUiwxSYHo4GtKNrk28J6zCbKFCRLrmW+ZOSlU1Ch1b2fatjWZKSNKtSDdA== X-Received: by 2002:a05:620a:2b89:b0:6ab:94b2:df23 with SMTP id dz9-20020a05620a2b8900b006ab94b2df23mr2658804qkb.70.1655497876115; Fri, 17 Jun 2022 13:31:16 -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 j5-20020a05620a000500b006a74458410csm5475234qki.123.2022.06.17.13.31.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jun 2022 13:31:15 -0700 (PDT) Date: Fri, 17 Jun 2022 16:31:13 -0400 From: Tom Rini To: Nishanth Menon Cc: Robert Nelson , gadiyar@ti.com, Praneeth Bajjuri , Jason Kridner , u-boot@lists.denx.de Subject: Re: [PATCH 1/3] board: ti: common: Optimize boot when detecting consecutive bad records Message-ID: <20220617203113.GC2484912@bill-the-cat> References: <20220617182612.12575-1-nm@ti.com> <20220617182612.12575-2-nm@ti.com> <20220617185022.GB2484912@bill-the-cat> <20220617191957.64ipzqk3mqqud5nm@parmesan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="CMLD6V24WUS0oql+" Content-Disposition: inline In-Reply-To: <20220617191957.64ipzqk3mqqud5nm@parmesan> 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.5 at phobos.denx.de X-Virus-Status: Clean --CMLD6V24WUS0oql+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 17, 2022 at 02:19:57PM -0500, Nishanth Menon wrote: > On 14:50-20220617, Tom Rini wrote: > > On Fri, Jun 17, 2022 at 01:26:10PM -0500, Nishanth Menon wrote: > >=20 > > > The eeprom data area is much bigger than the data we intend to store, > > > however, with bad programming, we might end up reading bad records ov= er > > > and over till we run out of eeprom space. instead just exit when 10 > > > consecutive records are read. > > >=20 > > > Signed-off-by: Nishanth Menon > >=20 > > Why not just stop at the first bad record? Otherwise 10 seems like a >=20 > Because it could be just a couple of bad ones where the header.len > does'nt match up with record data. Some folks use a spreadsheet to > generate the records, some manually and some script it up - so, > attempting to get the best possible success chance while warning > invalid data to get people to fix things made sense. >=20 > > fine, small, arbitrary number. If it's not arbitrary but number of > > total records, do we already enum the total number of records or > > something where we could say that we tried to read all possible records, > > everyone was bad, stop? >=20 > It is arbitrary small value - for all practical purposes, we have 6 > types of records atm in u-boot, even looking ahead, we have'nt had > more than that I know of (I think display, camera and few other misc > types got added). The structure however, is by design flexible > with the END_LIST marker denoting the last record - and depending on > the eeprom size, you could theoretically have a large variation. >=20 > Considering this is attempting to recover from bad programming, the > chances are better when attempting a few more entries, but I dont > think going aggressive with a single record or conservative (as it is > right now) in scanning the entire eeprom is necessary. That leaves us > with some sort of practical number. OK, thanks for explaining. Reviewed-by: Tom Rini --=20 Tom --CMLD6V24WUS0oql+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmKs5IcACgkQFHw5/5Y0 tyyNqgv/Qm26lD1ijE6Duk7m3jHje0VFANk9aNcIl4c4H38iqI/6/aB6Vxq/IOop 7u5H0xkiC1xRqFASzlJ9ynNaeqmIRDu+tG0wFJlx0FuASJ04nyEzI8kPuvXKBmAv LS4ZGyWdogYZ9n6HVZs5t+x3LL9vdOQevldF7FLDoFEDFB/lCMLDWjY5s1ajulYH P6Fh9qtbfa1UFCCXSdz0NqMOPgON8SVnWqc1om9sWTXI9LdxIwvF7TwJgtEQiJqp APFYIe8dLaqk4nPXOD7GRZc3Bjs3S3UWj7t8a8jflKQ+4A9aKtjjGS0ixl56VraP p0qRYa0tOkIkNnE8nl0rBaDxFW4LtN9s5oKPBosR8dSwHga9g6SB6Mue7M9CU+R+ iAzCvhn3f/tu3Hjh91bjtwlAX/cm6vW1JA38XiXH5rozgsUDSFabcT+z3WRikDiy rTyEO2J0eDgylkRLyQK5seSMlxpU8U9BMoGd5/AR2Lyyl5mTSEUg3baBTvNOtvrc nTotn66c =DtXL -----END PGP SIGNATURE----- --CMLD6V24WUS0oql+--