From patchwork Fri Nov 19 14:45:47 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 72254 X-Patchwork-Delegate: scottwood@freescale.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 55A12B7125 for ; Sat, 20 Nov 2010 01:46:02 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8CEA32835C; Fri, 19 Nov 2010 15:46:00 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b69ltMqaHxGD; Fri, 19 Nov 2010 15:46:00 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 23FEA28326; Fri, 19 Nov 2010 15:45:58 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1BE2128326 for ; Fri, 19 Nov 2010 15:45:56 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XTxFmmj2XcDu for ; Fri, 19 Nov 2010 15:45:54 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by theia.denx.de (Postfix) with ESMTP id 089702831B for ; Fri, 19 Nov 2010 15:45:52 +0100 (CET) Received: by fxm3 with SMTP id 3so2758777fxm.3 for ; Fri, 19 Nov 2010 06:45:52 -0800 (PST) Received: by 10.223.72.195 with SMTP id n3mr960823faj.132.1290177952064; Fri, 19 Nov 2010 06:45:52 -0800 (PST) Received: from [192.168.0.210] (static-74-41-60-154.dsl1.pco.ca.frontiernet.net [74.41.60.154]) by mx.google.com with ESMTPS id y13sm524792fah.26.2010.11.19.06.45.49 (version=SSLv3 cipher=RC4-MD5); Fri, 19 Nov 2010 06:45:50 -0800 (PST) From: Steve Sakoman To: "u-boot@lists.denx.de" Date: Fri, 19 Nov 2010 06:45:47 -0800 Message-ID: <1290177947.2927.1631.camel@quadra> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Cc: Scott Wood Subject: [U-Boot] [PATCH] env_nand: Use nand_read_skip_bad instead of nand_read X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Otherwise environment read will fail if correctable errors occur Signed-off-by: Steve Sakoman diff --git a/common/env_nand.c b/common/env_nand.c index 4e8307a..7f6c917 100644 --- a/common/env_nand.c +++ b/common/env_nand.c @@ -297,7 +297,7 @@ int readenv(size_t offset, u_char * buf) offset += blocksize; } else { char_ptr = &buf[amount_loaded]; - if (nand_read(&nand_info[0], offset, &len, char_ptr)) + if (nand_read_skip_bad(&nand_info[0], offset, &len, char_ptr)) return 1; offset += blocksize; amount_loaded += len;