From: Artem Bityutskiy <dedekind@infradead.org>
To: Kevin Cernekee <kpc.mtd@gmail.com>
Cc: dwmw2@infradead.org, linux-mtd@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCHv4] MTD: New ioctl calls for >4GiB device support
Date: Tue, 31 Mar 2009 09:31:40 +0300 [thread overview]
Message-ID: <1238481100.20906.14.camel@localhost.localdomain> (raw)
In-Reply-To: <a95a62fe0903301814k75ce56f5xef0a04c5c188012@mail.gmail.com>
On Mon, 2009-03-30 at 18:14 -0700, Kevin Cernekee wrote:
> #define MTD_ABSENT 0
> #define MTD_RAM 1
> #define MTD_ROM 2
> @@ -50,14 +64,25 @@ struct mtd_oob_buf {
> struct mtd_info_user {
> uint8_t type;
> uint32_t flags;
> - uint32_t size; // Total size of the MTD
> + uint32_t size; /* Total size of the MTD */
> + uint32_t erasesize;
> + uint32_t writesize;
> + uint32_t oobsize; /* OOB bytes per page (e.g. 16) */
> + uint32_t ecctype; /* Obsolete, always reports -1 */
> + uint32_t eccsize; /* Obsolete, always reports 0 */
> +};
> +
> +struct mtd_info_user64 {
> + uint32_t type;
> + uint32_t flags;
> + uint64_t size; /* Total size of the MTD */
> + uint32_t res0;
> uint32_t erasesize;
> + uint32_t res1;
> uint32_t writesize;
> - uint32_t oobsize; // Amount of OOB data per block (e.g. 16)
> - /* The below two fields are obsolete and broken, do not use them
> - * (TODO: remove at some point) */
> - uint32_t ecctype;
> - uint32_t eccsize;
> + uint32_t res2;
> + uint32_t oobsize; /* OOB bytes per page (e.g. 16) */
> + uint32_t res3[32];
> };
>
> struct region_info_user {
> @@ -68,6 +93,18 @@ struct region_info_user {
> uint32_t regionindex;
> };
>
> +struct region_info_user64 {
> + uint64_t offset; /* At which this region starts,
> + * from the beginning of the MTD */
> + uint32_t res0;
> + uint32_t erasesize; /* For this region */
> + uint32_t res1;
> + uint32_t numblocks; /* Number of blocks in this region */
> + uint32_t res2;
> + uint32_t regionindex;
> + uint32_t res3[16];
> +};
Your arguments vs. ioctls are valid, but sysfs is still better, because
ioctls are not very extendible. E.g., UBI utilities need sub-page size,
but ioctl's do not provide it, and I have no possibility to ask the
kernel about this. And I cannot add it, at least to old ioctls. With
sysfs, I can just add a sysfs file. This is much better.
David Brownell send 2 patches very recently which add sysfs to
MTD. I would recommend you to take them and work on top, and export
information via sysfs, still...
Thanks.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
next prev parent reply other threads:[~2009-03-31 6:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-31 1:14 [PATCHv4] MTD: New ioctl calls for >4GiB device support Kevin Cernekee
2009-03-31 6:31 ` Artem Bityutskiy [this message]
2009-03-31 10:51 ` Arnd Bergmann
2009-03-31 18:29 ` Kevin Cernekee
2009-04-01 14:50 ` Arnd Bergmann
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=1238481100.20906.14.camel@localhost.localdomain \
--to=dedekind@infradead.org \
--cc=dwmw2@infradead.org \
--cc=kpc.mtd@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
/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