From patchwork Thu Apr 28 17:30:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artem Bityutskiy X-Patchwork-Id: 93267 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E0835B6F7E for ; Fri, 29 Apr 2011 03:36:42 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by bombadil.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1QFV7L-0002sb-Ej; Thu, 28 Apr 2011 17:35:07 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1QFV7J-0001VV-NC; Thu, 28 Apr 2011 17:35:05 +0000 Received: from mail-ew0-f49.google.com ([209.85.215.49]) by canuck.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1QFV7F-0001V9-NL for linux-mtd@lists.infradead.org; Thu, 28 Apr 2011 17:35:03 +0000 Received: by ewy3 with SMTP id 3so1052895ewy.36 for ; Thu, 28 Apr 2011 10:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:reply-to:to:cc:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=J9PknjNlwNCcVckjkwpfbeAAFaPJE5bQFAF+6Wz7Gk8=; b=eYT1MaWXFrQyJH6QAyN5D8jf7Ux72LlSdKYbILhNVKfMuiintQPHl/74nAyIykD90C h4jQwv2f9BObcBARlNvo8aq5hICbeVyzh6/DxeQttN5Ok1RZMhMnUsWp/vtDQgRqKbux z/rp3wv6IJEsXZExqRZYdIh18g8GMX0K6BCNw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:reply-to:to:cc:in-reply-to:references:content-type :date:message-id:mime-version:x-mailer:content-transfer-encoding; b=r58QBNCDUlIjc38rzAJhVlPTXjQWxILbmGumA1zwfQ76Xl4LqgLdTgo/R1u2Sm4Wet 1kAWAjGz1tX3g7hOmBff8v6Fqw08QziALSJZw9g8gDeaWjzhIx7mZO0/Orf1EJwaari+ VyhJ/HWU5g7hUHIOB2L5stZw5AgT69NPSfr6w= Received: by 10.14.13.4 with SMTP id a4mr1707034eea.247.1304012099756; Thu, 28 Apr 2011 10:34:59 -0700 (PDT) Received: from ?IPv6:::1? (shutemov.name [188.40.19.243]) by mx.google.com with ESMTPS id k57sm1428700eei.24.2011.04.28.10.34.58 (version=SSLv3 cipher=OTHER); Thu, 28 Apr 2011 10:34:58 -0700 (PDT) Subject: Re: [RFC] mtd: nand: Fix bad block identification issue From: Artem Bityutskiy To: "Saxena, Parth" , Brian Norris In-Reply-To: <1303906161-24175-1-git-send-email-parth.saxena@ti.com> References: <1303906161-24175-1-git-send-email-parth.saxena@ti.com> Date: Thu, 28 Apr 2011 20:30:43 +0300 Message-ID: <1304011843.2737.3.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 (2.32.2-1.fc14) X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110428_133501_978329_D272C831 X-CRM114-Status: GOOD ( 15.95 ) X-Spam-Score: 1.4 (+) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (1.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.49 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is freemail (dedekind1[at]gmail.com) 2.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (dedekind1[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 RFC_ABUSE_POST Both abuse and postmaster missing on sender domain Cc: "Basheer, Mansoor Ahamed" , linux-omap@vger.kernel.org, linux-mtd@lists.infradead.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: dedekind1@gmail.com List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org On Wed, 2011-04-27 at 17:39 +0530, Saxena, Parth wrote: > This patch solves the above issue for omap by initialising > badblockbits. We are working further on this to find a generic fix > to the problem in nand_base.c. But it looks like the generic solution is to return the line which was accidentally removed, how about this patch From: Artem Bityutskiy Date: Thu, 28 Apr 2011 20:26:59 +0300 Subject: [PATCH] mtd: return badblockbits back In commit c7b28e25cb9beb943aead770ff14551b55fa8c79 the initialization of the backblockbits was accidentally removed. This patch returns it back, because otherwise some NAND drivers are broken. This problem was reported by "Saxena, Parth " here: http://lists.infradead.org/pipermail/linux-mtd/2011-April/035221.html Reported-by: Saxena, Parth Signed-off-by: Artem Bityutskiy Cc: stable@kernel.org [2.6.36+] Tested-By: Saxena, Parth Acked-by: Brian Norris --- drivers/mtd/nand/nand_base.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 15510f2..5a7f817 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -3106,6 +3106,8 @@ ident_done: chip->chip_shift += 32 - 1; } + chip->badblockbits = 8; + /* Set the bad block position */ if (mtd->writesize > 512 || (busw & NAND_BUSWIDTH_16)) chip->badblockpos = NAND_LARGE_BADBLOCK_POS;