From patchwork Thu Dec 16 22:42:18 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatolij Gustschin X-Patchwork-Id: 75818 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from canuck.infradead.org (canuck.infradead.org [134.117.69.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D78851007D3 for ; Fri, 17 Dec 2010 09:46:01 +1100 (EST) 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 1PTMXI-0006ix-Qb; Thu, 16 Dec 2010 22:42:56 +0000 Received: from mail-out.m-online.net ([212.18.0.9]) by canuck.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1PTMWj-0006eF-7h for linux-mtd@lists.infradead.org; Thu, 16 Dec 2010 22:42:23 +0000 Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id D73E81C08A45; Thu, 16 Dec 2010 23:42:17 +0100 (CET) X-Auth-Info: o9CGcwyPJoWbNsRCgom3FeMCQJjmXbbvx7ZSEwT0DJc= Received: from localhost (p4FE3CD59.dip.t-dialin.net [79.227.205.89]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA id A9A261C0009B; Thu, 16 Dec 2010 23:42:17 +0100 (CET) From: Anatolij Gustschin To: linux-mtd@lists.infradead.org Subject: [PATCH v2 5/6] mtd: initialize writebufsize in the MTD object of a partition Date: Thu, 16 Dec 2010 23:42:18 +0100 Message-Id: <1292539339-25111-6-git-send-email-agust@denx.de> X-Mailer: git-send-email 1.7.1 In-Reply-To: <292342500.2538.65.camel@localhost> References: <292342500.2538.65.camel@localhost> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20101216_174221_703411_ABD877A9 X-CRM114-Status: GOOD ( 12.78 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, low trust [212.18.0.9 listed in list.dnswl.org] Cc: Artem Bityutskiy , David Woodhouse 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: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Propagate the writebufsize to the partition's MTD object so that UBI can set correct value for it's minimal I/O size using the writebufsize field of MTD object of the partition. By previous patches we added proper writebufsize field initialization. Next patch can now change UBI to use this field for setting the minimal I/O size. Signed-off-by: Anatolij Gustschin --- drivers/mtd/mtdconcat.c | 1 + drivers/mtd/mtdpart.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c index bf8de09..5f5777b 100644 --- a/drivers/mtd/mtdconcat.c +++ b/drivers/mtd/mtdconcat.c @@ -776,6 +776,7 @@ struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to c concat->mtd.size = subdev[0]->size; concat->mtd.erasesize = subdev[0]->erasesize; concat->mtd.writesize = subdev[0]->writesize; + concat->mtd.writebufsize = subdev[0]->writebufsize; concat->mtd.subpage_sft = subdev[0]->subpage_sft; concat->mtd.oobsize = subdev[0]->oobsize; concat->mtd.oobavail = subdev[0]->oobavail; diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c index 1047ff0..b910a37 100644 --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c @@ -384,6 +384,7 @@ static struct mtd_part *allocate_partition(struct mtd_info *master, slave->mtd.flags = master->flags & ~part->mask_flags; slave->mtd.size = part->size; slave->mtd.writesize = master->writesize; + slave->mtd.writebufsize = master->writebufsize; slave->mtd.oobsize = master->oobsize; slave->mtd.oobavail = master->oobavail; slave->mtd.subpage_sft = master->subpage_sft;