From patchwork Thu Jun 2 06:48:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyungmin Park X-Patchwork-Id: 98355 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 33B34B6F92 for ; Thu, 2 Jun 2011 16:49:13 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QS1i6-0000aS-5h; Thu, 02 Jun 2011 06:48:50 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QS1i5-0000eK-Tn; Thu, 02 Jun 2011 06:48:49 +0000 Received: from mailout4.samsung.com ([203.254.224.34]) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QS1i1-0000e1-PJ for linux-mtd@lists.infradead.org; Thu, 02 Jun 2011 06:48:46 +0000 Received: from epcpsbgm2.samsung.com (mailout4.samsung.com [203.254.224.34]) by mailout4.samsung.com (Oracle Communications Messaging Exchange Server 7u4-19.01 64bit (built Sep 7 2010)) with ESMTP id <0LM50039ZHK0KOH0@mailout4.samsung.com> for linux-mtd@lists.infradead.org; Thu, 02 Jun 2011 15:48:40 +0900 (KST) X-AuditID: cbfee61b-b7c62ae0000056ed-bd-4de732482887 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (MMPCPMTA) with SMTP id CC.5B.22253.84237ED4; Thu, 02 Jun 2011 15:48:40 +0900 (KST) Received: from TNRNDGASPAPP1.tn.corp.samsungelectronics.net ([165.213.149.150]) by mmp2.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LM500G68HL4EF@mmp2.samsung.com> for linux-mtd@lists.infradead.org; Thu, 02 Jun 2011 15:48:40 +0900 (KST) Received: from july ([165.213.219.111]) by TNRNDGASPAPP1.tn.corp.samsungelectronics.net with Microsoft SMTPSVC(6.0.3790.4675); Thu, 02 Jun 2011 15:48:35 +0900 Received: by july (sSMTP sendmail emulation); Thu, 02 Jun 2011 15:48:32 +0900 Date: Thu, 02 Jun 2011 15:48:32 +0900 From: Kyungmin Park Subject: [PATCH] mtd: OneNAND: Fix wrong subpage_sft at 4KiB pagesize To: linux-mtd@lists.infradead.org Message-id: <20110602064832.GA7319@july> MIME-version: 1.0 Content-disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) X-OriginalArrivalTime: 02 Jun 2011 06:48:35.0683 (UTC) FILETIME=[187B1B30:01CC20F1] X-Brightmail-Tracker: AAAAAA== X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110602_024846_100316_BE28EC44 X-CRM114-Status: GOOD ( 12.51 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [203.254.224.34 listed in list.dnswl.org] Cc: m.szyprowski@samsung.com, dwmw2@infradead.org, dedekind1@gmail.com 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 From: Kyungmin Park There's no case to use the subpage for 4KiB pagesize. Signed-off-by: Kyungmin Park diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c index ac9e959..337be7c 100644 --- a/drivers/mtd/onenand/onenand_base.c +++ b/drivers/mtd/onenand/onenand_base.c @@ -4047,13 +4047,11 @@ int onenand_scan(struct mtd_info *mtd, int maxchips) */ switch (mtd->oobsize) { case 128: - if (FLEXONENAND(this)) { + if (FLEXONENAND(this)) this->ecclayout = &flexonenand_oob_128; - mtd->subpage_sft = 0; - } else { + else this->ecclayout = &onenand_oob_128; - mtd->subpage_sft = 2; - } + mtd->subpage_sft = 0; break; case 64: this->ecclayout = &onenand_oob_64;