Patchwork [1/6] mtd-utils/nanddump.c: Increase max OOB size

login
register
mail settings
Submitter Brian Norris
Date July 8, 2010, 8:50 p.m.
Message ID <1278622209-20149-2-git-send-email-norris@broadcom.com>
Download mbox | patch
Permalink /patch/58294/
State Accepted
Commit cee2c11a38fe2c2cc6a7ea1b13c1eea90ac62432
Headers show

Comments

Brian Norris - July 8, 2010, 8:50 p.m.
Supported OOB and page sizes can now be changed more easily by a
macro constant. NAND_MAX_OOBSIZE needed increased to support 218
and 224 byte OOB.

Signed-off-by: Brian Norris <norris@broadcom.com>
---
 nanddump.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
Artem Bityutskiy - July 18, 2010, 7:17 a.m.
On Thu, 2010-07-08 at 13:50 -0700, Brian Norris wrote:
> Supported OOB and page sizes can now be changed more easily by a
> macro constant. NAND_MAX_OOBSIZE needed increased to support 218
> and 224 byte OOB.
> 
> Signed-off-by: Brian Norris <norris@broadcom.com>

Pushed to mtd-utils.git

Patch

diff --git a/nanddump.c b/nanddump.c
index e44ab36..735ae48 100644
--- a/nanddump.c
+++ b/nanddump.c
@@ -174,8 +174,10 @@  static void process_options (int argc, char * const argv[])
 /*
  * Buffers for reading data from flash
  */
-static unsigned char readbuf[4096];
-static unsigned char oobbuf[128];
+#define NAND_MAX_PAGESIZE 4096
+#define NAND_MAX_OOBSIZE 256
+static unsigned char readbuf[NAND_MAX_PAGESIZE];
+static unsigned char oobbuf[NAND_MAX_OOBSIZE];
 
 /*
  * Main program