From: Felix Radensky <felix@embedded-sol.com>
To: linux-mtd@lists.infradead.org
Cc: Felix Radensky <felix@embedded-sol.com>
Subject: [PATCH] MTD: Fix MEMGETINFO and MEMGETREGIONINFO for devices >= 4GB
Date: Wed, 7 Oct 2009 10:26:42 +0200 [thread overview]
Message-ID: <1254904002-24913-1-git-send-email-felix@embedded-sol.com> (raw)
In-Reply-To: <>
Currently MEMGETINFO and MEMGETREGIONINFO report invalid
information for devices >= 4GB, since relevant fields in
MTD ABI structures are 32-bit while corresponding fields
in kernel internal structures are 64-bit. Fix ABI fields
to be 64-bit as well.
Signed-off-by: Felix Radensky <felix@embedded-sol.com>
---
include/mtd/mtd-abi.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h
index be51ae2..c66044d 100644
--- a/include/mtd/mtd-abi.h
+++ b/include/mtd/mtd-abi.h
@@ -64,7 +64,7 @@ struct mtd_oob_buf64 {
struct mtd_info_user {
__u8 type;
__u32 flags;
- __u32 size; // Total size of the MTD
+ __u64 size; // Total size of the MTD
__u32 erasesize;
__u32 writesize;
__u32 oobsize; // Amount of OOB data per block (e.g. 16)
@@ -75,7 +75,7 @@ struct mtd_info_user {
};
struct region_info_user {
- __u32 offset; /* At which this region starts,
+ __u64 offset; /* At which this region starts,
* from the beginning of the MTD */
__u32 erasesize; /* For this region */
__u32 numblocks; /* Number of blocks in this region */
--
1.5.4.3
next reply other threads:[~2009-10-07 8:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-07 8:26 Felix Radensky [this message]
2009-10-11 12:40 ` [PATCH] MTD: Fix MEMGETINFO and MEMGETREGIONINFO for devices >= 4GB Artem Bityutskiy
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=1254904002-24913-1-git-send-email-felix@embedded-sol.com \
--to=felix@embedded-sol.com \
--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