From: Mike Dunn <mikedunn@newsguy.com>
To: dedekind1@gmail.com
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Scott Branden <sbranden@broadcom.com>,
Wan ZongShun <mcuos.com@gmail.com>,
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
Robert Jarzmik <robert.jarzmik@free.fr>,
Manuel Lauss <manuel.lauss@googlemail.com>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
linux-mtd@lists.infradead.org, Ralf Baechle <ralf@linux-mips.org>,
Jiandong Zheng <jdzheng@broadcom.com>,
Andres Salomon <dilinger@queued.net>,
Olof Johansson <olof@lixom.net>, Jamie Iles <jamie@jamieiles.com>,
Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
Vimal Singh <vimal.newwork@gmail.com>
Subject: Re: [PATCH 1/2] MTD: pass driver methods through partition wrappers on unpartitioned devices
Date: Thu, 22 Dec 2011 15:28:32 -0800 [thread overview]
Message-ID: <4EF3BD20.9010408@newsguy.com> (raw)
In-Reply-To: <1324559149.10300.93.camel@sauron.fi.intel.com>
On 12/22/2011 05:05 AM, Artem Bityutskiy wrote:
> On Tue, 2011-12-20 at 10:42 -0800, Mike Dunn wrote:
>> + /*
>> + * For unpartitioned devices, create a single "partition" that
>> + * spans the entire device, so that driver methods go through
>> + * partition wrappers in all cases.
>> + */
>> + struct mtd_partition single_part = {
>> + .name = (char *)mtd->name,
>> + .offset = 0,
>> + .size = mtd->size,
>> + .mask_flags = 0,
>> + .ecclayout = mtd->ecclayout,
>> + };
>> + err = add_mtd_partitions(mtd, &single_part, 1);
>> }
> There is a problem with this approach :-(
>
> Look at the 'mtd_blkpg_ioctl()' function which is used to re-partition
> MTD device from user-space. It is a bit strange, but we use block device
> for re-partition in order to not invent new ioctls.
Sorry, missed that too. So many perils...
Thanks,
Mike
next prev parent reply other threads:[~2011-12-22 23:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-20 18:42 [PATCH 0/2] always use partition wrappers; drivers return bitflips Mike Dunn
2011-12-20 18:42 ` [PATCH 1/2] MTD: pass driver methods through partition wrappers on unpartitioned devices Mike Dunn
2011-12-22 12:34 ` Artem Bityutskiy
2011-12-22 23:28 ` Mike Dunn
2011-12-22 13:05 ` Artem Bityutskiy
2011-12-22 18:03 ` Artem Bityutskiy
2011-12-22 23:28 ` Mike Dunn
2011-12-23 14:47 ` Artem Bityutskiy
2011-12-22 23:28 ` Mike Dunn [this message]
2011-12-20 18:42 ` [PATCH 2/2] MTD: read(), read_oob() driver methods return num bitflips Mike Dunn
2011-12-21 8:10 ` [PATCH 0/2] always use partition wrappers; drivers return bitflips Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EF3BD20.9010408@newsguy.com \
--to=mikedunn@newsguy.com \
--cc=computersforpeace@gmail.com \
--cc=dbaryshkov@gmail.com \
--cc=dedekind1@gmail.com \
--cc=dilinger@queued.net \
--cc=dwmw2@infradead.org \
--cc=haojian.zhuang@gmail.com \
--cc=jamie@jamieiles.com \
--cc=jdzheng@broadcom.com \
--cc=kyungmin.park@samsung.com \
--cc=lars@metafoo.de \
--cc=linux-mtd@lists.infradead.org \
--cc=manuel.lauss@googlemail.com \
--cc=mcuos.com@gmail.com \
--cc=olof@lixom.net \
--cc=ralf@linux-mips.org \
--cc=robert.jarzmik@free.fr \
--cc=sbranden@broadcom.com \
--cc=thomas.petazzoni@free-electrons.com \
--cc=vimal.newwork@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).