From patchwork Thu May 12 07:16:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nitin Garg X-Patchwork-Id: 95266 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 0D528B6FB8 for ; Thu, 12 May 2011 17:17:21 +1000 (EST) Received: from canuck.infradead.org ([134.117.69.58]) by bombadil.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1QKQ85-0001bp-B4; Thu, 12 May 2011 07:16:13 +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 1QKQ84-00088d-JS; Thu, 12 May 2011 07:16:12 +0000 Received: from mail-gw0-f49.google.com ([74.125.83.49]) by canuck.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1QKQ81-00088K-3I for linux-mtd@lists.infradead.org; Thu, 12 May 2011 07:16:09 +0000 Received: by gwb1 with SMTP id 1so505866gwb.36 for ; Thu, 12 May 2011 00:16:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=99oyhuwHarmDxedKIS3NiZD39/HWhO4me6pbb2Plg6k=; b=fMDeoM5z2panLrpOP5p6UDk/qB8WJWjuhfs8CE1GpxFufzCNTcxEN7DpfQMOsHAQNk 23DkAcS6g/L2Lw5oaP49A4jUgqVjR9x/8tILrnG528jOma2A1yRv1Toq2SpJfPyyXkto x3wVYz1o9vp9GXgI4n2GDbokqSGFLgQIuW8Ik= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=G9U8ADX9ezmVnL/BPSIwCpxXMdhRx6lYsjQs5I6I6pMkV8ggSl6NnZU4kNrVNivjZO 1R3NWI079gDHccNTPIhDN0jFFg1EA5GlKYLRbIM90RgYOVWWkbmEXoQ81ksCTa6+sj6Q D5PeZ5AR37eZc4gurH6VeO8dCCFDFQ2n2l7X4= MIME-Version: 1.0 Received: by 10.101.83.5 with SMTP id k5mr6514388anl.132.1305184567045; Thu, 12 May 2011 00:16:07 -0700 (PDT) Received: by 10.101.68.4 with HTTP; Thu, 12 May 2011 00:16:07 -0700 (PDT) In-Reply-To: References: <20110511183322.da0739c9.akpm@linux-foundation.org> Date: Thu, 12 May 2011 02:16:07 -0500 Message-ID: Subject: Re: Bug in MTD NAND ONFI chipsize detection From: Nitin Garg To: Andrew Morton X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110512_031609_327240_0099C2F2 X-CRM114-Status: GOOD ( 18.83 ) 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.0 FREEMAIL_FROM Sender email is freemail (nitingarg98[at]gmail.com) 2.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (nitingarg98[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.83.49 listed in list.dnswl.org] -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: linux-mtd@lists.infradead.org, David Woodhouse , linux-kernel@vger.kernel.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list 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 Why isn't my patch going through? re-sending again, Signed-off-by: Nitin Garg --- drivers/mtd/nand/nand_base.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) if (le16_to_cpu(p->features) & 1) busw = NAND_BUSWIDTH_16; diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index c54a4cb..cdf6015 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -2892,7 +2892,7 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip, mtd->writesize = le32_to_cpu(p->byte_per_page); mtd->erasesize = le32_to_cpu(p->pages_per_block) * mtd->writesize; mtd->oobsize = le16_to_cpu(p->spare_bytes_per_page); - chip->chipsize = (uint64_t)le32_to_cpu(p->blocks_per_lun) * mtd->erasesize; + chip->chipsize = (uint64_t)le32_to_cpu(p->blocks_per_lun) * le32_to_cpu(p->lun_count) * mtd->erasesize; busw = 0;