From tj at kernel.org  Mon Nov  1 12:15:25 2010
From: tj at kernel.org (Tejun Heo)
Date: Mon,  1 Nov 2010 17:15:25 +0100
Subject: [PATCH 1/5] mtd: fix bdev exclusive open bugs in
	block2mtd::add_device()
In-Reply-To: <1288628129-12811-1-git-send-email-tj@kernel.org>
References: <1288628129-12811-1-git-send-email-tj@kernel.org>
Message-ID: <1288628129-12811-2-git-send-email-tj@kernel.org>

There are two bdev exclusive open bugs.

* open_bdev_exclusive() must not be called with NULL holder.  Use dev
  as the holder.

* open_by_devnum() doesn't open the bdev exclusively but
  block2mtd_free_device() always assumes it.  Explicitly claim the
  bdev.

The latter is rather clumsy but will be simplified with future
blkdev_get/put() cleanups.

Signed-off-by: Tejun Heo <tj at kernel.org>
Cc: linux-mtd at lists.infradead.org
---
 drivers/mtd/devices/block2mtd.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
index 2cf0cc6..806a9ed 100644
--- a/drivers/mtd/devices/block2mtd.c
+++ b/drivers/mtd/devices/block2mtd.c
@@ -246,7 +246,7 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size)
 		return NULL;
 
 	/* Get a handle on the device */
-	bdev = open_bdev_exclusive(devname, FMODE_READ|FMODE_WRITE, NULL);
+	bdev = open_bdev_exclusive(devname, FMODE_READ|FMODE_WRITE, dev);
 #ifndef MODULE
 	if (IS_ERR(bdev)) {
 
@@ -256,6 +256,15 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size)
 		dev_t devt = name_to_dev_t(devname);
 		if (devt) {
 			bdev = open_by_devnum(devt, FMODE_WRITE | FMODE_READ);
+			if (!IS_ERR(bdev)) {
+				int ret;
+				ret = bd_claim(bdev, dev);
+				if (ret) {
+					blkdev_put(bdev,
+						   FMODE_READ | FMODE_WRITE);
+					bdev = ERR_PTR(ret);
+				}
+			}
 		}
 	}
 #endif
-- 
1.7.1



From srimugunthan.dhandapani at gmail.com  Mon Nov  1 14:48:34 2010
From: srimugunthan.dhandapani at gmail.com (srimugunthan dhandapani)
Date: Tue, 2 Nov 2010 00:18:34 +0530
Subject: [PATCH] trivial: nandsim.c spell fixes in comments
Message-ID: <AANLkTimGScstLNC2Hs1v-h6BF0y8GFTw4TJw8JEt+j8X@mail.gmail.com>

attached patch has trivial spell fixes in comments in nandsim.c
Signed-off-by: srimugunthan  <srimugunthan.dhandapani at gmail.com>

------
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index a6a73aa..697979c 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/nandsim.c
@@ -230,7 +230,7 @@ MODULE_PARM_DESC(bbt,         "0 OOB, 1 BBT with marker
in OOB, 2 BBT with marker in d
 #define STATE_ADDR_ZERO        0x00000040 /* one byte zero address was
accepted */
 #define STATE_ADDR_MASK        0x00000070 /* address states mask */

-/* Durind data input/output the simulator is in these states */
+/* During data input/output the simulator is in these states */
 #define STATE_DATAIN           0x00000100 /* waiting for data input */
 #define STATE_DATAIN_MASK      0x00000100 /* data input states mask */

@@ -263,18 +263,18 @@ MODULE_PARM_DESC(bbt,         "0 OOB, 1 BBT with
marker in OOB, 2 BBT with marker in d
 #define OPT_PAGE512      0x00000002 /* 512-byte  page chips */
 #define OPT_PAGE2048     0x00000008 /* 2048-byte page chips */
 #define OPT_SMARTMEDIA   0x00000010 /* SmartMedia technology chips */
-#define OPT_AUTOINCR     0x00000020 /* page number auto inctimentation is
possible */
+#define OPT_AUTOINCR     0x00000020 /* page number auto incrementation is
possible */
 #define OPT_PAGE512_8BIT 0x00000040 /* 512-byte page chips with 8-bit bus
width */
 #define OPT_PAGE4096     0x00000080 /* 4096-byte page chips */
 #define OPT_LARGEPAGE    (OPT_PAGE2048 | OPT_PAGE4096) /* 2048 & 4096-byte
page chips */
 #define OPT_SMALLPAGE    (OPT_PAGE256  | OPT_PAGE512)  /* 256 and 512-byte
page chips */

-/* Remove action bits ftom state */
+/* Remove action bits from state */
 #define NS_STATE(x) ((x) & ~ACTION_MASK)

 /*
  * Maximum previous states which need to be saved. Currently saving is
- * only needed for page programm operation with preceeded read command
+ * only needed for page programm operation with preceded read command
  * (which is only valid for 512-byte pages).
  */
 #define NS_MAX_PREVSTATES 1
@@ -1171,9 +1171,9 @@ static inline void switch_to_ready_state(struct
nandsim *ns, u_char status)
  * of supported operations.
  *
  * Operation can be unknown because of the following.
- *   1. New command was accepted and this is the firs call to find the
+ *   1. New command was accepted and this is the first call to find the
  *      correspondent states chain. In this case ns->npstates = 0;
- *   2. There is several operations which begin with the same command(s)
+ *   2. There are several operations which begin with the same command(s)
  *      (for example program from the second half and read from the
  *      second half operations both begin with the READ1 command). In this
  *      case the ns->pstates[] array contains previous states.
@@ -1186,7 +1186,7 @@ static inline void switch_to_ready_state(struct
nandsim *ns, u_char status)
  * ns->ops, ns->state, ns->nxstate are initialized, ns->npstate is
  * zeroed).
  *
- * If there are several maches, the current state is pushed to the
+ * If there are several matches, the current state is pushed to the
  * ns->pstates.
  *
  * The operation can be unknown only while commands are input to the chip.
@@ -1195,7 +1195,7 @@ static inline void switch_to_ready_state(struct
nandsim *ns, u_char status)
  * operation is searched using the following pattern:
  *     ns->pstates[0], ... ns->pstates[ns->npstates], <address input>
  *
- * It is supposed that this pattern must either match one operation on
+ * It is supposed that this pattern must either match one operation or
  * none. There can't be ambiguity in that case.
  *
  * If no matches found, the functions does the following:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20101102/068c711f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spell_fix_patch
Type: application/octet-stream
Size: 3577 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20101102/068c711f/attachment.obj>

From randy.dunlap at oracle.com  Mon Nov  1 17:47:29 2010
From: randy.dunlap at oracle.com (Randy Dunlap)
Date: Mon, 1 Nov 2010 14:47:29 -0700
Subject: [PATCH] mtd: fix nand kernel-doc warnings
Message-ID: <20101101144729.e0c58fec.randy.dunlap@oracle.com>

From: Randy Dunlap <randy.dunlap at oracle.com>

Warning(include/linux/mtd/nand.h:543): No description found for parameter 'badblockbits'
Warning(drivers/mtd/nand/nand_bbt.c:1101): No description found for parameter 'mtd'

Signed-off-by: Randy Dunlap <randy.dunlap at oracle.com>
---
 drivers/mtd/nand/nand_bbt.c |    3 ++-
 include/linux/mtd/nand.h    |    2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

--- linux-2.6.36-git17.orig/include/linux/mtd/nand.h
+++ linux-2.6.36-git17/include/linux/mtd/nand.h
@@ -448,6 +448,8 @@ struct nand_buffers {
  *			See the defines for further explanation.
  * @badblockpos:	[INTERN] position of the bad block marker in the oob
  *			area.
+ * @badblockbits:	[INTERN] number of bits to left-shift the bad block
+ *			number
  * @cellinfo:		[INTERN] MLC/multichip data from chip ident
  * @numchips:		[INTERN] number of physical chips
  * @chipsize:		[INTERN] the size of one chip for multichip arrays
--- linux-2.6.36-git17.orig/drivers/mtd/nand/nand_bbt.c
+++ linux-2.6.36-git17/drivers/mtd/nand/nand_bbt.c
@@ -1092,7 +1092,8 @@ static void mark_bbt_region(struct mtd_i
 
 /**
  * verify_bbt_descr - verify the bad block description
- * @bd:			the table to verify
+ * @mtd:	MTD device structure
+ * @bd:		the table to verify
  *
  * This functions performs a few sanity checks on the bad block description
  * table.


From Jon.Povey at racelogic.co.uk  Mon Nov  1 21:24:54 2010
From: Jon.Povey at racelogic.co.uk (Jon Povey)
Date: Tue, 2 Nov 2010 01:24:54 +0000
Subject: [PATCH] trivial: nandsim.c spell fixes in comments
In-Reply-To: <AANLkTimGScstLNC2Hs1v-h6BF0y8GFTw4TJw8JEt+j8X@mail.gmail.com>
Message-ID: <70E876B0EA86DD4BAF101844BC814DFE093EEF9923@Cloud.RL.local>

linux-mtd-bounces at lists.infradead.org wrote:
> attached patch has trivial spell fixes in comments in nandsim.c
> Signed-off-by: srimugunthan  <srimugunthan.dhandapani at gmail.com>
>
> ------
> diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
> index a6a73aa..697979c 100644 --- a/drivers/mtd/nand/nandsim.c
> +++ b/drivers/mtd/nand/nandsim.c

...

> - * only needed for page programm operation with preceeded read command
> + * only needed for page programm operation with preceded read command

Might as well fix programm -> program while you are there?

--
Jon Povey
jon.povey at racelogic.co.uk

Racelogic is a limited company registered in England. Registered number 2743719 .
Registered Office Unit 10, Swan Business Centre, Osier Way, Buckingham, Bucks, MK18 1TB .

The information contained in this electronic mail transmission is intended by Racelogic Ltd for the use of the named individual or entity to which it is directed and may contain information that is confidential or privileged. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email so that the sender's address records can be corrected. The views expressed by the sender of this communication do not necessarily represent those of Racelogic Ltd. Please note that Racelogic reserves the right to monitor e-mail communications passing through its network




From kmpark at infradead.org  Mon Nov  1 21:28:46 2010
From: kmpark at infradead.org (Kyungmin Park)
Date: Tue, 02 Nov 2010 10:28:46 +0900
Subject: [PATCH] mtd: OneNAND: Fix page offset handling at 2KiB pagesize
Message-ID: <20101102012846.GA2470@july>

From: Kyungmin Park <kyungmin.park at samsung.com>

When use the 2KiB pagesize, it should be set the correct page offset.

Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
---
diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c
index 0de7a05..a4c74a9 100644
--- a/drivers/mtd/onenand/samsung.c
+++ b/drivers/mtd/onenand/samsung.c
@@ -651,7 +651,7 @@ static int s5pc110_read_bufferram(struct mtd_info *mtd, int area,
 	void __iomem *p;
 	void *buf = (void *) buffer;
 	dma_addr_t dma_src, dma_dst;
-	int err, page_dma = 0;
+	int err, ofs, page_dma = 0;
 	struct device *dev = &onenand->pdev->dev;
 
 	p = this->base + area;
@@ -677,10 +677,13 @@ static int s5pc110_read_bufferram(struct mtd_info *mtd, int area,
 		if (!page)
 			goto normal;
 
+		/* Page offset */
+		ofs = ((size_t) buf & ~PAGE_MASK);
 		page_dma = 1;
+
 		/* DMA routine */
 		dma_src = onenand->phys_base + (p - this->base);
-		dma_dst = dma_map_page(dev, page, 0, count, DMA_FROM_DEVICE);
+		dma_dst = dma_map_page(dev, page, ofs, count, DMA_FROM_DEVICE);
 	} else {
 		/* DMA routine */
 		dma_src = onenand->phys_base + (p - this->base);


From ketil at froyn.name  Tue Nov  2 06:08:56 2010
From: ketil at froyn.name (Ketil Froyn)
Date: Tue, 2 Nov 2010 11:08:56 +0100
Subject: Cross compiling mtd-utils for Android and pread errors
In-Reply-To: <70E876B0EA86DD4BAF101844BC814DFE093EEF9619@Cloud.RL.local>
References: <AANLkTinNUrQKg_8EgwW5k7BZFiik5ish6-z+qK-=3qpU@mail.gmail.com>
	<70E876B0EA86DD4BAF101844BC814DFE093EEF9619@Cloud.RL.local>
Message-ID: <AANLkTikSjAaNYQ0VTNonziK+j8z9qCcJ+D963U1MQ7HW@mail.gmail.com>

On Fri, Oct 29, 2010 at 3:18 PM, Jon Povey <Jon.Povey at racelogic.co.uk> wrote:
> linux-mtd-bounces at lists.infradead.org wrote:
>> pread: Not a typewriter / #
>>
>> I'm grateful for any tips that can nudge me in the right direction.
>
> "Not a typewriter" is ENOTTY, i.e. ioctl not supported.
>
> Seems your android mtd devices don't support those ioctls.

Hi Jon,

Thanks for the response! I only get ENOTTY when dumping to file, but
not when I try to dump output to a tty using:

/sdcard/nanddump -a /dev/mtd/mtd0

so it almost seems that the program is confused and tries to treat the
output file like a tty when I run with -f.

Ketil


From Jon.Povey at racelogic.co.uk  Tue Nov  2 06:11:41 2010
From: Jon.Povey at racelogic.co.uk (Jon Povey)
Date: Tue, 2 Nov 2010 10:11:41 +0000
Subject: Cross compiling mtd-utils for Android and pread errors
In-Reply-To: <AANLkTikSjAaNYQ0VTNonziK+j8z9qCcJ+D963U1MQ7HW@mail.gmail.com>
Message-ID: <70E876B0EA86DD4BAF101844BC814DFE093EEF9999@Cloud.RL.local>

Ketil Froyn wrote:
> On Fri, Oct 29, 2010 at 3:18 PM, Jon Povey
> <Jon.Povey at racelogic.co.uk> wrote:
>> linux-mtd-bounces at lists.infradead.org wrote:
>>> pread: Not a typewriter / #
>>>
>>> I'm grateful for any tips that can nudge me in the right direction.
>>
>> "Not a typewriter" is ENOTTY, i.e. ioctl not supported.
>>
>> Seems your android mtd devices don't support those ioctls.
>
> Hi Jon,
>
> Thanks for the response! I only get ENOTTY when dumping to file, but
> not when I try to dump output to a tty using:
>
> /sdcard/nanddump -a /dev/mtd/mtd0
>
> so it almost seems that the program is confused and tries to treat the
> output file like a tty when I run with -f.

strace can tell you what ioctl is failing on what file descriptor.

Happy sleuthing.




--
Jon Povey
jon.povey at racelogic.co.uk

Racelogic is a limited company registered in England. Registered number 2743719 .
Registered Office Unit 10, Swan Business Centre, Osier Way, Buckingham, Bucks, MK18 1TB .

The information contained in this electronic mail transmission is intended by Racelogic Ltd for the use of the named individual or entity to which it is directed and may contain information that is confidential or privileged. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email so that the sender's address records can be corrected. The views expressed by the sender of this communication do not necessarily represent those of Racelogic Ltd. Please note that Racelogic reserves the right to monitor e-mail communications passing through its network




From srimugunthan.dhandapani at gmail.com  Tue Nov  2 06:50:52 2010
From: srimugunthan.dhandapani at gmail.com (srimugunthan dhandapani)
Date: Tue, 2 Nov 2010 16:20:52 +0530
Subject: [PATCH] trivial: nandsim.c spell fixes in comments
In-Reply-To: <70E876B0EA86DD4BAF101844BC814DFE093EEF9923@Cloud.RL.local>
References: <AANLkTimGScstLNC2Hs1v-h6BF0y8GFTw4TJw8JEt+j8X@mail.gmail.com>
	<70E876B0EA86DD4BAF101844BC814DFE093EEF9923@Cloud.RL.local>
Message-ID: <AANLkTi=ON7CSbGq=X9wOBNcNjY05-ECJzpjxXFiE0fQM@mail.gmail.com>

attached patch fixes the program->programm and other  spellfixes in comments
in nandsim.c

Signed-off-by: srimugunthan  <srimugunthan.dhandapani at gmail.com>

-----
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index a6a73aa..c45e06f 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/nandsim.c
@@ -210,12 +210,12 @@ MODULE_PARM_DESC(bbt,         "0 OOB, 1 BBT with
marker in OOB, 2 BBT with marker in d
 #define STATE_CMD_READ0        0x00000001 /* read data from the beginning
of page */
 #define STATE_CMD_READ1        0x00000002 /* read data from the second half
of page */
 #define STATE_CMD_READSTART    0x00000003 /* read data second command
(large page devices) */
-#define STATE_CMD_PAGEPROG     0x00000004 /* start page programm */
+#define STATE_CMD_PAGEPROG     0x00000004 /* start page program */
 #define STATE_CMD_READOOB      0x00000005 /* read OOB area */
 #define STATE_CMD_ERASE1       0x00000006 /* sector erase first command */
 #define STATE_CMD_STATUS       0x00000007 /* read status */
 #define STATE_CMD_STATUS_M     0x00000008 /* read multi-plane status (isn't
implemented) */
-#define STATE_CMD_SEQIN        0x00000009 /* sequential data imput */
+#define STATE_CMD_SEQIN        0x00000009 /* sequential data input */
 #define STATE_CMD_READID       0x0000000A /* read ID */
 #define STATE_CMD_ERASE2       0x0000000B /* sector erase second command */
 #define STATE_CMD_RESET        0x0000000C /* reset */
@@ -230,7 +230,7 @@ MODULE_PARM_DESC(bbt,         "0 OOB, 1 BBT with marker
in OOB, 2 BBT with marker in d
 #define STATE_ADDR_ZERO        0x00000040 /* one byte zero address was
accepted */
 #define STATE_ADDR_MASK        0x00000070 /* address states mask */

-/* Durind data input/output the simulator is in these states */
+/* During data input/output the simulator is in these states */
 #define STATE_DATAIN           0x00000100 /* waiting for data input */
 #define STATE_DATAIN_MASK      0x00000100 /* data input states mask */

@@ -248,7 +248,7 @@ MODULE_PARM_DESC(bbt,         "0 OOB, 1 BBT with marker
in OOB, 2 BBT with marker in d

 /* Simulator's actions bit masks */
 #define ACTION_CPY       0x00100000 /* copy page/OOB to the internal buffer
*/
-#define ACTION_PRGPAGE   0x00200000 /* programm the internal buffer to
flash */
+#define ACTION_PRGPAGE   0x00200000 /* program the internal buffer to flash
*/
 #define ACTION_SECERASE  0x00300000 /* erase sector */
 #define ACTION_ZEROOFF   0x00400000 /* don't add any offset to address */
 #define ACTION_HALFOFF   0x00500000 /* add to address half of page */
@@ -263,18 +263,18 @@ MODULE_PARM_DESC(bbt,         "0 OOB, 1 BBT with
marker in OOB, 2 BBT with marker in d
 #define OPT_PAGE512      0x00000002 /* 512-byte  page chips */
 #define OPT_PAGE2048     0x00000008 /* 2048-byte page chips */
 #define OPT_SMARTMEDIA   0x00000010 /* SmartMedia technology chips */
-#define OPT_AUTOINCR     0x00000020 /* page number auto inctimentation is
possible */
+#define OPT_AUTOINCR     0x00000020 /* page number auto incrementation is
possible */
 #define OPT_PAGE512_8BIT 0x00000040 /* 512-byte page chips with 8-bit bus
width */
 #define OPT_PAGE4096     0x00000080 /* 4096-byte page chips */
 #define OPT_LARGEPAGE    (OPT_PAGE2048 | OPT_PAGE4096) /* 2048 & 4096-byte
page chips */
 #define OPT_SMALLPAGE    (OPT_PAGE256  | OPT_PAGE512)  /* 256 and 512-byte
page chips */

-/* Remove action bits ftom state */
+/* Remove action bits from state */
 #define NS_STATE(x) ((x) & ~ACTION_MASK)

 /*
  * Maximum previous states which need to be saved. Currently saving is
- * only needed for page programm operation with preceeded read command
+ * only needed for page program operation with preceded read command
  * (which is only valid for 512-byte pages).
  */
 #define NS_MAX_PREVSTATES 1
@@ -380,16 +380,16 @@ static struct nandsim_operations {
     /* Read OOB */
     {OPT_SMALLPAGE, {STATE_CMD_READOOB | ACTION_OOBOFF, STATE_ADDR_PAGE |
ACTION_CPY,
             STATE_DATAOUT, STATE_READY}},
-    /* Programm page starting from the beginning */
+    /* Program page starting from the beginning */
     {OPT_ANY, {STATE_CMD_SEQIN, STATE_ADDR_PAGE, STATE_DATAIN,
             STATE_CMD_PAGEPROG | ACTION_PRGPAGE, STATE_READY}},
-    /* Programm page starting from the beginning */
+    /* Program page starting from the beginning */
     {OPT_SMALLPAGE, {STATE_CMD_READ0, STATE_CMD_SEQIN | ACTION_ZEROOFF,
STATE_ADDR_PAGE,
                   STATE_DATAIN, STATE_CMD_PAGEPROG | ACTION_PRGPAGE,
STATE_READY}},
-    /* Programm page starting from the second half */
+    /* Program page starting from the second half */
     {OPT_PAGE512, {STATE_CMD_READ1, STATE_CMD_SEQIN | ACTION_HALFOFF,
STATE_ADDR_PAGE,
                   STATE_DATAIN, STATE_CMD_PAGEPROG | ACTION_PRGPAGE,
STATE_READY}},
-    /* Programm OOB */
+    /* Program OOB */
     {OPT_SMALLPAGE, {STATE_CMD_READOOB, STATE_CMD_SEQIN | ACTION_OOBOFF,
STATE_ADDR_PAGE,
                   STATE_DATAIN, STATE_CMD_PAGEPROG | ACTION_PRGPAGE,
STATE_READY}},
     /* Erase sector */
@@ -1171,9 +1171,9 @@ static inline void switch_to_ready_state(struct
nandsim *ns, u_char status)
  * of supported operations.
  *
  * Operation can be unknown because of the following.
- *   1. New command was accepted and this is the firs call to find the
+ *   1. New command was accepted and this is the first call to find the
  *      correspondent states chain. In this case ns->npstates = 0;
- *   2. There is several operations which begin with the same command(s)
+ *   2. There are several operations which begin with the same command(s)
  *      (for example program from the second half and read from the
  *      second half operations both begin with the READ1 command). In this
  *      case the ns->pstates[] array contains previous states.
@@ -1186,7 +1186,7 @@ static inline void switch_to_ready_state(struct
nandsim *ns, u_char status)
  * ns->ops, ns->state, ns->nxstate are initialized, ns->npstate is
  * zeroed).
  *
- * If there are several maches, the current state is pushed to the
+ * If there are several matches, the current state is pushed to the
  * ns->pstates.
  *
  * The operation can be unknown only while commands are input to the chip.
@@ -1195,10 +1195,10 @@ static inline void switch_to_ready_state(struct
nandsim *ns, u_char status)
  * operation is searched using the following pattern:
  *     ns->pstates[0], ... ns->pstates[ns->npstates], <address input>
  *
- * It is supposed that this pattern must either match one operation on
+ * It is supposed that this pattern must either match one operation or
  * none. There can't be ambiguity in that case.
  *
- * If no matches found, the functions does the following:
+ * If no matches found, the function does the following:
  *   1. if there are saved states present, try to ignore them and search
  *      again only using the last command. If nothing was found, switch
  *      to the STATE_READY state.
@@ -1668,7 +1668,7 @@ static int do_state_action(struct nandsim *ns,
uint32_t action)

     case ACTION_PRGPAGE:
         /*
-         * Programm page - move internal buffer data to the page.
+         * Program page - move internal buffer data to the page.
          */

         if (ns->lines.wp) {
@@ -1933,7 +1933,7 @@ static u_char ns_nand_read_byte(struct mtd_info *mtd)
         NS_DBG("read_byte: all bytes were read\n");

         /*
-         * The OPT_AUTOINCR allows to read next conseqitive pages without
+         * The OPT_AUTOINCR allows to read next consecutive pages without
          * new read operation cycle.
          */
         if ((ns->options & OPT_AUTOINCR) && NS_STATE(ns->state) ==
STATE_DATAOUT) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20101102/fc9a327b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spell_fixpatch2
Type: application/octet-stream
Size: 7351 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20101102/fc9a327b/attachment-0001.obj>

From roman.tereshonkov at nokia.com  Tue Nov  2 07:25:28 2010
From: roman.tereshonkov at nokia.com (Roman Tereshonkov)
Date: Tue,  2 Nov 2010 13:25:28 +0200
Subject: [PATCH 1/3] mtd: onenand: add option and variable for cache program
	feature
In-Reply-To: <1288697130-12772-1-git-send-email-roman.tereshonkov@nokia.com>
References: <1288697130-12772-1-git-send-email-roman.tereshonkov@nokia.com>
Message-ID: <1288697130-12772-2-git-send-email-roman.tereshonkov@nokia.com>

A new option is added for cache program feature. A new variable
ongoing is introduced for onenand_chip to handle the multi-command
cache program operation.

Signed-off-by: Roman Tereshonkov <roman.tereshonkov at nokia.com>
---
 include/linux/mtd/onenand.h |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h
index 0c8815b..6da3fe3 100644
--- a/include/linux/mtd/onenand.h
+++ b/include/linux/mtd/onenand.h
@@ -137,6 +137,14 @@ struct onenand_chip {
 	void			*bbm;
 
 	void			*priv;
+
+	/*
+	 * Shows that the current operation is composed
+	 * of sequence of commands. For example, cache program.
+	 * Such command status OnGo bit is checked at the end of
+	 * sequence.
+	 */
+	unsigned int		ongoing;
 };
 
 /*
@@ -171,6 +179,9 @@ struct onenand_chip {
 #define ONENAND_IS_2PLANE(this)			(0)
 #endif
 
+#define ONENAND_IS_CACHE_PROGRAM(this)					\
+	(this->options & ONENAND_HAS_CACHE_PROGRAM)
+
 /* Check byte access in OneNAND */
 #define ONENAND_CHECK_BYTE_ACCESS(addr)		(addr & 0x1)
 
@@ -181,6 +192,7 @@ struct onenand_chip {
 #define ONENAND_HAS_UNLOCK_ALL		(0x0002)
 #define ONENAND_HAS_2PLANE		(0x0004)
 #define ONENAND_HAS_4KB_PAGE		(0x0008)
+#define ONENAND_HAS_CACHE_PROGRAM	(0x0010)
 #define ONENAND_SKIP_UNLOCK_CHECK	(0x0100)
 #define ONENAND_PAGEBUF_ALLOC		(0x1000)
 #define ONENAND_OOBBUF_ALLOC		(0x2000)
-- 
1.7.0.4



From roman.tereshonkov at nokia.com  Tue Nov  2 07:25:29 2010
From: roman.tereshonkov at nokia.com (Roman Tereshonkov)
Date: Tue,  2 Nov 2010 13:25:29 +0200
Subject: [PATCH 2/3] mtd: onenand: introduce not "real" commands for cache
	program feature.
In-Reply-To: <1288697130-12772-1-git-send-email-roman.tereshonkov@nokia.com>
References: <1288697130-12772-1-git-send-email-roman.tereshonkov@nokia.com>
Message-ID: <1288697130-12772-3-git-send-email-roman.tereshonkov@nokia.com>

Introduce not "real" commands for start/continue and stop the
cache program operation.

Signed-off-by: Roman Tereshonkov <roman.tereshonkov at nokia.com>
---
 include/linux/mtd/onenand_regs.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/linux/mtd/onenand_regs.h b/include/linux/mtd/onenand_regs.h
index cd6f3b4..ce61e9c 100644
--- a/include/linux/mtd/onenand_regs.h
+++ b/include/linux/mtd/onenand_regs.h
@@ -143,6 +143,8 @@
 /* NOTE: Those are not *REAL* commands */
 #define ONENAND_CMD_BUFFERRAM		(0x1978)
 #define FLEXONENAND_CMD_READ_PI		(0x1985)
+#define ONENAND_CMD_CACHE_PROG		(0x1986)
+#define ONENAND_CMD_CACHE_PROG_LAST	(0x1987)
 
 /*
  * System Configuration 1 Register F221h (R, R/W)
-- 
1.7.0.4



From roman.tereshonkov at nokia.com  Tue Nov  2 07:25:27 2010
From: roman.tereshonkov at nokia.com (Roman Tereshonkov)
Date: Tue,  2 Nov 2010 13:25:27 +0200
Subject: [PATCH 0/3] mtd: onenand: add cache program feature for 4kb page
	onenand
Message-ID: <1288697130-12772-1-git-send-email-roman.tereshonkov@nokia.com>

Implement cache program feature for 4KB page onenand.
This feature improves the write data performance.
The observed 128KB data program speed change is
from 8827KB/s to 14156 KB/s when the feature is enabled.

Roman Tereshonkov (3):
  mtd: onenand: add option and variable for cache program feature
  mtd: onenand: introduce not "real" commands for cache program
    feature.
  mtd: onenand: implement cache program feature for 4kb page onenand

 drivers/mtd/onenand/omap2.c        |   12 ++++++++--
 drivers/mtd/onenand/onenand_base.c |   39 ++++++++++++++++++++++++++++++++++-
 include/linux/mtd/onenand.h        |   12 +++++++++++
 include/linux/mtd/onenand_regs.h   |    2 +
 4 files changed, 60 insertions(+), 5 deletions(-)



From roman.tereshonkov at nokia.com  Tue Nov  2 07:25:30 2010
From: roman.tereshonkov at nokia.com (Roman Tereshonkov)
Date: Tue,  2 Nov 2010 13:25:30 +0200
Subject: [PATCH 3/3] mtd: onenand: implement cache program feature for 4kb
	page onenand
In-Reply-To: <1288697130-12772-1-git-send-email-roman.tereshonkov@nokia.com>
References: <1288697130-12772-1-git-send-email-roman.tereshonkov@nokia.com>
Message-ID: <1288697130-12772-4-git-send-email-roman.tereshonkov@nokia.com>

Implement cache program feature for 4KB page onenand.
This feature improves the write data performance.
The observed 128KB data program speed change is
from 8827KB/s to 14156 KB/s when the feature is enabled.

Signed-off-by: Roman Tereshonkov <roman.tereshonkov at nokia.com>
---
 drivers/mtd/onenand/omap2.c        |   12 ++++++++--
 drivers/mtd/onenand/onenand_base.c |   39 ++++++++++++++++++++++++++++++++++-
 2 files changed, 46 insertions(+), 5 deletions(-)

diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index 9f322f1..da25a90 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -108,8 +108,9 @@ static void wait_warn(char *msg, int state, unsigned int ctrl,
 static int omap2_onenand_wait(struct mtd_info *mtd, int state)
 {
 	struct omap2_onenand *c = container_of(mtd, struct omap2_onenand, mtd);
+	struct onenand_chip *this = mtd->priv;
 	unsigned int intr = 0;
-	unsigned int ctrl;
+	unsigned int ctrl, ctrl_mask;
 	unsigned long timeout;
 	u32 syscfg;
 
@@ -180,7 +181,8 @@ retry:
 			if (result == 0) {
 				/* Timeout after 20ms */
 				ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS);
-				if (ctrl & ONENAND_CTRL_ONGO) {
+				if (ctrl & ONENAND_CTRL_ONGO &&
+				    !this->ongoing) {
 					/*
 					 * The operation seems to be still going
 					 * so give it some more time.
@@ -269,7 +271,11 @@ retry:
 		return -EIO;
 	}
 
-	if (ctrl & 0xFE9F)
+	ctrl_mask = 0xFE9F;
+	if (this->ongoing)
+		ctrl_mask &= ~0x8000;
+
+	if (ctrl & ctrl_mask)
 		wait_warn("unexpected controller status", state, ctrl, intr);
 
 	return 0;
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 6b3a875..b2c3e97 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -440,6 +440,19 @@ static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr, size_t le
 		default:
 			if (ONENAND_IS_2PLANE(this) && cmd == ONENAND_CMD_PROG)
 				cmd = ONENAND_CMD_2X_PROG;
+
+			/* Exclude 1st OTP and OTP blocks */
+			if (ONENAND_IS_CACHE_PROGRAM(this) &&
+			    likely(onenand_block(this, addr) != 0) &&
+			    ONENAND_IS_4KB_PAGE(this)) {
+
+				if (cmd == ONENAND_CMD_CACHE_PROG)
+					cmd = ONENAND_CMD_2X_CACHE_PROG;
+				else if (cmd == ONENAND_CMD_CACHE_PROG_LAST)
+					cmd = ONENAND_CMD_PROG;
+
+			}
+
 			dataram = ONENAND_CURRENT_BUFFERRAM(this);
 			break;
 		}
@@ -1845,7 +1858,7 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
 	const u_char *buf = ops->datbuf;
 	const u_char *oob = ops->oobbuf;
 	u_char *oobbuf;
-	int ret = 0;
+	int ret = 0, cmd;
 
 	DEBUG(MTD_DEBUG_LEVEL3, "%s: to = 0x%08x, len = %i\n",
 		__func__, (unsigned int) to, (int) len);
@@ -1954,7 +1967,25 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
 			ONENAND_SET_NEXT_BUFFERRAM(this);
 		}
 
-		this->command(mtd, ONENAND_CMD_PROG, to, mtd->writesize);
+		this->ongoing = 0;
+
+		/* Exclude 1st OTP and OTP blocks */
+		if (ONENAND_IS_CACHE_PROGRAM(this) &&
+		    likely(onenand_block(this, to) != 0) &&
+		    ONENAND_IS_4KB_PAGE(this)) {
+
+			if ((written + thislen) < len) {
+				cmd = ONENAND_CMD_CACHE_PROG;
+				this->ongoing = 1;
+			} else {
+				cmd = ONENAND_CMD_CACHE_PROG_LAST;
+			}
+
+		} else {
+			cmd = ONENAND_CMD_PROG;
+		}
+
+		this->command(mtd, cmd, to, mtd->writesize);
 
 		/*
 		 * 2 PLANE, MLC, and Flex-OneNAND wait here
@@ -3380,6 +3411,8 @@ static void onenand_check_features(struct mtd_info *mtd)
 		else if (numbufs == 1)
 			this->options |= ONENAND_HAS_4KB_PAGE;
 
+		this->options |= ONENAND_HAS_CACHE_PROGRAM;
+
 	case ONENAND_DEVICE_DENSITY_2Gb:
 		/* 2Gb DDP does not have 2 plane */
 		if (!ONENAND_IS_DDP(this))
@@ -3415,6 +3448,8 @@ static void onenand_check_features(struct mtd_info *mtd)
 		printk(KERN_DEBUG "Chip has 2 plane\n");
 	if (this->options & ONENAND_HAS_4KB_PAGE)
 		printk(KERN_DEBUG "Chip has 4KiB pagesize\n");
+	if (this->options & ONENAND_HAS_CACHE_PROGRAM)
+		printk(KERN_DEBUG "Chip has cache program feature\n");
 }
 
 /**
-- 
1.7.0.4



From kmpark at infradead.org  Tue Nov  2 10:00:41 2010
From: kmpark at infradead.org (Kyungmin Park)
Date: Tue, 2 Nov 2010 23:00:41 +0900
Subject: [PATCH 3/3] mtd: onenand: implement cache program feature for 4kb
	page onenand
In-Reply-To: <1288697130-12772-4-git-send-email-roman.tereshonkov@nokia.com>
References: <1288697130-12772-1-git-send-email-roman.tereshonkov@nokia.com>
	<1288697130-12772-4-git-send-email-roman.tereshonkov@nokia.com>
Message-ID: <AANLkTinq7HS5VHww8aq2XPKCwGnjEYSintsN4qRFJq1o@mail.gmail.com>

Hi,

On Tue, Nov 2, 2010 at 8:25 PM, Roman Tereshonkov
<roman.tereshonkov at nokia.com> wrote:
> Implement cache program feature for 4KB page onenand.
> This feature improves the write data performance.
> The observed 128KB data program speed change is
> from 8827KB/s to 14156 KB/s when the feature is enabled.
>
> Signed-off-by: Roman Tereshonkov <roman.tereshonkov at nokia.com>
> ---
> ?drivers/mtd/onenand/omap2.c ? ? ? ?| ? 12 ++++++++--
> ?drivers/mtd/onenand/onenand_base.c | ? 39 ++++++++++++++++++++++++++++++++++-
> ?2 files changed, 46 insertions(+), 5 deletions(-)

Please make separate the two patches, one for OMAP, another is for
onenand_base.c

>
> diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
> index 9f322f1..da25a90 100644
> --- a/drivers/mtd/onenand/omap2.c
> +++ b/drivers/mtd/onenand/omap2.c
> @@ -108,8 +108,9 @@ static void wait_warn(char *msg, int state, unsigned int ctrl,
> ?static int omap2_onenand_wait(struct mtd_info *mtd, int state)
> ?{
> ? ? ? ?struct omap2_onenand *c = container_of(mtd, struct omap2_onenand, mtd);
> + ? ? ? struct onenand_chip *this = mtd->priv;
> ? ? ? ?unsigned int intr = 0;
> - ? ? ? unsigned int ctrl;
> + ? ? ? unsigned int ctrl, ctrl_mask;
> ? ? ? ?unsigned long timeout;
> ? ? ? ?u32 syscfg;
>
> @@ -180,7 +181,8 @@ retry:
> ? ? ? ? ? ? ? ? ? ? ? ?if (result == 0) {
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?/* Timeout after 20ms */
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS);
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (ctrl & ONENAND_CTRL_ONGO) {
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (ctrl & ONENAND_CTRL_ONGO &&
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? !this->ongoing) {
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?/*
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * The operation seems to be still going
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * so give it some more time.
> @@ -269,7 +271,11 @@ retry:
> ? ? ? ? ? ? ? ?return -EIO;
> ? ? ? ?}
>
> - ? ? ? if (ctrl & 0xFE9F)
> + ? ? ? ctrl_mask = 0xFE9F;
> + ? ? ? if (this->ongoing)
> + ? ? ? ? ? ? ? ctrl_mask &= ~0x8000;
> +
> + ? ? ? if (ctrl & ctrl_mask)
> ? ? ? ? ? ? ? ?wait_warn("unexpected controller status", state, ctrl, intr);
>
> ? ? ? ?return 0;
> diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
> index 6b3a875..b2c3e97 100644
> --- a/drivers/mtd/onenand/onenand_base.c
> +++ b/drivers/mtd/onenand/onenand_base.c
> @@ -440,6 +440,19 @@ static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr, size_t le
> ? ? ? ? ? ? ? ?default:
> ? ? ? ? ? ? ? ? ? ? ? ?if (ONENAND_IS_2PLANE(this) && cmd == ONENAND_CMD_PROG)
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?cmd = ONENAND_CMD_2X_PROG;
> +
> + ? ? ? ? ? ? ? ? ? ? ? /* Exclude 1st OTP and OTP blocks */
Are there any reason? I think 1st OTP block is just block 0 so no need
to consider block 0 case.
> + ? ? ? ? ? ? ? ? ? ? ? if (ONENAND_IS_CACHE_PROGRAM(this) &&
> + ? ? ? ? ? ? ? ? ? ? ? ? ? likely(onenand_block(this, addr) != 0) &&
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ONENAND_IS_4KB_PAGE(this)) {
and I think no need to check 4KB_PAGE.
> +
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (cmd == ONENAND_CMD_CACHE_PROG)
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_2X_CACHE_PROG;
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? else if (cmd == ONENAND_CMD_CACHE_PROG_LAST)
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_PROG;
> +
> + ? ? ? ? ? ? ? ? ? ? ? }
> +
> ? ? ? ? ? ? ? ? ? ? ? ?dataram = ONENAND_CURRENT_BUFFERRAM(this);
> ? ? ? ? ? ? ? ? ? ? ? ?break;
> ? ? ? ? ? ? ? ?}
> @@ -1845,7 +1858,7 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
> ? ? ? ?const u_char *buf = ops->datbuf;
> ? ? ? ?const u_char *oob = ops->oobbuf;
> ? ? ? ?u_char *oobbuf;
> - ? ? ? int ret = 0;
> + ? ? ? int ret = 0, cmd;
>
> ? ? ? ?DEBUG(MTD_DEBUG_LEVEL3, "%s: to = 0x%08x, len = %i\n",
> ? ? ? ? ? ? ? ?__func__, (unsigned int) to, (int) len);
> @@ -1954,7 +1967,25 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
> ? ? ? ? ? ? ? ? ? ? ? ?ONENAND_SET_NEXT_BUFFERRAM(this);
> ? ? ? ? ? ? ? ?}
>
> - ? ? ? ? ? ? ? this->command(mtd, ONENAND_CMD_PROG, to, mtd->writesize);
> + ? ? ? ? ? ? ? this->ongoing = 0;
> +
> + ? ? ? ? ? ? ? /* Exclude 1st OTP and OTP blocks */
> + ? ? ? ? ? ? ? if (ONENAND_IS_CACHE_PROGRAM(this) &&
> + ? ? ? ? ? ? ? ? ? likely(onenand_block(this, to) != 0) &&
> + ? ? ? ? ? ? ? ? ? ONENAND_IS_4KB_PAGE(this)) {
check the length here instead of 4KB_PAGE.
> +
> + ? ? ? ? ? ? ? ? ? ? ? if ((written + thislen) < len) {
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_CACHE_PROG;
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? this->ongoing = 1;
> + ? ? ? ? ? ? ? ? ? ? ? } else {
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_CACHE_PROG_LAST;
> + ? ? ? ? ? ? ? ? ? ? ? }
Need to check how to pass the cmd properly. How/When send the CACHE_PROG_LAST?
> +
> + ? ? ? ? ? ? ? } else {
> + ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_PROG;
> + ? ? ? ? ? ? ? }
> +
> + ? ? ? ? ? ? ? this->command(mtd, cmd, to, mtd->writesize);
>
> ? ? ? ? ? ? ? ?/*
> ? ? ? ? ? ? ? ? * 2 PLANE, MLC, and Flex-OneNAND wait here
> @@ -3380,6 +3411,8 @@ static void onenand_check_features(struct mtd_info *mtd)
> ? ? ? ? ? ? ? ?else if (numbufs == 1)
> ? ? ? ? ? ? ? ? ? ? ? ?this->options |= ONENAND_HAS_4KB_PAGE;
>
> + ? ? ? ? ? ? ? this->options |= ONENAND_HAS_CACHE_PROGRAM;
It also needs to set CACHE_PROGRAM option.
> +
> ? ? ? ?case ONENAND_DEVICE_DENSITY_2Gb:
> ? ? ? ? ? ? ? ?/* 2Gb DDP does not have 2 plane */
> ? ? ? ? ? ? ? ?if (!ONENAND_IS_DDP(this))
> @@ -3415,6 +3448,8 @@ static void onenand_check_features(struct mtd_info *mtd)
> ? ? ? ? ? ? ? ?printk(KERN_DEBUG "Chip has 2 plane\n");
> ? ? ? ?if (this->options & ONENAND_HAS_4KB_PAGE)
> ? ? ? ? ? ? ? ?printk(KERN_DEBUG "Chip has 4KiB pagesize\n");
> + ? ? ? if (this->options & ONENAND_HAS_CACHE_PROGRAM)
> + ? ? ? ? ? ? ? printk(KERN_DEBUG "Chip has cache program feature\n");
> ?}

Thank you,
Kyungmin Park


From kyungmin.park at samsung.com  Tue Nov  2 10:01:35 2010
From: kyungmin.park at samsung.com (Kyungmin Park)
Date: Tue, 2 Nov 2010 23:01:35 +0900
Subject: [PATCH 0/3] mtd: onenand: add cache program feature for 4kb page
	onenand
In-Reply-To: <1288697130-12772-1-git-send-email-roman.tereshonkov@nokia.com>
References: <1288697130-12772-1-git-send-email-roman.tereshonkov@nokia.com>
Message-ID: <AANLkTikxkdX4CGn5ofMRzwoHch-PoOEgPaYXrg_50cpx@mail.gmail.com>

Hi,

Thank you for your works.

I'll check your patch in my board, 2KiB & 4KiB pagesize.

Thank you,
Kyungmin Park

On Tue, Nov 2, 2010 at 8:25 PM, Roman Tereshonkov
<roman.tereshonkov at nokia.com> wrote:
> Implement cache program feature for 4KB page onenand.
> This feature improves the write data performance.
> The observed 128KB data program speed change is
> from 8827KB/s to 14156 KB/s when the feature is enabled.
>
> Roman Tereshonkov (3):
> ?mtd: onenand: add option and variable for cache program feature
> ?mtd: onenand: introduce not "real" commands for cache program
> ? ?feature.
> ?mtd: onenand: implement cache program feature for 4kb page onenand
>
> ?drivers/mtd/onenand/omap2.c ? ? ? ?| ? 12 ++++++++--
> ?drivers/mtd/onenand/onenand_base.c | ? 39 ++++++++++++++++++++++++++++++++++-
> ?include/linux/mtd/onenand.h ? ? ? ?| ? 12 +++++++++++
> ?include/linux/mtd/onenand_regs.h ? | ? ?2 +
> ?4 files changed, 60 insertions(+), 5 deletions(-)
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>


From ketil at froyn.name  Tue Nov  2 10:37:13 2010
From: ketil at froyn.name (Ketil Froyn)
Date: Tue, 2 Nov 2010 15:37:13 +0100
Subject: Suggested patch: reset errno after isatty()
Message-ID: <AANLkTimwumfui-_T1ScDYwMLKbNh1ia-SDMUg56wTfN5@mail.gmail.com>

isatty() uses an ioctl and the resulting error code to determine if an
fd is a tty or not. If it isn't, errno is set to ENOTTY. Later in the
code, pread() fails, or rather returns 0 immediately. When this
happens, the following perror("pread") tells me:

pread: Not a typewriter

which is the wrong error. Here's strace showing the issue:

open("/sdcard/mtd5.dump", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0644) = 4
ioctl(4, TCGETS or SNDCTL_TMR_TIMEBASE, 0xbee43ab0) = -1 ENOTTY (Not a
typewriter)
write(2, "Block size 131072, page size 204"..., 47) = 47
write(2, "Dumping data starting at 0x00000"..., 64) = 64
ioctl(3, 0x40084d0b, 0xbee43c30)        = 0
pread(3, "", 2048, 0)                   = 0
write(2, "pread", 5)                    = 5
write(2, ": ", 2)                       = 2
write(2, "Not a typewriter", 16)        = 16
write(2, "\n", 1)                       = 1

And the included patch (below, against v1.4.1, but simple enough)
should take care of it.

Though if someone knows what could be causing the pread() to keep
failing, I'd be interested in hearing it! And the mtd device is
reported as having a page size of 2048 and oob size 56, so to get even
this far I added that as a valid page size. Isn't it?

diff --git a/nanddump.c b/nanddump.c
index 709b2db..ba370ad 100644
--- a/nanddump.c
+++ b/nanddump.c
@@ -374,6 +374,7 @@ int main(int argc, char * const argv[])
                close(fd);
                exit(EXIT_FAILURE);
        }
+       errno = 0;

        /* Initialize start/end addresses and block size */
        if (length)


From roman.tereshonkov at nokia.com  Tue Nov  2 10:37:59 2010
From: roman.tereshonkov at nokia.com (Roman Tereshonkov)
Date: Tue, 2 Nov 2010 16:37:59 +0200
Subject: [PATCH 3/3] mtd: onenand: implement cache program feature for
	4kb page onenand
In-Reply-To: <AANLkTinq7HS5VHww8aq2XPKCwGnjEYSintsN4qRFJq1o@mail.gmail.com>
References: <1288697130-12772-1-git-send-email-roman.tereshonkov@nokia.com>
	<1288697130-12772-4-git-send-email-roman.tereshonkov@nokia.com>
	<AANLkTinq7HS5VHww8aq2XPKCwGnjEYSintsN4qRFJq1o@mail.gmail.com>
Message-ID: <20101102143759.GA15222@nokia.com>

On Tue, Nov 02, 2010 at 03:00:41PM +0100, ext Kyungmin Park wrote:
> Hi,
> 
> On Tue, Nov 2, 2010 at 8:25 PM, Roman Tereshonkov
> <roman.tereshonkov at nokia.com> wrote:
> > Implement cache program feature for 4KB page onenand.
> > This feature improves the write data performance.
> > The observed 128KB data program speed change is
> > from 8827KB/s to 14156 KB/s when the feature is enabled.
> >
> > Signed-off-by: Roman Tereshonkov <roman.tereshonkov at nokia.com>
> > ---
> > ?drivers/mtd/onenand/omap2.c ? ? ? ?| ? 12 ++++++++--
> > ?drivers/mtd/onenand/onenand_base.c | ? 39 ++++++++++++++++++++++++++++++++++-
> > ?2 files changed, 46 insertions(+), 5 deletions(-)
> 
> Please make separate the two patches, one for OMAP, another is for
> onenand_base.c
> 
> >
> > diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
> > index 9f322f1..da25a90 100644
> > --- a/drivers/mtd/onenand/omap2.c
> > +++ b/drivers/mtd/onenand/omap2.c
> > @@ -108,8 +108,9 @@ static void wait_warn(char *msg, int state, unsigned int ctrl,
> > ?static int omap2_onenand_wait(struct mtd_info *mtd, int state)
> > ?{
> > ? ? ? ?struct omap2_onenand *c = container_of(mtd, struct omap2_onenand, mtd);
> > + ? ? ? struct onenand_chip *this = mtd->priv;
> > ? ? ? ?unsigned int intr = 0;
> > - ? ? ? unsigned int ctrl;
> > + ? ? ? unsigned int ctrl, ctrl_mask;
> > ? ? ? ?unsigned long timeout;
> > ? ? ? ?u32 syscfg;
> >
> > @@ -180,7 +181,8 @@ retry:
> > ? ? ? ? ? ? ? ? ? ? ? ?if (result == 0) {
> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?/* Timeout after 20ms */
> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS);
> > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (ctrl & ONENAND_CTRL_ONGO) {
> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (ctrl & ONENAND_CTRL_ONGO &&
> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? !this->ongoing) {
> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?/*
> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * The operation seems to be still going
> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * so give it some more time.
> > @@ -269,7 +271,11 @@ retry:
> > ? ? ? ? ? ? ? ?return -EIO;
> > ? ? ? ?}
> >
> > - ? ? ? if (ctrl & 0xFE9F)
> > + ? ? ? ctrl_mask = 0xFE9F;
> > + ? ? ? if (this->ongoing)
> > + ? ? ? ? ? ? ? ctrl_mask &= ~0x8000;
> > +
> > + ? ? ? if (ctrl & ctrl_mask)
> > ? ? ? ? ? ? ? ?wait_warn("unexpected controller status", state, ctrl, intr);
> >
> > ? ? ? ?return 0;
> > diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
> > index 6b3a875..b2c3e97 100644
> > --- a/drivers/mtd/onenand/onenand_base.c
> > +++ b/drivers/mtd/onenand/onenand_base.c
> > @@ -440,6 +440,19 @@ static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr, size_t le
> > ? ? ? ? ? ? ? ?default:
> > ? ? ? ? ? ? ? ? ? ? ? ?if (ONENAND_IS_2PLANE(this) && cmd == ONENAND_CMD_PROG)
> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?cmd = ONENAND_CMD_2X_PROG;
> > +
> > + ? ? ? ? ? ? ? ? ? ? ? /* Exclude 1st OTP and OTP blocks */
> Are there any reason? I think 1st OTP block is just block 0 so no need
> to consider block 0 case.


Specification tells:
3.9.1 Cache Program Operation
"Note that Cache Program command cannot be performed on OTP block and 1st block OTP"


> > + ? ? ? ? ? ? ? ? ? ? ? if (ONENAND_IS_CACHE_PROGRAM(this) &&
> > + ? ? ? ? ? ? ? ? ? ? ? ? ? likely(onenand_block(this, addr) != 0) &&
> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ONENAND_IS_4KB_PAGE(this)) {
> and I think no need to check 4KB_PAGE.


This patch is for 4kb page onenand only. The 2kb page onenand uses different
commands for cache program. Also 2kb page case cache program depends on
CONFIG_MTD_ONENAND_2X_PROGRAM.


> > +
> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (cmd == ONENAND_CMD_CACHE_PROG)
> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_2X_CACHE_PROG;
> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? else if (cmd == ONENAND_CMD_CACHE_PROG_LAST)
> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_PROG;
> > +
> > + ? ? ? ? ? ? ? ? ? ? ? }
> > +
> > ? ? ? ? ? ? ? ? ? ? ? ?dataram = ONENAND_CURRENT_BUFFERRAM(this);
> > ? ? ? ? ? ? ? ? ? ? ? ?break;
> > ? ? ? ? ? ? ? ?}
> > @@ -1845,7 +1858,7 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
> > ? ? ? ?const u_char *buf = ops->datbuf;
> > ? ? ? ?const u_char *oob = ops->oobbuf;
> > ? ? ? ?u_char *oobbuf;
> > - ? ? ? int ret = 0;
> > + ? ? ? int ret = 0, cmd;
> >
> > ? ? ? ?DEBUG(MTD_DEBUG_LEVEL3, "%s: to = 0x%08x, len = %i\n",
> > ? ? ? ? ? ? ? ?__func__, (unsigned int) to, (int) len);
> > @@ -1954,7 +1967,25 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
> > ? ? ? ? ? ? ? ? ? ? ? ?ONENAND_SET_NEXT_BUFFERRAM(this);
> > ? ? ? ? ? ? ? ?}
> >
> > - ? ? ? ? ? ? ? this->command(mtd, ONENAND_CMD_PROG, to, mtd->writesize);
> > + ? ? ? ? ? ? ? this->ongoing = 0;
> > +
> > + ? ? ? ? ? ? ? /* Exclude 1st OTP and OTP blocks */
> > + ? ? ? ? ? ? ? if (ONENAND_IS_CACHE_PROGRAM(this) &&
> > + ? ? ? ? ? ? ? ? ? likely(onenand_block(this, to) != 0) &&
> > + ? ? ? ? ? ? ? ? ? ONENAND_IS_4KB_PAGE(this)) {
> check the length here instead of 4KB_PAGE.


This patch is for 4kb page onenand only. The 2kb page onenand uses different
commands for cache program.


> > +
> > + ? ? ? ? ? ? ? ? ? ? ? if ((written + thislen) < len) {
> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_CACHE_PROG;
> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? this->ongoing = 1;
> > + ? ? ? ? ? ? ? ? ? ? ? } else {
> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_CACHE_PROG_LAST;
> > + ? ? ? ? ? ? ? ? ? ? ? }
> Need to check how to pass the cmd properly. How/When send the CACHE_PROG_LAST?


CACHE_PROG_LAST command must be sent for last programmed piece of data, that is
(written + thislen) >= len.


> > +
> > + ? ? ? ? ? ? ? } else {
> > + ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_PROG;
> > + ? ? ? ? ? ? ? }
> > +
> > + ? ? ? ? ? ? ? this->command(mtd, cmd, to, mtd->writesize);
> >
> > ? ? ? ? ? ? ? ?/*
> > ? ? ? ? ? ? ? ? * 2 PLANE, MLC, and Flex-OneNAND wait here
> > @@ -3380,6 +3411,8 @@ static void onenand_check_features(struct mtd_info *mtd)
> > ? ? ? ? ? ? ? ?else if (numbufs == 1)
> > ? ? ? ? ? ? ? ? ? ? ? ?this->options |= ONENAND_HAS_4KB_PAGE;
> >
> > + ? ? ? ? ? ? ? this->options |= ONENAND_HAS_CACHE_PROGRAM;
> It also needs to set CACHE_PROGRAM option.


Sorry. What do mean here?


> > +
> > ? ? ? ?case ONENAND_DEVICE_DENSITY_2Gb:
> > ? ? ? ? ? ? ? ?/* 2Gb DDP does not have 2 plane */
> > ? ? ? ? ? ? ? ?if (!ONENAND_IS_DDP(this))
> > @@ -3415,6 +3448,8 @@ static void onenand_check_features(struct mtd_info *mtd)
> > ? ? ? ? ? ? ? ?printk(KERN_DEBUG "Chip has 2 plane\n");
> > ? ? ? ?if (this->options & ONENAND_HAS_4KB_PAGE)
> > ? ? ? ? ? ? ? ?printk(KERN_DEBUG "Chip has 4KiB pagesize\n");
> > + ? ? ? if (this->options & ONENAND_HAS_CACHE_PROGRAM)
> > + ? ? ? ? ? ? ? printk(KERN_DEBUG "Chip has cache program feature\n");
> > ?}
> 
> Thank you,
> Kyungmin Park


From kmpark at infradead.org  Tue Nov  2 10:50:51 2010
From: kmpark at infradead.org (Kyungmin Park)
Date: Tue, 2 Nov 2010 23:50:51 +0900
Subject: [PATCH 3/3] mtd: onenand: implement cache program feature for 4kb
	page onenand
In-Reply-To: <20101102143759.GA15222@nokia.com>
References: <1288697130-12772-1-git-send-email-roman.tereshonkov@nokia.com>
	<1288697130-12772-4-git-send-email-roman.tereshonkov@nokia.com>
	<AANLkTinq7HS5VHww8aq2XPKCwGnjEYSintsN4qRFJq1o@mail.gmail.com>
	<20101102143759.GA15222@nokia.com>
Message-ID: <AANLkTikunPYxpG_8HONV6BnOo54GNk3wvmMasEq1G9tO@mail.gmail.com>

On Tue, Nov 2, 2010 at 11:37 PM, Roman Tereshonkov
<roman.tereshonkov at nokia.com> wrote:
> On Tue, Nov 02, 2010 at 03:00:41PM +0100, ext Kyungmin Park wrote:
>> Hi,
>>
>> On Tue, Nov 2, 2010 at 8:25 PM, Roman Tereshonkov
>> <roman.tereshonkov at nokia.com> wrote:
>> > Implement cache program feature for 4KB page onenand.
>> > This feature improves the write data performance.
>> > The observed 128KB data program speed change is
>> > from 8827KB/s to 14156 KB/s when the feature is enabled.
>> >
>> > Signed-off-by: Roman Tereshonkov <roman.tereshonkov at nokia.com>
>> > ---
>> > ?drivers/mtd/onenand/omap2.c ? ? ? ?| ? 12 ++++++++--
>> > ?drivers/mtd/onenand/onenand_base.c | ? 39 ++++++++++++++++++++++++++++++++++-
>> > ?2 files changed, 46 insertions(+), 5 deletions(-)
>>
>> Please make separate the two patches, one for OMAP, another is for
>> onenand_base.c
>>
>> >
>> > diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
>> > index 9f322f1..da25a90 100644
>> > --- a/drivers/mtd/onenand/omap2.c
>> > +++ b/drivers/mtd/onenand/omap2.c
>> > @@ -108,8 +108,9 @@ static void wait_warn(char *msg, int state, unsigned int ctrl,
>> > ?static int omap2_onenand_wait(struct mtd_info *mtd, int state)
>> > ?{
>> > ? ? ? ?struct omap2_onenand *c = container_of(mtd, struct omap2_onenand, mtd);
>> > + ? ? ? struct onenand_chip *this = mtd->priv;
>> > ? ? ? ?unsigned int intr = 0;
>> > - ? ? ? unsigned int ctrl;
>> > + ? ? ? unsigned int ctrl, ctrl_mask;
>> > ? ? ? ?unsigned long timeout;
>> > ? ? ? ?u32 syscfg;
>> >
>> > @@ -180,7 +181,8 @@ retry:
>> > ? ? ? ? ? ? ? ? ? ? ? ?if (result == 0) {
>> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?/* Timeout after 20ms */
>> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS);
>> > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (ctrl & ONENAND_CTRL_ONGO) {
>> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (ctrl & ONENAND_CTRL_ONGO &&
>> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? !this->ongoing) {
>> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?/*
>> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * The operation seems to be still going
>> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * so give it some more time.
>> > @@ -269,7 +271,11 @@ retry:
>> > ? ? ? ? ? ? ? ?return -EIO;
>> > ? ? ? ?}
>> >
>> > - ? ? ? if (ctrl & 0xFE9F)
>> > + ? ? ? ctrl_mask = 0xFE9F;
>> > + ? ? ? if (this->ongoing)
>> > + ? ? ? ? ? ? ? ctrl_mask &= ~0x8000;
>> > +
>> > + ? ? ? if (ctrl & ctrl_mask)
>> > ? ? ? ? ? ? ? ?wait_warn("unexpected controller status", state, ctrl, intr);
>> >
>> > ? ? ? ?return 0;
>> > diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
>> > index 6b3a875..b2c3e97 100644
>> > --- a/drivers/mtd/onenand/onenand_base.c
>> > +++ b/drivers/mtd/onenand/onenand_base.c
>> > @@ -440,6 +440,19 @@ static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr, size_t le
>> > ? ? ? ? ? ? ? ?default:
>> > ? ? ? ? ? ? ? ? ? ? ? ?if (ONENAND_IS_2PLANE(this) && cmd == ONENAND_CMD_PROG)
>> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?cmd = ONENAND_CMD_2X_PROG;
>> > +
>> > + ? ? ? ? ? ? ? ? ? ? ? /* Exclude 1st OTP and OTP blocks */
>> Are there any reason? I think 1st OTP block is just block 0 so no need
>> to consider block 0 case.
>
>
> Specification tells:
> 3.9.1 Cache Program Operation
> "Note that Cache Program command cannot be performed on OTP block and 1st block OTP"

Okay I'm not yet check the Spec. I will check it at office.
>
>
>> > + ? ? ? ? ? ? ? ? ? ? ? if (ONENAND_IS_CACHE_PROGRAM(this) &&
>> > + ? ? ? ? ? ? ? ? ? ? ? ? ? likely(onenand_block(this, addr) != 0) &&
>> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ONENAND_IS_4KB_PAGE(this)) {
>> and I think no need to check 4KB_PAGE.
>
>
> This patch is for 4kb page onenand only. The 2kb page onenand uses different
> commands for cache program. Also 2kb page case cache program depends on
> CONFIG_MTD_ONENAND_2X_PROGRAM.
>
>
>> > +
>> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (cmd == ONENAND_CMD_CACHE_PROG)
>> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_2X_CACHE_PROG;
>> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? else if (cmd == ONENAND_CMD_CACHE_PROG_LAST)
>> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_PROG;
>> > +
>> > + ? ? ? ? ? ? ? ? ? ? ? }
>> > +
>> > ? ? ? ? ? ? ? ? ? ? ? ?dataram = ONENAND_CURRENT_BUFFERRAM(this);
>> > ? ? ? ? ? ? ? ? ? ? ? ?break;
>> > ? ? ? ? ? ? ? ?}
>> > @@ -1845,7 +1858,7 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
>> > ? ? ? ?const u_char *buf = ops->datbuf;
>> > ? ? ? ?const u_char *oob = ops->oobbuf;
>> > ? ? ? ?u_char *oobbuf;
>> > - ? ? ? int ret = 0;
>> > + ? ? ? int ret = 0, cmd;
>> >
>> > ? ? ? ?DEBUG(MTD_DEBUG_LEVEL3, "%s: to = 0x%08x, len = %i\n",
>> > ? ? ? ? ? ? ? ?__func__, (unsigned int) to, (int) len);
>> > @@ -1954,7 +1967,25 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
>> > ? ? ? ? ? ? ? ? ? ? ? ?ONENAND_SET_NEXT_BUFFERRAM(this);
>> > ? ? ? ? ? ? ? ?}
>> >
>> > - ? ? ? ? ? ? ? this->command(mtd, ONENAND_CMD_PROG, to, mtd->writesize);
>> > + ? ? ? ? ? ? ? this->ongoing = 0;
>> > +
>> > + ? ? ? ? ? ? ? /* Exclude 1st OTP and OTP blocks */
>> > + ? ? ? ? ? ? ? if (ONENAND_IS_CACHE_PROGRAM(this) &&
>> > + ? ? ? ? ? ? ? ? ? likely(onenand_block(this, to) != 0) &&
>> > + ? ? ? ? ? ? ? ? ? ONENAND_IS_4KB_PAGE(this)) {
>> check the length here instead of 4KB_PAGE.
>
>
> This patch is for 4kb page onenand only. The 2kb page onenand uses different
> commands for cache program.
I see, check it both 4KiB and 2KiB at office.
>
>
>> > +
>> > + ? ? ? ? ? ? ? ? ? ? ? if ((written + thislen) < len) {
>> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_CACHE_PROG;
>> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? this->ongoing = 1;
>> > + ? ? ? ? ? ? ? ? ? ? ? } else {
>> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_CACHE_PROG_LAST;
>> > + ? ? ? ? ? ? ? ? ? ? ? }
>> Need to check how to pass the cmd properly. How/When send the CACHE_PROG_LAST?
>
>
> CACHE_PROG_LAST command must be sent for last programmed piece of data, that is
> (written + thislen) >= len.
Yes I know, I mean to use the CACHE program I think write size should
be more than 4KiB. e.g., 8KiB write size,
>
>
>> > +
>> > + ? ? ? ? ? ? ? } else {
>> > + ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_PROG;
>> > + ? ? ? ? ? ? ? }
>> > +
>> > + ? ? ? ? ? ? ? this->command(mtd, cmd, to, mtd->writesize);
>> >
>> > ? ? ? ? ? ? ? ?/*
>> > ? ? ? ? ? ? ? ? * 2 PLANE, MLC, and Flex-OneNAND wait here
>> > @@ -3380,6 +3411,8 @@ static void onenand_check_features(struct mtd_info *mtd)
>> > ? ? ? ? ? ? ? ?else if (numbufs == 1)
>> > ? ? ? ? ? ? ? ? ? ? ? ?this->options |= ONENAND_HAS_4KB_PAGE;
>> >
>> > + ? ? ? ? ? ? ? this->options |= ONENAND_HAS_CACHE_PROGRAM;
>> It also needs to set CACHE_PROGRAM option.
>
>
> Sorry. What do mean here?
Ah, Now it always set the CACHE_PROGRAM, so it should be set on each chip spec.
>
>
>> > +
>> > ? ? ? ?case ONENAND_DEVICE_DENSITY_2Gb:
>> > ? ? ? ? ? ? ? ?/* 2Gb DDP does not have 2 plane */
>> > ? ? ? ? ? ? ? ?if (!ONENAND_IS_DDP(this))
>> > @@ -3415,6 +3448,8 @@ static void onenand_check_features(struct mtd_info *mtd)
>> > ? ? ? ? ? ? ? ?printk(KERN_DEBUG "Chip has 2 plane\n");
>> > ? ? ? ?if (this->options & ONENAND_HAS_4KB_PAGE)
>> > ? ? ? ? ? ? ? ?printk(KERN_DEBUG "Chip has 4KiB pagesize\n");
>> > + ? ? ? if (this->options & ONENAND_HAS_CACHE_PROGRAM)
>> > + ? ? ? ? ? ? ? printk(KERN_DEBUG "Chip has cache program feature\n");
>> > ?}
>>
>> Thank you,
>> Kyungmin Park
>


From roman.tereshonkov at nokia.com  Tue Nov  2 12:53:16 2010
From: roman.tereshonkov at nokia.com (Roman Tereshonkov)
Date: Tue, 2 Nov 2010 18:53:16 +0200
Subject: [PATCH 3/3] mtd: onenand: implement cache program feature for
	4kb page onenand
In-Reply-To: <AANLkTikunPYxpG_8HONV6BnOo54GNk3wvmMasEq1G9tO@mail.gmail.com>
References: <1288697130-12772-1-git-send-email-roman.tereshonkov@nokia.com>
	<1288697130-12772-4-git-send-email-roman.tereshonkov@nokia.com>
	<AANLkTinq7HS5VHww8aq2XPKCwGnjEYSintsN4qRFJq1o@mail.gmail.com>
	<20101102143759.GA15222@nokia.com>
	<AANLkTikunPYxpG_8HONV6BnOo54GNk3wvmMasEq1G9tO@mail.gmail.com>
Message-ID: <20101102165316.GA15304@nokia.com>

On Tue, Nov 02, 2010 at 03:50:51PM +0100, ext Kyungmin Park wrote:
> On Tue, Nov 2, 2010 at 11:37 PM, Roman Tereshonkov
> <roman.tereshonkov at nokia.com> wrote:
> > On Tue, Nov 02, 2010 at 03:00:41PM +0100, ext Kyungmin Park wrote:
> >> Hi,
> >>
> >> On Tue, Nov 2, 2010 at 8:25 PM, Roman Tereshonkov
> >> <roman.tereshonkov at nokia.com> wrote:
> >> > Implement cache program feature for 4KB page onenand.
> >> > This feature improves the write data performance.
> >> > The observed 128KB data program speed change is
> >> > from 8827KB/s to 14156 KB/s when the feature is enabled.
> >> >
> >> > Signed-off-by: Roman Tereshonkov <roman.tereshonkov at nokia.com>
> >> > ---
> >> > ?drivers/mtd/onenand/omap2.c ? ? ? ?| ? 12 ++++++++--
> >> > ?drivers/mtd/onenand/onenand_base.c | ? 39 ++++++++++++++++++++++++++++++++++-
> >> > ?2 files changed, 46 insertions(+), 5 deletions(-)
> >>
> >> Please make separate the two patches, one for OMAP, another is for
> >> onenand_base.c
> >>
> >> >
> >> > diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
> >> > index 9f322f1..da25a90 100644
> >> > --- a/drivers/mtd/onenand/omap2.c
> >> > +++ b/drivers/mtd/onenand/omap2.c
> >> > @@ -108,8 +108,9 @@ static void wait_warn(char *msg, int state, unsigned int ctrl,
> >> > ?static int omap2_onenand_wait(struct mtd_info *mtd, int state)
> >> > ?{
> >> > ? ? ? ?struct omap2_onenand *c = container_of(mtd, struct omap2_onenand, mtd);
> >> > + ? ? ? struct onenand_chip *this = mtd->priv;
> >> > ? ? ? ?unsigned int intr = 0;
> >> > - ? ? ? unsigned int ctrl;
> >> > + ? ? ? unsigned int ctrl, ctrl_mask;
> >> > ? ? ? ?unsigned long timeout;
> >> > ? ? ? ?u32 syscfg;
> >> >
> >> > @@ -180,7 +181,8 @@ retry:
> >> > ? ? ? ? ? ? ? ? ? ? ? ?if (result == 0) {
> >> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?/* Timeout after 20ms */
> >> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS);
> >> > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (ctrl & ONENAND_CTRL_ONGO) {
> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (ctrl & ONENAND_CTRL_ONGO &&
> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? !this->ongoing) {
> >> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?/*
> >> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * The operation seems to be still going
> >> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * so give it some more time.
> >> > @@ -269,7 +271,11 @@ retry:
> >> > ? ? ? ? ? ? ? ?return -EIO;
> >> > ? ? ? ?}
> >> >
> >> > - ? ? ? if (ctrl & 0xFE9F)
> >> > + ? ? ? ctrl_mask = 0xFE9F;
> >> > + ? ? ? if (this->ongoing)
> >> > + ? ? ? ? ? ? ? ctrl_mask &= ~0x8000;
> >> > +
> >> > + ? ? ? if (ctrl & ctrl_mask)
> >> > ? ? ? ? ? ? ? ?wait_warn("unexpected controller status", state, ctrl, intr);
> >> >
> >> > ? ? ? ?return 0;
> >> > diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
> >> > index 6b3a875..b2c3e97 100644
> >> > --- a/drivers/mtd/onenand/onenand_base.c
> >> > +++ b/drivers/mtd/onenand/onenand_base.c
> >> > @@ -440,6 +440,19 @@ static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr, size_t le
> >> > ? ? ? ? ? ? ? ?default:
> >> > ? ? ? ? ? ? ? ? ? ? ? ?if (ONENAND_IS_2PLANE(this) && cmd == ONENAND_CMD_PROG)
> >> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?cmd = ONENAND_CMD_2X_PROG;
> >> > +
> >> > + ? ? ? ? ? ? ? ? ? ? ? /* Exclude 1st OTP and OTP blocks */
> >> Are there any reason? I think 1st OTP block is just block 0 so no need
> >> to consider block 0 case.
> >
> >
> > Specification tells:
> > 3.9.1 Cache Program Operation
> > "Note that Cache Program command cannot be performed on OTP block and 1st block OTP"
> 
> Okay I'm not yet check the Spec. I will check it at office.
> >
> >
> >> > + ? ? ? ? ? ? ? ? ? ? ? if (ONENAND_IS_CACHE_PROGRAM(this) &&
> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? likely(onenand_block(this, addr) != 0) &&
> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ONENAND_IS_4KB_PAGE(this)) {
> >> and I think no need to check 4KB_PAGE.
> >
> >
> > This patch is for 4kb page onenand only. The 2kb page onenand uses different
> > commands for cache program. Also 2kb page case cache program depends on
> > CONFIG_MTD_ONENAND_2X_PROGRAM.
> >
> >
> >> > +
> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (cmd == ONENAND_CMD_CACHE_PROG)
> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_2X_CACHE_PROG;
> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? else if (cmd == ONENAND_CMD_CACHE_PROG_LAST)
> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_PROG;
> >> > +
> >> > + ? ? ? ? ? ? ? ? ? ? ? }
> >> > +
> >> > ? ? ? ? ? ? ? ? ? ? ? ?dataram = ONENAND_CURRENT_BUFFERRAM(this);
> >> > ? ? ? ? ? ? ? ? ? ? ? ?break;
> >> > ? ? ? ? ? ? ? ?}
> >> > @@ -1845,7 +1858,7 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
> >> > ? ? ? ?const u_char *buf = ops->datbuf;
> >> > ? ? ? ?const u_char *oob = ops->oobbuf;
> >> > ? ? ? ?u_char *oobbuf;
> >> > - ? ? ? int ret = 0;
> >> > + ? ? ? int ret = 0, cmd;
> >> >
> >> > ? ? ? ?DEBUG(MTD_DEBUG_LEVEL3, "%s: to = 0x%08x, len = %i\n",
> >> > ? ? ? ? ? ? ? ?__func__, (unsigned int) to, (int) len);
> >> > @@ -1954,7 +1967,25 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
> >> > ? ? ? ? ? ? ? ? ? ? ? ?ONENAND_SET_NEXT_BUFFERRAM(this);
> >> > ? ? ? ? ? ? ? ?}
> >> >
> >> > - ? ? ? ? ? ? ? this->command(mtd, ONENAND_CMD_PROG, to, mtd->writesize);
> >> > + ? ? ? ? ? ? ? this->ongoing = 0;
> >> > +
> >> > + ? ? ? ? ? ? ? /* Exclude 1st OTP and OTP blocks */
> >> > + ? ? ? ? ? ? ? if (ONENAND_IS_CACHE_PROGRAM(this) &&
> >> > + ? ? ? ? ? ? ? ? ? likely(onenand_block(this, to) != 0) &&
> >> > + ? ? ? ? ? ? ? ? ? ONENAND_IS_4KB_PAGE(this)) {
> >> check the length here instead of 4KB_PAGE.
> >
> >
> > This patch is for 4kb page onenand only. The 2kb page onenand uses different
> > commands for cache program.
> I see, check it both 4KiB and 2KiB at office.
> >
> >
> >> > +
> >> > + ? ? ? ? ? ? ? ? ? ? ? if ((written + thislen) < len) {
> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_CACHE_PROG;
> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? this->ongoing = 1;
> >> > + ? ? ? ? ? ? ? ? ? ? ? } else {
> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_CACHE_PROG_LAST;
> >> > + ? ? ? ? ? ? ? ? ? ? ? }
> >> Need to check how to pass the cmd properly. How/When send the CACHE_PROG_LAST?
> >
> >
> > CACHE_PROG_LAST command must be sent for last programmed piece of data, that is
> > (written + thislen) >= len.
> Yes I know, I mean to use the CACHE program I think write size should
> be more than 4KiB. e.g., 8KiB write size,

Considering 4KB page onenand, for each program command the 4KB data is written at once.
If the condition ((written + thislen) < len) is true it means that there is more
than 4KB data to written. That means at least one more data program command.
Otherwise the ONENAND_CMD_CACHE_PROG_LAST is used which is normal program command.


> >
> >
> >> > +
> >> > + ? ? ? ? ? ? ? } else {
> >> > + ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_PROG;
> >> > + ? ? ? ? ? ? ? }
> >> > +
> >> > + ? ? ? ? ? ? ? this->command(mtd, cmd, to, mtd->writesize);
> >> >
> >> > ? ? ? ? ? ? ? ?/*
> >> > ? ? ? ? ? ? ? ? * 2 PLANE, MLC, and Flex-OneNAND wait here
> >> > @@ -3380,6 +3411,8 @@ static void onenand_check_features(struct mtd_info *mtd)
> >> > ? ? ? ? ? ? ? ?else if (numbufs == 1)
> >> > ? ? ? ? ? ? ? ? ? ? ? ?this->options |= ONENAND_HAS_4KB_PAGE;
> >> >
> >> > + ? ? ? ? ? ? ? this->options |= ONENAND_HAS_CACHE_PROGRAM;
> >> It also needs to set CACHE_PROGRAM option.
> >
> >
> > Sorry. What do mean here?
> Ah, Now it always set the CACHE_PROGRAM, so it should be set on each chip spec.

Is there any problem that CACHE_PROGRAM feature is set for each 4Gb chip?
I suppose each of them supports cache program either as 4KB page cache or
2KB page 2x cache program feature.

> >
> >
> >> > +
> >> > ? ? ? ?case ONENAND_DEVICE_DENSITY_2Gb:
> >> > ? ? ? ? ? ? ? ?/* 2Gb DDP does not have 2 plane */
> >> > ? ? ? ? ? ? ? ?if (!ONENAND_IS_DDP(this))
> >> > @@ -3415,6 +3448,8 @@ static void onenand_check_features(struct mtd_info *mtd)
> >> > ? ? ? ? ? ? ? ?printk(KERN_DEBUG "Chip has 2 plane\n");
> >> > ? ? ? ?if (this->options & ONENAND_HAS_4KB_PAGE)
> >> > ? ? ? ? ? ? ? ?printk(KERN_DEBUG "Chip has 4KiB pagesize\n");
> >> > + ? ? ? if (this->options & ONENAND_HAS_CACHE_PROGRAM)
> >> > + ? ? ? ? ? ? ? printk(KERN_DEBUG "Chip has cache program feature\n");
> >> > ?}
> >>
> >> Thank you,
> >> Kyungmin Park
> >


From kmpark at infradead.org  Wed Nov  3 03:34:59 2010
From: kmpark at infradead.org (Kyungmin Park)
Date: Wed, 3 Nov 2010 16:34:59 +0900
Subject: [PATCH 3/3] mtd: onenand: implement cache program feature for 4kb
	page onenand
In-Reply-To: <20101102165316.GA15304@nokia.com>
References: <1288697130-12772-1-git-send-email-roman.tereshonkov@nokia.com>
	<1288697130-12772-4-git-send-email-roman.tereshonkov@nokia.com>
	<AANLkTinq7HS5VHww8aq2XPKCwGnjEYSintsN4qRFJq1o@mail.gmail.com>
	<20101102143759.GA15222@nokia.com>
	<AANLkTikunPYxpG_8HONV6BnOo54GNk3wvmMasEq1G9tO@mail.gmail.com>
	<20101102165316.GA15304@nokia.com>
Message-ID: <AANLkTi=VWG3wCbmW1JLVpLMweRDZZw6w6ZsNerz=VFNL@mail.gmail.com>

On Wed, Nov 3, 2010 at 1:53 AM, Roman Tereshonkov
<roman.tereshonkov at nokia.com> wrote:
> On Tue, Nov 02, 2010 at 03:50:51PM +0100, ext Kyungmin Park wrote:
>> On Tue, Nov 2, 2010 at 11:37 PM, Roman Tereshonkov
>> <roman.tereshonkov at nokia.com> wrote:
>> > On Tue, Nov 02, 2010 at 03:00:41PM +0100, ext Kyungmin Park wrote:
>> >> Hi,
>> >>
>> >> On Tue, Nov 2, 2010 at 8:25 PM, Roman Tereshonkov
>> >> <roman.tereshonkov at nokia.com> wrote:
>> >> > Implement cache program feature for 4KB page onenand.
>> >> > This feature improves the write data performance.
>> >> > The observed 128KB data program speed change is
>> >> > from 8827KB/s to 14156 KB/s when the feature is enabled.
>> >> >
>> >> > Signed-off-by: Roman Tereshonkov <roman.tereshonkov at nokia.com>
>> >> > ---
>> >> > ?drivers/mtd/onenand/omap2.c ? ? ? ?| ? 12 ++++++++--
>> >> > ?drivers/mtd/onenand/onenand_base.c | ? 39 ++++++++++++++++++++++++++++++++++-
>> >> > ?2 files changed, 46 insertions(+), 5 deletions(-)
>> >>
>> >> Please make separate the two patches, one for OMAP, another is for
>> >> onenand_base.c
>> >>
>> >> >
>> >> > diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
>> >> > index 9f322f1..da25a90 100644
>> >> > --- a/drivers/mtd/onenand/omap2.c
>> >> > +++ b/drivers/mtd/onenand/omap2.c
>> >> > @@ -108,8 +108,9 @@ static void wait_warn(char *msg, int state, unsigned int ctrl,
>> >> > ?static int omap2_onenand_wait(struct mtd_info *mtd, int state)
>> >> > ?{
>> >> > ? ? ? ?struct omap2_onenand *c = container_of(mtd, struct omap2_onenand, mtd);
>> >> > + ? ? ? struct onenand_chip *this = mtd->priv;
>> >> > ? ? ? ?unsigned int intr = 0;
>> >> > - ? ? ? unsigned int ctrl;
>> >> > + ? ? ? unsigned int ctrl, ctrl_mask;
>> >> > ? ? ? ?unsigned long timeout;
>> >> > ? ? ? ?u32 syscfg;
>> >> >
>> >> > @@ -180,7 +181,8 @@ retry:
>> >> > ? ? ? ? ? ? ? ? ? ? ? ?if (result == 0) {
>> >> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?/* Timeout after 20ms */
>> >> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS);
>> >> > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (ctrl & ONENAND_CTRL_ONGO) {
>> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (ctrl & ONENAND_CTRL_ONGO &&
>> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? !this->ongoing) {
>> >> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?/*
>> >> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * The operation seems to be still going
>> >> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * so give it some more time.
>> >> > @@ -269,7 +271,11 @@ retry:
>> >> > ? ? ? ? ? ? ? ?return -EIO;
>> >> > ? ? ? ?}
>> >> >
>> >> > - ? ? ? if (ctrl & 0xFE9F)
>> >> > + ? ? ? ctrl_mask = 0xFE9F;
>> >> > + ? ? ? if (this->ongoing)
>> >> > + ? ? ? ? ? ? ? ctrl_mask &= ~0x8000;
>> >> > +
>> >> > + ? ? ? if (ctrl & ctrl_mask)
>> >> > ? ? ? ? ? ? ? ?wait_warn("unexpected controller status", state, ctrl, intr);

We have to implement the onenand_wait also. it's only for working for OMAP.

>> >> >
>> >> > ? ? ? ?return 0;
>> >> > diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
>> >> > index 6b3a875..b2c3e97 100644
>> >> > --- a/drivers/mtd/onenand/onenand_base.c
>> >> > +++ b/drivers/mtd/onenand/onenand_base.c
>> >> > @@ -440,6 +440,19 @@ static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr, size_t le
>> >> > ? ? ? ? ? ? ? ?default:
>> >> > ? ? ? ? ? ? ? ? ? ? ? ?if (ONENAND_IS_2PLANE(this) && cmd == ONENAND_CMD_PROG)
>> >> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?cmd = ONENAND_CMD_2X_PROG;
>> >> > +
>> >> > + ? ? ? ? ? ? ? ? ? ? ? /* Exclude 1st OTP and OTP blocks */
>> >> Are there any reason? I think 1st OTP block is just block 0 so no need
>> >> to consider block 0 case.
>> >
>> >
>> > Specification tells:
>> > 3.9.1 Cache Program Operation
>> > "Note that Cache Program command cannot be performed on OTP block and 1st block OTP"
>>
>> Okay I'm not yet check the Spec. I will check it at office.
>> >
>> >
>> >> > + ? ? ? ? ? ? ? ? ? ? ? if (ONENAND_IS_CACHE_PROGRAM(this) &&
>> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? likely(onenand_block(this, addr) != 0) &&
>> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ONENAND_IS_4KB_PAGE(this)) {
>> >> and I think no need to check 4KB_PAGE.
>> >
>> >
>> > This patch is for 4kb page onenand only. The 2kb page onenand uses different
>> > commands for cache program. Also 2kb page case cache program depends on
>> > CONFIG_MTD_ONENAND_2X_PROGRAM.
>> >
>> >
>> >> > +
>> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (cmd == ONENAND_CMD_CACHE_PROG)
>> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_2X_CACHE_PROG;
>> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? else if (cmd == ONENAND_CMD_CACHE_PROG_LAST)
>> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_PROG;
>> >> > +
>> >> > + ? ? ? ? ? ? ? ? ? ? ? }
>> >> > +
>> >> > ? ? ? ? ? ? ? ? ? ? ? ?dataram = ONENAND_CURRENT_BUFFERRAM(this);
>> >> > ? ? ? ? ? ? ? ? ? ? ? ?break;
>> >> > ? ? ? ? ? ? ? ?}
>> >> > @@ -1845,7 +1858,7 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
>> >> > ? ? ? ?const u_char *buf = ops->datbuf;
>> >> > ? ? ? ?const u_char *oob = ops->oobbuf;
>> >> > ? ? ? ?u_char *oobbuf;
>> >> > - ? ? ? int ret = 0;
>> >> > + ? ? ? int ret = 0, cmd;
>> >> >
>> >> > ? ? ? ?DEBUG(MTD_DEBUG_LEVEL3, "%s: to = 0x%08x, len = %i\n",
>> >> > ? ? ? ? ? ? ? ?__func__, (unsigned int) to, (int) len);
>> >> > @@ -1954,7 +1967,25 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
>> >> > ? ? ? ? ? ? ? ? ? ? ? ?ONENAND_SET_NEXT_BUFFERRAM(this);
>> >> > ? ? ? ? ? ? ? ?}
>> >> >
>> >> > - ? ? ? ? ? ? ? this->command(mtd, ONENAND_CMD_PROG, to, mtd->writesize);
>> >> > + ? ? ? ? ? ? ? this->ongoing = 0;
>> >> > +
>> >> > + ? ? ? ? ? ? ? /* Exclude 1st OTP and OTP blocks */
>> >> > + ? ? ? ? ? ? ? if (ONENAND_IS_CACHE_PROGRAM(this) &&
>> >> > + ? ? ? ? ? ? ? ? ? likely(onenand_block(this, to) != 0) &&
>> >> > + ? ? ? ? ? ? ? ? ? ONENAND_IS_4KB_PAGE(this)) {
>> >> check the length here instead of 4KB_PAGE.
>> >
>> >
>> > This patch is for 4kb page onenand only. The 2kb page onenand uses different
>> > commands for cache program.
>> I see, check it both 4KiB and 2KiB at office.
>> >
>> >
>> >> > +
>> >> > + ? ? ? ? ? ? ? ? ? ? ? if ((written + thislen) < len) {
>> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_CACHE_PROG;
>> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? this->ongoing = 1;
>> >> > + ? ? ? ? ? ? ? ? ? ? ? } else {
>> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_CACHE_PROG_LAST;
>> >> > + ? ? ? ? ? ? ? ? ? ? ? }
>> >> Need to check how to pass the cmd properly. How/When send the CACHE_PROG_LAST?
>> >
>> >
>> > CACHE_PROG_LAST command must be sent for last programmed piece of data, that is
>> > (written + thislen) >= len.
>> Yes I know, I mean to use the CACHE program I think write size should
>> be more than 4KiB. e.g., 8KiB write size,
>
> Considering 4KB page onenand, for each program command the 4KB data is written at once.
> If the condition ((written + thislen) < len) is true it means that there is more
> than 4KB data to written. That means at least one more data program command.
> Otherwise the ONENAND_CMD_CACHE_PROG_LAST is used which is normal program command.

Right, then do you need the pseudo command? how about to set the real
command at write function?
>
>
>> >
>> >
>> >> > +
>> >> > + ? ? ? ? ? ? ? } else {
>> >> > + ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_PROG;
>> >> > + ? ? ? ? ? ? ? }
>> >> > +
>> >> > + ? ? ? ? ? ? ? this->command(mtd, cmd, to, mtd->writesize);
>> >> >
>> >> > ? ? ? ? ? ? ? ?/*
>> >> > ? ? ? ? ? ? ? ? * 2 PLANE, MLC, and Flex-OneNAND wait here
>> >> > @@ -3380,6 +3411,8 @@ static void onenand_check_features(struct mtd_info *mtd)
>> >> > ? ? ? ? ? ? ? ?else if (numbufs == 1)
>> >> > ? ? ? ? ? ? ? ? ? ? ? ?this->options |= ONENAND_HAS_4KB_PAGE;
>> >> >
>> >> > + ? ? ? ? ? ? ? this->options |= ONENAND_HAS_CACHE_PROGRAM;
>> >> It also needs to set CACHE_PROGRAM option.
>> >
>> >
>> > Sorry. What do mean here?
>> Ah, Now it always set the CACHE_PROGRAM, so it should be set on each chip spec.
>
> Is there any problem that CACHE_PROGRAM feature is set for each 4Gb chip?
> I suppose each of them supports cache program either as 4KB page cache or
> 2KB page 2x cache program feature.
For clear, how about to set the 4KiB pagesize only? I'm not yet check
the 4Gib DDP chip.

Thank you,
Kyungmin Park

>
>> >
>> >
>> >> > +
>> >> > ? ? ? ?case ONENAND_DEVICE_DENSITY_2Gb:
>> >> > ? ? ? ? ? ? ? ?/* 2Gb DDP does not have 2 plane */
>> >> > ? ? ? ? ? ? ? ?if (!ONENAND_IS_DDP(this))
>> >> > @@ -3415,6 +3448,8 @@ static void onenand_check_features(struct mtd_info *mtd)
>> >> > ? ? ? ? ? ? ? ?printk(KERN_DEBUG "Chip has 2 plane\n");
>> >> > ? ? ? ?if (this->options & ONENAND_HAS_4KB_PAGE)
>> >> > ? ? ? ? ? ? ? ?printk(KERN_DEBUG "Chip has 4KiB pagesize\n");
>> >> > + ? ? ? if (this->options & ONENAND_HAS_CACHE_PROGRAM)
>> >> > + ? ? ? ? ? ? ? printk(KERN_DEBUG "Chip has cache program feature\n");
>> >> > ?}
>> >>
>> >> Thank you,
>> >> Kyungmin Park
>> >
>


From matthieu.castet at parrot.com  Wed Nov  3 04:23:31 2010
From: matthieu.castet at parrot.com (Matthieu CASTET)
Date: Wed, 3 Nov 2010 09:23:31 +0100
Subject: Suggested patch: reset errno after isatty()
In-Reply-To: <AANLkTimwumfui-_T1ScDYwMLKbNh1ia-SDMUg56wTfN5@mail.gmail.com>
References: <AANLkTimwumfui-_T1ScDYwMLKbNh1ia-SDMUg56wTfN5@mail.gmail.com>
Message-ID: <4CD11C03.3090207@parrot.com>

Ketil Froyn a ?crit :
> isatty() uses an ioctl and the resulting error code to determine if an
> fd is a tty or not. If it isn't, errno is set to ENOTTY. Later in the
> code, pread() fails, or rather returns 0 immediately. When this
> happens, the following perror("pread") tells me:
> 
> pread: Not a typewriter
> 
> which is the wrong error. Here's strace showing the issue:
> 
> open("/sdcard/mtd5.dump", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0644) = 4
> ioctl(4, TCGETS or SNDCTL_TMR_TIMEBASE, 0xbee43ab0) = -1 ENOTTY (Not a
> typewriter)
> write(2, "Block size 131072, page size 204"..., 47) = 47
> write(2, "Dumping data starting at 0x00000"..., 64) = 64
> ioctl(3, 0x40084d0b, 0xbee43c30)        = 0
> pread(3, "", 2048, 0)                   = 0
> write(2, "pread", 5)                    = 5
> write(2, ": ", 2)                       = 2
> write(2, "Not a typewriter", 16)        = 16
> write(2, "\n", 1)                       = 1
> 
> And the included patch (below, against v1.4.1, but simple enough)
> should take care of it.
> 
> Though if someone knows what could be causing the pread() to keep
> failing, I'd be interested in hearing it! And the mtd device is
> reported as having a page size of 2048 and oob size 56, so to get even
> this far I added that as a valid page size. Isn't it?
Why errno is checked when pread return 0 ?
Errno should be checked only when return is -1.

man pread :
RETURN VALUE
        On success, the number of bytes read or written is returned 
(zero indi-
        cates  that  nothing  was  written,  in the case of pwrite(), or 
end of
        file, in the case of pread()), or -1 on error, in which case 
errno  is
        set to indicate the error.


From computersforpeace at gmail.com  Wed Nov  3 04:27:18 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Wed, 3 Nov 2010 01:27:18 -0700
Subject: [PATCH 01/10] mtd-utils: nanddump: Allow 64-bit lengths
Message-ID: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>

We should allow the dump length to be 64-bit, especially since the value
was read in as a "long long" by strtoll().

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 nanddump.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/nanddump.c b/nanddump.c
index 86a71c9..fe29596 100644
--- a/nanddump.c
+++ b/nanddump.c
@@ -83,7 +83,7 @@ static bool			noecc = false;		// don't error correct
 static bool			noskipbad = false;	// don't skip bad blocks
 static bool			omitoob = false;	// omit oob data
 static unsigned long long	start_addr;		// start address
-static unsigned long		length;			// dump length
+static unsigned long long	length;			// dump length
 static const char		*mtddev;		// mtd device name
 static const char		*dumpfile;		// dump file name
 static bool			omitbad = false;
-- 
1.7.0.4




From computersforpeace at gmail.com  Wed Nov  3 04:27:21 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Wed, 3 Nov 2010 01:27:21 -0700
Subject: [PATCH 04/10] mtd-utils: nandwrite: switch "oobsize" for "writesize"
In-Reply-To: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
References: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
Message-ID: <1288772847-8120-4-git-send-email-computersforpeace@gmail.com>

The text of a printf() states that we're printing OOB area, but the
corresponding argument passes writesize. That probably wasn't the intent.

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 nandwrite.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/nandwrite.c b/nandwrite.c
index 66a9ef7..a3ac968 100644
--- a/nandwrite.c
+++ b/nandwrite.c
@@ -433,7 +433,7 @@ int main(int argc, char * const argv[])
 	// Check, if length fits into device
 	if (((imglen / pagelen) * meminfo.writesize) > (meminfo.size - mtdoffset)) {
 		fprintf(stderr, "Image %d bytes, NAND page %d bytes, OOB area %u bytes, device size %u bytes\n",
-				imglen, pagelen, meminfo.writesize, meminfo.size);
+				imglen, pagelen, meminfo.oobsize, meminfo.size);
 		perror("Input file does not fit into device");
 		goto closeall;
 	}
-- 
1.7.0.4




From computersforpeace at gmail.com  Wed Nov  3 04:27:24 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Wed, 3 Nov 2010 01:27:24 -0700
Subject: [PATCH 07/10] mtd-utils: nandwrite: avoid NULL buffer pointers
In-Reply-To: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
References: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
Message-ID: <1288772847-8120-7-git-send-email-computersforpeace@gmail.com>

Commit 07005d915d6a79dbdee14b0c4360df5058c3a98b made changes to the
buffer allocation in nandwrite and did not handle all affected code
areas properly. In particular, we were assigning:
	oob.ptr = noecc ? oobreadbuf : oobbuf;
However, since oobreadbuf and oobbuf are declared dynamically, they
are NULL at this point. If they aren't properly assigned later, we
unwittingly are passing a NULL pointer as oob buffer.

This assignment line is best moved after the buffer allocations and
pointer assignment.

Effects of this problem can be seen when writing oob data with the "-o"
flag and without the "-n" flag:
	$ ./nandwrite -o /dev/mtd0 img.bin
	Writing data to block 0 at offset 0x0
	ioctl(MEMWRITEOOB): Bad address
	Data was only partially written due to error
	: Bad address

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 nandwrite.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/nandwrite.c b/nandwrite.c
index b362c29..8ec5afe 100644
--- a/nandwrite.c
+++ b/nandwrite.c
@@ -391,7 +391,6 @@ int main(int argc, char * const argv[])
 	}
 
 	oob.length = mtd.oob_size;
-	oob.ptr = noecc ? oobreadbuf : oobbuf;
 
 	/* Determine if we are reading from standard input or from a file. */
 	if (strcmp(img, standard_input) == 0) {
@@ -594,9 +593,7 @@ int main(int argc, char * const argv[])
 				}
 			}
 
-			if (noecc) {
-				oob.ptr = oobreadbuf;
-			} else {
+			if (!noecc) {
 				int i, start, len;
 				int tags_pos = 0;
 				/*
@@ -630,6 +627,7 @@ int main(int argc, char * const argv[])
 			}
 			/* Write OOB data first, as ecc will be placed in there */
 			oob.start = mtdoffset;
+			oob.ptr = noecc ? oobreadbuf : oobbuf;
 			if (ioctl(fd, MEMWRITEOOB, &oob) != 0) {
 				perror("ioctl(MEMWRITEOOB)");
 				goto closeall;
-- 
1.7.0.4




From computersforpeace at gmail.com  Wed Nov  3 04:27:22 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Wed, 3 Nov 2010 01:27:22 -0700
Subject: [PATCH 05/10] mtd-utils: nandwrite: Use libmtd to get correct
	mtd parameters
In-Reply-To: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
References: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
Message-ID: <1288772847-8120-5-git-send-email-computersforpeace@gmail.com>

Begin utilizing libmtd for MTD operations: use mtd_get_dev_info() to return
a more detailed set of information about our MTD. Most importantly, libmtd
will yield a 64-bit "size" parameter. This is necessary to properly detect
devices larer than 4GB.

printf() arguments needed reformatted for the new mtd_dev_info data types.
In addition, the printf() was restructured to keep lines shorter.

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 nandwrite.c |   60 +++++++++++++++++++++++++++++++---------------------------
 1 files changed, 32 insertions(+), 28 deletions(-)

diff --git a/nandwrite.c b/nandwrite.c
index a3ac968..d05d257 100644
--- a/nandwrite.c
+++ b/nandwrite.c
@@ -42,6 +42,7 @@
 #include <asm/types.h>
 #include "mtd/mtd-user.h"
 #include "common.h"
+#include <libmtd.h>
 
 // oob layouts to pass into the kernel as default
 static struct nand_oobinfo none_oobinfo = {
@@ -259,7 +260,7 @@ int main(int argc, char * const argv[])
 	int imglen = 0, pagelen;
 	bool baderaseblock = false;
 	int blockstart = -1;
-	struct mtd_info_user meminfo;
+	struct mtd_dev_info mtd;
 	struct mtd_oob_buf oob;
 	loff_t offs;
 	int ret;
@@ -275,6 +276,7 @@ int main(int argc, char * const argv[])
 	// points to the OOB for the current page in filebuf
 	unsigned char *oobreadbuf = NULL;
 	unsigned char *oobbuf = NULL;
+	libmtd_t mtd_desc;
 	int ebsize_aligned;
 
 	process_options(argc, argv);
@@ -290,24 +292,24 @@ int main(int argc, char * const argv[])
 		exit(EXIT_FAILURE);
 	}
 
+	mtd_desc = libmtd_open();
+	if (!mtd_desc)
+		return errmsg("can't initialize libmtd");
 	/* Fill in MTD device capability structure */
-	if (ioctl(fd, MEMGETINFO, &meminfo) != 0) {
-		perror("MEMGETINFO");
-		close(fd);
-		exit(EXIT_FAILURE);
-	}
+	if (mtd_get_dev_info(mtd_desc, mtd_device, &mtd) < 0)
+		return errmsg("mtd_get_dev_info failed");
 
 	/*
 	 * Pretend erasesize is specified number of blocks - to match jffs2
 	 *   (virtual) block size
 	 * Use this value throughout unless otherwise necessary
 	 */
-	ebsize_aligned = meminfo.erasesize * blockalign;
+	ebsize_aligned = mtd.eb_size * blockalign;
 
-	if (mtdoffset & (meminfo.writesize - 1)) {
+	if (mtdoffset & (mtd.min_io_size - 1)) {
 		fprintf(stderr, "The start address is not page-aligned !\n"
 				"The pagesize of this NAND Flash is 0x%x.\n",
-				meminfo.writesize);
+				mtd.min_io_size);
 		close(fd);
 		exit(EXIT_FAILURE);
 	}
@@ -373,7 +375,7 @@ int main(int argc, char * const argv[])
 			fprintf(stderr, "Use -f option to enforce legacy placement on autoplacement enabled mtd device\n");
 			goto restoreoob;
 		}
-		if (meminfo.oobsize == 8) {
+		if (mtd.oob_size == 8) {
 			if (forceyaffs) {
 				fprintf(stderr, "YAFSS cannot operate on 256 Byte page size");
 				goto restoreoob;
@@ -388,7 +390,7 @@ int main(int argc, char * const argv[])
 		}
 	}
 
-	oob.length = meminfo.oobsize;
+	oob.length = mtd.oob_size;
 	oob.ptr = noecc ? oobreadbuf : oobbuf;
 
 	/* Determine if we are reading from standard input or from a file. */
@@ -403,7 +405,7 @@ int main(int argc, char * const argv[])
 		goto restoreoob;
 	}
 
-	pagelen = meminfo.writesize + ((writeoob) ? meminfo.oobsize : 0);
+	pagelen = mtd.min_io_size + ((writeoob) ? mtd.oob_size : 0);
 
 	/*
 	 * For the standard input case, the input size is merely an
@@ -431,20 +433,21 @@ int main(int argc, char * const argv[])
 	}
 
 	// Check, if length fits into device
-	if (((imglen / pagelen) * meminfo.writesize) > (meminfo.size - mtdoffset)) {
-		fprintf(stderr, "Image %d bytes, NAND page %d bytes, OOB area %u bytes, device size %u bytes\n",
-				imglen, pagelen, meminfo.oobsize, meminfo.size);
+	if (((imglen / pagelen) * mtd.min_io_size) > (mtd.size - mtdoffset)) {
+		fprintf(stderr, "Image %d bytes, NAND page %d bytes, OOB area %d"
+				" bytes, device size %lld bytes\n",
+				imglen, pagelen, mtd.oob_size, mtd.size);
 		perror("Input file does not fit into device");
 		goto closeall;
 	}
 
 	// Allocate a buffer big enough to contain all the data (OOB included) for one eraseblock
-	filebuf_max = pagelen * ebsize_aligned / meminfo.writesize;
+	filebuf_max = pagelen * ebsize_aligned / mtd.min_io_size;
 	filebuf = xmalloc(filebuf_max);
 	erase_buffer(filebuf, filebuf_max);
 
-	oobbuf = xmalloc(meminfo.oobsize);
-	erase_buffer(oobbuf, meminfo.oobsize);
+	oobbuf = xmalloc(mtd.oob_size);
+	erase_buffer(oobbuf, mtd.oob_size);
 
 	/*
 	 * Get data from input and write to the device while there is
@@ -454,7 +457,7 @@ int main(int argc, char * const argv[])
 	 * length or zero.
 	 */
 	while (((imglen > 0) || (writebuf < (filebuf + filebuf_len)))
-		&& (mtdoffset < meminfo.size)) {
+		&& (mtdoffset < mtd.size)) {
 		/*
 		 * New eraseblock, check for bad block(s)
 		 * Stay in the loop to be sure that, if mtdoffset changes because
@@ -504,8 +507,8 @@ int main(int argc, char * const argv[])
 		}
 
 		// Read more data from the input if there isn't enough in the buffer
-		if ((writebuf + meminfo.writesize) > (filebuf + filebuf_len)) {
-			int readlen = meminfo.writesize;
+		if ((writebuf + mtd.min_io_size) > (filebuf + filebuf_len)) {
+			int readlen = mtd.min_io_size;
 
 			int alreadyread = (filebuf + filebuf_len) - writebuf;
 			int tinycnt = alreadyread;
@@ -556,11 +559,11 @@ int main(int argc, char * const argv[])
 		}
 
 		if (writeoob) {
-			oobreadbuf = writebuf + meminfo.writesize;
+			oobreadbuf = writebuf + mtd.min_io_size;
 
 			// Read more data for the OOB from the input if there isn't enough in the buffer
-			if ((oobreadbuf + meminfo.oobsize) > (filebuf + filebuf_len)) {
-				int readlen = meminfo.oobsize;
+			if ((oobreadbuf + mtd.oob_size) > (filebuf + filebuf_len)) {
+				int readlen = mtd.oob_size;
 				int alreadyread = (filebuf + filebuf_len) - oobreadbuf;
 				int tinycnt = alreadyread;
 
@@ -619,7 +622,7 @@ int main(int argc, char * const argv[])
 				} else {
 					/* Set at least the ecc byte positions to 0xff */
 					start = old_oobinfo.eccbytes;
-					len = meminfo.oobsize - start;
+					len = mtd.oob_size - start;
 					memcpy(oobbuf + start,
 							oobreadbuf + start,
 							len);
@@ -634,7 +637,7 @@ int main(int argc, char * const argv[])
 		}
 
 		/* Write out the Page data */
-		if (pwrite(fd, writebuf, meminfo.writesize, mtdoffset) != meminfo.writesize) {
+		if (pwrite(fd, writebuf, mtd.min_io_size, mtdoffset) != mtd.min_io_size) {
 			erase_info_t erase;
 
 			if (errno != EIO) {
@@ -658,7 +661,7 @@ int main(int argc, char * const argv[])
 			}
 
 			if (markbad) {
-				loff_t bad_addr = mtdoffset & (~meminfo.erasesize + 1);
+				loff_t bad_addr = mtdoffset & (~mtd.eb_size + 1);
 				fprintf(stderr, "Marking block at %08lx bad\n", (long)bad_addr);
 				if (ioctl(fd, MEMSETBADBLOCK, &bad_addr)) {
 					perror("MEMSETBADBLOCK");
@@ -669,7 +672,7 @@ int main(int argc, char * const argv[])
 
 			continue;
 		}
-		mtdoffset += meminfo.writesize;
+		mtdoffset += mtd.min_io_size;
 		writebuf += pagelen;
 	}
 
@@ -679,6 +682,7 @@ closeall:
 	close(ifd);
 
 restoreoob:
+	libmtd_close(mtd_desc);
 	free(filebuf);
 	free(oobbuf);
 
-- 
1.7.0.4




From computersforpeace at gmail.com  Wed Nov  3 04:27:26 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Wed, 3 Nov 2010 01:27:26 -0700
Subject: [PATCH 09/10] mtd-utils: nanddump: type consistency
In-Reply-To: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
References: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
Message-ID: <1288772847-8120-9-git-send-email-computersforpeace@gmail.com>

Change type off "offs" for type consistency of 64-bit data types.
Also change an accompanying printf().

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 nandwrite.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/nandwrite.c b/nandwrite.c
index 364acdf..a28f7fb 100644
--- a/nandwrite.c
+++ b/nandwrite.c
@@ -262,7 +262,7 @@ int main(int argc, char * const argv[])
 	long long blockstart = -1;
 	struct mtd_dev_info mtd;
 	struct mtd_oob_buf oob;
-	loff_t offs;
+	long long offs;
 	int ret;
 	int oobinfochanged = 0;
 	struct nand_oobinfo old_oobinfo;
@@ -492,9 +492,9 @@ int main(int argc, char * const argv[])
 				} else if (ret == 1) {
 					baderaseblock = true;
 					if (!quiet)
-						fprintf(stderr, "Bad block at %x, %u block(s) "
+						fprintf(stderr, "Bad block at %llx, %u block(s) "
 								"from %llx will be skipped\n",
-								(int) offs, blockalign, blockstart);
+								offs, blockalign, blockstart);
 				}
 
 				if (baderaseblock) {
-- 
1.7.0.4




From computersforpeace at gmail.com  Wed Nov  3 04:27:25 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Wed, 3 Nov 2010 01:27:25 -0700
Subject: [PATCH 08/10] mtd-utils: nandwrite: prevent 32-bit overflow
In-Reply-To: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
References: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
Message-ID: <1288772847-8120-8-git-send-email-computersforpeace@gmail.com>

For large block- and page-sizes, the multiplication of ebsize_aligned
and pagelen can overflow a 32-bit integer.  This overflow can be
prevented by a simple change in order of operations (i.e., do division
first).

Since ebsize_aligned is always a multiple of mtd.min_io_size, this
produces no change in results.

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 nandwrite.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/nandwrite.c b/nandwrite.c
index 8ec5afe..364acdf 100644
--- a/nandwrite.c
+++ b/nandwrite.c
@@ -441,7 +441,7 @@ int main(int argc, char * const argv[])
 	}
 
 	// Allocate a buffer big enough to contain all the data (OOB included) for one eraseblock
-	filebuf_max = pagelen * ebsize_aligned / mtd.min_io_size;
+	filebuf_max = ebsize_aligned / mtd.min_io_size * pagelen;
 	filebuf = xmalloc(filebuf_max);
 	erase_buffer(filebuf, filebuf_max);
 
-- 
1.7.0.4




From computersforpeace at gmail.com  Wed Nov  3 04:27:23 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Wed, 3 Nov 2010 01:27:23 -0700
Subject: [PATCH 06/10] mtd-utils: nandwrite: Use 64-bit offset
In-Reply-To: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
References: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
Message-ID: <1288772847-8120-6-git-send-email-computersforpeace@gmail.com>

To support large NAND devices, we need 64-bit data types for
write offsets. This patch makes data type changes along with
their corresponding printf() formats and the input conversion
(i.e., use "strtoll()" instead of "strol()").

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 nandwrite.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/nandwrite.c b/nandwrite.c
index d05d257..b362c29 100644
--- a/nandwrite.c
+++ b/nandwrite.c
@@ -109,7 +109,7 @@ static void display_version(void)
 
 static const char	*standard_input = "-";
 static const char	*mtd_device, *img;
-static int		mtdoffset = 0;
+static long long	mtdoffset = 0;
 static bool		quiet = false;
 static bool		writeoob = false;
 static bool		rawoob = false;
@@ -201,7 +201,7 @@ static void process_options(int argc, char * const argv[])
 				writeoob = true;
 				break;
 			case 's':
-				mtdoffset = strtol(optarg, NULL, 0);
+				mtdoffset = strtoll(optarg, NULL, 0);
 				break;
 			case 'b':
 				blockalign = atoi(optarg);
@@ -213,7 +213,7 @@ static void process_options(int argc, char * const argv[])
 	}
 
 	if (mtdoffset < 0) {
-		fprintf(stderr, "Can't specify a negative device offset `%d'\n",
+		fprintf(stderr, "Can't specify a negative device offset `%lld'\n",
 				mtdoffset);
 		exit(EXIT_FAILURE);
 	}
@@ -259,7 +259,7 @@ int main(int argc, char * const argv[])
 	int ifd = -1;
 	int imglen = 0, pagelen;
 	bool baderaseblock = false;
-	int blockstart = -1;
+	long long blockstart = -1;
 	struct mtd_dev_info mtd;
 	struct mtd_oob_buf oob;
 	loff_t offs;
@@ -480,7 +480,7 @@ int main(int argc, char * const argv[])
 
 			baderaseblock = false;
 			if (!quiet)
-				fprintf(stdout, "Writing data to block %d at offset 0x%x\n",
+				fprintf(stdout, "Writing data to block %lld at offset 0x%llx\n",
 						 blockstart / ebsize_aligned, blockstart);
 
 			/* Check all the blocks in an erase block for bad blocks */
@@ -494,7 +494,7 @@ int main(int argc, char * const argv[])
 					baderaseblock = true;
 					if (!quiet)
 						fprintf(stderr, "Bad block at %x, %u block(s) "
-								"from %x will be skipped\n",
+								"from %llx will be skipped\n",
 								(int) offs, blockalign, blockstart);
 				}
 
-- 
1.7.0.4




From computersforpeace at gmail.com  Wed Nov  3 04:27:19 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Wed, 3 Nov 2010 01:27:19 -0700
Subject: [PATCH 02/10] mtd-utils: nandwrite: Comment, style fixups
In-Reply-To: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
References: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
Message-ID: <1288772847-8120-2-git-send-email-computersforpeace@gmail.com>

Comment on "blockalign" default value is incorrect; it only defaults
to a 1x multiplier of the actual block size. Perhaps this is a relic
of early NAND where all block sizes were 16KB?

Reformatted a multi-line comment.

Changed separete "if" statements to a combined "if-else-if" since they
were logically combinable. Should have no effect on results with minor
effect on efficiency.

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 nandwrite.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/nandwrite.c b/nandwrite.c
index b0c4366..3fbfca9 100644
--- a/nandwrite.c
+++ b/nandwrite.c
@@ -120,7 +120,7 @@ static bool		forcelegacy = false;
 static bool		noecc = false;
 static bool		noskipbad = false;
 static bool		pad = false;
-static int		blockalign = 1; /* default to using 16K block size */
+static int		blockalign = 1; /* default to using actual block size */
 
 static void process_options(int argc, char * const argv[])
 {
@@ -483,8 +483,7 @@ int main(int argc, char * const argv[])
 				if ((ret = ioctl(fd, MEMGETBADBLOCK, &offs)) < 0) {
 					perror("ioctl(MEMGETBADBLOCK)");
 					goto closeall;
-				}
-				if (ret == 1) {
+				} else if (ret == 1) {
 					baderaseblock = true;
 					if (!quiet)
 						fprintf(stderr, "Bad block at %x, %u block(s) "
@@ -520,9 +519,11 @@ int main(int argc, char * const argv[])
 
 			/* No padding needed - we are done */
 			if (tinycnt == 0) {
-				// For standard input, set the imglen to 0 to signal
-				// the end of the "file". For non standard input, leave
-				// it as-is to detect an early EOF
+				/*
+				 * For standard input, set imglen to 0 to signal
+				 * the end of the "file". For nonstandard input,
+				 * leave it as-is to detect an early EOF.
+				 */
 				if (ifd == STDIN_FILENO) {
 					imglen = 0;
 				}
-- 
1.7.0.4




From computersforpeace at gmail.com  Wed Nov  3 04:27:20 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Wed, 3 Nov 2010 01:27:20 -0700
Subject: [PATCH 03/10] mtd-utils: nandwrite: Clarify usage of aligned
	"erasesize"
In-Reply-To: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
References: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
Message-ID: <1288772847-8120-3-git-send-email-computersforpeace@gmail.com>

Due to the presence of the "--block-align" flag, nandwrite uses a
blocksize throughout that, depeding on the execution parameters, may
not be the actual erasesize of the NAND flash. In order to clarify
this situation for the untrained viewer of nandwrite's code, we should
not change the value of "meminfo.erasesize" itself; rather, we can
utilize a separate, calculated "ebsize_aligned". Then, when a user
actually wants to refer to the physical erasesize, it's straightforward.

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 nandwrite.c |   30 +++++++++++++++++-------------
 1 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/nandwrite.c b/nandwrite.c
index 3fbfca9..66a9ef7 100644
--- a/nandwrite.c
+++ b/nandwrite.c
@@ -275,6 +275,7 @@ int main(int argc, char * const argv[])
 	// points to the OOB for the current page in filebuf
 	unsigned char *oobreadbuf = NULL;
 	unsigned char *oobbuf = NULL;
+	int ebsize_aligned;
 
 	process_options(argc, argv);
 
@@ -296,9 +297,12 @@ int main(int argc, char * const argv[])
 		exit(EXIT_FAILURE);
 	}
 
-	/* Set erasesize to specified number of blocks - to match jffs2
-	 * (virtual) block size */
-	meminfo.erasesize *= blockalign;
+	/*
+	 * Pretend erasesize is specified number of blocks - to match jffs2
+	 *   (virtual) block size
+	 * Use this value throughout unless otherwise necessary
+	 */
+	ebsize_aligned = meminfo.erasesize * blockalign;
 
 	if (mtdoffset & (meminfo.writesize - 1)) {
 		fprintf(stderr, "The start address is not page-aligned !\n"
@@ -435,7 +439,7 @@ int main(int argc, char * const argv[])
 	}
 
 	// Allocate a buffer big enough to contain all the data (OOB included) for one eraseblock
-	filebuf_max = pagelen * meminfo.erasesize / meminfo.writesize;
+	filebuf_max = pagelen * ebsize_aligned / meminfo.writesize;
 	filebuf = xmalloc(filebuf_max);
 	erase_buffer(filebuf, filebuf_max);
 
@@ -459,8 +463,8 @@ int main(int argc, char * const argv[])
 		 * skipped block(s) is also bad (number of blocks depending on
 		 * the blockalign).
 		 */
-		while (blockstart != (mtdoffset & (~meminfo.erasesize + 1))) {
-			blockstart = mtdoffset & (~meminfo.erasesize + 1);
+		while (blockstart != (mtdoffset & (~ebsize_aligned + 1))) {
+			blockstart = mtdoffset & (~ebsize_aligned + 1);
 			offs = blockstart;
 
 			// if writebuf == filebuf, we are rewinding so we must not
@@ -474,7 +478,7 @@ int main(int argc, char * const argv[])
 			baderaseblock = false;
 			if (!quiet)
 				fprintf(stdout, "Writing data to block %d at offset 0x%x\n",
-						 blockstart / meminfo.erasesize, blockstart);
+						 blockstart / ebsize_aligned, blockstart);
 
 			/* Check all the blocks in an erase block for bad blocks */
 			if (noskipbad)
@@ -492,10 +496,10 @@ int main(int argc, char * const argv[])
 				}
 
 				if (baderaseblock) {
-					mtdoffset = blockstart + meminfo.erasesize;
+					mtdoffset = blockstart + ebsize_aligned;
 				}
-				offs +=  meminfo.erasesize / blockalign;
-			} while (offs < blockstart + meminfo.erasesize);
+				offs +=  ebsize_aligned / blockalign;
+			} while (offs < blockstart + ebsize_aligned);
 
 		}
 
@@ -642,7 +646,7 @@ int main(int argc, char * const argv[])
 			writebuf = filebuf;
 
 			erase.start = blockstart;
-			erase.length = meminfo.erasesize;
+			erase.length = ebsize_aligned;
 			fprintf(stderr, "Erasing failed write from %08lx-%08lx\n",
 				(long)erase.start, (long)erase.start+erase.length-1);
 			if (ioctl(fd, MEMERASE, &erase) != 0) {
@@ -654,14 +658,14 @@ int main(int argc, char * const argv[])
 			}
 
 			if (markbad) {
-				loff_t bad_addr = mtdoffset & (~(meminfo.erasesize / blockalign) + 1);
+				loff_t bad_addr = mtdoffset & (~meminfo.erasesize + 1);
 				fprintf(stderr, "Marking block at %08lx bad\n", (long)bad_addr);
 				if (ioctl(fd, MEMSETBADBLOCK, &bad_addr)) {
 					perror("MEMSETBADBLOCK");
 					goto closeall;
 				}
 			}
-			mtdoffset = blockstart + meminfo.erasesize;
+			mtdoffset = blockstart + ebsize_aligned;
 
 			continue;
 		}
-- 
1.7.0.4




From computersforpeace at gmail.com  Wed Nov  3 04:27:27 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Wed, 3 Nov 2010 01:27:27 -0700
Subject: [PATCH 10/10] mtd-utils: nandwrite: full 64-bit support w/
 libmtd
In-Reply-To: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
References: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
Message-ID: <1288772847-8120-10-git-send-email-computersforpeace@gmail.com>

Several ioctls are replaced with libmtd calls which should give us 64-bit
support for large devices. libmtd mostly provides drop-in replacements
for the functionality we need. However, when we require erasure of a
badly-written block, mtd_erase() only erases a single block, whereas
MEMERASE could erase a larger region. In nandwrite, we may have a "virtual
blocksize" of more than one (when blockalign > 1). Thus, I added a loop
for this case.

The mtd_oob_buf struct is no longer needed, nor is "erase_info_t".

Error messages for the new libmtd calls reflect the style found in
flash_erase.

Tested with nandsim and with NAND chips up to 4GB in size (I don't have
a device that truly requires 64-bit addressing yet).

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 nandwrite.c |   49 +++++++++++++++++++++++--------------------------
 1 files changed, 23 insertions(+), 26 deletions(-)

diff --git a/nandwrite.c b/nandwrite.c
index a28f7fb..37d2204 100644
--- a/nandwrite.c
+++ b/nandwrite.c
@@ -261,7 +261,6 @@ int main(int argc, char * const argv[])
 	bool baderaseblock = false;
 	long long blockstart = -1;
 	struct mtd_dev_info mtd;
-	struct mtd_oob_buf oob;
 	long long offs;
 	int ret;
 	int oobinfochanged = 0;
@@ -390,8 +389,6 @@ int main(int argc, char * const argv[])
 		}
 	}
 
-	oob.length = mtd.oob_size;
-
 	/* Determine if we are reading from standard input or from a file. */
 	if (strcmp(img, standard_input) == 0) {
 		ifd = STDIN_FILENO;
@@ -486,8 +483,8 @@ int main(int argc, char * const argv[])
 			if (noskipbad)
 				continue;
 			do {
-				if ((ret = ioctl(fd, MEMGETBADBLOCK, &offs)) < 0) {
-					perror("ioctl(MEMGETBADBLOCK)");
+				if ((ret = mtd_is_bad(&mtd, fd, offs / ebsize_aligned)) < 0) {
+					sys_errmsg("%s: MTD get bad block failed", mtd_device);
 					goto closeall;
 				} else if (ret == 1) {
 					baderaseblock = true;
@@ -626,43 +623,43 @@ int main(int argc, char * const argv[])
 				}
 			}
 			/* Write OOB data first, as ecc will be placed in there */
-			oob.start = mtdoffset;
-			oob.ptr = noecc ? oobreadbuf : oobbuf;
-			if (ioctl(fd, MEMWRITEOOB, &oob) != 0) {
-				perror("ioctl(MEMWRITEOOB)");
+			if (mtd_write_oob(mtd_desc, &mtd, fd, mtdoffset,
+						mtd.oob_size,
+						noecc ? oobreadbuf : oobbuf)) {
+				sys_errmsg("%s: MTD writeoob failure", mtd_device);
 				goto closeall;
 			}
 		}
 
 		/* Write out the Page data */
-		if (pwrite(fd, writebuf, mtd.min_io_size, mtdoffset) != mtd.min_io_size) {
-			erase_info_t erase;
-
+		if (mtd_write(&mtd, fd, mtdoffset / mtd.eb_size, mtdoffset % mtd.eb_size,
+					writebuf, mtd.min_io_size)) {
+			int i;
 			if (errno != EIO) {
-				perror("pwrite");
+				sys_errmsg("%s: MTD write failure", mtd_device);
 				goto closeall;
 			}
 
 			/* Must rewind to blockstart if we can */
 			writebuf = filebuf;
 
-			erase.start = blockstart;
-			erase.length = ebsize_aligned;
-			fprintf(stderr, "Erasing failed write from %08lx-%08lx\n",
-				(long)erase.start, (long)erase.start+erase.length-1);
-			if (ioctl(fd, MEMERASE, &erase) != 0) {
-				int errno_tmp = errno;
-				perror("MEMERASE");
-				if (errno_tmp != EIO) {
-					goto closeall;
+			fprintf(stderr, "Erasing failed write from %#08llx to %#08llx\n",
+				blockstart, blockstart + ebsize_aligned - 1);
+			for (i = blockstart; i < blockstart + ebsize_aligned; i += mtd.eb_size) {
+				if (mtd_erase(mtd_desc, &mtd, fd, mtd.eb_size)) {
+					int errno_tmp = errno;
+					sys_errmsg("%s: MTD Erase failure", mtd_device);
+					if (errno_tmp != EIO) {
+						goto closeall;
+					}
 				}
 			}
 
 			if (markbad) {
-				loff_t bad_addr = mtdoffset & (~mtd.eb_size + 1);
-				fprintf(stderr, "Marking block at %08lx bad\n", (long)bad_addr);
-				if (ioctl(fd, MEMSETBADBLOCK, &bad_addr)) {
-					perror("MEMSETBADBLOCK");
+				fprintf(stderr, "Marking block at %08llx bad\n",
+						mtdoffset & (~mtd.eb_size + 1));
+				if (mtd_mark_bad(&mtd, fd, mtdoffset / mtd.eb_size)) {
+					sys_errmsg("%s: MTD Mark bad block failure", mtd_device);
 					goto closeall;
 				}
 			}
-- 
1.7.0.4




From kmpark at infradead.org  Wed Nov  3 06:06:13 2010
From: kmpark at infradead.org (Kyungmin Park)
Date: Wed, 3 Nov 2010 19:06:13 +0900
Subject: [PATCH 3/3] mtd: onenand: implement cache program feature for 4kb
	page onenand
In-Reply-To: <AANLkTi=VWG3wCbmW1JLVpLMweRDZZw6w6ZsNerz=VFNL@mail.gmail.com>
References: <1288697130-12772-1-git-send-email-roman.tereshonkov@nokia.com>
	<1288697130-12772-4-git-send-email-roman.tereshonkov@nokia.com>
	<AANLkTinq7HS5VHww8aq2XPKCwGnjEYSintsN4qRFJq1o@mail.gmail.com>
	<20101102143759.GA15222@nokia.com>
	<AANLkTikunPYxpG_8HONV6BnOo54GNk3wvmMasEq1G9tO@mail.gmail.com>
	<20101102165316.GA15304@nokia.com>
	<AANLkTi=VWG3wCbmW1JLVpLMweRDZZw6w6ZsNerz=VFNL@mail.gmail.com>
Message-ID: <AANLkTimVpw5eHPjOMjjdkTi2c9yNK1w6wvDRKXi+PBv2@mail.gmail.com>

On Wed, Nov 3, 2010 at 4:34 PM, Kyungmin Park <kmpark at infradead.org> wrote:
> On Wed, Nov 3, 2010 at 1:53 AM, Roman Tereshonkov
> <roman.tereshonkov at nokia.com> wrote:
>> On Tue, Nov 02, 2010 at 03:50:51PM +0100, ext Kyungmin Park wrote:
>>> On Tue, Nov 2, 2010 at 11:37 PM, Roman Tereshonkov
>>> <roman.tereshonkov at nokia.com> wrote:
>>> > On Tue, Nov 02, 2010 at 03:00:41PM +0100, ext Kyungmin Park wrote:
>>> >> Hi,
>>> >>
>>> >> On Tue, Nov 2, 2010 at 8:25 PM, Roman Tereshonkov
>>> >> <roman.tereshonkov at nokia.com> wrote:
>>> >> > Implement cache program feature for 4KB page onenand.
>>> >> > This feature improves the write data performance.
>>> >> > The observed 128KB data program speed change is
>>> >> > from 8827KB/s to 14156 KB/s when the feature is enabled.
>>> >> >
>>> >> > Signed-off-by: Roman Tereshonkov <roman.tereshonkov at nokia.com>
>>> >> > ---
>>> >> > ?drivers/mtd/onenand/omap2.c ? ? ? ?| ? 12 ++++++++--
>>> >> > ?drivers/mtd/onenand/onenand_base.c | ? 39 ++++++++++++++++++++++++++++++++++-
>>> >> > ?2 files changed, 46 insertions(+), 5 deletions(-)
>>> >>
>>> >> Please make separate the two patches, one for OMAP, another is for
>>> >> onenand_base.c
>>> >>
>>> >> >
>>> >> > diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
>>> >> > index 9f322f1..da25a90 100644
>>> >> > --- a/drivers/mtd/onenand/omap2.c
>>> >> > +++ b/drivers/mtd/onenand/omap2.c
>>> >> > @@ -108,8 +108,9 @@ static void wait_warn(char *msg, int state, unsigned int ctrl,
>>> >> > ?static int omap2_onenand_wait(struct mtd_info *mtd, int state)
>>> >> > ?{
>>> >> > ? ? ? ?struct omap2_onenand *c = container_of(mtd, struct omap2_onenand, mtd);
>>> >> > + ? ? ? struct onenand_chip *this = mtd->priv;
>>> >> > ? ? ? ?unsigned int intr = 0;
>>> >> > - ? ? ? unsigned int ctrl;
>>> >> > + ? ? ? unsigned int ctrl, ctrl_mask;
>>> >> > ? ? ? ?unsigned long timeout;
>>> >> > ? ? ? ?u32 syscfg;
>>> >> >
>>> >> > @@ -180,7 +181,8 @@ retry:
>>> >> > ? ? ? ? ? ? ? ? ? ? ? ?if (result == 0) {
>>> >> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?/* Timeout after 20ms */
>>> >> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS);
>>> >> > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (ctrl & ONENAND_CTRL_ONGO) {
>>> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (ctrl & ONENAND_CTRL_ONGO &&
>>> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? !this->ongoing) {
>>> >> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?/*
>>> >> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * The operation seems to be still going
>>> >> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? * so give it some more time.
>>> >> > @@ -269,7 +271,11 @@ retry:
>>> >> > ? ? ? ? ? ? ? ?return -EIO;
>>> >> > ? ? ? ?}
>>> >> >
>>> >> > - ? ? ? if (ctrl & 0xFE9F)
>>> >> > + ? ? ? ctrl_mask = 0xFE9F;
>>> >> > + ? ? ? if (this->ongoing)
>>> >> > + ? ? ? ? ? ? ? ctrl_mask &= ~0x8000;
>>> >> > +
>>> >> > + ? ? ? if (ctrl & ctrl_mask)
>>> >> > ? ? ? ? ? ? ? ?wait_warn("unexpected controller status", state, ctrl, intr);
>
> We have to implement the onenand_wait also. it's only for working for OMAP.
>
>>> >> >
>>> >> > ? ? ? ?return 0;
>>> >> > diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
>>> >> > index 6b3a875..b2c3e97 100644
>>> >> > --- a/drivers/mtd/onenand/onenand_base.c
>>> >> > +++ b/drivers/mtd/onenand/onenand_base.c
>>> >> > @@ -440,6 +440,19 @@ static int onenand_command(struct mtd_info *mtd, int cmd, loff_t addr, size_t le
>>> >> > ? ? ? ? ? ? ? ?default:
>>> >> > ? ? ? ? ? ? ? ? ? ? ? ?if (ONENAND_IS_2PLANE(this) && cmd == ONENAND_CMD_PROG)
>>> >> > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?cmd = ONENAND_CMD_2X_PROG;
>>> >> > +
>>> >> > + ? ? ? ? ? ? ? ? ? ? ? /* Exclude 1st OTP and OTP blocks */
>>> >> Are there any reason? I think 1st OTP block is just block 0 so no need
>>> >> to consider block 0 case.
>>> >
>>> >
>>> > Specification tells:
>>> > 3.9.1 Cache Program Operation
>>> > "Note that Cache Program command cannot be performed on OTP block and 1st block OTP"
>>>
>>> Okay I'm not yet check the Spec. I will check it at office.
>>> >
>>> >
>>> >> > + ? ? ? ? ? ? ? ? ? ? ? if (ONENAND_IS_CACHE_PROGRAM(this) &&
>>> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? likely(onenand_block(this, addr) != 0) &&
>>> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ONENAND_IS_4KB_PAGE(this)) {
>>> >> and I think no need to check 4KB_PAGE.
>>> >
>>> >
>>> > This patch is for 4kb page onenand only. The 2kb page onenand uses different
>>> > commands for cache program. Also 2kb page case cache program depends on
>>> > CONFIG_MTD_ONENAND_2X_PROGRAM.
>>> >
>>> >
>>> >> > +
>>> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (cmd == ONENAND_CMD_CACHE_PROG)
>>> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_2X_CACHE_PROG;
>>> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? else if (cmd == ONENAND_CMD_CACHE_PROG_LAST)
>>> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_PROG;
>>> >> > +
>>> >> > + ? ? ? ? ? ? ? ? ? ? ? }
>>> >> > +
>>> >> > ? ? ? ? ? ? ? ? ? ? ? ?dataram = ONENAND_CURRENT_BUFFERRAM(this);
>>> >> > ? ? ? ? ? ? ? ? ? ? ? ?break;
>>> >> > ? ? ? ? ? ? ? ?}
>>> >> > @@ -1845,7 +1858,7 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
>>> >> > ? ? ? ?const u_char *buf = ops->datbuf;
>>> >> > ? ? ? ?const u_char *oob = ops->oobbuf;
>>> >> > ? ? ? ?u_char *oobbuf;
>>> >> > - ? ? ? int ret = 0;
>>> >> > + ? ? ? int ret = 0, cmd;
>>> >> >
>>> >> > ? ? ? ?DEBUG(MTD_DEBUG_LEVEL3, "%s: to = 0x%08x, len = %i\n",
>>> >> > ? ? ? ? ? ? ? ?__func__, (unsigned int) to, (int) len);
>>> >> > @@ -1954,7 +1967,25 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
>>> >> > ? ? ? ? ? ? ? ? ? ? ? ?ONENAND_SET_NEXT_BUFFERRAM(this);
>>> >> > ? ? ? ? ? ? ? ?}
>>> >> >
>>> >> > - ? ? ? ? ? ? ? this->command(mtd, ONENAND_CMD_PROG, to, mtd->writesize);
>>> >> > + ? ? ? ? ? ? ? this->ongoing = 0;
>>> >> > +
>>> >> > + ? ? ? ? ? ? ? /* Exclude 1st OTP and OTP blocks */
>>> >> > + ? ? ? ? ? ? ? if (ONENAND_IS_CACHE_PROGRAM(this) &&
>>> >> > + ? ? ? ? ? ? ? ? ? likely(onenand_block(this, to) != 0) &&
>>> >> > + ? ? ? ? ? ? ? ? ? ONENAND_IS_4KB_PAGE(this)) {
>>> >> check the length here instead of 4KB_PAGE.
>>> >
>>> >
>>> > This patch is for 4kb page onenand only. The 2kb page onenand uses different
>>> > commands for cache program.
>>> I see, check it both 4KiB and 2KiB at office.
>>> >
>>> >
>>> >> > +
>>> >> > + ? ? ? ? ? ? ? ? ? ? ? if ((written + thislen) < len) {
>>> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_CACHE_PROG;
>>> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? this->ongoing = 1;
>>> >> > + ? ? ? ? ? ? ? ? ? ? ? } else {
>>> >> > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_CACHE_PROG_LAST;
>>> >> > + ? ? ? ? ? ? ? ? ? ? ? }
>>> >> Need to check how to pass the cmd properly. How/When send the CACHE_PROG_LAST?
>>> >
>>> >
>>> > CACHE_PROG_LAST command must be sent for last programmed piece of data, that is
>>> > (written + thislen) >= len.
>>> Yes I know, I mean to use the CACHE program I think write size should
>>> be more than 4KiB. e.g., 8KiB write size,
>>
>> Considering 4KB page onenand, for each program command the 4KB data is written at once.
>> If the condition ((written + thislen) < len) is true it means that there is more
>> than 4KB data to written. That means at least one more data program command.
>> Otherwise the ONENAND_CMD_CACHE_PROG_LAST is used which is normal program command.
>
> Right, then do you need the pseudo command? how about to set the real
> command at write function?
>>
>>
>>> >
>>> >
>>> >> > +
>>> >> > + ? ? ? ? ? ? ? } else {
>>> >> > + ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_PROG;
>>> >> > + ? ? ? ? ? ? ? }
>>> >> > +
>>> >> > + ? ? ? ? ? ? ? this->command(mtd, cmd, to, mtd->writesize);
>>> >> >
>>> >> > ? ? ? ? ? ? ? ?/*
>>> >> > ? ? ? ? ? ? ? ? * 2 PLANE, MLC, and Flex-OneNAND wait here
>>> >> > @@ -3380,6 +3411,8 @@ static void onenand_check_features(struct mtd_info *mtd)
>>> >> > ? ? ? ? ? ? ? ?else if (numbufs == 1)
>>> >> > ? ? ? ? ? ? ? ? ? ? ? ?this->options |= ONENAND_HAS_4KB_PAGE;
>>> >> >
>>> >> > + ? ? ? ? ? ? ? this->options |= ONENAND_HAS_CACHE_PROGRAM;
>>> >> It also needs to set CACHE_PROGRAM option.
>>> >
>>> >
>>> > Sorry. What do mean here?
>>> Ah, Now it always set the CACHE_PROGRAM, so it should be set on each chip spec.
>>
>> Is there any problem that CACHE_PROGRAM feature is set for each 4Gb chip?
>> I suppose each of them supports cache program either as 4KB page cache or
>> 2KB page 2x cache program feature.
> For clear, how about to set the 4KiB pagesize only? I'm not yet check
> the 4Gib DDP chip.
>
> Thank you,
> Kyungmin Park
>
>>
>>> >
>>> >
>>> >> > +
>>> >> > ? ? ? ?case ONENAND_DEVICE_DENSITY_2Gb:
>>> >> > ? ? ? ? ? ? ? ?/* 2Gb DDP does not have 2 plane */
>>> >> > ? ? ? ? ? ? ? ?if (!ONENAND_IS_DDP(this))
>>> >> > @@ -3415,6 +3448,8 @@ static void onenand_check_features(struct mtd_info *mtd)
>>> >> > ? ? ? ? ? ? ? ?printk(KERN_DEBUG "Chip has 2 plane\n");
>>> >> > ? ? ? ?if (this->options & ONENAND_HAS_4KB_PAGE)
>>> >> > ? ? ? ? ? ? ? ?printk(KERN_DEBUG "Chip has 4KiB pagesize\n");
>>> >> > + ? ? ? if (this->options & ONENAND_HAS_CACHE_PROGRAM)
>>> >> > + ? ? ? ? ? ? ? printk(KERN_DEBUG "Chip has cache program feature\n");
>>> >> > ?}
>>> >>

One more can you show your speedtest result?

Here's my results.
* Before
[    2.490000] mtd_speedtest: testing eraseblock write speed
[   10.005000] mtd_speedtest: eraseblock write speed is 8147 KiB/s
[   10.010000] mtd_speedtest: testing eraseblock read speed
[   11.660000] mtd_speedtest: eraseblock read speed is 37171 KiB/s
[   11.920000] mtd_speedtest: testing page write speed
[   19.440000] mtd_speedtest: page write speed is 8138 KiB/s
[   19.445000] mtd_speedtest: testing page read speed
[   21.115000] mtd_speedtest: page read speed is 36725 KiB/s
[   21.375000] mtd_speedtest: testing 2 page write speed
[   28.885000] mtd_speedtest: 2 page write speed is 8151 KiB/s
[   28.890000] mtd_speedtest: testing 2 page read speed
[   30.550000] mtd_speedtest: 2 page read speed is 36924 KiB/s
[   30.555000] mtd_speedtest: Testing erase speed
[   30.815000] mtd_speedtest: erase speed is 240881 KiB/s
* After
[   73.385000] mtd_speedtest: scanned 240 eraseblocks, 1 are bad
[   73.645000] mtd_speedtest: testing eraseblock write speed
[   78.820000] mtd_speedtest: eraseblock write speed is 11834 KiB/s
[   78.825000] mtd_speedtest: testing eraseblock read speed
[   80.475000] mtd_speedtest: eraseblock read speed is 37193 KiB/s
[   80.735000] mtd_speedtest: testing page write speed
[   88.255000] mtd_speedtest: page write speed is 8138 KiB/s
[   88.260000] mtd_speedtest: testing page read speed
[   89.930000] mtd_speedtest: page read speed is 36725 KiB/s
[   90.190000] mtd_speedtest: testing 2 page write speed
[   96.515000] mtd_speedtest: 2 page write speed is 9676 KiB/s
[   96.520000] mtd_speedtest: testing 2 page read speed
[   98.180000] mtd_speedtest: 2 page read speed is 36924 KiB/s
[   98.185000] mtd_speedtest: Testing erase speed
[   98.445000] mtd_speedtest: erase speed is 240881 KiB/s
[   98.445000] mtd_speedtest: finished

Thank you,
Kyungmin Park


From kmpark at infradead.org  Wed Nov  3 06:55:13 2010
From: kmpark at infradead.org (Kyungmin Park)
Date: Wed, 03 Nov 2010 19:55:13 +0900
Subject: [PATCH v2] mtd: OneNAND: Cache Program support on 4KiB pagesize
Message-ID: <20101103105513.GA15946@july>

Hi Roman,

How about this patch? Just remove the pseudo command and use real command.
As In case of 2KiB pagesize, it uses the write-while-program so not much write improvement.

Give your opinions.

Thank you,
Kyungmin Park

---
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 6b3a875..586ba4b 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -1845,7 +1845,7 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
 	const u_char *buf = ops->datbuf;
 	const u_char *oob = ops->oobbuf;
 	u_char *oobbuf;
-	int ret = 0;
+	int ret = 0, cmd;
 
 	DEBUG(MTD_DEBUG_LEVEL3, "%s: to = 0x%08x, len = %i\n",
 		__func__, (unsigned int) to, (int) len);
@@ -1954,7 +1954,26 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
 			ONENAND_SET_NEXT_BUFFERRAM(this);
 		}
 
-		this->command(mtd, ONENAND_CMD_PROG, to, mtd->writesize);
+		this->ongoing = 0;
+
+		/* Default write command */
+		cmd = ONENAND_CMD_PROG;
+
+		/*
+		 * Cache Program support
+		 * Exclude 1st OTP and OTP blocks
+		 */
+		if (ONENAND_IS_CACHE_PROGRAM(this) &&
+		    likely(onenand_block(this, to) != 0) &&
+		    ONENAND_IS_4KB_PAGE(this)) {
+
+			if ((written + thislen) < len) {
+				cmd = ONENAND_CMD_2X_CACHE_PROG;
+				this->ongoing = 1;
+			}
+		}
+
+		this->command(mtd, cmd, to, mtd->writesize);
 
 		/*
 		 * 2 PLANE, MLC, and Flex-OneNAND wait here
@@ -3380,6 +3399,8 @@ static void onenand_check_features(struct mtd_info *mtd)
 		else if (numbufs == 1)
 			this->options |= ONENAND_HAS_4KB_PAGE;
 
+		this->options |= ONENAND_HAS_CACHE_PROGRAM;
+
 	case ONENAND_DEVICE_DENSITY_2Gb:
 		/* 2Gb DDP does not have 2 plane */
 		if (!ONENAND_IS_DDP(this))
@@ -3415,6 +3436,8 @@ static void onenand_check_features(struct mtd_info *mtd)
 		printk(KERN_DEBUG "Chip has 2 plane\n");
 	if (this->options & ONENAND_HAS_4KB_PAGE)
 		printk(KERN_DEBUG "Chip has 4KiB pagesize\n");
+	if (this->options & ONENAND_HAS_CACHE_PROGRAM)
+		printk(KERN_DEBUG "Chip has cache program feature\n");
 }
 
 /**
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h
index 0c8815b..3bb1a91 100644
--- a/include/linux/mtd/onenand.h
+++ b/include/linux/mtd/onenand.h
@@ -137,6 +137,14 @@ struct onenand_chip {
 	void			*bbm;
 
 	void			*priv;
+
+	/*
+	 * Shows that the current operation is composed
+	 * of sequence of commands. For example, cache program.
+	 * Such command status OnGo bit is checked at the end of
+	 * sequence.
+	 */
+	unsigned int            ongoing;
 };
 
 /*
@@ -171,6 +179,9 @@ struct onenand_chip {
 #define ONENAND_IS_2PLANE(this)			(0)
 #endif
 
+#define ONENAND_IS_CACHE_PROGRAM(this)					\
+	(this->options & ONENAND_HAS_CACHE_PROGRAM)
+
 /* Check byte access in OneNAND */
 #define ONENAND_CHECK_BYTE_ACCESS(addr)		(addr & 0x1)
 
@@ -181,6 +192,7 @@ struct onenand_chip {
 #define ONENAND_HAS_UNLOCK_ALL		(0x0002)
 #define ONENAND_HAS_2PLANE		(0x0004)
 #define ONENAND_HAS_4KB_PAGE		(0x0008)
+#define ONENAND_HAS_CACHE_PROGRAM	(0x0010)
 #define ONENAND_SKIP_UNLOCK_CHECK	(0x0100)
 #define ONENAND_PAGEBUF_ALLOC		(0x1000)
 #define ONENAND_OOBBUF_ALLOC		(0x2000)


From roman.tereshonkov at nokia.com  Wed Nov  3 06:55:18 2010
From: roman.tereshonkov at nokia.com (Roman Tereshonkov)
Date: Wed,  3 Nov 2010 12:55:18 +0200
Subject: [PATCHv2 0/3] mtd: onenand: add cache program feature for 4kb page
	onenand
Message-ID: <1288781721-31771-1-git-send-email-roman.tereshonkov@nokia.com>

Implement cache program feature for 4KB page onenand.
This feature improves the write data performance.
The observed 128KB data program speed change is
from 8827KB/s to 14156 KB/s when the feature is enabled.

Roman Tereshonkov (3):
  mtd: onenand: add option and variable for cache program feature
  mtd: onenand: fix omap2 code to handle cache program feature
  mtd: onenand: implement cache program feature for 4kb page onenand

 drivers/mtd/onenand/omap2.c        |   12 +++++++++---
 drivers/mtd/onenand/onenand_base.c |   22 +++++++++++++++++++---
 include/linux/mtd/onenand.h        |   12 ++++++++++++
 3 files changed, 40 insertions(+), 6 deletions(-)



From roman.tereshonkov at nokia.com  Wed Nov  3 06:55:20 2010
From: roman.tereshonkov at nokia.com (Roman Tereshonkov)
Date: Wed,  3 Nov 2010 12:55:20 +0200
Subject: [PATCHv2 2/3] mtd: onenand: fix omap2 code to handle cache program
	feature
In-Reply-To: <1288781721-31771-1-git-send-email-roman.tereshonkov@nokia.com>
References: <1288781721-31771-1-git-send-email-roman.tereshonkov@nokia.com>
Message-ID: <1288781721-31771-3-git-send-email-roman.tereshonkov@nokia.com>

Some fixes are introduced into omap2 code to handle errors when
cache program feature is used.

Signed-off-by: Roman Tereshonkov <roman.tereshonkov at nokia.com>
---
 drivers/mtd/onenand/omap2.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index 9f322f1..da25a90 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -108,8 +108,9 @@ static void wait_warn(char *msg, int state, unsigned int ctrl,
 static int omap2_onenand_wait(struct mtd_info *mtd, int state)
 {
 	struct omap2_onenand *c = container_of(mtd, struct omap2_onenand, mtd);
+	struct onenand_chip *this = mtd->priv;
 	unsigned int intr = 0;
-	unsigned int ctrl;
+	unsigned int ctrl, ctrl_mask;
 	unsigned long timeout;
 	u32 syscfg;
 
@@ -180,7 +181,8 @@ retry:
 			if (result == 0) {
 				/* Timeout after 20ms */
 				ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS);
-				if (ctrl & ONENAND_CTRL_ONGO) {
+				if (ctrl & ONENAND_CTRL_ONGO &&
+				    !this->ongoing) {
 					/*
 					 * The operation seems to be still going
 					 * so give it some more time.
@@ -269,7 +271,11 @@ retry:
 		return -EIO;
 	}
 
-	if (ctrl & 0xFE9F)
+	ctrl_mask = 0xFE9F;
+	if (this->ongoing)
+		ctrl_mask &= ~0x8000;
+
+	if (ctrl & ctrl_mask)
 		wait_warn("unexpected controller status", state, ctrl, intr);
 
 	return 0;
-- 
1.7.0.4



From roman.tereshonkov at nokia.com  Wed Nov  3 06:55:19 2010
From: roman.tereshonkov at nokia.com (Roman Tereshonkov)
Date: Wed,  3 Nov 2010 12:55:19 +0200
Subject: [PATCHv2 1/3] mtd: onenand: add option and variable for cache program
	feature
In-Reply-To: <1288781721-31771-1-git-send-email-roman.tereshonkov@nokia.com>
References: <1288781721-31771-1-git-send-email-roman.tereshonkov@nokia.com>
Message-ID: <1288781721-31771-2-git-send-email-roman.tereshonkov@nokia.com>

A new option is added for cache program feature. A new variable
ongoing is introduced for onenand_chip to handle the multi-command
cache program operation.

Signed-off-by: Roman Tereshonkov <roman.tereshonkov at nokia.com>
---
 include/linux/mtd/onenand.h |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h
index 0c8815b..6da3fe3 100644
--- a/include/linux/mtd/onenand.h
+++ b/include/linux/mtd/onenand.h
@@ -137,6 +137,14 @@ struct onenand_chip {
 	void			*bbm;
 
 	void			*priv;
+
+	/*
+	 * Shows that the current operation is composed
+	 * of sequence of commands. For example, cache program.
+	 * Such command status OnGo bit is checked at the end of
+	 * sequence.
+	 */
+	unsigned int		ongoing;
 };
 
 /*
@@ -171,6 +179,9 @@ struct onenand_chip {
 #define ONENAND_IS_2PLANE(this)			(0)
 #endif
 
+#define ONENAND_IS_CACHE_PROGRAM(this)					\
+	(this->options & ONENAND_HAS_CACHE_PROGRAM)
+
 /* Check byte access in OneNAND */
 #define ONENAND_CHECK_BYTE_ACCESS(addr)		(addr & 0x1)
 
@@ -181,6 +192,7 @@ struct onenand_chip {
 #define ONENAND_HAS_UNLOCK_ALL		(0x0002)
 #define ONENAND_HAS_2PLANE		(0x0004)
 #define ONENAND_HAS_4KB_PAGE		(0x0008)
+#define ONENAND_HAS_CACHE_PROGRAM	(0x0010)
 #define ONENAND_SKIP_UNLOCK_CHECK	(0x0100)
 #define ONENAND_PAGEBUF_ALLOC		(0x1000)
 #define ONENAND_OOBBUF_ALLOC		(0x2000)
-- 
1.7.0.4



From roman.tereshonkov at nokia.com  Wed Nov  3 06:55:21 2010
From: roman.tereshonkov at nokia.com (Roman Tereshonkov)
Date: Wed,  3 Nov 2010 12:55:21 +0200
Subject: [PATCHv2 3/3] mtd: onenand: implement cache program feature for 4kb
	page onenand
In-Reply-To: <1288781721-31771-1-git-send-email-roman.tereshonkov@nokia.com>
References: <1288781721-31771-1-git-send-email-roman.tereshonkov@nokia.com>
Message-ID: <1288781721-31771-4-git-send-email-roman.tereshonkov@nokia.com>

Implement cache program feature for 4KB page onenand.
This feature improves the write data performance.
The observed 128KB data program speed change is
from 8827KB/s to 14156 KB/s when the feature is enabled.

Signed-off-by: Roman Tereshonkov <roman.tereshonkov at nokia.com>
---
 drivers/mtd/onenand/onenand_base.c |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 6b3a875..4d6e6c5 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -1845,7 +1845,7 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
 	const u_char *buf = ops->datbuf;
 	const u_char *oob = ops->oobbuf;
 	u_char *oobbuf;
-	int ret = 0;
+	int ret = 0, cmd;
 
 	DEBUG(MTD_DEBUG_LEVEL3, "%s: to = 0x%08x, len = %i\n",
 		__func__, (unsigned int) to, (int) len);
@@ -1954,7 +1954,19 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
 			ONENAND_SET_NEXT_BUFFERRAM(this);
 		}
 
-		this->command(mtd, ONENAND_CMD_PROG, to, mtd->writesize);
+		this->ongoing = 0;
+		cmd = ONENAND_CMD_PROG;
+
+		/* Exclude 1st OTP and OTP blocks for cache program feature */
+		if (ONENAND_IS_CACHE_PROGRAM(this) &&
+		    likely(onenand_block(this, to) != 0) &&
+		    ONENAND_IS_4KB_PAGE(this) &&
+		    ((written + thislen) < len)) {
+			cmd = ONENAND_CMD_2X_CACHE_PROG;
+			this->ongoing = 1;
+		}
+
+		this->command(mtd, cmd, to, mtd->writesize);
 
 		/*
 		 * 2 PLANE, MLC, and Flex-OneNAND wait here
@@ -3377,8 +3389,10 @@ static void onenand_check_features(struct mtd_info *mtd)
 	case ONENAND_DEVICE_DENSITY_4Gb:
 		if (ONENAND_IS_DDP(this))
 			this->options |= ONENAND_HAS_2PLANE;
-		else if (numbufs == 1)
+		else if (numbufs == 1) {
 			this->options |= ONENAND_HAS_4KB_PAGE;
+			this->options |= ONENAND_HAS_CACHE_PROGRAM;
+		}
 
 	case ONENAND_DEVICE_DENSITY_2Gb:
 		/* 2Gb DDP does not have 2 plane */
@@ -3415,6 +3429,8 @@ static void onenand_check_features(struct mtd_info *mtd)
 		printk(KERN_DEBUG "Chip has 2 plane\n");
 	if (this->options & ONENAND_HAS_4KB_PAGE)
 		printk(KERN_DEBUG "Chip has 4KiB pagesize\n");
+	if (this->options & ONENAND_HAS_CACHE_PROGRAM)
+		printk(KERN_DEBUG "Chip has cache program feature\n");
 }
 
 /**
-- 
1.7.0.4



From kyungmin.park at samsung.com  Wed Nov  3 07:05:40 2010
From: kyungmin.park at samsung.com (Kyungmin Park)
Date: Wed, 3 Nov 2010 20:05:40 +0900
Subject: [PATCHv2 3/3] mtd: onenand: implement cache program feature for
	4kb page onenand
In-Reply-To: <1288781721-31771-4-git-send-email-roman.tereshonkov@nokia.com>
References: <1288781721-31771-1-git-send-email-roman.tereshonkov@nokia.com>
	<1288781721-31771-4-git-send-email-roman.tereshonkov@nokia.com>
Message-ID: <AANLkTik_YnmesYb9AF_7DPa3hf1Q5TrXV=4g35vGYxFb@mail.gmail.com>

Acked-by: Kyungmin Park <kyungmin.park at samsung.com>

On Wed, Nov 3, 2010 at 7:55 PM, Roman Tereshonkov
<roman.tereshonkov at nokia.com> wrote:
> Implement cache program feature for 4KB page onenand.
> This feature improves the write data performance.
> The observed 128KB data program speed change is
> from 8827KB/s to 14156 KB/s when the feature is enabled.
>
> Signed-off-by: Roman Tereshonkov <roman.tereshonkov at nokia.com>
> ---
> ?drivers/mtd/onenand/onenand_base.c | ? 22 +++++++++++++++++++---
> ?1 files changed, 19 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
> index 6b3a875..4d6e6c5 100644
> --- a/drivers/mtd/onenand/onenand_base.c
> +++ b/drivers/mtd/onenand/onenand_base.c
> @@ -1845,7 +1845,7 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
> ? ? ? ?const u_char *buf = ops->datbuf;
> ? ? ? ?const u_char *oob = ops->oobbuf;
> ? ? ? ?u_char *oobbuf;
> - ? ? ? int ret = 0;
> + ? ? ? int ret = 0, cmd;
>
> ? ? ? ?DEBUG(MTD_DEBUG_LEVEL3, "%s: to = 0x%08x, len = %i\n",
> ? ? ? ? ? ? ? ?__func__, (unsigned int) to, (int) len);
> @@ -1954,7 +1954,19 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,
> ? ? ? ? ? ? ? ? ? ? ? ?ONENAND_SET_NEXT_BUFFERRAM(this);
> ? ? ? ? ? ? ? ?}
>
> - ? ? ? ? ? ? ? this->command(mtd, ONENAND_CMD_PROG, to, mtd->writesize);
> + ? ? ? ? ? ? ? this->ongoing = 0;
> + ? ? ? ? ? ? ? cmd = ONENAND_CMD_PROG;
> +
> + ? ? ? ? ? ? ? /* Exclude 1st OTP and OTP blocks for cache program feature */
> + ? ? ? ? ? ? ? if (ONENAND_IS_CACHE_PROGRAM(this) &&
> + ? ? ? ? ? ? ? ? ? likely(onenand_block(this, to) != 0) &&
> + ? ? ? ? ? ? ? ? ? ONENAND_IS_4KB_PAGE(this) &&
> + ? ? ? ? ? ? ? ? ? ((written + thislen) < len)) {
> + ? ? ? ? ? ? ? ? ? ? ? cmd = ONENAND_CMD_2X_CACHE_PROG;
> + ? ? ? ? ? ? ? ? ? ? ? this->ongoing = 1;
> + ? ? ? ? ? ? ? }
> +
> + ? ? ? ? ? ? ? this->command(mtd, cmd, to, mtd->writesize);
>
> ? ? ? ? ? ? ? ?/*
> ? ? ? ? ? ? ? ? * 2 PLANE, MLC, and Flex-OneNAND wait here
> @@ -3377,8 +3389,10 @@ static void onenand_check_features(struct mtd_info *mtd)
> ? ? ? ?case ONENAND_DEVICE_DENSITY_4Gb:
> ? ? ? ? ? ? ? ?if (ONENAND_IS_DDP(this))
> ? ? ? ? ? ? ? ? ? ? ? ?this->options |= ONENAND_HAS_2PLANE;
> - ? ? ? ? ? ? ? else if (numbufs == 1)
> + ? ? ? ? ? ? ? else if (numbufs == 1) {
> ? ? ? ? ? ? ? ? ? ? ? ?this->options |= ONENAND_HAS_4KB_PAGE;
> + ? ? ? ? ? ? ? ? ? ? ? this->options |= ONENAND_HAS_CACHE_PROGRAM;
> + ? ? ? ? ? ? ? }
>
> ? ? ? ?case ONENAND_DEVICE_DENSITY_2Gb:
> ? ? ? ? ? ? ? ?/* 2Gb DDP does not have 2 plane */
> @@ -3415,6 +3429,8 @@ static void onenand_check_features(struct mtd_info *mtd)
> ? ? ? ? ? ? ? ?printk(KERN_DEBUG "Chip has 2 plane\n");
> ? ? ? ?if (this->options & ONENAND_HAS_4KB_PAGE)
> ? ? ? ? ? ? ? ?printk(KERN_DEBUG "Chip has 4KiB pagesize\n");
> + ? ? ? if (this->options & ONENAND_HAS_CACHE_PROGRAM)
> + ? ? ? ? ? ? ? printk(KERN_DEBUG "Chip has cache program feature\n");
> ?}
>
> ?/**
> --
> 1.7.0.4
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>


From kyungmin.park at samsung.com  Wed Nov  3 07:06:21 2010
From: kyungmin.park at samsung.com (Kyungmin Park)
Date: Wed, 3 Nov 2010 20:06:21 +0900
Subject: [PATCHv2 1/3] mtd: onenand: add option and variable for cache
	program feature
In-Reply-To: <1288781721-31771-2-git-send-email-roman.tereshonkov@nokia.com>
References: <1288781721-31771-1-git-send-email-roman.tereshonkov@nokia.com>
	<1288781721-31771-2-git-send-email-roman.tereshonkov@nokia.com>
Message-ID: <AANLkTikXCXdHh_pU3QS-QS+o0UWctqqwjxa2U5fDkmkF@mail.gmail.com>

Acked-by: Kyungmin Park <kyungmin.park at samsung.com>

On Wed, Nov 3, 2010 at 7:55 PM, Roman Tereshonkov
<roman.tereshonkov at nokia.com> wrote:
> A new option is added for cache program feature. A new variable
> ongoing is introduced for onenand_chip to handle the multi-command
> cache program operation.
>
> Signed-off-by: Roman Tereshonkov <roman.tereshonkov at nokia.com>
> ---
> ?include/linux/mtd/onenand.h | ? 12 ++++++++++++
> ?1 files changed, 12 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h
> index 0c8815b..6da3fe3 100644
> --- a/include/linux/mtd/onenand.h
> +++ b/include/linux/mtd/onenand.h
> @@ -137,6 +137,14 @@ struct onenand_chip {
> ? ? ? ?void ? ? ? ? ? ? ? ? ? ?*bbm;
>
> ? ? ? ?void ? ? ? ? ? ? ? ? ? ?*priv;
> +
> + ? ? ? /*
> + ? ? ? ?* Shows that the current operation is composed
> + ? ? ? ?* of sequence of commands. For example, cache program.
> + ? ? ? ?* Such command status OnGo bit is checked at the end of
> + ? ? ? ?* sequence.
> + ? ? ? ?*/
> + ? ? ? unsigned int ? ? ? ? ? ?ongoing;
> ?};
>
> ?/*
> @@ -171,6 +179,9 @@ struct onenand_chip {
> ?#define ONENAND_IS_2PLANE(this) ? ? ? ? ? ? ? ? ? ? ? ?(0)
> ?#endif
>
> +#define ONENAND_IS_CACHE_PROGRAM(this) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? \
> + ? ? ? (this->options & ONENAND_HAS_CACHE_PROGRAM)
> +
> ?/* Check byte access in OneNAND */
> ?#define ONENAND_CHECK_BYTE_ACCESS(addr) ? ? ? ? ? ? ? ?(addr & 0x1)
>
> @@ -181,6 +192,7 @@ struct onenand_chip {
> ?#define ONENAND_HAS_UNLOCK_ALL ? ? ? ? (0x0002)
> ?#define ONENAND_HAS_2PLANE ? ? ? ? ? ? (0x0004)
> ?#define ONENAND_HAS_4KB_PAGE ? ? ? ? ? (0x0008)
> +#define ONENAND_HAS_CACHE_PROGRAM ? ? ?(0x0010)
> ?#define ONENAND_SKIP_UNLOCK_CHECK ? ? ?(0x0100)
> ?#define ONENAND_PAGEBUF_ALLOC ? ? ? ? ?(0x1000)
> ?#define ONENAND_OOBBUF_ALLOC ? ? ? ? ? (0x2000)
> --
> 1.7.0.4
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>


From matthieu.castet at parrot.com  Wed Nov  3 07:38:58 2010
From: matthieu.castet at parrot.com (Matthieu CASTET)
Date: Wed, 3 Nov 2010 12:38:58 +0100
Subject: [PATCH] nand wait timeout fix
Message-ID: <4CD149D2.5080900@parrot.com>

nand_wait_ready timeout should not depends of HZ value.
panic_nand_wait take an relative timeout, not a absolute one.
warn if nand_wait exit while the nand is still busy.

Signed-off-by: Matthieu CASTET <matthieu.castet at parrot.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nand_wait.diff
Type: text/x-diff
Size: 1143 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20101103/ede657a1/attachment.bin>

From notasas at gmail.com  Wed Nov  3 09:02:36 2010
From: notasas at gmail.com (Grazvydas Ignotas)
Date: Wed, 3 Nov 2010 15:02:36 +0200
Subject: [PATCH RESEND v5 4/5] omap: nand: ecc layout select from board
	file
In-Reply-To: <1285596710-25658-5-git-send-email-s-ghorai@ti.com>
References: <1285596710-25658-1-git-send-email-s-ghorai@ti.com>
	<1285596710-25658-5-git-send-email-s-ghorai@ti.com>
Message-ID: <AANLkTikKMnzHR5DZqzGdJJbnCXhCpxKA7K2C2ZtPhNke@mail.gmail.com>

On Mon, Sep 27, 2010 at 5:11 PM, Sukumar Ghorai <s-ghorai at ti.com> wrote:
> This patch makes it possible to select sw or hw (different layout options)
> ecc scheme supported by omap nand driver. ?And hw ecc layout selected for
> sdp and zoom boards, by default.
>
> Signed-off-by: Vimal Singh <vimalsingh at ti.com>
> Signed-off-by: Sukumar Ghorai <s-ghorai at ti.com>

Any news on this? Commit 2c01946c accidentally (?) enabled hardware
ECC and now my board is broken, as the driver always used sw ecc and
my NAND partitions are formatted accordingly. We should at least
switch the default back to sw ecc, don't you think?


From ketil at froyn.name  Wed Nov  3 09:16:01 2010
From: ketil at froyn.name (Ketil Froyn)
Date: Wed, 3 Nov 2010 14:16:01 +0100
Subject: Suggested patch: reset errno after isatty()
In-Reply-To: <4CD11C03.3090207@parrot.com>
References: <AANLkTimwumfui-_T1ScDYwMLKbNh1ia-SDMUg56wTfN5@mail.gmail.com>
	<4CD11C03.3090207@parrot.com>
Message-ID: <AANLkTimfxjrtV4eks5tK68h6TQ20soib+6gaTC+QyB4a@mail.gmail.com>

On Wed, Nov 3, 2010 at 9:23 AM, Matthieu CASTET
<matthieu.castet at parrot.com> wrote:

> Why errno is checked when pread return 0 ?
> Errno should be checked only when return is -1.

Good point, and I guess that was why I was getting weird errors in the
first place, because errno was checked when no error had occurred. Odd
that pread() returned 0 when trying to read on my android device -
maybe a bionic bug?

This code has been rewritten, but the new master isn't working for me
(yet). This patch against v1.4.1 seems to have solved my problems for
now. I've just replaced pread() with read(), because it works, and
fixed up the error checking.

--- a/nanddump.c
+++ b/nanddump.c
@@ -412,10 +412,25 @@ int main(int argc, char * const argv[])
                        memset (readbuf, 0xff, bs);
                } else {
                        /* Read page data and exit on failure */
-                       if (pread(fd, readbuf, bs, ofs) != bs) {
-                               perror("pread");
-                               goto closeall;
-                       }
+                       do {
+                               ret = read(fd, readbuf, bs);
+                               if (ret == -1) {
+                                       if (errno == EAGAIN || errno == EINTR) {
+                                               continue;
+                                       }
+                                       perror("read");
+                                       goto closeall;
+                               }
+                               if (ret == 0) {
+                                       printf("No more data to read\n");
+                                       break;
+                               }
+                               if (ret != bs) {
+                                       fprintf(stderr, "read() got
wrong number of bytes: got %i, expected %i\n", ret, bs);
+                                       goto closeall;
+                               }
+                               break;
+                       } while (1);
                }

                /* ECC stats available ? */


From notasas at gmail.com  Wed Nov  3 17:30:02 2010
From: notasas at gmail.com (Grazvydas Ignotas)
Date: Wed, 3 Nov 2010 23:30:02 +0200
Subject: ubi deadlock on .36+
Message-ID: <AANLkTimKc_EtT6NEwbga8g7AKoGnDSt7UMQwgou_jCXD@mail.gmail.com>

Hi,

there seems to be some issue with NAND on my OMAP3 board that causes
CRC errors on 2.6.36 and 2.6.37-rc1. Those seem to be triggering a bug
in UBI that makes it loop forever (or very long) printing this:

uncorrectable error :
UBI error: ubi_io_read: error -74 (ECC error) while reading 512 bytes
from PEB 0:512, read 512 bytes
uncorrectable error :
UBI error: ubi_io_read: error -74 (ECC error) while reading 512 bytes
from PEB 68:512, read 512 bytes
UBI: run torture test for PEB 68
UBI: PEB 68 passed torture test, do not mark it a bad


here is full log of one minute session, after which I killed power:
http://notaz.gp2x.de/misc/pnd/logs/linux_20101103_ubi_lockup


Gra?vydas


From s-ghorai at ti.com  Wed Nov  3 21:02:17 2010
From: s-ghorai at ti.com (Ghorai, Sukumar)
Date: Thu, 4 Nov 2010 06:32:17 +0530
Subject: [PATCH RESEND v5 4/5] omap: nand: ecc layout select from board
	file
In-Reply-To: <AANLkTikKMnzHR5DZqzGdJJbnCXhCpxKA7K2C2ZtPhNke@mail.gmail.com>
References: <1285596710-25658-1-git-send-email-s-ghorai@ti.com>
	<1285596710-25658-5-git-send-email-s-ghorai@ti.com>
	<AANLkTikKMnzHR5DZqzGdJJbnCXhCpxKA7K2C2ZtPhNke@mail.gmail.com>
Message-ID: <2A3DCF3DA181AD40BDE86A3150B27B6B0356BABFAE@dbde02.ent.ti.com>



> -----Original Message-----
> From: Grazvydas Ignotas [mailto:notasas at gmail.com]
> Sent: Wednesday, November 03, 2010 6:33 PM
> To: Ghorai, Sukumar
> Cc: linux-omap at vger.kernel.org; linux-mtd at lists.infradead.org; linux-arm-
> kernel at lists.infradead.org; Vimal Singh; Artem.Bityutskiy at nokia.com
> Subject: Re: [PATCH RESEND v5 4/5] omap: nand: ecc layout select from
> board file
> 
> On Mon, Sep 27, 2010 at 5:11 PM, Sukumar Ghorai <s-ghorai at ti.com> wrote:
> > This patch makes it possible to select sw or hw (different layout
> options)
> > ecc scheme supported by omap nand driver. ?And hw ecc layout selected
> for
> > sdp and zoom boards, by default.
> >
> > Signed-off-by: Vimal Singh <vimalsingh at ti.com>
> > Signed-off-by: Sukumar Ghorai <s-ghorai at ti.com>
> 
> Any news on this? Commit 2c01946c accidentally (?) enabled hardware
> ECC and now my board is broken, as the driver always used sw ecc and
> my NAND partitions are formatted accordingly. We should at least
> switch the default back to sw ecc, don't you think?
[Ghorai] 
1. which board you are working. 
2. and the default layout is the same as previous 
+       board_nand_data.ecc_opt         = OMAP_ECC_HAMMING_CODE_DIFF_LAYOUT;


From kyungmin.park at samsung.com  Wed Nov  3 21:14:57 2010
From: kyungmin.park at samsung.com (Kyungmin Park)
Date: Thu, 4 Nov 2010 10:14:57 +0900
Subject: [PATCHv2 0/3] mtd: onenand: add cache program feature for 4kb
	page onenand
In-Reply-To: <1288781721-31771-1-git-send-email-roman.tereshonkov@nokia.com>
References: <1288781721-31771-1-git-send-email-roman.tereshonkov@nokia.com>
Message-ID: <AANLkTikUSTnPedgdP19_bNbhOtSdfApdyCLKMyn+6Ext@mail.gmail.com>

Hi,

One concern is that after apply patch, there are some 1-bit ECC
warnings so UBI scrubbing messages are displayed.

Are there these message at your board?

Thank you,
Kyungmin Park

On Wed, Nov 3, 2010 at 7:55 PM, Roman Tereshonkov
<roman.tereshonkov at nokia.com> wrote:
> Implement cache program feature for 4KB page onenand.
> This feature improves the write data performance.
> The observed 128KB data program speed change is
> from 8827KB/s to 14156 KB/s when the feature is enabled.
>
> Roman Tereshonkov (3):
> ?mtd: onenand: add option and variable for cache program feature
> ?mtd: onenand: fix omap2 code to handle cache program feature
> ?mtd: onenand: implement cache program feature for 4kb page onenand
>
> ?drivers/mtd/onenand/omap2.c ? ? ? ?| ? 12 +++++++++---
> ?drivers/mtd/onenand/onenand_base.c | ? 22 +++++++++++++++++++---
> ?include/linux/mtd/onenand.h ? ? ? ?| ? 12 ++++++++++++
> ?3 files changed, 40 insertions(+), 6 deletions(-)
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>


From dedekind1 at gmail.com  Thu Nov  4 03:29:09 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Thu, 04 Nov 2010 09:29:09 +0200
Subject: ubi deadlock on .36+
In-Reply-To: <AANLkTimKc_EtT6NEwbga8g7AKoGnDSt7UMQwgou_jCXD@mail.gmail.com>
References: <AANLkTimKc_EtT6NEwbga8g7AKoGnDSt7UMQwgou_jCXD@mail.gmail.com>
Message-ID: <1288855749.2075.7.camel@localhost>

On Wed, 2010-11-03 at 23:30 +0200, Grazvydas Ignotas wrote:
> Hi,
> 
> there seems to be some issue with NAND on my OMAP3 board that causes
> CRC errors on 2.6.36 and 2.6.37-rc1. Those seem to be triggering a bug
> in UBI that makes it loop forever (or very long) printing this:
> 
> uncorrectable error :
> UBI error: ubi_io_read: error -74 (ECC error) while reading 512 bytes
> from PEB 0:512, read 512 bytes
> uncorrectable error :
> UBI error: ubi_io_read: error -74 (ECC error) while reading 512 bytes
> from PEB 68:512, read 512 bytes
> UBI: run torture test for PEB 68
> UBI: PEB 68 passed torture test, do not mark it a bad
> 
> 
> here is full log of one minute session, after which I killed power:
> http://notaz.gp2x.de/misc/pnd/logs/linux_20101103_ubi_lockup

Hmm, could you please enable UBI debugging and provide me the logs? See
here for some hints:
http://www.linux-mtd.infradead.org/doc/ubi.html#L_how_send_bugreport

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From roman.tereshonkov at nokia.com  Thu Nov  4 04:58:07 2010
From: roman.tereshonkov at nokia.com (roman.tereshonkov at nokia.com)
Date: Thu, 4 Nov 2010 09:58:07 +0100
Subject: [PATCHv2 0/3] mtd: onenand: add cache program feature for 4kb
	page onenand
In-Reply-To: <AANLkTikUSTnPedgdP19_bNbhOtSdfApdyCLKMyn+6Ext@mail.gmail.com>
References: <1288781721-31771-1-git-send-email-roman.tereshonkov@nokia.com>
	<AANLkTikUSTnPedgdP19_bNbhOtSdfApdyCLKMyn+6Ext@mail.gmail.com>
Message-ID: <E1C7579D1379824DAE67858071C810383717438EEF@NOK-EUMSG-02.mgdnok.nokia.com>


Hi,


I used driver/mtd/tests and did not observe any warnings except a couple of bad blocks for some boards.

Can you discribe your test case for me to reproduce it. And show your kernel log when it happens if possible?
Is it for 2kb or 4kb page onenand?


Regards
Roman Tereshonkov


>-----Original Message-----
>From: kyungmin78 at gmail.com [mailto:kyungmin78 at gmail.com] On 
>Behalf Of ext Kyungmin Park
>Sent: 04 November, 2010 03:15
>To: Tereshonkov Roman (Nokia-MS/Helsinki)
>Cc: linux-mtd at lists.infradead.org
>Subject: Re: [PATCHv2 0/3] mtd: onenand: add cache program 
>feature for 4kb page onenand
>
>Hi,
>
>One concern is that after apply patch, there are some 1-bit ECC
>warnings so UBI scrubbing messages are displayed.
>
>Are there these message at your board?
>
>Thank you,
>Kyungmin Park
>
>On Wed, Nov 3, 2010 at 7:55 PM, Roman Tereshonkov
><roman.tereshonkov at nokia.com> wrote:
>> Implement cache program feature for 4KB page onenand.
>> This feature improves the write data performance.
>> The observed 128KB data program speed change is
>> from 8827KB/s to 14156 KB/s when the feature is enabled.
>>
>> Roman Tereshonkov (3):
>> ?mtd: onenand: add option and variable for cache program feature
>> ?mtd: onenand: fix omap2 code to handle cache program feature
>> ?mtd: onenand: implement cache program feature for 4kb page onenand
>>
>> ?drivers/mtd/onenand/omap2.c ? ? ? ?| ? 12 +++++++++---
>> ?drivers/mtd/onenand/onenand_base.c | ? 22 +++++++++++++++++++---
>> ?include/linux/mtd/onenand.h ? ? ? ?| ? 12 ++++++++++++
>> ?3 files changed, 40 insertions(+), 6 deletions(-)
>>
>>
>> ______________________________________________________
>> Linux MTD discussion mailing list
>> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>>
>

From kmpark at infradead.org  Thu Nov  4 05:10:36 2010
From: kmpark at infradead.org (Kyungmin Park)
Date: Thu, 4 Nov 2010 18:10:36 +0900
Subject: [PATCHv2 0/3] mtd: onenand: add cache program feature for 4kb
	page onenand
In-Reply-To: <E1C7579D1379824DAE67858071C810383717438EEF@NOK-EUMSG-02.mgdnok.nokia.com>
References: <1288781721-31771-1-git-send-email-roman.tereshonkov@nokia.com>
	<AANLkTikUSTnPedgdP19_bNbhOtSdfApdyCLKMyn+6Ext@mail.gmail.com>
	<E1C7579D1379824DAE67858071C810383717438EEF@NOK-EUMSG-02.mgdnok.nokia.com>
Message-ID: <AANLkTikrO1BC7LuUCzuNg7b3gAuC=DYLKLRnFh4rPoco@mail.gmail.com>

On Thu, Nov 4, 2010 at 5:58 PM,  <roman.tereshonkov at nokia.com> wrote:
>
> Hi,
>
>
> I used driver/mtd/tests and did not observe any warnings except a couple of bad blocks for some boards.
Yes in case of mtd_test* there's no messages.
>
> Can you discribe your test case for me to reproduce it. And show your kernel log when it happens if possible?
> Is it for 2kb or 4kb page onenand?

Mount ubifs on OneNAND which has 4KiB pagesize and run fsstress -p 3
-n 1000000000 -d /ubifs

then you can or maybe see the UBI scrubbing message.

Thank you,
Kyungmin Park
>
>
> Regards
> Roman Tereshonkov
>
>
>>-----Original Message-----
>>From: kyungmin78 at gmail.com [mailto:kyungmin78 at gmail.com] On
>>Behalf Of ext Kyungmin Park
>>Sent: 04 November, 2010 03:15
>>To: Tereshonkov Roman (Nokia-MS/Helsinki)
>>Cc: linux-mtd at lists.infradead.org
>>Subject: Re: [PATCHv2 0/3] mtd: onenand: add cache program
>>feature for 4kb page onenand
>>
>>Hi,
>>
>>One concern is that after apply patch, there are some 1-bit ECC
>>warnings so UBI scrubbing messages are displayed.
>>
>>Are there these message at your board?
>>
>>Thank you,
>>Kyungmin Park
>>
>>On Wed, Nov 3, 2010 at 7:55 PM, Roman Tereshonkov
>><roman.tereshonkov at nokia.com> wrote:
>>> Implement cache program feature for 4KB page onenand.
>>> This feature improves the write data performance.
>>> The observed 128KB data program speed change is
>>> from 8827KB/s to 14156 KB/s when the feature is enabled.
>>>
>>> Roman Tereshonkov (3):
>>> ?mtd: onenand: add option and variable for cache program feature
>>> ?mtd: onenand: fix omap2 code to handle cache program feature
>>> ?mtd: onenand: implement cache program feature for 4kb page onenand
>>>
>>> ?drivers/mtd/onenand/omap2.c ? ? ? ?| ? 12 +++++++++---
>>> ?drivers/mtd/onenand/onenand_base.c | ? 22 +++++++++++++++++++---
>>> ?include/linux/mtd/onenand.h ? ? ? ?| ? 12 ++++++++++++
>>> ?3 files changed, 40 insertions(+), 6 deletions(-)
>>>
>>>
>>> ______________________________________________________
>>> Linux MTD discussion mailing list
>>> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>>>
>>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>


From notasas at gmail.com  Thu Nov  4 05:52:10 2010
From: notasas at gmail.com (Grazvydas Ignotas)
Date: Thu, 4 Nov 2010 11:52:10 +0200
Subject: [PATCH RESEND v5 4/5] omap: nand: ecc layout select from board
	file
In-Reply-To: <2A3DCF3DA181AD40BDE86A3150B27B6B0356BABFAE@dbde02.ent.ti.com>
References: <1285596710-25658-1-git-send-email-s-ghorai@ti.com>
	<1285596710-25658-5-git-send-email-s-ghorai@ti.com>
	<AANLkTikKMnzHR5DZqzGdJJbnCXhCpxKA7K2C2ZtPhNke@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BABFAE@dbde02.ent.ti.com>
Message-ID: <AANLkTinOhBNUt+gvNb0MWiyHD8ZYgLDJPz8tc=p+CsVW@mail.gmail.com>

On Thu, Nov 4, 2010 at 3:02 AM, Ghorai, Sukumar <s-ghorai at ti.com> wrote:
>> -----Original Message-----
>> From: Grazvydas Ignotas [mailto:notasas at gmail.com]
>> Sent: Wednesday, November 03, 2010 6:33 PM
>> To: Ghorai, Sukumar
>> Cc: linux-omap at vger.kernel.org; linux-mtd at lists.infradead.org; linux-arm-
>> kernel at lists.infradead.org; Vimal Singh; Artem.Bityutskiy at nokia.com
>> Subject: Re: [PATCH RESEND v5 4/5] omap: nand: ecc layout select from
>> board file
>>
>> On Mon, Sep 27, 2010 at 5:11 PM, Sukumar Ghorai <s-ghorai at ti.com> wrote:
>> > This patch makes it possible to select sw or hw (different layout
>> options)
>> > ecc scheme supported by omap nand driver. ?And hw ecc layout selected
>> for
>> > sdp and zoom boards, by default.
>> >
>> > Signed-off-by: Vimal Singh <vimalsingh at ti.com>
>> > Signed-off-by: Sukumar Ghorai <s-ghorai at ti.com>
>>
>> Any news on this? Commit 2c01946c accidentally (?) enabled hardware
>> ECC and now my board is broken, as the driver always used sw ecc and
>> my NAND partitions are formatted accordingly. We should at least
>> switch the default back to sw ecc, don't you think?
> [Ghorai]
> 1. which board you are working.
> 2. and the default layout is the same as previous
> + ? ? ? board_nand_data.ecc_opt ? ? ? ? = OMAP_ECC_HAMMING_CODE_DIFF_LAYOUT;

OMAP3 pandora.
What I wanted to say is that current mainline code has hw ECC forced
which is wrong for some boards, and this patch did not make into last
merge window, so NAND is broken. It would be good to take this patch
out of larger series you sent earlier and resend as a fix for -rc1, so
that NAND works on 2.6.37.  It's not too large and should probably be
ok for -rc2.


From s-ghorai at ti.com  Thu Nov  4 06:15:17 2010
From: s-ghorai at ti.com (Ghorai, Sukumar)
Date: Thu, 4 Nov 2010 15:45:17 +0530
Subject: [PATCH RESEND v5 4/5] omap: nand: ecc layout select from board
	file
In-Reply-To: <AANLkTinOhBNUt+gvNb0MWiyHD8ZYgLDJPz8tc=p+CsVW@mail.gmail.com>
References: <1285596710-25658-1-git-send-email-s-ghorai@ti.com>
	<1285596710-25658-5-git-send-email-s-ghorai@ti.com>
	<AANLkTikKMnzHR5DZqzGdJJbnCXhCpxKA7K2C2ZtPhNke@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BABFAE@dbde02.ent.ti.com>
	<AANLkTinOhBNUt+gvNb0MWiyHD8ZYgLDJPz8tc=p+CsVW@mail.gmail.com>
Message-ID: <2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC2B6@dbde02.ent.ti.com>



> -----Original Message-----
> From: Grazvydas Ignotas [mailto:notasas at gmail.com]
> Sent: Thursday, November 04, 2010 3:22 PM
> To: Ghorai, Sukumar
> Cc: linux-omap at vger.kernel.org; linux-mtd at lists.infradead.org; linux-arm-
> kernel at lists.infradead.org; Artem.Bityutskiy at nokia.com; Vimal Singh; Tony
> Lindgren
> Subject: Re: [PATCH RESEND v5 4/5] omap: nand: ecc layout select from
> board file
> 
> On Thu, Nov 4, 2010 at 3:02 AM, Ghorai, Sukumar <s-ghorai at ti.com> wrote:
> >> -----Original Message-----
> >> From: Grazvydas Ignotas [mailto:notasas at gmail.com]
> >> Sent: Wednesday, November 03, 2010 6:33 PM
> >> To: Ghorai, Sukumar
> >> Cc: linux-omap at vger.kernel.org; linux-mtd at lists.infradead.org; linux-
> arm-
> >> kernel at lists.infradead.org; Vimal Singh; Artem.Bityutskiy at nokia.com
> >> Subject: Re: [PATCH RESEND v5 4/5] omap: nand: ecc layout select from
> >> board file
> >>
> >> On Mon, Sep 27, 2010 at 5:11 PM, Sukumar Ghorai <s-ghorai at ti.com>
> wrote:
> >> > This patch makes it possible to select sw or hw (different layout
> >> options)
> >> > ecc scheme supported by omap nand driver. ?And hw ecc layout selected
> >> for
> >> > sdp and zoom boards, by default.
> >> >
> >> > Signed-off-by: Vimal Singh <vimalsingh at ti.com>
> >> > Signed-off-by: Sukumar Ghorai <s-ghorai at ti.com>
> >>
> >> Any news on this? Commit 2c01946c accidentally (?) enabled hardware
> >> ECC and now my board is broken, as the driver always used sw ecc and
> >> my NAND partitions are formatted accordingly. We should at least
> >> switch the default back to sw ecc, don't you think?
> > [Ghorai]
> > 1. which board you are working.
> > 2. and the default layout is the same as previous
> > + ? ? ? board_nand_data.ecc_opt ? ? ? ? =
> OMAP_ECC_HAMMING_CODE_DIFF_LAYOUT;
> 
> OMAP3 pandora.
> What I wanted to say is that current mainline code has hw ECC forced
> which is wrong for some boards, and this patch did not make into last
> merge window, so NAND is broken. It would be good to take this patch
> out of larger series you sent earlier and resend as a fix for -rc1, so
> that NAND works on 2.6.37.  It's not too large and should probably be
> ok for -rc2.

[Ghorai] 
There is an additional patch I will send (with this series by next week) to select the ECC from board file, such that different board file can select the different ECC method. 

1. This is mainly for OMAP3630 onwards and has been aligned with many customers to use the hw ecc.

2. I did not understand how it's not working, would you please explain again? If you apply the series then it's storing the same ecc value in different location and generated from h/w module. 
File: arch/arm/mach-omap2/board-flash.c 
board_nand_data.ecc_opt         = OMAP_ECC_HAMMING_CODE_DIFF_LAYOUT;
change to -
board_nand_data.ecc_opt         = OMAP_ECC_HAMMING_CODE_HW;
- to switch back to s/w generated ECC stores at end of the spare area.

3. This patches are not upstream yet; send me the git-link you referring that these patches are available in 2.6.37?




From notasas at gmail.com  Thu Nov  4 06:56:57 2010
From: notasas at gmail.com (Grazvydas Ignotas)
Date: Thu, 4 Nov 2010 12:56:57 +0200
Subject: [PATCH RESEND v5 4/5] omap: nand: ecc layout select from board
	file
In-Reply-To: <2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC2B6@dbde02.ent.ti.com>
References: <1285596710-25658-1-git-send-email-s-ghorai@ti.com>
	<1285596710-25658-5-git-send-email-s-ghorai@ti.com>
	<AANLkTikKMnzHR5DZqzGdJJbnCXhCpxKA7K2C2ZtPhNke@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BABFAE@dbde02.ent.ti.com>
	<AANLkTinOhBNUt+gvNb0MWiyHD8ZYgLDJPz8tc=p+CsVW@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC2B6@dbde02.ent.ti.com>
Message-ID: <AANLkTinNrZNuZnFfJKGLF9J3zsHsOTK0+VmUmYH88+c3@mail.gmail.com>

On Thu, Nov 4, 2010 at 12:15 PM, Ghorai, Sukumar <s-ghorai at ti.com> wrote:
>> -----Original Message-----
>> From: Grazvydas Ignotas [mailto:notasas at gmail.com]
>> OMAP3 pandora.
>> What I wanted to say is that current mainline code has hw ECC forced
>> which is wrong for some boards, and this patch did not make into last
>> merge window, so NAND is broken. It would be good to take this patch
>> out of larger series you sent earlier and resend as a fix for -rc1, so
>> that NAND works on 2.6.37. ?It's not too large and should probably be
>> ok for -rc2.
>
> [Ghorai]
> There is an additional patch I will send (with this series by next week) to select the ECC from board file, such that different board file can select the different ECC method.
>
> 1. This is mainly for OMAP3630 onwards and has been aligned with many customers to use the hw ecc.
>
> 2. I did not understand how it's not working, would you please explain again? If you apply the series then it's storing the same ecc value in different location and generated from h/w module.

It most likely works (need to test more), I was just complaining it's
not upstream and sw ecc is broken on both 2.6.36 and 2.6.37.

> 3. This patches are not upstream yet; send me the git-link you referring that these patches are available in 2.6.37?
Correct, they are not upstream, so that's why suggest sending smaller
fix patch for 2.6.37-rc2, so that sw ecc works on 2.6.37.


From s-ghorai at ti.com  Thu Nov  4 07:03:31 2010
From: s-ghorai at ti.com (Ghorai, Sukumar)
Date: Thu, 4 Nov 2010 16:33:31 +0530
Subject: [PATCH RESEND v5 4/5] omap: nand: ecc layout select from board
	file
In-Reply-To: <AANLkTinNrZNuZnFfJKGLF9J3zsHsOTK0+VmUmYH88+c3@mail.gmail.com>
References: <1285596710-25658-1-git-send-email-s-ghorai@ti.com>
	<1285596710-25658-5-git-send-email-s-ghorai@ti.com>
	<AANLkTikKMnzHR5DZqzGdJJbnCXhCpxKA7K2C2ZtPhNke@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BABFAE@dbde02.ent.ti.com>
	<AANLkTinOhBNUt+gvNb0MWiyHD8ZYgLDJPz8tc=p+CsVW@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC2B6@dbde02.ent.ti.com>
	<AANLkTinNrZNuZnFfJKGLF9J3zsHsOTK0+VmUmYH88+c3@mail.gmail.com>
Message-ID: <2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC323@dbde02.ent.ti.com>



> -----Original Message-----
> From: Grazvydas Ignotas [mailto:notasas at gmail.com]
> Sent: Thursday, November 04, 2010 4:27 PM
> To: Ghorai, Sukumar
> Cc: linux-omap at vger.kernel.org; linux-mtd at lists.infradead.org; linux-arm-
> kernel at lists.infradead.org; Artem.Bityutskiy at nokia.com; Vimal Singh; Tony
> Lindgren
> Subject: Re: [PATCH RESEND v5 4/5] omap: nand: ecc layout select from
> board file
> 
> On Thu, Nov 4, 2010 at 12:15 PM, Ghorai, Sukumar <s-ghorai at ti.com> wrote:
> >> -----Original Message-----
> >> From: Grazvydas Ignotas [mailto:notasas at gmail.com]
> >> OMAP3 pandora.
> >> What I wanted to say is that current mainline code has hw ECC forced
> >> which is wrong for some boards, and this patch did not make into last
> >> merge window, so NAND is broken. It would be good to take this patch
> >> out of larger series you sent earlier and resend as a fix for -rc1, so
> >> that NAND works on 2.6.37. ?It's not too large and should probably be
> >> ok for -rc2.
> >
> > [Ghorai]
> > There is an additional patch I will send (with this series by next week)
> to select the ECC from board file, such that different board file can
> select the different ECC method.
> >
> > 1. This is mainly for OMAP3630 onwards and has been aligned with many
> customers to use the hw ecc.
> >
> > 2. I did not understand how it's not working, would you please explain
> again? If you apply the series then it's storing the same ecc value in
> different location and generated from h/w module.
> 
> It most likely works (need to test more), I was just complaining it's
> not upstream and sw ecc is broken on both 2.6.36 and 2.6.37.

[Ghorai] In 2.6.36, it's a s/w ecc by default and working in all platforms like - omap3430 SDP, zoom2, 3630SDP, ZOOM3.
So please explain more when you found that - sw ecc is broken on both 2.6.36  

> 
> > 3. This patches are not upstream yet; send me the git-link you referring
> that these patches are available in 2.6.37?
> Correct, they are not upstream, so that's why suggest sending smaller
> fix patch for 2.6.37-rc2, so that sw ecc works on 2.6.37.


From notasas at gmail.com  Thu Nov  4 07:11:50 2010
From: notasas at gmail.com (Grazvydas Ignotas)
Date: Thu, 4 Nov 2010 13:11:50 +0200
Subject: [PATCH RESEND v5 4/5] omap: nand: ecc layout select from board
	file
In-Reply-To: <2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC323@dbde02.ent.ti.com>
References: <1285596710-25658-1-git-send-email-s-ghorai@ti.com>
	<1285596710-25658-5-git-send-email-s-ghorai@ti.com>
	<AANLkTikKMnzHR5DZqzGdJJbnCXhCpxKA7K2C2ZtPhNke@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BABFAE@dbde02.ent.ti.com>
	<AANLkTinOhBNUt+gvNb0MWiyHD8ZYgLDJPz8tc=p+CsVW@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC2B6@dbde02.ent.ti.com>
	<AANLkTinNrZNuZnFfJKGLF9J3zsHsOTK0+VmUmYH88+c3@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC323@dbde02.ent.ti.com>
Message-ID: <AANLkTik3gO1Rm2U8-Rm2t2M83sdCjz_Oktpve_gDrbNM@mail.gmail.com>

> [Ghorai] In 2.6.36, it's a s/w ecc by default and working in all platforms like - omap3430 SDP, zoom2, 3630SDP, ZOOM3.
> So please explain more when you found that - sw ecc is broken on both 2.6.36

It doesn't for me, see
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/mtd/nand/omap2.c;h=513e0a76a4a73866d52bba8151e43556a3b30a54;hb=f6f94e2ab1b33f0082ac22d71f66385a60d8157f

This is omap NAND driver at v2.6.36 tag, and it has
CONFIG_MTD_NAND_OMAP_HWECC forced.


From s-ghorai at ti.com  Thu Nov  4 07:15:14 2010
From: s-ghorai at ti.com (Ghorai, Sukumar)
Date: Thu, 4 Nov 2010 16:45:14 +0530
Subject: [PATCH RESEND v5 4/5] omap: nand: ecc layout select from board
	file
In-Reply-To: <AANLkTik3gO1Rm2U8-Rm2t2M83sdCjz_Oktpve_gDrbNM@mail.gmail.com>
References: <1285596710-25658-1-git-send-email-s-ghorai@ti.com>
	<1285596710-25658-5-git-send-email-s-ghorai@ti.com>
	<AANLkTikKMnzHR5DZqzGdJJbnCXhCpxKA7K2C2ZtPhNke@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BABFAE@dbde02.ent.ti.com>
	<AANLkTinOhBNUt+gvNb0MWiyHD8ZYgLDJPz8tc=p+CsVW@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC2B6@dbde02.ent.ti.com>
	<AANLkTinNrZNuZnFfJKGLF9J3zsHsOTK0+VmUmYH88+c3@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC323@dbde02.ent.ti.com>
	<AANLkTik3gO1Rm2U8-Rm2t2M83sdCjz_Oktpve_gDrbNM@mail.gmail.com>
Message-ID: <2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC331@dbde02.ent.ti.com>



> -----Original Message-----
> From: Grazvydas Ignotas [mailto:notasas at gmail.com]
> Sent: Thursday, November 04, 2010 4:42 PM
> To: Ghorai, Sukumar
> Cc: linux-omap at vger.kernel.org; linux-mtd at lists.infradead.org; linux-arm-
> kernel at lists.infradead.org; Artem.Bityutskiy at nokia.com; Vimal Singh; Tony
> Lindgren
> Subject: Re: [PATCH RESEND v5 4/5] omap: nand: ecc layout select from
> board file
> 
> > [Ghorai] In 2.6.36, it's a s/w ecc by default and working in all
> platforms like - omap3430 SDP, zoom2, 3630SDP, ZOOM3.
> > So please explain more when you found that - sw ecc is broken on both
> 2.6.36
> 
> It doesn't for me, see
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-
> 2.6.git;a=blob;f=drivers/mtd/nand/omap2.c;h=513e0a76a4a73866d52bba8151e435
> 56a3b30a54;hb=f6f94e2ab1b33f0082ac22d71f66385a60d8157f
> 
> This is omap NAND driver at v2.6.36 tag, and it has
> CONFIG_MTD_NAND_OMAP_HWECC forced.

[Ghorai] This is the same old code since log. And this portion of code not touched for 2.6.36.
And please let me know what kind of problem you are facing when you using 2.6.36; also let me know how to reproduce, I can check in my platform too.



From notasas at gmail.com  Thu Nov  4 07:32:57 2010
From: notasas at gmail.com (Grazvydas Ignotas)
Date: Thu, 4 Nov 2010 13:32:57 +0200
Subject: [PATCH RESEND v5 4/5] omap: nand: ecc layout select from board
	file
In-Reply-To: <2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC331@dbde02.ent.ti.com>
References: <1285596710-25658-1-git-send-email-s-ghorai@ti.com>
	<1285596710-25658-5-git-send-email-s-ghorai@ti.com>
	<AANLkTikKMnzHR5DZqzGdJJbnCXhCpxKA7K2C2ZtPhNke@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BABFAE@dbde02.ent.ti.com>
	<AANLkTinOhBNUt+gvNb0MWiyHD8ZYgLDJPz8tc=p+CsVW@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC2B6@dbde02.ent.ti.com>
	<AANLkTinNrZNuZnFfJKGLF9J3zsHsOTK0+VmUmYH88+c3@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC323@dbde02.ent.ti.com>
	<AANLkTik3gO1Rm2U8-Rm2t2M83sdCjz_Oktpve_gDrbNM@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC331@dbde02.ent.ti.com>
Message-ID: <AANLkTinfO5e9JewdTDxasTRrUAXhGaQs=n6=HnqOQP7S@mail.gmail.com>

On Thu, Nov 4, 2010 at 1:15 PM, Ghorai, Sukumar <s-ghorai at ti.com> wrote:
>
>
>> -----Original Message-----
>> From: Grazvydas Ignotas [mailto:notasas at gmail.com]
>> Sent: Thursday, November 04, 2010 4:42 PM
>> To: Ghorai, Sukumar
>> Cc: linux-omap at vger.kernel.org; linux-mtd at lists.infradead.org; linux-arm-
>> kernel at lists.infradead.org; Artem.Bityutskiy at nokia.com; Vimal Singh; Tony
>> Lindgren
>> Subject: Re: [PATCH RESEND v5 4/5] omap: nand: ecc layout select from
>> board file
>>
>> > [Ghorai] In 2.6.36, it's a s/w ecc by default and working in all
>> platforms like - omap3430 SDP, zoom2, 3630SDP, ZOOM3.
>> > So please explain more when you found that - sw ecc is broken on both
>> 2.6.36
>>
>> It doesn't for me, see
>> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-
>> 2.6.git;a=blob;f=drivers/mtd/nand/omap2.c;h=513e0a76a4a73866d52bba8151e435
>> 56a3b30a54;hb=f6f94e2ab1b33f0082ac22d71f66385a60d8157f
>>
>> This is omap NAND driver at v2.6.36 tag, and it has
>> CONFIG_MTD_NAND_OMAP_HWECC forced.
>
> [Ghorai] This is the same old code since log. And this portion of code not touched for 2.6.36.
> And please let me know what kind of problem you are facing when you using 2.6.36; also let me know how to reproduce, I can check in my platform too.

It has changed in 2.5.36, take a look how it was in 2.6.35, when it
worked for me:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/mtd/nand/omap2.c;h=ee87325c7712a8eeee4bbc683f93014c9901f337;hb=9fe6206f400646a2322096b56c59891d530e8d51

notice how 2.5.36 has CONFIG_MTD_NAND_OMAP_HWECC defined and 2.6.35 doesn't.

The test case is simple:
format and use NAND on 2.6.35 or earlier, works fine.
upgrade to 2.6.36 or 2.6.37-rc1 and try to mount the same NAND
partition - lots of ECC errors.


From roman.tereshonkov at nokia.com  Thu Nov  4 08:40:16 2010
From: roman.tereshonkov at nokia.com (Roman Tereshonkov)
Date: Thu, 4 Nov 2010 14:40:16 +0200
Subject: [PATCHv2 0/3] mtd: onenand: add cache program feature for 4kb
	page onenand
In-Reply-To: <AANLkTikrO1BC7LuUCzuNg7b3gAuC=DYLKLRnFh4rPoco@mail.gmail.com>
References: <1288781721-31771-1-git-send-email-roman.tereshonkov@nokia.com>
	<AANLkTikUSTnPedgdP19_bNbhOtSdfApdyCLKMyn+6Ext@mail.gmail.com>
	<E1C7579D1379824DAE67858071C810383717438EEF@NOK-EUMSG-02.mgdnok.nokia.com>
	<AANLkTikrO1BC7LuUCzuNg7b3gAuC=DYLKLRnFh4rPoco@mail.gmail.com>
Message-ID: <20101104124016.GA13312@nokia.com>


Hi Park,

I tried several times
fsstress -p 3 -n 10000 -d /mnt/ubifs 
for 28 MB onenand partition. No warnings observed.
The logs are below.


# modprobe ubi mtd=4
[  101.013549] UBI: attaching mtd4 to ubi0
[  101.017486] UBI: physical eraseblock size:   262144 bytes (256 KiB)
[  101.023895] UBI: logical eraseblock size:    253952 bytes
[  101.029510] UBI: smallest flash I/O unit:    4096
[  101.034271] UBI: VID header offset:          4096 (aligned 4096)
[  101.040405] UBI: data offset:                8192
[  101.054565] UBI: empty MTD device detected
[  101.058868] UBI: create volume table (copy #1)
[  101.067504] UBI: create volume table (copy #2)
[  101.077239] UBI: attached mtd4 to ubi0
[  101.081054] UBI: MTD device name:            "swap"
[  101.086090] UBI: MTD device size:            32 MiB
[  101.091033] UBI: number of good PEBs:        123
[  101.095733] UBI: number of bad PEBs:         5
[  101.100280] UBI: max. allowed volumes:       128
[  101.104949] UBI: wear-leveling threshold:    8192
[  101.109771] UBI: number of internal volumes: 1
[  101.114257] UBI: number of user volumes:     0
[  101.118804] UBI: available PEBs:             117
[  101.123504] UBI: total number of reserved PEBs: 6
[  101.128295] UBI: number of PEBs reserved for bad PEB handling: 2
[  101.134399] UBI: max/mean erase counter: 0/0
[  101.138763] UBI: image sequence number: 0
[  101.142852] UBI: background thread "ubi_bgt0d" started, PID 104
[  101.150085] modprobe used greatest stack depth: 6068 bytes left
# modprobe ubifs
# ubimkvol /dev/ubi0 -N test -m
Set volume size to 29712384
Volume ID 0, size 117 LEBs (29712384 bytes, 28.3 MiB), LEB size [  111.348449] ubimkvol used greatest stack depth: 5820 bytes left
253952 bytes (248.0 KiB), dynamic, name "test", alignment 1
#mount -t ubifs ubi0_0 /mnt/ubifs
[  133.515991] UBIFS: default file-system created
[  133.565490] UBIFS: mounted UBI device 0, volume 0, name "test"
[  133.571594] UBIFS: file system size:   27426816 bytes (26784 KiB, 26 MiB, 108 LEBs)
[  133.579406] UBIFS: journal size:       2031617 bytes (1984 KiB, 1 MiB, 6 LEBs)
[  133.586791] UBIFS: media format:       w4/r0 (latest is w4/r0)
[  133.592712] UBIFS: default compressor: lzo
[  133.596893] UBIFS: reserved for root:  1295435 bytes (1265 KiB)
[  133.604675] mount used greatest stack depth: 5768 bytes left
# fsstress -p 3 -n 10 -d /mnt/ubifs
seed = 397323
# fsstress -p 3 -n 100 -d /mnt/ubifs
seed = 826848
# fsstress -p 3 -n 1000 -d /mnt/ubifs
seed = 209658
# fsstress -p 3 -n 10000 -d /mnt/ubifs
seed = 748381
#


mtd_speedtest gives no warnings also. Only bad block related errors:

# insmod mtd_speedtest.ko  dev=4
[   23.759948] 
[   23.761505] =================================================
[   23.767639] mtd_speedtest: MTD device: 4
[   23.771728] mtd_speedtest: MTD device size 33554432, eraseblock size 262144, page size 4096, count of eraseblocks 128, pages per eraseblock 64, OOB size 128
[   23.800933] mtd_speedtest: scanning for bad eraseblocks
[   23.808441] Bad eraseblock 42 at 0x00a80000
[   23.812713] mtd_speedtest: block 22 is bad
[   23.818542] Bad eraseblock 60 at 0x00f00000
[   23.822814] mtd_speedtest: block 40 is bad
[   23.827423] Bad eraseblock 65 at 0x01040000
[   23.831665] mtd_speedtest: block 45 is bad
[   23.837860] Bad eraseblock 87 at 0x015c0000
[   23.842163] mtd_speedtest: block 67 is bad
[   23.850891] Bad eraseblock 136 at 0x02200000
[   23.855224] mtd_speedtest: block 116 is bad
[   23.860534] mtd_speedtest: scanned 128 eraseblocks, 5 are bad
[   24.010498] mtd_speedtest: testing eraseblock write speed
[   26.267669] mtd_speedtest: eraseblock write speed is 13988 KiB/s
[   26.273803] mtd_speedtest: testing eraseblock read speed
[   27.286437] mtd_speedtest: eraseblock read speed is 31269 KiB/s
[   27.430114] mtd_speedtest: testing page write speed
[   36.082855] mtd_speedtest: page write speed is 3641 KiB/s
[   36.088409] mtd_speedtest: testing page read speed
[   37.086517] mtd_speedtest: page read speed is 31678 KiB/s
[   37.444854] mtd_speedtest: testing 2 page write speed
[   60.709533] mtd_speedtest: 2 page write speed is 1353 KiB/s
[   60.715148] mtd_speedtest: testing 2 page read speed
[   61.624176] mtd_speedtest: 2 page read speed is 34870 KiB/s
[   61.629791] mtd_speedtest: Testing erase speed
[   61.868347] mtd_speedtest: erase speed is 133991 KiB/s
[   61.873565] mtd_speedtest: finished
[   61.877105] =================================================



Regards
Roman Tereshonkov

On Thu, Nov 04, 2010 at 10:10:36AM +0100, ext Kyungmin Park wrote:
> On Thu, Nov 4, 2010 at 5:58 PM,  <roman.tereshonkov at nokia.com> wrote:
> >
> > Hi,
> >
> >
> > I used driver/mtd/tests and did not observe any warnings except a couple of bad blocks for some boards.
> Yes in case of mtd_test* there's no messages.
> >
> > Can you discribe your test case for me to reproduce it. And show your kernel log when it happens if possible?
> > Is it for 2kb or 4kb page onenand?
> 
> Mount ubifs on OneNAND which has 4KiB pagesize and run fsstress -p 3
> -n 1000000000 -d /ubifs
> 
> then you can or maybe see the UBI scrubbing message.
> 
> Thank you,
> Kyungmin Park
> >
> >
> > Regards
> > Roman Tereshonkov
> >
> >
> >>-----Original Message-----
> >>From: kyungmin78 at gmail.com [mailto:kyungmin78 at gmail.com] On
> >>Behalf Of ext Kyungmin Park
> >>Sent: 04 November, 2010 03:15
> >>To: Tereshonkov Roman (Nokia-MS/Helsinki)
> >>Cc: linux-mtd at lists.infradead.org
> >>Subject: Re: [PATCHv2 0/3] mtd: onenand: add cache program
> >>feature for 4kb page onenand
> >>
> >>Hi,
> >>
> >>One concern is that after apply patch, there are some 1-bit ECC
> >>warnings so UBI scrubbing messages are displayed.
> >>
> >>Are there these message at your board?
> >>
> >>Thank you,
> >>Kyungmin Park
> >>
> >>On Wed, Nov 3, 2010 at 7:55 PM, Roman Tereshonkov
> >><roman.tereshonkov at nokia.com> wrote:
> >>> Implement cache program feature for 4KB page onenand.
> >>> This feature improves the write data performance.
> >>> The observed 128KB data program speed change is
> >>> from 8827KB/s to 14156 KB/s when the feature is enabled.
> >>>
> >>> Roman Tereshonkov (3):
> >>> ?mtd: onenand: add option and variable for cache program feature
> >>> ?mtd: onenand: fix omap2 code to handle cache program feature
> >>> ?mtd: onenand: implement cache program feature for 4kb page onenand
> >>>
> >>> ?drivers/mtd/onenand/omap2.c ? ? ? ?| ? 12 +++++++++---
> >>> ?drivers/mtd/onenand/onenand_base.c | ? 22 +++++++++++++++++++---
> >>> ?include/linux/mtd/onenand.h ? ? ? ?| ? 12 ++++++++++++
> >>> ?3 files changed, 40 insertions(+), 6 deletions(-)
> >>>
> >>>
> >>> ______________________________________________________
> >>> Linux MTD discussion mailing list
> >>> http://lists.infradead.org/mailman/listinfo/linux-mtd/
> >>>
> >>
> > ______________________________________________________
> > Linux MTD discussion mailing list
> > http://lists.infradead.org/mailman/listinfo/linux-mtd/
> >


From s-ghorai at ti.com  Thu Nov  4 08:52:52 2010
From: s-ghorai at ti.com (Ghorai, Sukumar)
Date: Thu, 4 Nov 2010 18:22:52 +0530
Subject: [PATCH RESEND v5 4/5] omap: nand: ecc layout select from board
	file
In-Reply-To: <AANLkTinfO5e9JewdTDxasTRrUAXhGaQs=n6=HnqOQP7S@mail.gmail.com>
References: <1285596710-25658-1-git-send-email-s-ghorai@ti.com>
	<1285596710-25658-5-git-send-email-s-ghorai@ti.com>
	<AANLkTikKMnzHR5DZqzGdJJbnCXhCpxKA7K2C2ZtPhNke@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BABFAE@dbde02.ent.ti.com>
	<AANLkTinOhBNUt+gvNb0MWiyHD8ZYgLDJPz8tc=p+CsVW@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC2B6@dbde02.ent.ti.com>
	<AANLkTinNrZNuZnFfJKGLF9J3zsHsOTK0+VmUmYH88+c3@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC323@dbde02.ent.ti.com>
	<AANLkTik3gO1Rm2U8-Rm2t2M83sdCjz_Oktpve_gDrbNM@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC331@dbde02.ent.ti.com>
	<AANLkTinfO5e9JewdTDxasTRrUAXhGaQs=n6=HnqOQP7S@mail.gmail.com>
Message-ID: <2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC3BB@dbde02.ent.ti.com>



> -----Original Message-----
> From: Grazvydas Ignotas [mailto:notasas at gmail.com]
> Sent: Thursday, November 04, 2010 5:03 PM
> To: Ghorai, Sukumar
> Cc: linux-omap at vger.kernel.org; linux-mtd at lists.infradead.org; linux-arm-
> kernel at lists.infradead.org; Artem.Bityutskiy at nokia.com; Vimal Singh; Tony
> Lindgren
> Subject: Re: [PATCH RESEND v5 4/5] omap: nand: ecc layout select from
> board file
> 
> On Thu, Nov 4, 2010 at 1:15 PM, Ghorai, Sukumar <s-ghorai at ti.com> wrote:
> >
> >
> >> -----Original Message-----
> >> From: Grazvydas Ignotas [mailto:notasas at gmail.com]
> >> Sent: Thursday, November 04, 2010 4:42 PM
> >> To: Ghorai, Sukumar
> >> Cc: linux-omap at vger.kernel.org; linux-mtd at lists.infradead.org; linux-
> arm-
> >> kernel at lists.infradead.org; Artem.Bityutskiy at nokia.com; Vimal Singh;
> Tony
> >> Lindgren
> >> Subject: Re: [PATCH RESEND v5 4/5] omap: nand: ecc layout select from
> >> board file
> >>
> >> > [Ghorai] In 2.6.36, it's a s/w ecc by default and working in all
> >> platforms like - omap3430 SDP, zoom2, 3630SDP, ZOOM3.
> >> > So please explain more when you found that - sw ecc is broken on both
> >> 2.6.36
> >>
> >> It doesn't for me, see
> >> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-
> >>
> 2.6.git;a=blob;f=drivers/mtd/nand/omap2.c;h=513e0a76a4a73866d52bba8151e435
> >> 56a3b30a54;hb=f6f94e2ab1b33f0082ac22d71f66385a60d8157f
> >>
> >> This is omap NAND driver at v2.6.36 tag, and it has
> >> CONFIG_MTD_NAND_OMAP_HWECC forced.
> >
> > [Ghorai] This is the same old code since log. And this portion of code
> not touched for 2.6.36.
> > And please let me know what kind of problem you are facing when you
> using 2.6.36; also let me know how to reproduce, I can check in my
> platform too.
> 
> It has changed in 2.5.36, take a look how it was in 2.6.35, when it
> worked for me:
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-
> 2.6.git;a=blob;f=drivers/mtd/nand/omap2.c;h=ee87325c7712a8eeee4bbc683f9301
> 4c9901f337;hb=9fe6206f400646a2322096b56c59891d530e8d51
> 
> notice how 2.5.36 has CONFIG_MTD_NAND_OMAP_HWECC defined and 2.6.35
> doesn't.
> 
> The test case is simple:
> format and use NAND on 2.6.35 or earlier, works fine.
> upgrade to 2.6.36 or 2.6.37-rc1 and try to mount the same NAND
> partition - lots of ECC errors.

[Ghorai] I tested this and working fine in zoom3.
 
And as you mentioned there may be an issue we need to identify, 
So remove this #define form 2.6.36 and let me know the test result. 



From notasas at gmail.com  Thu Nov  4 09:07:34 2010
From: notasas at gmail.com (Grazvydas Ignotas)
Date: Thu, 4 Nov 2010 15:07:34 +0200
Subject: ubi deadlock on .36+
In-Reply-To: <1288855749.2075.7.camel@localhost>
References: <AANLkTimKc_EtT6NEwbga8g7AKoGnDSt7UMQwgou_jCXD@mail.gmail.com>
	<1288855749.2075.7.camel@localhost>
Message-ID: <AANLkTim-+_98Ezcn3dG5g0mzNLNVrkDKC2f_34A_n2pE@mail.gmail.com>

On Thu, Nov 4, 2010 at 9:29 AM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> On Wed, 2010-11-03 at 23:30 +0200, Grazvydas Ignotas wrote:
>> Hi,
>>
>> there seems to be some issue with NAND on my OMAP3 board that causes
>> CRC errors on 2.6.36 and 2.6.37-rc1. Those seem to be triggering a bug
>> in UBI that makes it loop forever (or very long) printing this:
>>
>> uncorrectable error :
>> UBI error: ubi_io_read: error -74 (ECC error) while reading 512 bytes
>> from PEB 0:512, read 512 bytes
>> uncorrectable error :
>> UBI error: ubi_io_read: error -74 (ECC error) while reading 512 bytes
>> from PEB 68:512, read 512 bytes
>> UBI: run torture test for PEB 68
>> UBI: PEB 68 passed torture test, do not mark it a bad
>>
>>
>> here is full log of one minute session, after which I killed power:
>> http://notaz.gp2x.de/misc/pnd/logs/linux_20101103_ubi_lockup
>
> Hmm, could you please enable UBI debugging and provide me the logs? See
> here for some hints:
> http://www.linux-mtd.infradead.org/doc/ubi.html#L_how_send_bugreport

done:
http://notaz.gp2x.de/misc/pnd/logs/linux_20101103_ubi_lockup2


From notasas at gmail.com  Thu Nov  4 11:54:00 2010
From: notasas at gmail.com (Grazvydas Ignotas)
Date: Thu, 4 Nov 2010 17:54:00 +0200
Subject: [PATCH RESEND v5 4/5] omap: nand: ecc layout select from board
	file
In-Reply-To: <2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC3BB@dbde02.ent.ti.com>
References: <1285596710-25658-1-git-send-email-s-ghorai@ti.com>
	<1285596710-25658-5-git-send-email-s-ghorai@ti.com>
	<AANLkTikKMnzHR5DZqzGdJJbnCXhCpxKA7K2C2ZtPhNke@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BABFAE@dbde02.ent.ti.com>
	<AANLkTinOhBNUt+gvNb0MWiyHD8ZYgLDJPz8tc=p+CsVW@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC2B6@dbde02.ent.ti.com>
	<AANLkTinNrZNuZnFfJKGLF9J3zsHsOTK0+VmUmYH88+c3@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC323@dbde02.ent.ti.com>
	<AANLkTik3gO1Rm2U8-Rm2t2M83sdCjz_Oktpve_gDrbNM@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC331@dbde02.ent.ti.com>
	<AANLkTinfO5e9JewdTDxasTRrUAXhGaQs=n6=HnqOQP7S@mail.gmail.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356BAC3BB@dbde02.ent.ti.com>
Message-ID: <AANLkTikbcHM4MpWm9ar-hLZBh3g5PkD3PK6FxY_bGd8u@mail.gmail.com>

On Thu, Nov 4, 2010 at 2:52 PM, Ghorai, Sukumar <s-ghorai at ti.com> wrote:
>> -----Original Message-----
>> It has changed in 2.5.36, take a look how it was in 2.6.35, when it
>> worked for me:
>> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-
>> 2.6.git;a=blob;f=drivers/mtd/nand/omap2.c;h=ee87325c7712a8eeee4bbc683f9301
>> 4c9901f337;hb=9fe6206f400646a2322096b56c59891d530e8d51
>>
>> notice how 2.5.36 has CONFIG_MTD_NAND_OMAP_HWECC defined and 2.6.35
>> doesn't.
>>
>> The test case is simple:
>> format and use NAND on 2.6.35 or earlier, works fine.
>> upgrade to 2.6.36 or 2.6.37-rc1 and try to mount the same NAND
>> partition - lots of ECC errors.
>
> [Ghorai] I tested this and working fine in zoom3.
>
> And as you mentioned there may be an issue we need to identify,
> So remove this #define form 2.6.36 and let me know the test result.

After removing #define it works, but only without
CONFIG_MTD_NAND_OMAP_PREFETCH. With prefetch enabled, sub-page reads
return ECC errors, for example:

nanddump -p -l 1024 -s 512 /dev/mtd3
ECC: 3 uncorrectable bitflip(s) at offset 0x00000200

nanddump -p -l 1024 -s 0 /dev/mtd3
nanddump -p -l 1024 -s 1024 /dev/mtd3
works ok.

Sub-pages need to be working for UBI, my NAND partitions are formatted
with UBIFS.


From joe at perches.com  Thu Nov  4 23:07:24 2010
From: joe at perches.com (Joe Perches)
Date: Thu,  4 Nov 2010 20:07:24 -0700
Subject: [PATCH 00/49] Use vzalloc not vmalloc/kmemset
In-Reply-To: <alpine.DEB.2.00.1011031108260.11625@router.home>
References: <alpine.DEB.2.00.1011031108260.11625@router.home>
Message-ID: <cover.1288925424.git.joe@perches.com>

Converted vmalloc/memset and vmalloc_node/memset to
vzalloc or vzalloc_node using a cocci script and some editing

Reduces text a little bit.

Compiled x86 only.

There are still vmalloc_32 with memset calls still around.

Broken out to multiple patches to cc appropriate maintainers.

Joe Perches (49):
  arch/ia64: Use vzalloc
  arch/mips: Use vzalloc
  arch/powerpc: Use vzalloc
  arch/s390: Use vzalloc
  arch/x86: Use vzalloc
  crypto: Use vzalloc
  drivers/atm: Use vzalloc
  drivers/block: Use vzalloc
  drivers/char: Use vzalloc
  drivers/gpu: Use vzalloc
  drivers/hid: Use vzalloc
  drivers/infiniband: Use vzalloc
  drivers/isdn: Use vzalloc
  drivers/md: Use vzalloc
  drivers/media: Use vzalloc
  drivers/mtd: Use vzalloc
  drivers/net/cxgb3: Use vzalloc
  drivers/net/cxgb4: Use vzalloc
  drivers/net/e1000: Use vzalloc
  drivers/net/e1000e: Use vzalloc
  drivers/net/ehea: Use vzalloc
  drivers/net/igb: Use vzalloc
  drivers/net/igbvf: Use vzalloc
  drivers/net/ixgb: Use vzalloc
  drivers/net/ixgbe: Use vzalloc
  drivers/net/ixgbevf: Use vzalloc
  drivers/net/netxen: Use vzalloc
  drivers/net/pch_gbe: Use vzalloc
  drivers/net/qlcnic: Use vzalloc
  drivers/net/sfc: Use vzalloc
  drivers/net/vxge: Use vzalloc
  drivers/net/bnx2.c: Use vzalloc
  drivers/s390: Use vzalloc
  drivers/scsi: Use vzalloc
  drivers/staging: Use vzalloc
  drivers/video: Use vzalloc
  fs/ext4: Use vzalloc
  fs/jffs2: Use vzalloc
  fs/reiserfs: Use vzalloc
  fs/udf: Use vzalloc
  fs/xfs: Use vzalloc
  include/linux/coda_linux.h: Use vzalloc
  kernel: Use vzalloc
  mm: Use vzalloc
  net/core/pktgen.c: Use vzalloc
  net/netfilter: Use vzalloc
  net/rds: Use vzalloc
  sound/oss/dev_table.c: Use vzalloc
  virt/kvm/kvm_main.c: Use vzalloc

 arch/ia64/kernel/perfmon.c                      |    3 +-
 arch/mips/sibyte/common/sb_tbprof.c             |    3 +-
 arch/powerpc/kvm/book3s.c                       |    6 +--
 arch/powerpc/platforms/cell/spufs/lscsa_alloc.c |    3 +-
 arch/s390/hypfs/hypfs_diag.c                    |    3 +-
 arch/x86/kernel/microcode_amd.c                 |    3 +-
 arch/x86/kvm/x86.c                              |    3 +-
 arch/x86/mm/pageattr-test.c                     |    3 +-
 crypto/deflate.c                                |    3 +-
 crypto/zlib.c                                   |    3 +-
 drivers/atm/idt77252.c                          |   11 ++++---
 drivers/atm/lanai.c                             |    3 +-
 drivers/block/drbd/drbd_bitmap.c                |    5 +--
 drivers/char/agp/backend.c                      |    3 +-
 drivers/char/mspec.c                            |    5 +--
 drivers/gpu/drm/via/via_dmablit.c               |    4 +-
 drivers/hid/hid-core.c                          |    3 +-
 drivers/infiniband/hw/amso1100/c2_rnic.c        |    5 +--
 drivers/infiniband/hw/ehca/ipz_pt_fn.c          |    5 +--
 drivers/infiniband/hw/ipath/ipath_driver.c      |    3 +-
 drivers/infiniband/hw/ipath/ipath_file_ops.c    |   11 ++-----
 drivers/infiniband/hw/ipath/ipath_init_chip.c   |    5 +--
 drivers/infiniband/hw/qib/qib_init.c            |    7 +---
 drivers/infiniband/ulp/ipoib/ipoib_cm.c         |   10 ++----
 drivers/infiniband/ulp/ipoib/ipoib_main.c       |    3 +-
 drivers/isdn/i4l/isdn_common.c                  |    4 +-
 drivers/isdn/mISDN/dsp_core.c                   |    3 +-
 drivers/isdn/mISDN/l1oip_codec.c                |    6 +--
 drivers/md/dm-log.c                             |    3 +-
 drivers/md/dm-snap-persistent.c                 |    3 +-
 drivers/md/dm-table.c                           |    4 +--
 drivers/media/dvb/ngene/ngene-core.c            |    3 +-
 drivers/media/video/mx3_camera.c                |    3 +-
 drivers/media/video/pwc/pwc-if.c                |    3 +-
 drivers/media/video/videobuf-dma-sg.c           |    3 +-
 drivers/mtd/nand/nandsim.c                      |    3 +-
 drivers/mtd/ubi/vtbl.c                          |    6 +--
 drivers/net/bnx2.c                              |   10 +-----
 drivers/net/cxgb3/cxgb3_offload.c               |    7 ++--
 drivers/net/cxgb4/cxgb4_main.c                  |    7 ++--
 drivers/net/e1000/e1000_main.c                  |    6 +--
 drivers/net/e1000e/netdev.c                     |    6 +--
 drivers/net/ehea/ehea_main.c                    |    4 +--
 drivers/net/igb/igb_main.c                      |    6 +--
 drivers/net/igbvf/netdev.c                      |    6 +--
 drivers/net/ixgb/ixgb_main.c                    |    6 +--
 drivers/net/ixgbe/ixgbe_main.c                  |   10 ++----
 drivers/net/ixgbevf/ixgbevf_main.c              |    6 +--
 drivers/net/netxen/netxen_nic_init.c            |    7 +---
 drivers/net/pch_gbe/pch_gbe_main.c              |    6 +--
 drivers/net/qlcnic/qlcnic_init.c                |    7 +---
 drivers/net/sfc/filter.c                        |    3 +-
 drivers/net/vxge/vxge-config.c                  |   37 +++++-----------------
 drivers/s390/cio/blacklist.c                    |    3 +-
 drivers/scsi/bfa/bfad.c                         |    3 +-
 drivers/scsi/bfa/bfad_debugfs.c                 |    8 +----
 drivers/scsi/cxgbi/libcxgbi.h                   |    9 ++----
 drivers/scsi/osst.c                             |    3 +-
 drivers/scsi/qla2xxx/qla_attr.c                 |    3 +-
 drivers/scsi/qla2xxx/qla_bsg.c                  |    3 +-
 drivers/scsi/scsi_debug.c                       |    7 +---
 drivers/staging/comedi/drivers.c                |    4 +--
 drivers/staging/rtl8192e/r8192E_core.c          |    4 +--
 drivers/staging/udlfb/udlfb.c                   |    5 +--
 drivers/staging/xgifb/XGI_main_26.c             |    3 +-
 drivers/staging/zram/zram_drv.c                 |    3 +-
 drivers/video/arcfb.c                           |    5 +--
 drivers/video/broadsheetfb.c                    |    4 +--
 drivers/video/hecubafb.c                        |    5 +--
 drivers/video/metronomefb.c                     |    4 +--
 drivers/video/xen-fbfront.c                     |    3 +-
 fs/ext4/super.c                                 |    4 +--
 fs/jffs2/build.c                                |    5 +--
 fs/reiserfs/journal.c                           |    9 ++----
 fs/reiserfs/resize.c                            |    4 +--
 fs/udf/super.c                                  |    5 +--
 fs/xfs/linux-2.6/kmem.h                         |    7 +----
 include/linux/coda_linux.h                      |   26 ++++++++++------
 kernel/profile.c                                |    6 +--
 kernel/relay.c                                  |    4 +--
 mm/memcontrol.c                                 |    5 +--
 mm/page_cgroup.c                                |    3 +-
 mm/percpu.c                                     |    8 +----
 mm/swapfile.c                                   |    3 +-
 net/core/pktgen.c                               |    3 +-
 net/netfilter/x_tables.c                        |    5 +--
 net/rds/ib_cm.c                                 |    6 +--
 sound/oss/dev_table.c                           |    6 +--
 virt/kvm/kvm_main.c                             |   13 ++------
 89 files changed, 167 insertions(+), 328 deletions(-)

-- 
1.7.3.1.g432b3.dirty



From joe at perches.com  Thu Nov  4 23:07:40 2010
From: joe at perches.com (Joe Perches)
Date: Thu,  4 Nov 2010 20:07:40 -0700
Subject: [PATCH 16/49] drivers/mtd: Use vzalloc
In-Reply-To: <alpine.DEB.2.00.1011031108260.11625@router.home>
References: <alpine.DEB.2.00.1011031108260.11625@router.home>
Message-ID: <61af073f284d2169834120889a641cd11c370643.1288925424.git.joe@perches.com>

Signed-off-by: Joe Perches <joe at perches.com>
---
 drivers/mtd/nand/nandsim.c |    3 +--
 drivers/mtd/ubi/vtbl.c     |    6 ++----
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index a6a73aa..b3d241b 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/nandsim.c
@@ -470,7 +470,7 @@ static int alloc_device(struct nandsim *ns)
 			err = -EINVAL;
 			goto err_close;
 		}
-		ns->pages_written = vmalloc(ns->geom.pgnum);
+		ns->pages_written = vzalloc(ns->geom.pgnum);
 		if (!ns->pages_written) {
 			NS_ERR("alloc_device: unable to allocate pages written array\n");
 			err = -ENOMEM;
@@ -483,7 +483,6 @@ static int alloc_device(struct nandsim *ns)
 			goto err_free;
 		}
 		ns->cfile = cfile;
-		memset(ns->pages_written, 0, ns->geom.pgnum);
 		return 0;
 	}
 
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c
index fcdb7f6..0b8141f 100644
--- a/drivers/mtd/ubi/vtbl.c
+++ b/drivers/mtd/ubi/vtbl.c
@@ -425,12 +425,11 @@ static struct ubi_vtbl_record *process_lvol(struct ubi_device *ubi,
 
 	/* Read both LEB 0 and LEB 1 into memory */
 	ubi_rb_for_each_entry(rb, seb, &sv->root, u.rb) {
-		leb[seb->lnum] = vmalloc(ubi->vtbl_size);
+		leb[seb->lnum] = vzalloc(ubi->vtbl_size);
 		if (!leb[seb->lnum]) {
 			err = -ENOMEM;
 			goto out_free;
 		}
-		memset(leb[seb->lnum], 0, ubi->vtbl_size);
 
 		err = ubi_io_read_data(ubi, leb[seb->lnum], seb->pnum, 0,
 				       ubi->vtbl_size);
@@ -516,10 +515,9 @@ static struct ubi_vtbl_record *create_empty_lvol(struct ubi_device *ubi,
 	int i;
 	struct ubi_vtbl_record *vtbl;
 
-	vtbl = vmalloc(ubi->vtbl_size);
+	vtbl = vzalloc(ubi->vtbl_size);
 	if (!vtbl)
 		return ERR_PTR(-ENOMEM);
-	memset(vtbl, 0, ubi->vtbl_size);
 
 	for (i = 0; i < ubi->vtbl_slots; i++)
 		memcpy(&vtbl[i], &empty_vtbl_record, UBI_VTBL_RECORD_SIZE);
-- 
1.7.3.1.g432b3.dirty



From joe at perches.com  Thu Nov  4 23:08:02 2010
From: joe at perches.com (Joe Perches)
Date: Thu,  4 Nov 2010 20:08:02 -0700
Subject: [PATCH 38/49] fs/jffs2: Use vzalloc
In-Reply-To: <alpine.DEB.2.00.1011031108260.11625@router.home>
References: <alpine.DEB.2.00.1011031108260.11625@router.home>
Message-ID: <1c6caf522ea9088919a89c8c23c54436c7020cdb.1288925425.git.joe@perches.com>

Signed-off-by: Joe Perches <joe at perches.com>
---
 fs/jffs2/build.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/jffs2/build.c b/fs/jffs2/build.c
index 85c6be2..3005ec4 100644
--- a/fs/jffs2/build.c
+++ b/fs/jffs2/build.c
@@ -336,14 +336,13 @@ int jffs2_do_mount_fs(struct jffs2_sb_info *c)
 	size = sizeof(struct jffs2_eraseblock) * c->nr_blocks;
 #ifndef __ECOS
 	if (jffs2_blocks_use_vmalloc(c))
-		c->blocks = vmalloc(size);
+		c->blocks = vzalloc(size);
 	else
 #endif
-		c->blocks = kmalloc(size, GFP_KERNEL);
+		c->blocks = kzalloc(size, GFP_KERNEL);
 	if (!c->blocks)
 		return -ENOMEM;
 
-	memset(c->blocks, 0, size);
 	for (i=0; i<c->nr_blocks; i++) {
 		INIT_LIST_HEAD(&c->blocks[i].list);
 		c->blocks[i].offset = i * c->sector_size;
-- 
1.7.3.1.g432b3.dirty



From roman.tereshonkov at nokia.com  Fri Nov  5 07:12:38 2010
From: roman.tereshonkov at nokia.com (Roman Tereshonkov)
Date: Fri, 5 Nov 2010 13:12:38 +0200
Subject: [PATCHv2 0/3] mtd: onenand: add cache program feature for 4kb
	page onenand
In-Reply-To: <AANLkTimJK4H00ug-SCybUcMYq+QrSMncfZ7hrCYyegec@mail.gmail.com>
References: <1288781721-31771-1-git-send-email-roman.tereshonkov@nokia.com>
	<AANLkTikUSTnPedgdP19_bNbhOtSdfApdyCLKMyn+6Ext@mail.gmail.com>
	<E1C7579D1379824DAE67858071C810383717438EEF@NOK-EUMSG-02.mgdnok.nokia.com>
	<AANLkTikrO1BC7LuUCzuNg7b3gAuC=DYLKLRnFh4rPoco@mail.gmail.com>
	<20101104124016.GA13312@nokia.com>
	<AANLkTimJK4H00ug-SCybUcMYq+QrSMncfZ7hrCYyegec@mail.gmail.com>
Message-ID: <20101105111238.GA21115@nokia.com>

On Thu, Nov 04, 2010 at 01:47:26PM +0100, ext Kyungmin Park wrote:
> I think it has some slow write performance since two page write is lower than one page. It means cache program is not work as expected.
> That's reason no warning message. In my case I enabled the sync write and get 10MiB or more performance. Please see my speedtest result.

Where can I see your speedtest results? If it was in attachment when I have not got any such.


These are my speed test results for different write sizes.
write size (bytes):            4096  8192 16384 32768 65536 131072 262144
cache program disabled (KB/s): 8827  8904  8827  8982  8982   8982   8982
cache program enabled (KB/s):  8752 10893 12337 13298 13837  14222  14422


Regards
Roman Tereshonkov

> 
> Thank you,
> Kyungmin Park
> 
> Sent from Android
> 
> On Nov 4, 2010 9:40 PM, "Roman Tereshonkov" <roman.tereshonkov at nokia.com<mailto:roman.tereshonkov at nokia.com>> wrote:
> >
> > Hi Park,
> >
> > I tried several times
> > fsstress -p 3 -n 10000 -d /mnt/ubifs
> > for 28 MB onenand partition. No warnings observed.
> > The logs are below.
> >
> >
> > # modprobe ubi mtd=4
> > [ 101.013549] UBI: attaching mtd4 to ubi0
> > [ 101.017486] UBI: physical eraseblock size: 262144 bytes (256 KiB)
> > [ 101.023895] UBI: logical eraseblock size: 253952 bytes
> > [ 101.029510] UBI: smallest flash I/O unit: 4096
> > [ 101.034271] UBI: VID header offset: 4096 (aligned 4096)
> > [ 101.040405] UBI: data offset: 8192
> > [ 101.054565] UBI: empty MTD device detected
> > [ 101.058868] UBI: create volume table (copy #1)
> > [ 101.067504] UBI: create volume table (copy #2)
> > [ 101.077239] UBI: attached mtd4 to ubi0
> > [ 101.081054] UBI: MTD device name: "swap"
> > [ 101.086090] UBI: MTD device size: 32 MiB
> > [ 101.091033] UBI: number of good PEBs: 123
> > [ 101.095733] UBI: number of bad PEBs: 5
> > [ 101.100280] UBI: max. allowed volumes: 128
> > [ 101.104949] UBI: wear-leveling threshold: 8192
> > [ 101.109771] UBI: number of internal volumes: 1
> > [ 101.114257] UBI: number of user volumes: 0
> > [ 101.118804] UBI: available PEBs: 117
> > [ 101.123504] UBI: total number of reserved PEBs: 6
> > [ 101.128295] UBI: number of PEBs reserved for bad PEB handling: 2
> > [ 101.134399] UBI: max/mean erase counter: 0/0
> > [ 101.138763] UBI: image sequence number: 0
> > [ 101.142852] UBI: background thread "ubi_bgt0d" started, PID 104
> > [ 101.150085] modprobe used greatest stack depth: 6068 bytes left
> > # modprobe ubifs
> > # ubimkvol /dev/ubi0 -N test -m
> > Set volume size to 29712384
> > Volume ID 0, size 117 LEBs (29712384 bytes, 28.3 MiB), LEB size [ 111.348449] ubimkvol used greatest stack depth: 5820 bytes left
> > 253952 bytes (248.0 KiB), dynamic, name "test", alignment 1
> > #mount -t ubifs ubi0_0 /mnt/ubifs
> > [ 133.515991] UBIFS: default file-system created
> > [ 133.565490] UBIFS: mounted UBI device 0, volume 0, name "test"
> > [ 133.571594] UBIFS: file system size: 27426816 bytes (26784 KiB, 26 MiB, 108 LEBs)
> > [ 133.579406] UBIFS: journal size: 2031617 bytes (1984 KiB, 1 MiB, 6 LEBs)
> > [ 133.586791] UBIFS: media format: w4/r0 (latest is w4/r0)
> > [ 133.592712] UBIFS: default compressor: lzo
> > [ 133.596893] UBIFS: reserved for root: 1295435 bytes (1265 KiB)
> > [ 133.604675] mount used greatest stack depth: 5768 bytes left
> > # fsstress -p 3 -n 10 -d /mnt/ubifs
> > seed = 397323
> > # fsstress -p 3 -n 100 -d /mnt/ubifs
> > seed = 826848
> > # fsstress -p 3 -n 1000 -d /mnt/ubifs
> > seed = 209658
> > # fsstress -p 3 -n 10000 -d /mnt/ubifs
> > seed = 748381
> > #
> >
> >
> > mtd_speedtest gives no warnings also. Only bad block related errors:
> >
> > # insmod mtd_speedtest.ko dev=4
> > [ 23.759948]
> > [ 23.761505] =================================================
> > [ 23.767639] mtd_speedtest: MTD device: 4
> > [ 23.771728] mtd_speedtest: MTD device size 33554432, eraseblock size 262144, page size 4096, count of eraseblocks 128, pages per eraseblock 64, OOB size 128
> > [ 23.800933] mtd_speedtest: scanning for bad eraseblocks
> > [ 23.808441] Bad eraseblock 42 at 0x00a80000
> > [ 23.812713] mtd_speedtest: block 22 is bad
> > [ 23.818542] Bad eraseblock 60 at 0x00f00000
> > [ 23.822814] mtd_speedtest: block 40 is bad
> > [ 23.827423] Bad eraseblock 65 at 0x01040000
> > [ 23.831665] mtd_speedtest: block 45 is bad
> > [ 23.837860] Bad eraseblock 87 at 0x015c0000
> > [ 23.842163] mtd_speedtest: block 67 is bad
> > [ 23.850891] Bad eraseblock 136 at 0x02200000
> > [ 23.855224] mtd_speedtest: block 116 is bad
> > [ 23.860534] mtd_speedtest: scanned 128 eraseblocks, 5 are bad
> > [ 24.010498] mtd_speedtest: testing eraseblock write speed
> > [ 26.267669] mtd_speedtest: eraseblock write speed is 13988 KiB/s
> > [ 26.273803] mtd_speedtest: testing eraseblock read speed
> > [ 27.286437] mtd_speedtest: eraseblock read speed is 31269 KiB/s
> > [ 27.430114] mtd_speedtest: testing page write speed
> > [ 36.082855] mtd_speedtest: page write speed is 3641 KiB/s
> > [ 36.088409] mtd_speedtest: testing page read speed
> > [ 37.086517] mtd_speedtest: page read speed is 31678 KiB/s
> > [ 37.444854] mtd_speedtest: testing 2 page write speed
> > [ 60.709533] mtd_speedtest: 2 page write speed is 1353 KiB/s
> > [ 60.715148] mtd_speedtest: testing 2 page read speed
> > [ 61.624176] mtd_speedtest: 2 page read speed is 34870 KiB/s
> > [ 61.629791] mtd_speedtest: Testing erase speed
> > [ 61.868347] mtd_speedtest: erase speed is 133991 KiB/s
> > [ 61.873565] mtd_speedtest: finished
> > [ 61.877105] =================================================
> >
> >
> >
> > Regards
> > Roman Tereshonkov
> >
> > On Thu, Nov 04, 2010 at 10:10:36AM +0100, ext Kyungmin Park wrote:
> >> On Thu, Nov 4, 2010 at 5:58 PM, <roman.tereshonkov at nokia.com<mailto:roman.tereshonkov at nokia.com>> wrote:
> >> >
> >> > Hi,
> >> >
> >> >
> >> > I used driver/mtd/tests and did not observe any warnings except a couple of bad blocks for some boards.
> >> Yes in case of mtd_test* there's no messages.
> >> >
> >> > Can you discribe your test case for me to reproduce it. And show your kernel log when it happens if possible?
> >> > Is it for 2kb or 4kb page onenand?
> >>
> >> Mount ubifs on OneNAND which has 4KiB pagesize and run fsstress -p 3
> >> -n 1000000000 -d /ubifs
> >>
> >> then you can or maybe see the UBI scrubbing message.
> >>
> >> Thank you,
> >> Kyungmin Park
> >> >
> >> >
> >> > Regards
> >> > Roman Tereshonkov
> >> >
> >> >
> >> >>-----Original Message-----
> >> >>From: kyungmin78 at gmail.com<mailto:kyungmin78 at gmail.com> [mailto:kyungmin78 at gmail.com<mailto:kyungmin78 at gmail.com>] On
> >> >>Behalf Of ext Kyungmin Park
> >> >>Sent: 04 November, 2010 03:15
> >> >>To: Tereshonkov Roman (Nokia-MS/Helsinki)
> >> >>Cc: linux-mtd at lists.infradead.org<mailto:linux-mtd at lists.infradead.org>
> >> >>Subject: Re: [PATCHv2 0/3] mtd: onenand: add cache program
> >> >>feature for 4kb page onenand
> >> >>
> >> >>Hi,
> >> >>
> >> >>One concern is that after apply patch, there are some 1-bit ECC
> >> >>warnings so UBI scrubbing messages are displayed.
> >> >>
> >> >>Are there these message at your board?
> >> >>
> >> >>Thank you,
> >> >>Kyungmin Park
> >> >>
> >> >>On Wed, Nov 3, 2010 at 7:55 PM, Roman Tereshonkov
> >> >><roman.tereshonkov at nokia.com<mailto:roman.tereshonkov at nokia.com>> wrote:
> >> >>> Implement cache program feature for 4KB page onenand.
> >> >>> This feature improves the write data performance.
> >> >>> The observed 128KB data program speed change is
> >> >>> from 8827KB/s to 14156 KB/s when the feature is enabled.
> >> >>>
> >> >>> Roman Tereshonkov (3):
> >> >>>  mtd: onenand: add option and variable for cache program feature
> >> >>>  mtd: onenand: fix omap2 code to handle cache program feature
> >> >>>  mtd: onenand: implement cache program feature for 4kb page onenand
> >> >>>
> >> >>>  drivers/mtd/onenand/omap2.c        |   12 +++++++++---
> >> >>>  drivers/mtd/onenand/onenand_base.c |   22 +++++++++++++++++++---
> >> >>>  include/linux/mtd/onenand.h        |   12 ++++++++++++
> >> >>>  3 files changed, 40 insertions(+), 6 deletions(-)
> >> >>>
> >> >>>
> >> >>> ______________________________________________________
> >> >>> Linux MTD discussion mailing list
> >> >>> http://lists.infradead.org/mailman/listinfo/linux-mtd/
> >> >>>
> >> >>
> >> > ______________________________________________________
> >> > Linux MTD discussion mailing list
> >> > http://lists.infradead.org/mailman/listinfo/linux-mtd/
> >> >


From tony at atomide.com  Fri Nov  5 17:12:39 2010
From: tony at atomide.com (Tony Lindgren)
Date: Fri, 5 Nov 2010 14:12:39 -0700
Subject: [PATCH v5 1/5] omap gpmc: enable irq mode in gpmc
In-Reply-To: <2A3DCF3DA181AD40BDE86A3150B27B6B0356AEEDE2@dbde02.ent.ti.com>
References: <1285594634-19277-1-git-send-email-s-ghorai@ti.com>
	<1285594634-19277-2-git-send-email-s-ghorai@ti.com>
	<20100928222727.GS3117@atomide.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356AEEDE2@dbde02.ent.ti.com>
Message-ID: <20101105211238.GT9264@atomide.com>

* Ghorai, Sukumar <s-ghorai at ti.com> [101028 07:02]:
> Tony,
> 
> > -----Original Message-----
> > From: Ghorai, Sukumar
> > Sent: Wednesday, September 29, 2010 12:08 PM
> > To: 'Tony Lindgren'
> > Cc: linux-omap at vger.kernel.org; linux-mtd at lists.infradead.org; linux-arm-
> > kernel at lists.infradead.org
> > Subject: RE: [PATCH v5 1/5] omap gpmc: enable irq mode in gpmc
> > 
> > 
> [..snip..]
> 
> > > > diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-
> > > omap2/board-3430sdp.c
> > > > index 67b95b5..549cd62 100644
> > > > --- a/arch/arm/mach-omap2/board-3430sdp.c
> > > > +++ b/arch/arm/mach-omap2/board-3430sdp.c
> > > > @@ -328,6 +328,7 @@ static void __init omap_3430sdp_init_irq(void)
> > > >  	omap3_pm_init_cpuidle(omap3_cpuidle_params_table);
> > > >  	omap2_init_common_hw(hyb18m512160af6_sdrc_params, NULL);
> > > >  	omap_init_irq();
> > > > +	gpmc_init();
> > > >  	omap_gpio_init();
> > > >  }
> > > ...
> > >
> > > You can avoid adding gpmc_init() by making it a subsys_initcall().
> > > Just make sure you return early from it with if (!cpu_class_is_omap2()).
> > [Ghorai] will do
> > >
> [Ghorai] I was trying this and no success, as nand_init() get called before  subsys_initcall(gpmc_init);
> 
> 126 MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board") 
> ..
> 130         .init_irq       = omap_zoom_init_irq,
> 131         .init_machine   = omap_zoom_init,
> ..
> 
> Step-(n):
> 	kernel_init() -> customize_machine() 
>              -> omap_zoom_init() -> gpmc_nand_init() -> which call gpmc
>                 functions, that's crashing, as gpmc is not initialized.
> 
> Step-(n+1):
> 	Followed by subsys_initcall(gpmc_init)
> 
> So I will incorporate the other input and will re-submit.
> [..snip..]

I don't see why you could not make gpmc_nand_init happen later?
Also, some of these calls can be moved to omap2_init_common_hw()?

Tony


From vapier.adi at gmail.com  Sat Nov  6 04:54:20 2010
From: vapier.adi at gmail.com (Mike Frysinger)
Date: Sat, 6 Nov 2010 04:54:20 -0400
Subject: Suggested patch: reset errno after isatty()
In-Reply-To: <AANLkTimfxjrtV4eks5tK68h6TQ20soib+6gaTC+QyB4a@mail.gmail.com>
References: <AANLkTimwumfui-_T1ScDYwMLKbNh1ia-SDMUg56wTfN5@mail.gmail.com>
	<4CD11C03.3090207@parrot.com>
	<AANLkTimfxjrtV4eks5tK68h6TQ20soib+6gaTC+QyB4a@mail.gmail.com>
Message-ID: <AANLkTinSj2vAJJjeSxF-rvq08OVsnw3YcpRSpuOfv9pQ@mail.gmail.com>

On Wed, Nov 3, 2010 at 09:16, Ketil Froyn wrote:
> On Wed, Nov 3, 2010 at 9:23 AM, Matthieu CASTET wrote:
> This code has been rewritten, but the new master isn't working for me
> (yet). This patch against v1.4.1 seems to have solved my problems for
> now. I've just replaced pread() with read(), because it works, and
> fixed up the error checking.
>
> --- a/nanddump.c
> +++ b/nanddump.c
> @@ -412,10 +412,25 @@ int main(int argc, char * const argv[])
> ? ? ? ? ? ? ? ? ? ? ? ?memset (readbuf, 0xff, bs);
> ? ? ? ? ? ? ? ?} else {
> ? ? ? ? ? ? ? ? ? ? ? ?/* Read page data and exit on failure */
> - ? ? ? ? ? ? ? ? ? ? ? if (pread(fd, readbuf, bs, ofs) != bs) {
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? perror("pread");
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? goto closeall;
> - ? ? ? ? ? ? ? ? ? ? ? }
> + ? ? ? ? ? ? ? ? ? ? ? do {
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ret = read(fd, readbuf, bs);
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (ret == -1) {
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (errno == EAGAIN || errno == EINTR) {
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? continue;
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? }
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? perror("read");
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? goto closeall;
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? }
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (ret == 0) {
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? printf("No more data to read\n");
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? break;
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? }
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (ret != bs) {
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? fprintf(stderr, "read() got
> wrong number of bytes: got %i, expected %i\n", ret, bs);
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? goto closeall;
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? }
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? break;
> + ? ? ? ? ? ? ? ? ? ? ? } while (1);
> ? ? ? ? ? ? ? ?}

doesnt libmtd provide read functions already ?
-mike

From segooon at gmail.com  Sat Nov  6 10:41:24 2010
From: segooon at gmail.com (Vasiliy Kulikov)
Date: Sat,  6 Nov 2010 17:41:24 +0300
Subject: [PATCH] mtd: mtdchar: fix information leak to userland
Message-ID: <1289054485-18190-1-git-send-email-segooon@gmail.com>

Structure mtd_info_user is copied to userland with padding byted
between "type" and "flags" fields uninitialized.  It leads to leaking
of contents of kernel stack memory.

Signed-off-by: Vasiliy Kulikov <segooon at gmail.com>
---
 Compile tested.

 drivers/mtd/mtdchar.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index 3eff1e5..2a0bc9e 100644
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -601,6 +601,7 @@ static int mtd_ioctl(struct file *file, u_int cmd, u_long arg)
 	}
 
 	case MEMGETINFO:
+		memset(&info, 0, sizeof(info));
 		info.type	= mtd->type;
 		info.flags	= mtd->flags;
 		info.size	= mtd->size;
@@ -609,7 +610,6 @@ static int mtd_ioctl(struct file *file, u_int cmd, u_long arg)
 		info.oobsize	= mtd->oobsize;
 		/* The below fields are obsolete */
 		info.ecctype	= -1;
-		info.eccsize	= 0;
 		if (copy_to_user(argp, &info, sizeof(struct mtd_info_user)))
 			return -EFAULT;
 		break;
-- 
1.7.0.4



From ketil at froyn.name  Sun Nov  7 17:36:04 2010
From: ketil at froyn.name (Ketil Froyn)
Date: Sun, 7 Nov 2010 23:36:04 +0100
Subject: Suggested patch: reset errno after isatty()
In-Reply-To: <AANLkTinSj2vAJJjeSxF-rvq08OVsnw3YcpRSpuOfv9pQ@mail.gmail.com>
References: <AANLkTimwumfui-_T1ScDYwMLKbNh1ia-SDMUg56wTfN5@mail.gmail.com>
	<4CD11C03.3090207@parrot.com>
	<AANLkTimfxjrtV4eks5tK68h6TQ20soib+6gaTC+QyB4a@mail.gmail.com>
	<AANLkTinSj2vAJJjeSxF-rvq08OVsnw3YcpRSpuOfv9pQ@mail.gmail.com>
Message-ID: <AANLkTikQtNwsPkJSkmpmC=kMZpmdqHDW0HROeUBNDOEi@mail.gmail.com>

On Sat, Nov 6, 2010 at 9:54 AM, Mike Frysinger <vapier.adi at gmail.com> wrote:
>
> doesnt libmtd provide read functions already ?
> -mike

I'm not familiar with libmtd, but the latest release (v1.4.1) just did
it itself with pread, and since that failed I fixed it.

The new code in the repo, which appears to use libmtd, didn't work for
me, and the fix appeared more complicated. My patch is for v1.4.1,
which should also make it easier to integrate for package maintainers,
if they wish, pending a working rewrite.

Ketil


From viresh.kumar at st.com  Mon Nov  8 00:47:54 2010
From: viresh.kumar at st.com (Viresh Kumar)
Date: Mon, 8 Nov 2010 11:17:54 +0530
Subject: [PATCH] mtd/fsmc.h: including linux/io.h for definition of readl
Message-ID: <ae7281ab5364fe0c2b1a7375d5d53ddfc12172d6.1289194908.git.viresh.kumar@st.com>

Signed-off-by: Viresh Kumar <viresh.kumar at st.com>
---
 include/linux/mtd/fsmc.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/mtd/fsmc.h b/include/linux/mtd/fsmc.h
index 2ac94d3..fce5cf0 100644
--- a/include/linux/mtd/fsmc.h
+++ b/include/linux/mtd/fsmc.h
@@ -16,6 +16,7 @@
 #ifndef __MTD_FSMC_H
 #define __MTD_FSMC_H
 
+#include <linux/io.h>
 #include <linux/platform_device.h>
 #include <linux/mtd/physmap.h>
 #include <linux/types.h>
-- 
1.7.2.3



From bjorn.forsman at gmail.com  Mon Nov  8 09:54:43 2010
From: bjorn.forsman at gmail.com (=?UTF-8?Q?Bj=C3=B8rn_Forsman?=)
Date: Mon, 8 Nov 2010 15:54:43 +0100
Subject: PXA310: double bit errors on NAND
Message-ID: <AANLkTin86UQe8Q4PNqSnU7M0x4kVPUehcBRpS0HhHKRh@mail.gmail.com>

Hi all,

I get "double bit error @ page" messages while working with NAND on a
Colibri PXA310 module. Basically, when I write an UBI image to NAND,
either with U-Boot "nand write" or "nandwrite" from mtd-utils,
everything is OK on the *first* mount. But on the second mount I get
several "double bit error @ page" messages and mount fails. This
always happen (unless I'm mounting read-only -- then the problem is
gone). But the funny thing is that if I write an UBIFS image using
these commands:

ubiformat /dev/mtd7
ubiattach -m 7
ubimkvol /dev/ubi0 -N rootfs -m
ubiupdatevol /dev/ubi0_0 /rootfs.ubifs

everything is OK! I can mount/umount many times and no errors.

Any ideas why writing UBI image directly allows only *one* mount but
using the UBI tools above it works perfectly on all later mounts? I'd
really like to be able to flash UBI images directly and not having to
boot Linux over NFS just to be able to flash my rootfs...

Some notes:

1) I found a thread at
http://sourceforge.net/mailarchive/forum.php?thread_name=201009181607.38352.marek.vasut%40gmail.com&forum_name=openpxa-users
which seems to be about the very same problem, but I was not on the
list back then so I couldn't reply to that thread.

2) A console session where I provoke the "2nd UBIFS mount" failure:
# flash_eraseall /dev/mtd7
# nandwrite -p /dev/mtd7 /rootfs.ubi
# ubiattach -m7
[ 2011.367544] UBI: attaching mtd7 to ubi0
[ 2011.378022] UBI: physical eraseblock size:   131072 bytes (128 KiB)
[ 2011.385102] UBI: logical eraseblock size:    126976 bytes
[ 2011.395127] UBI: smallest flash I/O unit:    2048
[ 2011.404498] UBI: VID header offset:          2048 (aligned 2048)
[ 2011.415154] UBI: data offset:                4096
[ 2011.826179] UBI: max. sequence number:       0
[ 2011.849846] UBI: attached mtd7 to ubi0
[ 2011.853591] UBI: MTD device name:            "rootfs 64 MiB"
[ 2011.860003] UBI: MTD device size:            64 MiB
[ 2011.868983] UBI: number of good PEBs:        512
[ 2011.874397] UBI: number of bad PEBs:         0
[ 2011.881566] UBI: max. allowed volumes:       128
[ 2011.886170] UBI: wear-leveling threshold:    4096
[ 2011.891614] UBI: number of internal volumes: 1
[ 2011.899102] UBI: number of user volumes:     1
[ 2011.906238] UBI: available PEBs:             142
[ 2011.911610] UBI: total number of reserved PEBs: 370
[ 2011.919086] UBI: number of PEBs reserved for bad PEB handling: 5
[ 2011.925844] UBI: max/mean erase counter: 0/0
[ 2011.932870] UBI: image sequence number:  0
[ 2011.937009] UBI: background thread "ubi_bgt0d" started, PID 1019
UBI device number 0, total 512 LEBs (65011712 bytes, 62.0 MiB),
available 142 LEBs (18030592 bytes, 17)
# mount -t ubifs /dev/ubi0_0 /mnt
[ 2174.116000] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[ 2174.122117] UBIFS: file system size:   44441600 bytes (43400 KiB,
42 MiB, 350 LEBs)
[ 2174.129771] UBIFS: journal size:       9023488 bytes (8812 KiB, 8
MiB, 72 LEBs)
[ 2174.137036] UBIFS: media format:       w4/r0 (latest is w4/r0)
[ 2174.142857] UBIFS: default compressor: lzo
[ 2174.146924] UBIFS: reserved for root:  0 bytes (0 KiB)
# ls /mnt
bin      etc      init     linuxrc  opt      root     sys      usr      www
dev      home     lib      mnt      proc     sbin     tmp      var
# umount /mnt
[ 2187.011934] UBIFS: un-mount UBI device 0, volume 0
# mount -t ubifs /dev/ubi0_0 /mnt
[ 2189.827801] double bit error @ page 0000d2c5
[ 2189.859454] double bit error @ page 0000d2c5
[ 2189.889241] UBIFS error (pid 1028): ubifs_recover_master_node:
failed to recover master node
[ 2189.901888] double bit error @ page 0000d2c5
mount: mounting /dev/ubi0_0 on /mnt failed: Invalid argument
# [ 2189.942810] UBI: scrubbed PEB 3 (LEB 0:1), data moved to PEB 511

3) I tried to flash and mount a jffs2 image instead of UBI/UBIFS. It
produced *lots* of errors and mount eventually failed:
# flash_eraseall /dev/mtd7      # the '-j' flag produces errors, so
I'm skipping it...
# nandwrite -p /dev/mtd7 /rootfs.jffs2
# mount -t jffs2 /dev/mtdblock7 /mnt
[ 5320.153576] jffs2_scan_eraseblock(): Node at 0x00000000 {0x1985,
0xe001, 0x0000002b) has invalid CRC 0x1804b18f (calculated 0x7d266ee6)
[ 5320.168986] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x00000004: 0x002b instead
[ 5320.180415] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x00000008: 0xb18f instead
[ 5320.189258] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x0000000c: 0x0001 instead
[ 5320.198878] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x00000014: 0x0002 instead
[ 5320.212126] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x00000018: 0xc63b instead
[ 5320.221757] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x0000001c: 0x0403 instead
[ 5320.233390] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x00000020: 0x148e instead
[ 5320.243017] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x00000024: 0x5aed instead
[ 5320.254612] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x00000028: 0x6962 instead
[ 5320.263601] Further such events for this erase block will not be printed
<...snip lots of errors...>
[ 5349.320793] Empty flash at 0x0156c5c0 ends at 0x0156c5c4
[ 5349.336938] Empty flash at 0x0156c5d0 ends at 0x0156c5d4
[ 5349.355108] Empty flash at 0x0156c5e0 ends at 0x0156c5e4
<..snip lots of errors...>
[ 5374.079867] jffs2_scan_eraseblock(): Node at 0x02800000 {0x1985,
0xe002, 0x00000415) has invalid CRC 0x896de46f (calculated 0xec4f3b06)
[ 5374.092709] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x02800004: 0x0415 instead
[ 5374.104261] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x02800008: 0xe46f instead
[ 5374.113883] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x0280000c: 0x134b instead
[ 5374.125444] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x02800010: 0x0001 instead
[ 5374.135058] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x02800014: 0x81a4 instead
[ 5374.146676] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x0280001c: 0x165d instead
[ 5374.156287] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x02800020: 0xa68f instead
[ 5374.166811] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x02800024: 0xa68f instead
[ 5374.178375] jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x02800028: 0xa68f instead
[ 5374.187367] Further such events for this erase block will not be printed
[ 5374.237539] Old JFFS2 bitmask found at 0x0280b86c
[ 5374.242332] You cannot use older JFFS2 filesystems with newer kernels
[ 5374.753907] Cowardly refusing to erase blocks on filesystem with no
valid JFFS2 nodes
[ 5374.761797] empty_blocks 191, bad_blocks 0, c->nr_blocks 512
mount: mounting /dev/mtdblock7 on /mnt failed: Input/output error
#

Best regards,
Bj?rn Forsman


From bjorn.forsman at gmail.com  Mon Nov  8 11:54:03 2010
From: bjorn.forsman at gmail.com (=?UTF-8?Q?Bj=C3=B8rn_Forsman?=)
Date: Mon, 8 Nov 2010 17:54:03 +0100
Subject: PXA310: double bit errors on NAND
In-Reply-To: <AANLkTin86UQe8Q4PNqSnU7M0x4kVPUehcBRpS0HhHKRh@mail.gmail.com>
References: <AANLkTin86UQe8Q4PNqSnU7M0x4kVPUehcBRpS0HhHKRh@mail.gmail.com>
Message-ID: <AANLkTikVMy+2VBr=SCLS2pP7k-ZMSMViWt=5yeUJvErb@mail.gmail.com>

2010/11/8 Bj?rn Forsman <bjorn.forsman at gmail.com>:
> Hi all,
>
> I get "double bit error @ page" messages while working with NAND on a
> Colibri PXA310 module. Basically, when I write an UBI image to NAND,
> either with U-Boot "nand write" or "nandwrite" from mtd-utils,
> everything is OK on the *first* mount. But on the second mount I get
> several "double bit error @ page" messages and mount fails. This
> always happen (unless I'm mounting read-only -- then the problem is
> gone). But the funny thing is that if I write an UBIFS image using
> these commands:
>
> ubiformat /dev/mtd7
> ubiattach -m 7
> ubimkvol /dev/ubi0 -N rootfs -m
> ubiupdatevol /dev/ubi0_0 /rootfs.ubifs
>
> everything is OK! I can mount/umount many times and no errors.

After reading the MTD how to send bugreport[1] (which I should have
read earlier!) I enabled "UBI debugging messages" and "Extra
self-checks". The console output is now much more useful :-) AFAICS,
it shows that UBI fails to write data to PEB 3 and switches to
read-only mode. UBIFS then reports write failure at LEB 1 and then the
kernel tries to dereference a NULL pointer:

# flash_eraseall /dev/mtd7 && nandwrite -p /dev/mtd7 /rootfs.ubi
# ubiattach -m 7
# mount -t ubifs /dev/ubi0_0 /mnt
[  664.964427] UBI warning: ubi_eba_write_leb: failed to write data to PEB 3
[  664.971275] UBI warning: ubi_ro_mode: switch to read-only mode
[  664.977087] UBIFS error (pid 1014): ubifs_write_node: cannot write
2048 bytes to LEB 1:2048, error 5
[  665.008605] kernel BUG at fs/super.c:948!
[  665.012616] Unable to handle kernel NULL pointer dereference at
virtual address 00000000
[  665.020789] pgd = c6888000
[  665.023484] [00000000] *pgd=a7ba0031, *pte=00000000, *ppte=00000000
[  665.029782] Internal error: Oops: 817 [#1] PREEMPT
[  665.034537] last sysfs file: /sys/devices/virtual/ubi/ubi0/min_io_size
[  665.041017] Modules linked in:
[  665.044055] CPU: 0    Not tainted  (2.6.36-00018-g14edd22-dirty #265)
[  665.050467] PC is at __bug+0x24/0x30
[  665.054031] LR is at release_console_sem+0x1e8/0x200
[  665.058968] pc : [<c002b9e0>]    lr : [<c0040454>]    psr: 60000013
[  665.058981] sp : c6873ec0  ip : c6873df0  fp : c6873ecc
[  665.070370] r10: c686b000  r9 : c689cbe0  r8 : c686b000
[  665.075557] r7 : 00008000  r6 : 00000005  r5 : c03e5cd8  r4 : c7b1f000
[  665.082044] r3 : 00000000  r2 : 00000001  r1 : c6873e18  r0 : 00000033
[  665.088526] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[  665.095614] Control: 0000397f  Table: a6888018  DAC: 00000015
[  665.101317] Process mount (pid: 1014, stack limit = 0xc6872278)
[  665.107201] Stack: (0xc6873ec0 to 0xc6874000)
[  665.111540] 3ec0: c6873efc c6873ed0 c00a4d38 c002b9c8 c7b1f000
c6873ee0 c00bae28 c03e5cd8
[  665.119679] 3ee0: c689cbe0 c686b000 c689cbc0 00008000 c6873f24
c6873f00 c00a4e28 c00a4cc0
[  665.127811] 3f00: c686b000 00000020 c689cbc0 00000000 00000000
00008000 c6873f6c c6873f28
[  665.135944] 3f20: c00be030 c00a4df8 00000000 c6873f6c 00000000
c6873f48 c7805a00 c7452c00
[  665.144077] 3f40: 20000013 c7b9b000 be8f9eb8 00008000 00000000
c0028108 c6872000 00000000
[  665.152211] 3f60: c6873fa4 c6873f70 c00be140 c00bd9d4 c686b000
3a699d01 386d4604 c686b000
[  665.160342] 3f80: c689cbc0 c689cbe0 000b9018 be8f9c70 4018d380
00000015 00000000 c6873fa8
[  665.168476] 3fa0: c0027f60 c00be0c0 000b9018 be8f9c70 be8f9eb8
be8f9ec4 be8f9eb2 00008000
[  665.176607] 3fc0: 000b9018 be8f9c70 4018d380 00000015 00000000
0000d0b0 00008000 00000000
[  665.184742] 3fe0: 40140da4 be8f9b80 0004aefc 40140db8 20000010
be8f9eb8 ffffffff ffffffff
[  665.192860] Backtrace:
[  665.195305] [<c002b9bc>] (__bug+0x0/0x30) from [<c00a4d38>]
(vfs_kern_mount+0x84/0x118)
[  665.203266] [<c00a4cb4>] (vfs_kern_mount+0x0/0x118) from
[<c00a4e28>] (do_kern_mount+0x3c/0xe0)
[  665.211902]  r8:00008000 r7:c689cbc0 r6:c686b000 r5:c689cbe0 r4:c03e5cd8
[  665.218619] [<c00a4dec>] (do_kern_mount+0x0/0xe0) from [<c00be030>]
(do_mount+0x668/0x6ec)
[  665.226822]  r8:00008000 r7:00000000 r6:00000000 r5:c689cbc0 r4:00000020
[  665.233335] r3:c686b000
[  665.235941] [<c00bd9c8>] (do_mount+0x0/0x6ec) from [<c00be140>]
(sys_mount+0x8c/0xcc)
[  665.243751] [<c00be0b4>] (sys_mount+0x0/0xcc) from [<c0027f60>]
(ret_fast_syscall+0x0/0x2c)
[  665.252039]  r7:00000015 r6:4018d380 r5:be8f9c70 r4:000b9018
[  665.257693] Code: e59f0010 e1a01003 eb0b42cf e3a03000 (e5833000)
[  665.264041] ---[ end trace f4c146898e7fbb35 ]---
Segmentation fault
#

If I try mount one more time:

# mount -t ubifs /dev/ubi0_0 /mnt
[  726.910538] UBI DBG (pid 1018): ubi_open_volume_path: open volume
/dev/ubi0_0, mode 1
[  726.918530] UBI DBG (pid 1018): ubi_open_volume: open device 0,
volume 0, mode 1
[  726.925986] UBI DBG (pid 1018): ubi_open_volume: open device 0,
volume 0, mode 2
[  726.952020] UBIFS: read-only UBI device
[  726.955874] UBI DBG (pid 1018): ubi_is_mapped: test LEB 0:0
[  726.961568] UBIFS error (pid 1018): mount_ubifs: cannot mount
read-write - read-only media
[  726.988356] UBI DBG (pid 1018): ubi_close_volume: close device 0,
volume 0, mode 2
[  726.995913] UBI DBG (pid 1018): ubi_close_volume: close device 0,
volume 0, mode 1
[  727.007180] UBI DBG (pid 1018): ubi_open_volume_path: open volume
/dev/ubi0_0, mode 1
[  727.015195] UBI DBG (pid 1018): ubi_open_volume: open device 0,
volume 0, mode 1
[  727.022720] UBI DBG (pid 1018): ubi_open_volume: open device 0,
volume 0, mode 2
[  727.035420] UBIFS: read-only UBI device
[  727.039428] UBI DBG (pid 1018): ubi_is_mapped: test LEB 0:0
[  727.045149] UBI DBG (pid 1018): ubi_leb_read: read 4096 bytes from LEB 0:0:0
[  727.057599] UBI DBG (pid 1018): ubi_leb_read: read 126976 bytes
from LEB 0:1:0
[  727.089040] UBI DBG (pid 1018): ubi_io_read: fixable bit-flip
detected at PEB 3
[  727.096321] UBI DBG (pid 1018): ubi_wl_scrub_peb: schedule PEB 3
for scrubbing
[  727.104738] UBI DBG (pid 1018): ubi_leb_read: read 126976 bytes
from LEB 0:1:0
[  727.138638] UBI DBG (pid 1018): ubi_io_read: fixable bit-flip
detected at PEB 3
[  727.145919] UBI DBG (pid 1018): ubi_wl_scrub_peb: schedule PEB 3
for scrubbing
[  727.155845] UBI DBG (pid 1018): ubi_leb_read: read 126976 bytes
from LEB 0:2:0
[  727.192788] UBIFS: recovered master node from LEB 1
[  727.198194] UBI DBG (pid 1018): ubi_leb_read: read 11 bytes from LEB 0:8:1868
[  727.206483] UBI DBG (pid 1018): ubi_leb_read: read 12 bytes from LEB 0:8:1856
[  727.213789] UBI DBG (pid 1018): ubi_leb_read: read 12 bytes from LEB 0:8:1844
[  727.221136] UBI DBG (pid 1018): ubi_leb_read: read 12 bytes from LEB 0:8:1820
[  727.228335] UBI DBG (pid 1018): ubi_leb_read: read 12 bytes from LEB 0:8:1748
[  727.235442] UBI DBG (pid 1018): ubi_leb_read: read 17 bytes from LEB 0:8:1479
[  727.242813] UBI DBG (pid 1018): ubi_leb_read: read 126976 bytes
from LEB 0:3:0
[  727.285249] UBI DBG (pid 1018): ubi_leb_read: read 126976 bytes
from LEB 0:4:0
[  727.318372] UBI DBG (pid 1018): ubi_leb_read: read 17 bytes from LEB 0:8:1445
[  727.325575] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[  727.331666] UBIFS: mounted read-only
[  727.335222] UBIFS: file system size:   44441600 bytes (43400 KiB,
42 MiB, 350 LEBs)
[  727.342863] UBIFS: journal size:       9023488 bytes (8812 KiB, 8
MiB, 72 LEBs)
[  727.350154] UBIFS: media format:       w4/r0 (latest is w4/r0)
[  727.355945] UBIFS: default compressor: lzo
[  727.360043] UBIFS: reserved for root:  0 bytes (0 KiB)
[  727.365179] UBI DBG (pid 1018): ubi_leb_read: read 188 bytes from
LEB 0:360:66688
[  727.373887] UBI DBG (pid 1018): ubi_leb_read: read 188 bytes from
LEB 0:360:65256
[  727.386062] UBI DBG (pid 1018): ubi_leb_read: read 188 bytes from
LEB 0:360:53928
[  727.398812] UBI DBG (pid 1018): ubi_leb_read: read 188 bytes from
LEB 0:359:90216
[  727.408316] UBI DBG (pid 1018): ubi_leb_read: read 188 bytes from LEB 0:354:0
[  727.416968] UBI DBG (pid 1018): ubi_leb_read: read 160 bytes from
LEB 0:352:12248
[  727.439783] UBI DBG (pid 1018): ubi_close_volume: close device 0,
volume 0, mode 1
#

It succeeds by using read-only mode. Verification:

# mount | grep ubi
/dev/ubi0_0 on /mnt type ubifs (ro,relatime)


And this is how it looks when /dev/ubi0_0 is created with ubimkvol +
ubiupdatevol (mount succeds, even in rw mode):

# mount -t ubifs /dev/ubi0_0 /mnt/
[ 1977.951135] UBI DBG (pid 1046): ubi_open_volume_path: open volume
/dev/ubi0_0, mode 1
[ 1977.959138] UBI DBG (pid 1046): ubi_open_volume: open device 0,
volume 0, mode 1
[ 1977.966629] UBI DBG (pid 1046): ubi_open_volume: open device 0,
volume 0, mode 2
[ 1977.980317] UBI DBG (pid 1046): ubi_is_mapped: test LEB 0:0
[ 1977.986369] UBI DBG (pid 1046): ubi_leb_read: read 4096 bytes from LEB 0:0:0
[ 1977.996481] UBI DBG (pid 1046): ubi_leb_change: atomically write
4096 bytes to LEB 0:0
[ 1978.166771] UBI DBG (pid 1046): ubi_leb_read: read 126976 bytes
from LEB 0:1:0
[ 1978.276756] UBI DBG (pid 1046): ubi_leb_read: read 126976 bytes
from LEB 0:2:0
[ 1978.386391] UBI DBG (pid 1046): ubi_leb_write: write 2048 bytes to
LEB 0:1:2048
[ 1978.458923] UBI DBG (pid 1046): ubi_leb_write: write 2048 bytes to
LEB 0:2:2048
[ 1978.520369] UBI DBG (pid 1046): ubi_leb_read: read 11 bytes from LEB 0:8:1868
[ 1978.529013] UBI DBG (pid 1046): ubi_leb_unmap: unmap LEB 0:9
[ 1978.534805] UBI DBG (pid 1046): ubi_leb_read: read 12 bytes from LEB 0:8:1856
[ 1978.541955] UBI DBG (pid 1046): ubi_leb_read: read 12 bytes from LEB 0:8:1844
[ 1978.549146] UBI DBG (pid 1046): ubi_leb_read: read 12 bytes from LEB 0:8:1820
[ 1978.556332] UBI DBG (pid 1046): ubi_leb_read: read 12 bytes from LEB 0:8:1748
[ 1978.563441] UBI DBG (pid 1046): ubi_leb_read: read 17 bytes from LEB 0:8:1479
[ 1978.570830] UBI DBG (pid 1046): ubi_leb_read: read 126976 bytes
from LEB 0:3:0
[ 1978.639280] UBI DBG (pid 1046): ubi_leb_read: read 126976 bytes
from LEB 0:4:0
[ 1978.649533] UBI DBG (pid 1046): ubi_leb_unmap: unmap LEB 0:10
[ 1978.655423] UBI DBG (pid 1046): ubi_leb_read: read 17 bytes from LEB 0:8:1445
[ 1978.662589] UBI DBG (pid 1046): ubi_leb_unmap: unmap LEB 0:353
[ 1978.668471] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[ 1978.674487] UBIFS: file system size:   62472192 bytes (61008 KiB,
59 MiB, 492 LEBs)
[ 1978.682095] UBIFS: journal size:       9023488 bytes (8812 KiB, 8
MiB, 72 LEBs)
[ 1978.689388] UBIFS: media format:       w4/r0 (latest is w4/r0)
[ 1978.695208] UBIFS: default compressor: lzo
[ 1978.699279] UBIFS: reserved for root:  0 bytes (0 KiB)
[ 1978.704447] UBI DBG (pid 1046): ubi_leb_read: read 188 bytes from
LEB 0:360:66688
[ 1978.715500] UBI DBG (pid 1046): ubi_leb_read: read 188 bytes from
LEB 0:360:65256
[ 1978.727822] UBI DBG (pid 1046): ubi_leb_read: read 188 bytes from
LEB 0:360:53928
[ 1978.739949] UBI DBG (pid 1046): ubi_leb_read: read 188 bytes from
LEB 0:359:90216
[ 1978.752414] UBI DBG (pid 1046): ubi_leb_read: read 188 bytes from LEB 0:354:0
[ 1978.764848] UBI DBG (pid 1046): ubi_leb_read: read 160 bytes from
LEB 0:352:12248
[ 1978.774388] UBI DBG (pid 1046): ubi_close_volume: close device 0,
volume 0, mode 1
# mount | grep ubi
/dev/ubi0_0 on /mnt type ubifs (rw,relatime)

I'll get back when I find out more. But of course; any help appreciated :-)

Best regards,
Bj?rn Forsman

[1]: http://www.linux-mtd.infradead.org/doc/ubifs.html#L_how_send_bugreport


From pieterg at gmx.com  Mon Nov  8 17:18:21 2010
From: pieterg at gmx.com (pieterg)
Date: Mon, 8 Nov 2010 23:18:21 +0100
Subject: [Openpxa-users] PXA310: double bit errors on NAND
In-Reply-To: <AANLkTin86UQe8Q4PNqSnU7M0x4kVPUehcBRpS0HhHKRh@mail.gmail.com>
References: <AANLkTin86UQe8Q4PNqSnU7M0x4kVPUehcBRpS0HhHKRh@mail.gmail.com>
Message-ID: <201011082318.21748.pieterg@gmx.com>

On Monday, November 08, 2010 15:54:43 Bj?rn Forsman wrote:
> I get "double bit error @ page" messages while working with NAND on a
> Colibri PXA310 module. Basically, when I write an UBI image to NAND,
> either with U-Boot "nand write" or "nandwrite" from mtd-utils,
> everything is OK on the *first* mount. But on the second mount I get
> several "double bit error @ page" messages and mount fails.

You are not erase-block padding your image, when you write it?
That's the mistake I made (with jffs2 in my case), in that openpxa-users
thread you mention.
As soon as I found out my image was eraseblock padded, and fixed that,
the number of single/double bit errors was reduced dramatically, 
but some errors remained.

I haven't yet had the time to further investigate this, my preliminary 
conclusion is that the Samsung K9K's, though advertised as SLC, 
are very poor quality, and they probably need a better ecc than 
Hamming (as the pxa nand controller implements).
And also that jffs2 seems to care less than ubi(fs) when double bit errors 
do happen.(ubifs often refused to even mount when biterrors occurred, 
jffs2 so far always continued with what remained)
That's the reason why I'm using jffs2 for the time being, a non-booting 
device is worse than a device with a corrupted file.
(from a theoretical point of view however both are equally bad of course, 
this issue does need to be resolved)

Rgds, Pieter


From jj at chaosbits.net  Mon Nov  8 18:09:02 2010
From: jj at chaosbits.net (Jesper Juhl)
Date: Tue, 9 Nov 2010 00:09:02 +0100 (CET)
Subject: [PATCH 06/17][trivial] mtd: Remove unnecessary casts of void ptr
	returning alloc function return values
Message-ID: <alpine.LNX.2.00.1011082327290.23697@swampdragon.chaosbits.net>

Hi,

The [vk][cmz]alloc(_node) family of functions return void pointers which
it's completely unnecessary/pointless to cast to other pointer types since
that happens implicitly.

This patch removes such casts from drivers/mtd/


Signed-off-by: Jesper Juhl <jj at chaosbits.net>
---
 tqm8xxl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/maps/tqm8xxl.c b/drivers/mtd/maps/tqm8xxl.c
index 6014698..c08e140 100644
--- a/drivers/mtd/maps/tqm8xxl.c
+++ b/drivers/mtd/maps/tqm8xxl.c
@@ -139,7 +139,7 @@ static int __init init_tqm_mtd(void)
 			goto error_mem;
 		}
 
-		map_banks[idx]->name = (char *)kmalloc(16, GFP_KERNEL);
+		map_banks[idx]->name = kmalloc(16, GFP_KERNEL);
 
 		if (!map_banks[idx]->name) {
 			ret = -ENOMEM;



-- 
Jesper Juhl <jj at chaosbits.net>             http://www.chaosbits.net/
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.



From viresh.kumar at st.com  Mon Nov  8 23:46:14 2010
From: viresh.kumar at st.com (Viresh Kumar)
Date: Tue, 9 Nov 2010 10:16:14 +0530
Subject: [PATCH V2 25/69 resend] ST SPEAr: Add smi driver for serial NOR flash
In-Reply-To: <5f672179627d93478893c9b3f71e954485d4ce3a.1289277112.git.viresh.kumar@st.com>
References: <5f672179627d93478893c9b3f71e954485d4ce3a.1289277112.git.viresh.kumar@st.com>
Message-ID: <04fcf46b70d9be722a84342fcd8c58a8b3d1cd69.1289277113.git.viresh.kumar@st.com>

From: Shiraz Hashim <shiraz.hashim at st.com>

SPEAr platforms(spear3xx/spear6xx/spear13xx) provide SMI(Serial Memory
Interface) controller to access serial NOR flash. SMI provides a simple
interface for SPI/serial NOR flashes and has certain inbuilt commands
and features to support these flashes easily. It also makes it possible
to map an address range in order to directly access (read/write) the SNOR
over address bus. This patch intends to provide serial nor driver support
for spear platforms which are accessed through SMI.

Signed-off-by: Shiraz Hashim <shiraz.hashim at st.com>
Signed-off-by: Viresh Kumar <viresh.kumar at st.com>
---
 arch/arm/plat-spear/include/plat/smi.h |   68 ++
 drivers/mtd/devices/Kconfig            |    7 +
 drivers/mtd/devices/Makefile           |    1 +
 drivers/mtd/devices/spear_smi.c        | 1122 ++++++++++++++++++++++++++++++++
 4 files changed, 1198 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/plat-spear/include/plat/smi.h
 create mode 100644 drivers/mtd/devices/spear_smi.c

diff --git a/arch/arm/plat-spear/include/plat/smi.h b/arch/arm/plat-spear/include/plat/smi.h
new file mode 100644
index 0000000..4c74df7
--- /dev/null
+++ b/arch/arm/plat-spear/include/plat/smi.h
@@ -0,0 +1,68 @@
+/*
+ * arch/arm/plat-spear/include/plat/smi.h
+ *
+ * Copyright (C) 2010 ST Microelectronics
+ * Shiraz Hashim <shiraz.hashim at st.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#ifndef __PLAT_SMI_H
+#define __PLAT_SMI_H
+
+#include <linux/types.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/platform_device.h>
+
+/* macro to define partitions for flash devices */
+#define DEFINE_PARTS(n, of, s)		\
+{					\
+	.name = n,			\
+	.offset = of,			\
+	.size = s,			\
+}
+
+/**
+ * struct spear_smi_flash_info - platform structure for passing flash
+ * information
+ *
+ * name: name of the serial nor flash for identification
+ * mem_base: the memory base on which the flash is mapped
+ * size: size of the flash in bytes
+ * num_parts: number of partitions
+ * parts: parition details
+ * fast_mode: whether flash supports fast mode
+ */
+
+struct spear_smi_flash_info {
+	char *name;
+	unsigned long mem_base;
+	unsigned long size;
+	int num_parts;
+	struct mtd_partition *parts;
+	u8 fast_mode;
+};
+
+/**
+ * struct spear_smi_plat_data - platform structure for configuring smi
+ *
+ * clk_rate: clk rate at which SMI must operate
+ * num_flashes: number of flashes present on board
+ * board_flash_info: specific details of each flash present on board
+ */
+struct spear_smi_plat_data {
+	unsigned long clk_rate;
+	int num_flashes;
+	struct spear_smi_flash_info *board_flash_info;
+};
+
+static inline void smi_set_plat_data(struct platform_device *pdev,
+		struct spear_smi_plat_data *pdata)
+{
+	pdev->dev.platform_data = pdata;
+}
+
+#endif /* __PLAT_SMI_H */
diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig
index 35081ce..83daf23 100644
--- a/drivers/mtd/devices/Kconfig
+++ b/drivers/mtd/devices/Kconfig
@@ -102,6 +102,13 @@ config M25PXX_USE_FAST_READ
 	help
 	  This option enables FAST_READ access supported by ST M25Pxx.
 
+config MTD_SPEAR_SMI
+	tristate "SPEAR MTD NOR Support through SMI controller"
+	depends on PLAT_SPEAR
+	default y
+	help
+	  This enable SNOR support on SPEAR platforms using SMI controller
+
 config MTD_SST25L
 	tristate "Support SST25L (non JEDEC) SPI Flash chips"
 	depends on SPI_MASTER
diff --git a/drivers/mtd/devices/Makefile b/drivers/mtd/devices/Makefile
index f3226b1..6e9063b 100644
--- a/drivers/mtd/devices/Makefile
+++ b/drivers/mtd/devices/Makefile
@@ -16,4 +16,5 @@ obj-$(CONFIG_MTD_LART)		+= lart.o
 obj-$(CONFIG_MTD_BLOCK2MTD)	+= block2mtd.o
 obj-$(CONFIG_MTD_DATAFLASH)	+= mtd_dataflash.o
 obj-$(CONFIG_MTD_M25P80)	+= m25p80.o
+obj-$(CONFIG_MTD_SPEAR_SMI)	+= spear_smi.o
 obj-$(CONFIG_MTD_SST25L)	+= sst25l.o
diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c
new file mode 100644
index 0000000..6dd7de1
--- /dev/null
+++ b/drivers/mtd/devices/spear_smi.c
@@ -0,0 +1,1122 @@
+/*
+ * linux/drivers/mtd/devices/spear_smi.c
+ *
+ * SMI (Serial Memory Controller) device driver for Serial NOR Flash on
+ * SPEAr platform
+ * The serial nor interface is largely based on drivers/mtd/m25p80.c,
+ * however the SPI interface has been replaced by SMI.
+ *
+ * Copyright (C) 2010 STMicroelectronics.
+ * Ashish Priyadarshi
+ * Shiraz Hashim <shiraz.hashim at st.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#include <linux/clk.h>
+#include <linux/delay.h>
+#include <linux/device.h>
+#include <linux/err.h>
+#include <linux/errno.h>
+#include <linux/interrupt.h>
+#include <linux/io.h>
+#include <linux/ioport.h>
+#include <linux/jiffies.h>
+#include <linux/kernel.h>
+#include <linux/param.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mutex.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/wait.h>
+#include <plat/smi.h>
+
+/* max possible slots for serial-nor flash chip in the SMI controller */
+#define MAX_NUM_FLASH_CHIP	4
+
+/* SMI clock rate */
+#define SMI_MAX_CLOCK_FREQ	50000000 /* 50 MHz */
+
+/* MAX time out to safely come out of a erase or write busy conditions */
+#define SMI_PROBE_TIMEOUT	(HZ / 10)
+#define SMI_MAX_TIME_OUT	(3 * HZ)
+
+/* timeout for command completion */
+#define SMI_CMD_TIMEOUT		(HZ / 10)
+
+/* registers of smi */
+#define SMI_CR1		0x0	/* SMI control register 1 */
+#define SMI_CR2		0x4	/* SMI control register 2 */
+#define SMI_SR		0x8	/* SMI status register */
+#define SMI_TR		0xC	/* SMI transmit register */
+#define SMI_RR		0x10	/* SMI receive register */
+
+/* defines for control_reg 1 */
+#define BANK_EN		(0xF << 0)	/* enables all banks */
+#define DSEL_TIME	(0x6 << 4)	/* Deselect time 6 + 1 SMI_CK periods */
+#define SW_MODE		(0x1 << 28)	/* enables SW Mode */
+#define WB_MODE		(0x1 << 29)	/* Write Burst Mode */
+#define FAST_MODE	(0x1 << 15)	/* Fast Mode */
+#define HOLD1		(0x1 << 16)	/* Clock Hold period selection */
+
+/* defines for control_reg 2 */
+#define SEND		(0x1 << 7)	/* Send data */
+#define TFIE		(0x1 << 8)	/* Transmission Flag Interrupt Enable */
+#define WCIE		(0x1 << 9)	/* Write Complete Interrupt Enable */
+#define RD_STATUS_REG	(0x1 << 10)	/* reads status reg */
+#define WE		(0x1 << 11)	/* Write Enable */
+
+#define TX_LEN_SHIFT	0
+#define RX_LEN_SHIFT	4
+#define BANK_SHIFT	12
+
+/* defines for status register */
+#define SR_WIP		0x1	/* Write in progress */
+#define SR_WEL		0x2	/* Write enable latch */
+#define SR_BP0		0x4	/* Block protect 0 */
+#define SR_BP1		0x8	/* Block protect 1 */
+#define SR_BP2		0x10	/* Block protect 2 */
+#define SR_SRWD		0x80	/* SR write protect */
+#define TFF		0x100	/* Transfer Finished Flag */
+#define WCF		0x200	/* Transfer Finished Flag */
+#define ERF1		0x400	/* Forbidden Write Request */
+#define ERF2		0x800	/* Forbidden Access */
+
+#define WM_SHIFT	12
+
+/* flash opcodes */
+#define OPCODE_RDID	0x9f	/* Read JEDEC ID */
+
+/* Flash Device Ids maintenance section */
+
+/* data structure to maintain flash ids from different vendors */
+struct flash_device {
+	char *name;
+	u8 erase_cmd;
+	u32 device_id;
+	u32 pagesize;
+	unsigned long sectorsize;
+	unsigned long size_in_bytes;
+};
+
+#define FLASH_ID(n, es, id, psize, ssize, size)	\
+{				\
+	.name = n,		\
+	.erase_cmd = es,	\
+	.device_id = id,	\
+	.pagesize = psize,	\
+	.sectorsize = ssize,	\
+	.size_in_bytes = size	\
+}
+
+static struct flash_device flash_devices[] = {
+	FLASH_ID("st m25p16"     , 0xd8, 0x00152020, 0x100, 0x10000, 0x200000),
+	FLASH_ID("st m25p32"     , 0xd8, 0x00162020, 0x100, 0x10000, 0x400000),
+	FLASH_ID("st m25p64"     , 0xd8, 0x00172020, 0x100, 0x10000, 0x800000),
+	FLASH_ID("st m25p128"    , 0xd8, 0x00182020, 0x100, 0x40000, 0x1000000),
+	FLASH_ID("st m25p05"     , 0xd8, 0x00102020, 0x80 , 0x8000 , 0x10000),
+	FLASH_ID("st m25p10"     , 0xd8, 0x00112020, 0x80 , 0x8000 , 0x20000),
+	FLASH_ID("st m25p20"     , 0xd8, 0x00122020, 0x100, 0x10000, 0x40000),
+	FLASH_ID("st m25p40"     , 0xd8, 0x00132020, 0x100, 0x10000, 0x80000),
+	FLASH_ID("st m25p80"     , 0xd8, 0x00142020, 0x100, 0x10000, 0x100000),
+	FLASH_ID("st m45pe10"    , 0xd8, 0x00114020, 0x100, 0x10000, 0x20000),
+	FLASH_ID("st m45pe20"    , 0xd8, 0x00124020, 0x100, 0x10000, 0x40000),
+	FLASH_ID("st m45pe40"    , 0xd8, 0x00134020, 0x100, 0x10000, 0x80000),
+	FLASH_ID("st m45pe80"    , 0xd8, 0x00144020, 0x100, 0x10000, 0x100000),
+	FLASH_ID("sp s25fl004"   , 0xd8, 0x00120201, 0x100, 0x10000, 0x80000),
+	FLASH_ID("sp s25fl008"   , 0xd8, 0x00130201, 0x100, 0x10000, 0x100000),
+	FLASH_ID("sp s25fl016"   , 0xd8, 0x00140201, 0x100, 0x10000, 0x200000),
+	FLASH_ID("sp s25fl032"   , 0xd8, 0x00150201, 0x100, 0x10000, 0x400000),
+	FLASH_ID("sp s25fl064"   , 0xd8, 0x00160201, 0x100, 0x10000, 0x800000),
+	FLASH_ID("atmel 25f512"  , 0x52, 0x0065001F, 0x80 , 0x8000 , 0x10000),
+	FLASH_ID("atmel 25f1024" , 0x52, 0x0060001F, 0x100, 0x8000 , 0x20000),
+	FLASH_ID("atmel 25f2048" , 0x52, 0x0063001F, 0x100, 0x10000, 0x40000),
+	FLASH_ID("atmel 25f4096" , 0x52, 0x0064001F, 0x100, 0x10000, 0x80000),
+	FLASH_ID("atmel 25fs040" , 0xd7, 0x0004661F, 0x100, 0x10000, 0x80000),
+	FLASH_ID("mac 25l512"    , 0xd8, 0x001020C2, 0x010, 0x10000, 0x10000),
+	FLASH_ID("mac 25l1005"   , 0xd8, 0x001120C2, 0x010, 0x10000, 0x20000),
+	FLASH_ID("mac 25l2005"   , 0xd8, 0x001220C2, 0x010, 0x10000, 0x40000),
+	FLASH_ID("mac 25l4005"   , 0xd8, 0x001320C2, 0x010, 0x10000, 0x80000),
+	FLASH_ID("mac 25l4005a"  , 0xd8, 0x001320C2, 0x010, 0x10000, 0x80000),
+	FLASH_ID("mac 25l8005"   , 0xd8, 0x001420C2, 0x010, 0x10000, 0x100000),
+	FLASH_ID("mac 25l1605"   , 0xd8, 0x001520C2, 0x100, 0x10000, 0x200000),
+	FLASH_ID("mac 25l1605a"  , 0xd8, 0x001520C2, 0x010, 0x10000, 0x200000),
+	FLASH_ID("mac 25l3205"   , 0xd8, 0x001620C2, 0x100, 0x10000, 0x400000),
+	FLASH_ID("mac 25l3205a"  , 0xd8, 0x001620C2, 0x100, 0x10000, 0x400000),
+	FLASH_ID("mac 25l6405"   , 0xd8, 0x001720C2, 0x100, 0x10000, 0x800000),
+};
+
+/* These partitions would be used if platform doesn't pass one */
+static struct mtd_partition part_info_8M[] = {
+	DEFINE_PARTS("Xloader", 0x00, 0x10000),
+	DEFINE_PARTS("UBoot", 0x10000, 0x40000),
+	DEFINE_PARTS("Kernel", 0x50000, 0x2C0000),
+	DEFINE_PARTS("Root File System", 0x310000, 0x4F0000),
+};
+
+static struct mtd_partition part_info_16M[] = {
+	DEFINE_PARTS("Xloader", 0x00, 0x40000),
+	DEFINE_PARTS("UBoot", 0x40000, 0x100000),
+	DEFINE_PARTS("Kernel", 0x140000, 0x300000),
+	DEFINE_PARTS("Root File System", 0x440000, 0xBC0000),
+};
+
+/* Define spear specific structures */
+
+struct spear_snor_flash;
+
+/**
+ * struct spear_smi - Structure for SMI Device
+ *
+ * @clk: functional clock
+ * @status: current status register of SMI.
+ * @clk_rate: functional clock rate of SMI (default: SMI_MAX_CLOCK_FREQ)
+ * @lock: lock to prevent parallel access of SMI.
+ * @io_base: base address for registers of SMI.
+ * @pdev: platform device
+ * @cmd_complete: queue to wait for command completion of NOR-flash.
+ * @num_flashes: number of flashes actually present on board.
+ * @flash: separate structure for each Serial NOR-flash attached to SMI.
+ */
+struct spear_smi {
+	struct clk *clk;
+	u32 status;
+	unsigned long clk_rate;
+	struct mutex lock;
+	void __iomem *io_base;
+	struct platform_device *pdev;
+	wait_queue_head_t cmd_complete;
+	u32 num_flashes;
+	struct spear_snor_flash *flash[MAX_NUM_FLASH_CHIP];
+};
+
+/**
+ * struct spear_snor_flash - Structure for Serial NOR Flash
+ *
+ * @bank: Bank number(0, 1, 2, 3) for each NOR-flash.
+ * @dev_id: Device ID of NOR-flash.
+ * @lock: lock to manage flash read, write and erase operations
+ * @mtd: MTD info for each NOR-flash.
+ * @num_parts: Total number of partition in each bank of NOR-flash.
+ * @parts: Partition info for each bank of NOR-flash.
+ * @page_size: Page size of NOR-flash.
+ * @base_addr: Base address of NOR-flash.
+ * @erase_cmd: erase command may vary on different flash types
+ * @fast_mode: flash supports read in fast mode
+ */
+struct spear_snor_flash {
+	u32 bank;
+	u32 dev_id;
+	struct mutex lock;
+	struct mtd_info mtd;
+	u32 num_parts;
+	struct mtd_partition *parts;
+	u32 page_size;
+	void __iomem *base_addr;
+	u8 erase_cmd;
+	u8 fast_mode;
+};
+
+static inline struct spear_snor_flash *get_flash_data(struct mtd_info *mtd)
+{
+	return container_of(mtd, struct spear_snor_flash, mtd);
+}
+
+/**
+ * spear_smi_read_sr - Read status register of flash through SMI
+ * @dev: structure of SMI information.
+ * @bank: bank to which flash is connected
+ *
+ * This routine will return the status register of the flash chip present at the
+ * given bank.
+ */
+static int spear_smi_read_sr(struct spear_smi *dev, u32 bank)
+{
+	int ret;
+	u32 ctrlreg1;
+
+	mutex_lock(&dev->lock);
+	dev->status = 0; /* Will be set in interrupt handler */
+
+	ctrlreg1 = readl(dev->io_base + SMI_CR1);
+	/* program smi in hw mode */
+	writel(ctrlreg1 & ~(SW_MODE | WB_MODE), dev->io_base + SMI_CR1);
+
+	/* performing a rsr instruction in hw mode */
+	writel((bank << BANK_SHIFT) | RD_STATUS_REG | TFIE,
+			dev->io_base + SMI_CR2);
+
+	/* wait for tff */
+	ret = wait_event_interruptible_timeout(dev->cmd_complete,
+			dev->status & TFF, SMI_CMD_TIMEOUT);
+
+	/* copy dev->status (lower 16 bits) in order to release lock */
+	if (ret > 0)
+		ret = dev->status & 0xffff;
+	else
+		ret = -EIO;
+
+	/* restore the ctrl regs state */
+	writel(ctrlreg1, dev->io_base + SMI_CR1);
+	writel(0, dev->io_base + SMI_CR2);
+	mutex_unlock(&dev->lock);
+
+	return ret;
+}
+
+/**
+ * spear_smi_wait_till_ready - wait till flash is ready
+ * @dev: structure of SMI information.
+ * @bank: flash corresponding to this bank
+ * @timeout: timeout for busy wait condition
+ *
+ * This routine checks for WIP (write in progress) bit in Status register
+ * If successful the routine returns 0 else -EBUSY
+ */
+static int spear_smi_wait_till_ready(struct spear_smi *dev, u32 bank,
+		unsigned long timeout)
+{
+	unsigned long finish;
+	int status;
+
+	finish = jiffies + timeout;
+	do {
+		status = spear_smi_read_sr(dev, bank);
+		if (status < 0)
+			continue; /* try till timeout */
+		else if (!(status & SR_WIP))
+			return 0;
+
+		cond_resched();
+	} while (!time_after_eq(jiffies, finish));
+
+	dev_err(&dev->pdev->dev, "smi controller is busy, timeout\n");
+	return status;
+}
+
+/**
+ * spear_smi_int_handler - SMI Interrupt Handler.
+ * @irq: irq number
+ * @dev_id: structure of SMI device, embedded in dev_id.
+ *
+ * The handler clears all interrupt conditions and records the status in
+ * dev->status which is used by the driver later.
+ */
+static irqreturn_t spear_smi_int_handler(int irq, void *dev_id)
+{
+	u32 status = 0;
+	struct spear_smi *dev = dev_id;
+
+	status = readl(dev->io_base + SMI_SR);
+
+	if (unlikely(!status))
+		return IRQ_NONE;
+
+	/* clear all interrupt conditions */
+	writel(0, dev->io_base + SMI_SR);
+
+	/* copy the status register in dev->status */
+	dev->status |= status;
+
+	/* send the completion */
+	wake_up_interruptible(&dev->cmd_complete);
+
+	return IRQ_HANDLED;
+}
+
+/**
+ * spear_smi_hw_init - initializes the smi controller.
+ * @dev: structure of smi device
+ *
+ * this routine initializes the smi controller wit the default values
+ */
+static void spear_smi_hw_init(struct spear_smi *dev)
+{
+	unsigned long rate = 0;
+	u32 prescale = 0;
+	u32 val;
+
+	rate = clk_get_rate(dev->clk);
+
+	/* functional clock of smi */
+	prescale = DIV_ROUND_UP(rate, dev->clk_rate);
+
+	/*
+	 * setting the standard values, fast mode, prescaler for
+	 * SMI_MAX_CLOCK_FREQ (50MHz) operation and bank enable
+	 */
+	val = HOLD1 | BANK_EN | DSEL_TIME | (prescale << 8);
+
+	mutex_lock(&dev->lock);
+	writel(val, dev->io_base + SMI_CR1);
+	mutex_unlock(&dev->lock);
+}
+
+/**
+ * get_flash_index - match chip id from a flash list.
+ * @flash_id: a valid nor flash chip id obtained from board.
+ *
+ * try to validate the chip id by matching from a list, if not found then simply
+ * returns negative. In case of success returns index in to the flash devices
+ * array.
+ */
+static int get_flash_index(u32 flash_id)
+{
+	int index;
+
+	/* Matches chip-id to entire list of 'serial-nor flash' ids */
+	for (index = 0; index < ARRAY_SIZE(flash_devices); index++) {
+		if (flash_devices[index].device_id == flash_id)
+			return index;
+	}
+
+	/* Memory chip is not listed and not supported */
+	return -ENODEV;
+}
+
+/**
+ * spear_smi_write_enable - Enable the flash to do write operation
+ * @dev: structure of SMI device
+ * @bank: enable write for flash connected to this bank
+ *
+ * Set write enable latch with Write Enable command.
+ * Returns 0 on success.
+ */
+static int spear_smi_write_enable(struct spear_smi *dev, u32 bank)
+{
+	int ret;
+	u32 ctrlreg1;
+
+	mutex_lock(&dev->lock);
+	dev->status = 0; /* Will be set in interrupt handler */
+
+	ctrlreg1 = readl(dev->io_base + SMI_CR1);
+	/* program smi in h/w mode */
+	writel(ctrlreg1 & ~SW_MODE, dev->io_base + SMI_CR1);
+
+	/* give the flash, write enable command */
+	writel((bank << BANK_SHIFT) | WE | TFIE, dev->io_base + SMI_CR2);
+
+	ret = wait_event_interruptible_timeout(dev->cmd_complete,
+			dev->status & TFF, SMI_CMD_TIMEOUT);
+
+	/* restore the ctrl regs state */
+	writel(ctrlreg1, dev->io_base + SMI_CR1);
+	writel(0, dev->io_base + SMI_CR2);
+
+	if (ret <= 0) {
+		ret = -EIO;
+		dev_err(&dev->pdev->dev,
+			"smi controller failed on write enable\n");
+	} else {
+		/* check whether write mode status is set for required bank */
+		if (dev->status & (1 << (bank + WM_SHIFT)))
+			ret = 0;
+		else {
+			dev_err(&dev->pdev->dev, "couldn't enable write\n");
+			ret = -EIO;
+		}
+	}
+
+	mutex_unlock(&dev->lock);
+	return ret;
+}
+
+static inline u32
+get_sector_erase_cmd(struct spear_snor_flash *flash, u32 offset)
+{
+	u32 cmd;
+	u8 *x = (u8 *)&cmd;
+
+	x[0] = flash->erase_cmd;
+	x[1] = offset >> 16;
+	x[2] = offset >> 8;
+	x[3] = offset;
+
+	return cmd;
+}
+
+/**
+ * spear_smi_erase_sector - erase one sector of flash
+ * @dev: structure of SMI information
+ * @command: erase command to be send
+ * @bank: bank to which this command needs to be send
+ * @bytes: size of command
+ *
+ * Erase one sector of flash memory at offset ``offset'' which is any
+ * address within the sector which should be erased.
+ * Returns 0 if successful, non-zero otherwise.
+ */
+static int spear_smi_erase_sector(struct spear_smi *dev,
+		u32 bank, u32 command, u32 bytes)
+{
+	u32 ctrlreg1 = 0;
+	int ret;
+
+	ret = spear_smi_wait_till_ready(dev, bank, SMI_MAX_TIME_OUT);
+	if (ret)
+		return ret;
+
+	ret = spear_smi_write_enable(dev, bank);
+	if (ret)
+		return ret;
+
+	mutex_lock(&dev->lock);
+
+	ctrlreg1 = readl(dev->io_base + SMI_CR1);
+	writel((ctrlreg1 | SW_MODE) & ~WB_MODE, dev->io_base + SMI_CR1);
+
+	/* send command in sw mode */
+	writel(command, dev->io_base + SMI_TR);
+
+	writel((bank << BANK_SHIFT) | SEND | TFIE | (bytes << TX_LEN_SHIFT),
+			dev->io_base + SMI_CR2);
+
+	ret = wait_event_interruptible_timeout(dev->cmd_complete,
+			dev->status & TFF, SMI_CMD_TIMEOUT);
+
+	if (ret <= 0) {
+		ret = -EIO;
+		dev_err(&dev->pdev->dev, "sector erase failed\n");
+	} else
+		ret = 0; /* success */
+
+	/* restore ctrl regs */
+	writel(ctrlreg1, dev->io_base + SMI_CR1);
+	writel(0, dev->io_base + SMI_CR2);
+
+	mutex_unlock(&dev->lock);
+	return ret;
+}
+
+/**
+ * spear_mtd_erase - perform flash erase operation as requested by user
+ * @mtd: Provides the memory characteristics
+ * @e_info: Provides the erase information
+ *
+ * Erase an address range on the flash chip. The address range may extend
+ * one or more erase sectors. Return an error is there is a problem erasing.
+ */
+static int spear_mtd_erase(struct mtd_info *mtd, struct erase_info *e_info)
+{
+	struct spear_snor_flash *flash = get_flash_data(mtd);
+	struct spear_smi *dev = mtd->priv;
+	u32 addr, command, bank;
+	int len, ret;
+
+	if (!flash || !dev)
+		return -ENODEV;
+
+	/* do not allow erase past end of device */
+	if (e_info->addr + e_info->len > flash->mtd.size)
+		return -EINVAL;
+
+	bank = flash->bank;
+	if (bank > dev->num_flashes - 1) {
+		dev_err(&dev->pdev->dev, "Invalid Bank Num");
+		return -EINVAL;
+	}
+
+	addr = e_info->addr;
+	len = e_info->len;
+
+	mutex_lock(&flash->lock);
+
+	/* now erase sectors in loop */
+	while (len) {
+		command = get_sector_erase_cmd(flash, addr);
+		/* preparing the command for flash */
+		ret = spear_smi_erase_sector(dev, bank, command, 4);
+		if (ret) {
+			e_info->state = MTD_ERASE_FAILED;
+			mutex_unlock(&flash->lock);
+			return ret;
+		}
+		addr += mtd->erasesize;
+		len -= mtd->erasesize;
+	}
+
+	mutex_unlock(&flash->lock);
+	e_info->state = MTD_ERASE_DONE;
+	mtd_erase_callback(e_info);
+
+	return 0;
+}
+
+/**
+ * spear_mtd_read - performs flash read operation as requested by the user
+ * @mtd: MTD information of the memory bank
+ * @from: Address from which to start read
+ * @len: Number of bytes to be read
+ * @retlen: Fills the Number of bytes actually read
+ * @buf: Fills this after reading
+ *
+ * Read an address range from the flash chip. The address range
+ * may be any size provided it is within the physical boundaries.
+ * Returns 0 on success, non zero otherwise
+ */
+static int spear_mtd_read(struct mtd_info *mtd, loff_t from, size_t len,
+		size_t *retlen, u8 *buf)
+{
+	struct spear_snor_flash *flash = get_flash_data(mtd);
+	struct spear_smi *dev = mtd->priv;
+	void *src;
+	u32 ctrlreg1, val;
+	int ret;
+
+	if (!len)
+		return 0;
+
+	if (!flash || !dev)
+		return -ENODEV;
+
+	/* do not allow reads past end of device */
+	if (from + len > flash->mtd.size)
+		return -EINVAL;
+
+	if (flash->bank > dev->num_flashes - 1) {
+		dev_err(&dev->pdev->dev, "Invalid Bank Num");
+		return -EINVAL;
+	}
+
+	if (!retlen)
+		return -EINVAL;
+	else
+		*retlen = 0;
+
+	/* select address as per bank number */
+	src = flash->base_addr + from;
+
+	mutex_lock(&flash->lock);
+
+	/* wait till previous write/erase is done. */
+	ret = spear_smi_wait_till_ready(dev, flash->bank, SMI_MAX_TIME_OUT);
+	if (ret) {
+		mutex_unlock(&flash->lock);
+		return ret;
+	}
+
+	mutex_lock(&dev->lock);
+	/* put smi in hw mode not wbt mode */
+	ctrlreg1 = val = readl(dev->io_base + SMI_CR1);
+	val &= ~(SW_MODE | WB_MODE);
+	if (flash->fast_mode)
+		val |= FAST_MODE;
+
+	writel(val, dev->io_base + SMI_CR1);
+
+	memcpy_fromio(buf, (u8 *)src, len);
+
+	/* restore ctrl reg1 */
+	writel(ctrlreg1, dev->io_base + SMI_CR1);
+	mutex_unlock(&dev->lock);
+
+	*retlen = len;
+	mutex_unlock(&flash->lock);
+
+	return 0;
+}
+
+static inline int spear_smi_cpy_toio(struct spear_smi *dev, u32 bank,
+		void *dest, const void *src, size_t len)
+{
+	int ret;
+	u32 ctrlreg1;
+
+	/* wait until finished previous write command. */
+	ret = spear_smi_wait_till_ready(dev, bank, SMI_MAX_TIME_OUT);
+	if (ret)
+		return ret;
+
+	/* put smi in write enable */
+	ret = spear_smi_write_enable(dev, bank);
+	if (ret)
+		return ret;
+
+	/* put smi in hw, write burst mode */
+	mutex_lock(&dev->lock);
+
+	ctrlreg1 = readl(dev->io_base + SMI_CR1);
+	writel((ctrlreg1 | WB_MODE) & ~SW_MODE, dev->io_base + SMI_CR1);
+
+	memcpy_toio(dest, src, len);
+
+	writel(ctrlreg1, dev->io_base + SMI_CR1);
+
+	mutex_unlock(&dev->lock);
+	return 0;
+}
+
+/**
+ * spear_mtd_write - performs write operation as requested by the user.
+ * @mtd: MTD information of the memory bank.
+ * @to:	Address to write.
+ * @len: Number of bytes to be written.
+ * @retlen: Number of bytes actually wrote.
+ * @buf: Buffer from which the data to be taken.
+ *
+ * Write an address range to the flash chip. Data must be written in
+ * flash_page_size chunks. The address range may be any size provided
+ * it is within the physical boundaries.
+ * Returns 0 on success, non zero otherwise
+ */
+static int spear_mtd_write(struct mtd_info *mtd, loff_t to, size_t len,
+		size_t *retlen, const u8 *buf)
+{
+	struct spear_snor_flash *flash = get_flash_data(mtd);
+	struct spear_smi *dev = mtd->priv;
+	void *dest;
+	u32 page_offset, page_size;
+	int ret;
+
+	if (!flash || !dev)
+		return -ENODEV;
+
+	if (!len)
+		return 0;
+
+	/* do not allow write past end of page */
+	if (to + len > flash->mtd.size)
+		return -EINVAL;
+
+	if (flash->bank > dev->num_flashes - 1) {
+		dev_err(&dev->pdev->dev, "Invalid Bank Num");
+		return -EINVAL;
+	}
+
+	if (!retlen)
+		return -EINVAL;
+	else
+		*retlen = 0;
+
+	/* select address as per bank number */
+	dest = flash->base_addr + to;
+	mutex_lock(&flash->lock);
+
+	page_offset = (u32)to % flash->page_size;
+
+	/* do if all the bytes fit onto one page */
+	if (page_offset + len <= flash->page_size) {
+		ret = spear_smi_cpy_toio(dev, flash->bank, dest, buf, len);
+		if (!ret)
+			*retlen += len;
+	} else {
+		u32 i;
+
+		/* the size of data remaining on the first page */
+		page_size = flash->page_size - page_offset;
+
+		ret = spear_smi_cpy_toio(dev, flash->bank, dest, buf,
+				page_size);
+		if (ret)
+			goto err_write;
+		else
+			*retlen += page_size;
+
+		/* write everything in pagesize chunks */
+		for (i = page_size; i < len; i += page_size) {
+			page_size = len - i;
+			if (page_size > flash->page_size)
+				page_size = flash->page_size;
+
+			ret = spear_smi_cpy_toio(dev, flash->bank, dest + i,
+					buf + i, page_size);
+			if (ret)
+				break;
+			else
+				*retlen += page_size;
+		}
+	}
+
+err_write:
+	mutex_unlock(&flash->lock);
+
+	return ret;
+}
+
+/**
+ * spear_smi_probe_flash - Detects the NOR Flash chip.
+ * @dev: structure of SMI information.
+ * @bank: bank on which flash must be probed
+ *
+ * This routine will check whether there exists a flash chip on a given memory
+ * bank ID.
+ * Return index of the probed flash in flash devices structure
+ */
+static int spear_smi_probe_flash(struct spear_smi *dev, u32 bank)
+{
+	int ret;
+	u32 val = 0;
+
+	ret = spear_smi_wait_till_ready(dev, bank, SMI_PROBE_TIMEOUT);
+	if (ret)
+		return ret;
+
+	mutex_lock(&dev->lock);
+
+	dev->status = 0; /* Will be set in interrupt handler */
+	/* put smi in sw mode */
+	val = readl(dev->io_base + SMI_CR1);
+	writel(val | SW_MODE, dev->io_base + SMI_CR1);
+
+	/* send readid command in sw mode */
+	writel(OPCODE_RDID, dev->io_base + SMI_TR);
+
+	val = (bank << BANK_SHIFT) | SEND | (1 << TX_LEN_SHIFT) |
+		(3 << RX_LEN_SHIFT) | TFIE;
+	writel(val, dev->io_base + SMI_CR2);
+
+	/* wait for TFF */
+	ret = wait_event_interruptible_timeout(dev->cmd_complete,
+			dev->status & TFF, SMI_CMD_TIMEOUT);
+	if (ret <= 0) {
+		ret = -ENODEV;
+		goto err_probe;
+	}
+
+	/* get memory chip id */
+	val = readl(dev->io_base + SMI_RR);
+	val &= 0x00ffffff;
+	ret = get_flash_index(val);
+
+err_probe:
+	/* clear sw mode */
+	val = readl(dev->io_base + SMI_CR1);
+	writel(val & ~SW_MODE, dev->io_base + SMI_CR1);
+
+	mutex_unlock(&dev->lock);
+	return ret;
+}
+
+static int spear_smi_setup_banks(struct platform_device *pdev, u32 bank)
+{
+	const char *part_probes[] = {"cmdlinepart", NULL};
+	struct spear_smi *dev = platform_get_drvdata(pdev);
+	struct spear_smi_flash_info *flash_info;
+	struct spear_smi_plat_data *pdata;
+	struct spear_snor_flash *flash;
+	int flash_index;
+	int ret = 0;
+
+	pdata = dev_get_platdata(&pdev->dev);
+	if (bank > pdata->num_flashes - 1)
+		return -EINVAL;
+
+	flash_info = &pdata->board_flash_info[bank];
+	if (!flash_info)
+		return -ENODEV;
+
+	flash = kzalloc(sizeof(*flash), GFP_ATOMIC);
+	if (!flash)
+		return -ENOMEM;
+	flash->bank = bank;
+	flash->fast_mode = flash_info->fast_mode ? 1 : 0;
+	mutex_init(&flash->lock);
+
+	/* verify whether nor flash is really present on board */
+	flash_index = spear_smi_probe_flash(dev, bank);
+	if (flash_index < 0) {
+		dev_info(&dev->pdev->dev, "smi-nor%d not found\n", bank);
+		kfree(flash);
+		return flash_index;
+	}
+	/* map the memory for nor flash chip */
+	flash->base_addr = ioremap(flash_info->mem_base, flash_info->size);
+	if (!flash->base_addr) {
+		kfree(flash);
+		return -EIO;
+	}
+
+	dev->flash[bank] = flash;
+	flash->mtd.priv = dev;
+
+	if (flash_info->name)
+		flash->mtd.name = flash_info->name;
+	else
+		flash->mtd.name = flash_devices[flash_index].name;
+
+	flash->mtd.type = MTD_NORFLASH;
+	flash->mtd.writesize = 1;
+	flash->mtd.flags = MTD_CAP_NORFLASH;
+	flash->mtd.size = flash_info->size;
+	flash->mtd.erasesize = flash_devices[flash_index].sectorsize;
+	flash->page_size = flash_devices[flash_index].pagesize;
+	flash->erase_cmd = flash_devices[flash_index].erase_cmd;
+	flash->mtd.erase = spear_mtd_erase;
+	flash->mtd.read = spear_mtd_read;
+	flash->mtd.write = spear_mtd_write;
+	flash->dev_id = flash_devices[flash_index].device_id;
+
+	dev_info(&dev->pdev->dev, "mtd .name=%s .size=%llx(%lluM)\n",
+			flash->mtd.name, flash->mtd.size,
+			flash->mtd.size / (1024 * 1024));
+
+	dev_info(&dev->pdev->dev, ".erasesize = 0x%x(%uK)\n",
+			flash->mtd.erasesize, flash->mtd.erasesize / 1024);
+
+	if (!mtd_has_partitions()) {
+		ret = add_mtd_device(&flash->mtd);
+		return ret;
+	}
+
+	flash->num_parts = 0;
+	if (mtd_has_cmdlinepart()) {
+		flash->num_parts = parse_mtd_partitions(&flash->mtd,
+				part_probes, &flash->parts, 0);
+	}
+
+	if (flash->num_parts <= 0) {
+		if (flash_info->parts) {
+			flash->parts = flash_info->parts;
+			flash->num_parts = flash_info->num_parts;
+		} else {
+			/* choose from default ones */
+			switch (flash->mtd.size) {
+			case 0x800000:/* 8MB */
+				flash->parts = part_info_8M;
+				flash->num_parts =
+					ARRAY_SIZE(part_info_8M);
+				break;
+			case 0x1000000:/* 16MB */
+				flash->parts = part_info_16M;
+				flash->num_parts =
+					ARRAY_SIZE(part_info_16M);
+				break;
+			default:
+				dev_err(&pdev->dev, "undefined partition\n");
+			}
+		}
+	}
+
+	/* Register the partitions */
+	ret = add_mtd_partitions(&flash->mtd, flash->parts, flash->num_parts);
+	if (ret)
+		dev_err(&dev->pdev->dev, "Err MTD partition=%d\n", ret);
+
+	return ret;
+}
+
+/**
+ * spear_smi_probe - Entry routine
+ * @pdev: platform device structure
+ *
+ * This is the first routine which gets invoked during booting and does all
+ * initialization/allocation work. The routine looks for available memory banks,
+ * and do proper init for any found one.
+ * Returns 0 on success, non zero otherwise
+ */
+static int __devinit spear_smi_probe(struct platform_device *pdev)
+{
+	struct spear_smi_plat_data *pdata;
+	struct spear_smi *dev;
+	struct resource *smi_base;
+	int irq, ret = 0;
+	int i;
+
+	pdata = dev_get_platdata(&pdev->dev);
+	if (pdata < 0) {
+		ret = -ENODEV;
+		dev_err(&pdev->dev, "no platform data\n");
+		goto err;
+	}
+
+	smi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	if (!smi_base) {
+		ret = -ENODEV;
+		dev_err(&pdev->dev, "invalid smi base address\n");
+		goto err;
+	}
+
+	irq = platform_get_irq(pdev, 0);
+	if (irq < 0) {
+		ret = -ENODEV;
+		dev_err(&pdev->dev, "invalid smi irq\n");
+		goto err;
+	}
+
+	dev = kzalloc(sizeof(*dev), GFP_ATOMIC);
+	if (!dev) {
+		ret = -ENOMEM;
+		dev_err(&pdev->dev, "mem alloc fail\n");
+		goto err;
+	}
+
+	smi_base = request_mem_region(smi_base->start, resource_size(smi_base),
+			pdev->name);
+	if (!smi_base) {
+		ret = -EBUSY;
+		dev_err(&pdev->dev, "request mem region fail\n");
+		goto err_mem;
+	}
+
+	dev->io_base = ioremap(smi_base->start, resource_size(smi_base));
+	if (!dev->io_base) {
+		ret = -EIO;
+		dev_err(&pdev->dev, "ioremap fail\n");
+		goto err_ioremap;
+	}
+
+	dev->pdev = pdev;
+	dev->clk_rate = pdata->clk_rate;
+
+	if (dev->clk_rate < 0 || dev->clk_rate > SMI_MAX_CLOCK_FREQ)
+		dev->clk_rate = SMI_MAX_CLOCK_FREQ;
+
+	dev->num_flashes = pdata->num_flashes;
+
+	if (dev->num_flashes > MAX_NUM_FLASH_CHIP) {
+		dev_err(&pdev->dev, "exceeding max number of flashes\n");
+		dev->num_flashes = MAX_NUM_FLASH_CHIP;
+	}
+
+	dev->clk = clk_get(&pdev->dev, NULL);
+	if (IS_ERR(dev->clk)) {
+		ret = PTR_ERR(dev->clk);
+		goto err_clk;
+	}
+
+	ret = clk_enable(dev->clk);
+	if (ret)
+		goto err_clk_enable;
+
+	ret = request_irq(irq, spear_smi_int_handler, 0, pdev->name, dev);
+	if (ret) {
+		dev_err(&dev->pdev->dev, "SMI IRQ allocation failed\n");
+		goto err_irq;
+	}
+
+	mutex_init(&dev->lock);
+	init_waitqueue_head(&dev->cmd_complete);
+	spear_smi_hw_init(dev);
+	platform_set_drvdata(pdev, dev);
+
+	/* loop for each serial nor-flash which is connected to smi */
+	for (i = 0; i < dev->num_flashes; i++) {
+		ret = spear_smi_setup_banks(pdev, i);
+		if (ret) {
+			dev_err(&dev->pdev->dev, "bank setup failed\n");
+			goto err_bank_setup;
+		}
+	}
+
+	return 0;
+
+err_bank_setup:
+	free_irq(irq, dev);
+	platform_set_drvdata(pdev, NULL);
+err_irq:
+	clk_disable(dev->clk);
+err_clk_enable:
+	clk_put(dev->clk);
+err_clk:
+	iounmap(dev->io_base);
+err_ioremap:
+	release_mem_region(smi_base->start, resource_size(smi_base));
+err_mem:
+	kfree(dev);
+err:
+	return ret;
+}
+
+/**
+ * spear_smi_remove - Exit routine
+ * @pdev: platform device structure
+ *
+ * free all allocations and delete the partitions.
+ */
+static int __devexit spear_smi_remove(struct platform_device *pdev)
+{
+	struct spear_smi *dev;
+	struct spear_snor_flash *flash;
+	int ret;
+	int i, irq;
+
+	dev = platform_get_drvdata(pdev);
+	if (!dev) {
+		dev_err(&pdev->dev, "dev is null\n");
+		return -ENODEV;
+	}
+
+	/* clean up for all nor flash */
+	for (i = 0; i < dev->num_flashes; i++) {
+		flash = dev->flash[i];
+		if (!flash)
+			continue;
+
+		/* clean up mtd stuff */
+		if (mtd_has_partitions())
+			ret = del_mtd_partitions(&flash->mtd);
+		else
+			ret = del_mtd_device(&flash->mtd);
+
+		if (ret)
+			dev_err(&pdev->dev, "error removing mtd\n");
+
+		iounmap(flash->base_addr);
+		kfree(flash);
+	}
+
+	irq = platform_get_irq(pdev, 0);
+	free_irq(irq, dev);
+
+	clk_disable(dev->clk);
+	clk_put(dev->clk);
+	iounmap(dev->io_base);
+	kfree(dev);
+	platform_set_drvdata(pdev, NULL);
+
+	return 0;
+}
+
+int spear_smi_suspend(struct platform_device *pdev, pm_message_t state)
+{
+	struct spear_smi *dev = platform_get_drvdata(pdev);
+
+	if (dev && dev->clk)
+		clk_disable(dev->clk);
+
+	return 0;
+}
+
+int spear_smi_resume(struct platform_device *pdev)
+{
+	struct spear_smi *dev = platform_get_drvdata(pdev);
+	int ret = -EPERM;
+
+	if (dev && dev->clk)
+		ret = clk_enable(dev->clk);
+
+	return ret;
+}
+
+static struct platform_driver spear_smi_driver = {
+	.driver = {
+		.name = "smi",
+		.bus = &platform_bus_type,
+		.owner = THIS_MODULE,
+	},
+	.probe = spear_smi_probe,
+	.remove = __devexit_p(spear_smi_remove),
+	.suspend = spear_smi_suspend,
+	.resume = spear_smi_resume,
+};
+
+static int spear_smi_init(void)
+{
+	return platform_driver_register(&spear_smi_driver);
+}
+module_init(spear_smi_init);
+
+static void spear_smi_exit(void)
+{
+	platform_driver_unregister(&spear_smi_driver);
+}
+module_exit(spear_smi_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Ashish Priyadarshi, Shiraz Hashim <shiraz.hashim at st.com>");
+MODULE_DESCRIPTION("MTD SMI driver for serial nor flash chips");
-- 
1.7.2.2



From bjorn.forsman at gmail.com  Tue Nov  9 04:15:40 2010
From: bjorn.forsman at gmail.com (=?UTF-8?Q?Bj=C3=B8rn_Forsman?=)
Date: Tue, 9 Nov 2010 10:15:40 +0100
Subject: [Openpxa-users] PXA310: double bit errors on NAND
In-Reply-To: <201011082318.21748.pieterg@gmx.com>
References: <AANLkTin86UQe8Q4PNqSnU7M0x4kVPUehcBRpS0HhHKRh@mail.gmail.com>
	<201011082318.21748.pieterg@gmx.com>
Message-ID: <AANLkTikJrAaR-Fh-yS+jDyTdPFeGAU16fW1R08dW3DBt@mail.gmail.com>

Hi Pieter,

Thanks for your reply. It's nice to know someone is out there :-)

2010/11/8 pieterg <pieterg at gmx.com>:
> On Monday, November 08, 2010 15:54:43 Bj?rn Forsman wrote:
>> I get "double bit error @ page" messages while working with NAND on a
>> Colibri PXA310 module. Basically, when I write an UBI image to NAND,
>> either with U-Boot "nand write" or "nandwrite" from mtd-utils,
>> everything is OK on the *first* mount. But on the second mount I get
>> several "double bit error @ page" messages and mount fails.
>
> You are not erase-block padding your image, when you write it?
> That's the mistake I made (with jffs2 in my case), in that openpxa-users
> thread you mention.
> As soon as I found out my image was eraseblock padded, and fixed that,
> the number of single/double bit errors was reduced dramatically,
> but some errors remained.

I've tried nandwrite with or without the --pad option. Is that the
padding you are referring to? Or is it the --blockalign option? How
exactly did you flash your rootfs?

> I haven't yet had the time to further investigate this, my preliminary
> conclusion is that the Samsung K9K's, though advertised as SLC,
> are very poor quality, and they probably need a better ecc than
> Hamming (as the pxa nand controller implements).
> And also that jffs2 seems to care less than ubi(fs) when double bit errors
> do happen.(ubifs often refused to even mount when biterrors occurred,
> jffs2 so far always continued with what remained)
> That's the reason why I'm using jffs2 for the time being, a non-booting
> device is worse than a device with a corrupted file.
> (from a theoretical point of view however both are equally bad of course,
> this issue does need to be resolved)

Thanks for the info. Note that I've had *zero* trouble with ubifs when
it's flashed with ubiformat and ubiupdatevol. I did some more googling
and found some other threads about the "ubiformat + ubiupdatevol works
but not direct UBI image flashing" issue. I'll take a closer look.

Best regards,
Bj?rn Forsman


From vapier.adi at gmail.com  Tue Nov  9 04:40:04 2010
From: vapier.adi at gmail.com (Mike Frysinger)
Date: Tue, 9 Nov 2010 04:40:04 -0500
Subject: Suggested patch: reset errno after isatty()
In-Reply-To: <AANLkTikQtNwsPkJSkmpmC=kMZpmdqHDW0HROeUBNDOEi@mail.gmail.com>
References: <AANLkTimwumfui-_T1ScDYwMLKbNh1ia-SDMUg56wTfN5@mail.gmail.com>
	<4CD11C03.3090207@parrot.com>
	<AANLkTimfxjrtV4eks5tK68h6TQ20soib+6gaTC+QyB4a@mail.gmail.com>
	<AANLkTinSj2vAJJjeSxF-rvq08OVsnw3YcpRSpuOfv9pQ@mail.gmail.com>
	<AANLkTikQtNwsPkJSkmpmC=kMZpmdqHDW0HROeUBNDOEi@mail.gmail.com>
Message-ID: <AANLkTikW9=FUvM9CeqABUdB098PMeC9s3+94V2Ae=LiL@mail.gmail.com>

On Sun, Nov 7, 2010 at 17:36, Ketil Froyn wrote:
> On Sat, Nov 6, 2010 at 9:54 AM, Mike Frysinger wrote:
>> doesnt libmtd provide read functions already ?
>
> I'm not familiar with libmtd, but the latest release (v1.4.1) just did
> it itself with pread, and since that failed I fixed it.
>
> The new code in the repo, which appears to use libmtd, didn't work for
> me, and the fix appeared more complicated. My patch is for v1.4.1,
> which should also make it easier to integrate for package maintainers,
> if they wish, pending a working rewrite.

the focus is on the master branch.  stable fixes should largely be
back ports, not a complete fork.
-mike


From vapier.adi at gmail.com  Tue Nov  9 04:48:53 2010
From: vapier.adi at gmail.com (Mike Frysinger)
Date: Tue, 9 Nov 2010 04:48:53 -0500
Subject: [PATCH 08/10] mtd-utils: nandwrite: prevent 32-bit overflow
In-Reply-To: <1288772847-8120-8-git-send-email-computersforpeace@gmail.com>
References: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
	<1288772847-8120-8-git-send-email-computersforpeace@gmail.com>
Message-ID: <AANLkTikCjW=P2ncq7E_4WLJtxzwPdaU4SWi1s-7Us7ZP@mail.gmail.com>

On Wed, Nov 3, 2010 at 04:27, Brian Norris wrote:
> For large block- and page-sizes, the multiplication of ebsize_aligned
> and pagelen can overflow a 32-bit integer. ?This overflow can be
> prevented by a simple change in order of operations (i.e., do division
> first).
>
> - ? ? ? filebuf_max = pagelen * ebsize_aligned / mtd.min_io_size;
> + ? ? ? filebuf_max = ebsize_aligned / mtd.min_io_size * pagelen;

i'd insert a comment noting that order of operations matters to avoid
32bit overflow so someone doesnt switch it back by accident in the
future
-mike


From vapier.adi at gmail.com  Tue Nov  9 04:51:36 2010
From: vapier.adi at gmail.com (Mike Frysinger)
Date: Tue, 9 Nov 2010 04:51:36 -0500
Subject: [PATCH 09/10] mtd-utils: nanddump: type consistency
In-Reply-To: <1288772847-8120-9-git-send-email-computersforpeace@gmail.com>
References: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
	<1288772847-8120-9-git-send-email-computersforpeace@gmail.com>
Message-ID: <AANLkTinGe84r8mo84HQVikPqQxLrKnwrXa20E_rfN=0f@mail.gmail.com>

On Wed, Nov 3, 2010 at 04:27, Brian Norris wrote:
> ?nandwrite.c | ? ?6 +++---

the subject says "nanddump" ...

> --- a/nandwrite.c
> +++ b/nandwrite.c
> @@ -262,7 +262,7 @@ int main(int argc, char * const argv[])
> ? ? ? ?long long blockstart = -1;
> ? ? ? ?struct mtd_dev_info mtd;
> ? ? ? ?struct mtd_oob_buf oob;
> - ? ? ? loff_t offs;
> + ? ? ? long long offs;
> ? ? ? ?int ret;
> ? ? ? ?int oobinfochanged = 0;
> ? ? ? ?struct nand_oobinfo old_oobinfo;

i dont think this is quite right.  "offs" is given to an ioctl which
takes __kernel_loff_t ... we shouldnt assume "long long" and
"__kernel_loff_t" are always the same.
-mike


From vapier.adi at gmail.com  Tue Nov  9 04:54:16 2010
From: vapier.adi at gmail.com (Mike Frysinger)
Date: Tue, 9 Nov 2010 04:54:16 -0500
Subject: [PATCH 01/10] mtd-utils: nanddump: Allow 64-bit lengths
In-Reply-To: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
References: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
Message-ID: <AANLkTi=KYdoM1cWouFAhPdyFWJn-RL2m51i=g=3higu8@mail.gmail.com>

most of these changes look sane ... i commented on the ones that i
think need tweaking, but for the rest, Acked-by: Mike Frysinger
<vapier at gentoo.org>
-mike


From pieterg at gmx.com  Tue Nov  9 04:58:03 2010
From: pieterg at gmx.com (pieterg)
Date: Tue, 9 Nov 2010 10:58:03 +0100
Subject: [Openpxa-users] PXA310: double bit errors on NAND
In-Reply-To: <AANLkTikJrAaR-Fh-yS+jDyTdPFeGAU16fW1R08dW3DBt@mail.gmail.com>
References: <AANLkTin86UQe8Q4PNqSnU7M0x4kVPUehcBRpS0HhHKRh@mail.gmail.com>
	<201011082318.21748.pieterg@gmx.com>
	<AANLkTikJrAaR-Fh-yS+jDyTdPFeGAU16fW1R08dW3DBt@mail.gmail.com>
Message-ID: <201011091058.04193.pieterg@gmx.com>

On Tuesday, November 09, 2010 10:15:40 Bj?rn Forsman wrote:
> I've tried nandwrite with or without the --pad option. Is that the
> padding you are referring to? Or is it the --blockalign option? How
> exactly did you flash your rootfs?

nandwrite -p pads to pagesize, which is ok.
But I was using a --pad=0x800 (=pagesize) option for mkfs.jffs2 instead, 
which somehow resulted in eraseblock padding.

> Thanks for the info. Note that I've had *zero* trouble with ubifs when
> it's flashed with ubiformat and ubiupdatevol. I did some more googling
> and found some other threads about the "ubiformat + ubiupdatevol works
> but not direct UBI image flashing" issue. I'll take a closer look.

Interesting. In that case I might give that a try as well, as jffs2 is still
far from perfect, even with correct pagesize padding.

I've added a single bit debug message in the nand driver by the way,
which shows a lot of lucky escapes, before the first double bit error
eventually occurs. Which seems inevitable, as the driver takes
no action (such as refreshing a page) when single bit errors occur.

Rgds, Pieter


From dedekind1 at gmail.com  Tue Nov  9 07:20:56 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Tue, 09 Nov 2010 14:20:56 +0200
Subject: [PATCH 08/10] mtd-utils: nandwrite: prevent 32-bit overflow
In-Reply-To: <1288772847-8120-8-git-send-email-computersforpeace@gmail.com>
References: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
	<1288772847-8120-8-git-send-email-computersforpeace@gmail.com>
Message-ID: <1289305256.2283.2.camel@localhost>

On Wed, 2010-11-03 at 01:27 -0700, Brian Norris wrote:
> For large block- and page-sizes, the multiplication of ebsize_aligned
> and pagelen can overflow a 32-bit integer.  This overflow can be
> prevented by a simple change in order of operations (i.e., do division
> first).
> 
> Since ebsize_aligned is always a multiple of mtd.min_io_size, this
> produces no change in results.
> 
> Signed-off-by: Brian Norris <computersforpeace at gmail.com>

Brian, increasingly have less and less time for mtd, but I remember
about your patches - I'll pick them as soon as I have some time. You can
meanwhile address Mikes comments.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From cabinetdumaitrecharbel at yahoo.fr  Tue Nov  9 08:44:00 2010
From: cabinetdumaitrecharbel at yahoo.fr (Direction Generale)
Date: Tue, 09 Nov 2010 13:44:00 +0000
Subject: VOTRE E-MAIL EST GAGNANT
Message-ID: <20101109134400.39727068emd0cvsw@webmail.zcp.bf>



CHER(E) INTERNAUTE(S) Vous venez de gagner 80.000? par une s?lection  
al?atoire d'?mail qu'a organis? la SOCI?T? HEINEKEN SAS (HE SAS) .Pour  
mieux comprendre et r?clamer votre gain, pri?re envoyer votre nom,  
pr?nom, sexe,profession, pays, date et lieu de naissance au Notaire  
CHARBEL FERNOS ? l'adresse ?mail suivante :  
cabinetdumaitrecharbel at yahoo.fr
MERCI ET F?LICITATIONS!!!









----------------------------------------------------------------
Ce message est envoye depuis partir du webmail de ZCP Informatique



From computersforpeace at gmail.com  Tue Nov  9 13:19:40 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Tue, 09 Nov 2010 10:19:40 -0800
Subject: [PATCH 09/10] mtd-utils: nanddump: type consistency
In-Reply-To: <AANLkTinGe84r8mo84HQVikPqQxLrKnwrXa20E_rfN=0f@mail.gmail.com>
References: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
	<1288772847-8120-9-git-send-email-computersforpeace@gmail.com>
	<AANLkTinGe84r8mo84HQVikPqQxLrKnwrXa20E_rfN=0f@mail.gmail.com>
Message-ID: <4CD990BC.6040800@gmail.com>

On 11/9/2010 1:51 AM, Mike Frysinger wrote:
> On Wed, Nov 3, 2010 at 04:27, Brian Norris wrote:
>>  nandwrite.c |    6 +++---
> 
> the subject says "nanddump" ...

Oops, I'll change that if I send a "v2".

>> --- a/nandwrite.c
>> +++ b/nandwrite.c
>> @@ -262,7 +262,7 @@ int main(int argc, char * const argv[])
>>        long long blockstart = -1;
>>        struct mtd_dev_info mtd;
>>        struct mtd_oob_buf oob;
>> -       loff_t offs;
>> +       long long offs;
>>        int ret;
>>        int oobinfochanged = 0;
>>        struct nand_oobinfo old_oobinfo;
> 
> i dont think this is quite right.  "offs" is given to an ioctl which
> takes __kernel_loff_t ... we shouldnt assume "long long" and
> "__kernel_loff_t" are always the same.

This problem is sort of a "which comes first" question for me: I put
this patch before patch 10, where in patch 10, the ioctl in question is
replaced with an entirely different call to "mtd_is_bad".

In the new usage (patch 10), "mtd_is_bad" needs the eraseblock number as
an int, so there's some arithmetic going on ("offs" divided by ebsize)
that passes an int to "mtd_is_bad".

I was just trying to unify the usage of different 64-bit data types, and
after patch 10, there's no need to be using the "loff_t" type. However,
if it makes more sense, I can rearrange patch 9 and 10 such that the
type change comes after the ioctl is no longer called directly.

Thanks,
Brian


From vapier.adi at gmail.com  Tue Nov  9 19:00:43 2010
From: vapier.adi at gmail.com (Mike Frysinger)
Date: Tue, 9 Nov 2010 19:00:43 -0500
Subject: [PATCH 09/10] mtd-utils: nanddump: type consistency
In-Reply-To: <4CD990BC.6040800@gmail.com>
References: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
	<1288772847-8120-9-git-send-email-computersforpeace@gmail.com>
	<AANLkTinGe84r8mo84HQVikPqQxLrKnwrXa20E_rfN=0f@mail.gmail.com>
	<4CD990BC.6040800@gmail.com>
Message-ID: <AANLkTimUr8Dvmz7=Owk9dEgWt7hdTFFT+NDXczWd9DfV@mail.gmail.com>

On Tue, Nov 9, 2010 at 13:19, Brian Norris wrote:
> On 11/9/2010 1:51 AM, Mike Frysinger wrote:
>> On Wed, Nov 3, 2010 at 04:27, Brian Norris wrote:
>>> --- a/nandwrite.c
>>> +++ b/nandwrite.c
>>> @@ -262,7 +262,7 @@ int main(int argc, char * const argv[])
>>> ? ? ? ?long long blockstart = -1;
>>> ? ? ? ?struct mtd_dev_info mtd;
>>> ? ? ? ?struct mtd_oob_buf oob;
>>> - ? ? ? loff_t offs;
>>> + ? ? ? long long offs;
>>> ? ? ? ?int ret;
>>> ? ? ? ?int oobinfochanged = 0;
>>> ? ? ? ?struct nand_oobinfo old_oobinfo;
>>
>> i dont think this is quite right. ?"offs" is given to an ioctl which
>> takes __kernel_loff_t ... we shouldnt assume "long long" and
>> "__kernel_loff_t" are always the same.
>
> This problem is sort of a "which comes first" question for me: I put
> this patch before patch 10, where in patch 10, the ioctl in question is
> replaced with an entirely different call to "mtd_is_bad".
>
> In the new usage (patch 10), "mtd_is_bad" needs the eraseblock number as
> an int, so there's some arithmetic going on ("offs" divided by ebsize)
> that passes an int to "mtd_is_bad".
>
> I was just trying to unify the usage of different 64-bit data types, and
> after patch 10, there's no need to be using the "loff_t" type. However,
> if it makes more sense, I can rearrange patch 9 and 10 such that the
> type change comes after the ioctl is no longer called directly.

i'd leave the type unchanged when using the ioctl() and change it only
when moving to a different API
-mike


From Frank.Li at freescale.com  Wed Nov 10 05:52:29 2010
From: Frank.Li at freescale.com (Frank Li)
Date: Wed, 10 Nov 2010 18:52:29 +0800
Subject: [PATCH 1/1] [MTD]:CORE Fix wrong check register_blkdev return value
Message-ID: <1289386349-29033-1-git-send-email-Frank.Li@freescale.com>

register_blkdev return 1..255 when major = 0.

if (ret ) {
	printk(KERN_WARNING "Unable to register %s block device on major %d: %d\n",
		tr->name, tr->major, ret);
	      mutex_unlock(&mtd_table_mutex);
	return ret;
}

Above code will return fail when register_blkdev return allocated major number.

Signed-off-by: Frank Li <Frank.Li at freescale.com>
---
 drivers/mtd/mtd_blkdevs.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index a919587..63790e9 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
@@ -502,13 +502,16 @@ int register_mtd_blktrans(struct mtd_blktrans_ops *tr)
 	mutex_lock(&mtd_table_mutex);
 
 	ret = register_blkdev(tr->major, tr->name);
-	if (ret) {
+	if (ret < 0) {
 		printk(KERN_WARNING "Unable to register %s block device on major %d: %d\n",
 		       tr->name, tr->major, ret);
 		mutex_unlock(&mtd_table_mutex);
 		return ret;
 	}
 
+	if (ret)
+		tr->major = ret;
+
 	tr->blkshift = ffs(tr->blksize) - 1;
 
 	INIT_LIST_HEAD(&tr->devs);
-- 
1.7.1




From computersforpeace at gmail.com  Thu Nov 11 01:31:41 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Wed, 10 Nov 2010 22:31:41 -0800
Subject: [PATCH v2 08/10] mtd-utils: nandwrite: prevent 32-bit overflow
In-Reply-To: <AANLkTikCjW=P2ncq7E_4WLJtxzwPdaU4SWi1s-7Us7ZP@mail.gmail.com>
References: <AANLkTikCjW=P2ncq7E_4WLJtxzwPdaU4SWi1s-7Us7ZP@mail.gmail.com>
Message-ID: <1289457101-24040-1-git-send-email-computersforpeace@gmail.com>

For large block- and page-sizes, the multiplication of ebsize_aligned
and pagelen can overflow a 32-bit integer.  This overflow can be
prevented by a simple change in order of operations (i.e., do division
first).

Since ebsize_aligned is always a multiple of mtd.min_io_size, this
produces no change in results.

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 nandwrite.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/nandwrite.c b/nandwrite.c
index 8ec5afe..aea7572 100644
--- a/nandwrite.c
+++ b/nandwrite.c
@@ -440,8 +440,13 @@ int main(int argc, char * const argv[])
 		goto closeall;
 	}
 
-	// Allocate a buffer big enough to contain all the data (OOB included) for one eraseblock
-	filebuf_max = pagelen * ebsize_aligned / mtd.min_io_size;
+	/*
+	 * Allocate a buffer big enough to contain all the data (OOB included)
+	 * for one eraseblock. The order of operations here matters; if ebsize
+	 * and pagelen are large enough, then "ebsize_aligned * pagelen" could
+	 * overflow a 32-bit data type.
+	 */
+	filebuf_max = ebsize_aligned / mtd.min_io_size * pagelen;
 	filebuf = xmalloc(filebuf_max);
 	erase_buffer(filebuf, filebuf_max);
 
-- 
1.7.0.4




From computersforpeace at gmail.com  Thu Nov 11 01:39:13 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Wed, 10 Nov 2010 22:39:13 -0800
Subject: [PATCH v2 09/10] mtd-utils: nandwrite: full 64-bit support w/ libmtd
In-Reply-To: <AANLkTimUr8Dvmz7=Owk9dEgWt7hdTFFT+NDXczWd9DfV@mail.gmail.com>
References: <AANLkTimUr8Dvmz7=Owk9dEgWt7hdTFFT+NDXczWd9DfV@mail.gmail.com>
Message-ID: <1289457554-24155-1-git-send-email-computersforpeace@gmail.com>

Several ioctls are replaced with libmtd calls which should give us 64-bit
support for large devices. libmtd mostly provides drop-in replacements
for the functionality we need. However, when we require erasure of a
badly-written block, mtd_erase() only erases a single block, whereas
MEMERASE could erase a larger region. In nandwrite, we may have a "virtual
blocksize" of more than one (when blockalign > 1). Thus, I added a loop
for this case.

The mtd_oob_buf struct is no longer needed, nor is "erase_info_t".

Error messages for the new libmtd calls reflect the style found in
flash_erase.

Tested with nandsim and with NAND chips up to 4GB in size (I don't have
a device that truly requires 64-bit addressing yet).

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 nandwrite.c |   49 +++++++++++++++++++++++--------------------------
 1 files changed, 23 insertions(+), 26 deletions(-)

diff --git a/nandwrite.c b/nandwrite.c
index aea7572..00e7c28 100644
--- a/nandwrite.c
+++ b/nandwrite.c
@@ -261,7 +261,6 @@ int main(int argc, char * const argv[])
 	bool baderaseblock = false;
 	long long blockstart = -1;
 	struct mtd_dev_info mtd;
-	struct mtd_oob_buf oob;
 	loff_t offs;
 	int ret;
 	int oobinfochanged = 0;
@@ -390,8 +389,6 @@ int main(int argc, char * const argv[])
 		}
 	}
 
-	oob.length = mtd.oob_size;
-
 	/* Determine if we are reading from standard input or from a file. */
 	if (strcmp(img, standard_input) == 0) {
 		ifd = STDIN_FILENO;
@@ -491,8 +488,8 @@ int main(int argc, char * const argv[])
 			if (noskipbad)
 				continue;
 			do {
-				if ((ret = ioctl(fd, MEMGETBADBLOCK, &offs)) < 0) {
-					perror("ioctl(MEMGETBADBLOCK)");
+				if ((ret = mtd_is_bad(&mtd, fd, offs / ebsize_aligned)) < 0) {
+					sys_errmsg("%s: MTD get bad block failed", mtd_device);
 					goto closeall;
 				} else if (ret == 1) {
 					baderaseblock = true;
@@ -631,43 +628,43 @@ int main(int argc, char * const argv[])
 				}
 			}
 			/* Write OOB data first, as ecc will be placed in there */
-			oob.start = mtdoffset;
-			oob.ptr = noecc ? oobreadbuf : oobbuf;
-			if (ioctl(fd, MEMWRITEOOB, &oob) != 0) {
-				perror("ioctl(MEMWRITEOOB)");
+			if (mtd_write_oob(mtd_desc, &mtd, fd, mtdoffset,
+						mtd.oob_size,
+						noecc ? oobreadbuf : oobbuf)) {
+				sys_errmsg("%s: MTD writeoob failure", mtd_device);
 				goto closeall;
 			}
 		}
 
 		/* Write out the Page data */
-		if (pwrite(fd, writebuf, mtd.min_io_size, mtdoffset) != mtd.min_io_size) {
-			erase_info_t erase;
-
+		if (mtd_write(&mtd, fd, mtdoffset / mtd.eb_size, mtdoffset % mtd.eb_size,
+					writebuf, mtd.min_io_size)) {
+			int i;
 			if (errno != EIO) {
-				perror("pwrite");
+				sys_errmsg("%s: MTD write failure", mtd_device);
 				goto closeall;
 			}
 
 			/* Must rewind to blockstart if we can */
 			writebuf = filebuf;
 
-			erase.start = blockstart;
-			erase.length = ebsize_aligned;
-			fprintf(stderr, "Erasing failed write from %08lx-%08lx\n",
-				(long)erase.start, (long)erase.start+erase.length-1);
-			if (ioctl(fd, MEMERASE, &erase) != 0) {
-				int errno_tmp = errno;
-				perror("MEMERASE");
-				if (errno_tmp != EIO) {
-					goto closeall;
+			fprintf(stderr, "Erasing failed write from %#08llx to %#08llx\n",
+				blockstart, blockstart + ebsize_aligned - 1);
+			for (i = blockstart; i < blockstart + ebsize_aligned; i += mtd.eb_size) {
+				if (mtd_erase(mtd_desc, &mtd, fd, mtd.eb_size)) {
+					int errno_tmp = errno;
+					sys_errmsg("%s: MTD Erase failure", mtd_device);
+					if (errno_tmp != EIO) {
+						goto closeall;
+					}
 				}
 			}
 
 			if (markbad) {
-				loff_t bad_addr = mtdoffset & (~mtd.eb_size + 1);
-				fprintf(stderr, "Marking block at %08lx bad\n", (long)bad_addr);
-				if (ioctl(fd, MEMSETBADBLOCK, &bad_addr)) {
-					perror("MEMSETBADBLOCK");
+				fprintf(stderr, "Marking block at %08llx bad\n",
+						mtdoffset & (~mtd.eb_size + 1));
+				if (mtd_mark_bad(&mtd, fd, mtdoffset / mtd.eb_size)) {
+					sys_errmsg("%s: MTD Mark bad block failure", mtd_device);
 					goto closeall;
 				}
 			}
-- 
1.7.0.4




From computersforpeace at gmail.com  Thu Nov 11 01:39:14 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Wed, 10 Nov 2010 22:39:14 -0800
Subject: [PATCH v2 10/10] mtd-utils: nandwrite: type consistency
In-Reply-To: <AANLkTimUr8Dvmz7=Owk9dEgWt7hdTFFT+NDXczWd9DfV@mail.gmail.com>
References: <AANLkTimUr8Dvmz7=Owk9dEgWt7hdTFFT+NDXczWd9DfV@mail.gmail.com>
Message-ID: <1289457554-24155-2-git-send-email-computersforpeace@gmail.com>

Change type off "offs" for type consistency of 64-bit data types. The
"loff_t" type is no longer needed for the MEMGETBADBLOCK ioctl since
it isn't called dirently anymore - this is handled by mtd_is_bad().

Also change an accompanying printf().

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 nandwrite.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/nandwrite.c b/nandwrite.c
index 00e7c28..bbe69b0 100644
--- a/nandwrite.c
+++ b/nandwrite.c
@@ -261,7 +261,7 @@ int main(int argc, char * const argv[])
 	bool baderaseblock = false;
 	long long blockstart = -1;
 	struct mtd_dev_info mtd;
-	loff_t offs;
+	long long offs;
 	int ret;
 	int oobinfochanged = 0;
 	struct nand_oobinfo old_oobinfo;
@@ -494,9 +494,9 @@ int main(int argc, char * const argv[])
 				} else if (ret == 1) {
 					baderaseblock = true;
 					if (!quiet)
-						fprintf(stderr, "Bad block at %x, %u block(s) "
+						fprintf(stderr, "Bad block at %llx, %u block(s) "
 								"from %llx will be skipped\n",
-								(int) offs, blockalign, blockstart);
+								offs, blockalign, blockstart);
 				}
 
 				if (baderaseblock) {
-- 
1.7.0.4




From savinay.dharmappa at ti.com  Thu Nov 11 02:55:53 2010
From: savinay.dharmappa at ti.com (Savinay Dharmappa)
Date: Thu, 11 Nov 2010 13:25:53 +0530
Subject: [PATCH 1/2] mtd: NOR flash driver for OMAP-L137/AM17x
Message-ID: <1289462153-4350-1-git-send-email-savinay.dharmappa@ti.com>

From: David Griego <dgriego at mvista.com>

OMAP-L137/AM17x has limited number of dedicated EMIFA
address pins, enough to interface directly to an SDRAM.
If a device such as an asynchronous flash needs to be
attached to the EMIFA, then either GPIO pins or a chip
select may be used to control the flash device's upper
address lines.

This patch adds support for the NOR flash on the OMAP-L137/
AM17x user interface daughter board using the latch-addr-flash
MTD mapping driver which allows flashes to be partially
physically addressed. The upper address lines are set by
a board specific code which is a separate patch.

Signed-off-by: David Griego <dgriego at mvista.com>
Signed-off-by: Savinay Dharmappa <savinay.dharmappa at ti.com>
---
 drivers/mtd/maps/Kconfig             |    9 +
 drivers/mtd/maps/Makefile            |    1 +
 drivers/mtd/maps/latch-addr-flash.c  |  271 ++++++++++++++++++++++++++++++++++
 include/linux/mtd/latch-addr-flash.h |   29 ++++
 4 files changed, 310 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mtd/maps/latch-addr-flash.c
 create mode 100644 include/linux/mtd/latch-addr-flash.h

diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index 701d942..b794ea2 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -543,4 +543,13 @@ config MTD_PISMO
 
 	  When built as a module, it will be called pismo.ko
 
+config MTD_LATCH_ADDR
+        tristate "Latch-assisted Flash Chip Support"
+        depends on MTD_COMPLEX_MAPPINGS
+        help
+          Map driver which allows flashes to be partially physically addressed
+          and have the upper address lines set by a board specific code.
+
+          If compiled as a module, it will be called latch-addr-flash.
+
 endmenu
diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile
index f216bb5..35c3573 100644
--- a/drivers/mtd/maps/Makefile
+++ b/drivers/mtd/maps/Makefile
@@ -58,3 +58,4 @@ obj-$(CONFIG_MTD_BFIN_ASYNC)	+= bfin-async-flash.o
 obj-$(CONFIG_MTD_RBTX4939)	+= rbtx4939-flash.o
 obj-$(CONFIG_MTD_VMU)		+= vmu-flash.o
 obj-$(CONFIG_MTD_GPIO_ADDR)	+= gpio-addr-flash.o
+obj-$(CONFIG_MTD_LATCH_ADDR)	+= latch-addr-flash.o
diff --git a/drivers/mtd/maps/latch-addr-flash.c b/drivers/mtd/maps/latch-addr-flash.c
new file mode 100644
index 0000000..e3a7f91
--- /dev/null
+++ b/drivers/mtd/maps/latch-addr-flash.c
@@ -0,0 +1,271 @@
+/*
+ * Interface for NOR flash driver whose high address lines are latched
+ *
+ * Copyright 2000 Nicolas Pitre <nico at cam.org>
+ * Copyright 2005-2008 Analog Devices Inc.
+ * Coyright (C) 2008 MontaVista Software, Inc. <source at mvista.com>
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#include <linux/mtd/partitions.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/latch-addr-flash.h>
+#include <linux/slab.h>
+
+#define DRIVER_NAME "latch-addr-flash"
+
+struct latch_addr_flash_info {
+	struct mtd_info		*mtd;
+	struct map_info		map;
+	struct resource		*res;
+
+	void			(*set_window)(unsigned long offset, void *data);
+	void			*data;
+
+	/* cache; could be found out of res */
+	unsigned long		win_mask;
+
+	int			nr_parts;
+	struct mtd_partition	*parts;
+
+	spinlock_t		lock;
+};
+
+static map_word lf_read(struct map_info *map, unsigned long ofs)
+{
+	struct latch_addr_flash_info *info;
+	map_word datum;
+
+	info = (struct latch_addr_flash_info *)map->map_priv_1;
+
+	spin_lock(&info->lock);
+
+	info->set_window(ofs, info->data);
+	datum = inline_map_read(map, info->win_mask & ofs);
+
+	spin_unlock(&info->lock);
+
+	return datum;
+}
+
+static void lf_write(struct map_info *map, map_word datum, unsigned long ofs)
+{
+	struct latch_addr_flash_info *info;
+
+	info = (struct latch_addr_flash_info *)map->map_priv_1;
+
+	spin_lock(&info->lock);
+
+	info->set_window(ofs, info->data);
+	inline_map_write(map, datum, info->win_mask & ofs);
+
+	spin_unlock(&info->lock);
+}
+
+static void lf_copy_from(struct map_info *map, void *to,
+		unsigned long from, ssize_t len)
+{
+	struct latch_addr_flash_info *info =
+		(struct latch_addr_flash_info *) map->map_priv_1;
+	unsigned n;
+
+	while (len > 0) {
+		n = info->win_mask + 1 - (from & info->win_mask);
+		if (n > len)
+			n = len;
+
+		spin_lock(&info->lock);
+
+		info->set_window(from, info->data);
+		memcpy_fromio(to, map->virt + (from & info->win_mask), n);
+
+		spin_unlock(&info->lock);
+
+		to += n;
+		from += n;
+		len -= n;
+	}
+}
+
+static const char *rom_probe_types[] = { "cfi_probe", NULL };
+
+static const char *part_probe_types[] = { "cmdlinepart", NULL };
+
+static int latch_addr_flash_remove(struct platform_device *dev)
+{
+	struct latch_addr_flash_info *info;
+	struct latch_addr_flash_data *latch_addr_data;
+
+	info = platform_get_drvdata(dev);
+	if (info == NULL)
+		return 0;
+	platform_set_drvdata(dev, NULL);
+
+	latch_addr_data = dev->dev.platform_data;
+
+	if (info->mtd != NULL) {
+		if (mtd_has_partitions()) {
+			if (info->nr_parts) {
+				del_mtd_partitions(info->mtd);
+				kfree(info->parts);
+			} else if (latch_addr_data->nr_parts) {
+				del_mtd_partitions(info->mtd);
+			} else {
+				del_mtd_device(info->mtd);
+			}
+		} else {
+			del_mtd_device(info->mtd);
+		}
+		map_destroy(info->mtd);
+	}
+
+	if (info->map.virt != NULL)
+		iounmap(info->map.virt);
+
+	if (info->res != NULL)
+		release_mem_region(info->res->start, resource_size(info->res));
+
+	kfree(info);
+
+	if (latch_addr_data->done)
+		latch_addr_data->done(latch_addr_data->data);
+
+	return 0;
+}
+
+static int __devinit latch_addr_flash_probe(struct platform_device *dev)
+{
+	struct latch_addr_flash_data *latch_addr_data;
+	struct latch_addr_flash_info *info;
+	resource_size_t win_base = dev->resource->start;
+	resource_size_t win_size = resource_size(dev->resource);
+	const char **probe_type;
+	int chipsel;
+	int err;
+
+	latch_addr_data = dev->dev.platform_data;
+	if (latch_addr_data == NULL)
+		return -ENODEV;
+
+	pr_notice("latch-addr platform flash device: %#llx byte "
+		  "window at %#.8llx\n",
+		  (unsigned long long)win_size, (unsigned long long)win_base);
+
+	chipsel = dev->id;
+
+	if (latch_addr_data->init) {
+		err = latch_addr_data->init(latch_addr_data->data, chipsel);
+		if (err != 0)
+			return err;
+	}
+
+	info = kzalloc(sizeof(struct latch_addr_flash_info), GFP_KERNEL);
+	if (info == NULL) {
+		err = -ENOMEM;
+		goto done;
+	}
+
+	platform_set_drvdata(dev, info);
+
+	info->res = request_mem_region(win_base, win_size, DRIVER_NAME);
+	if (info->res == NULL) {
+		dev_err(&dev->dev, "Could not reserve memory region\n");
+		err = -EBUSY;
+		goto free_info;
+	}
+
+	info->map.name		= DRIVER_NAME;
+	info->map.size		= latch_addr_data->size;
+	info->map.bankwidth	= latch_addr_data->width;
+
+	info->map.phys		= NO_XIP;
+	info->map.virt		= ioremap(win_base, win_size);
+	if (!info->map.virt) {
+		err = -ENOMEM;
+		goto free_res;
+	}
+
+	info->map.map_priv_1	= (unsigned long)info;
+
+	info->map.read		= lf_read;
+	info->map.copy_from	= lf_copy_from;
+	info->map.write		= lf_write;
+	info->set_window	= latch_addr_data->set_window;
+	info->data		= latch_addr_data->data;
+	info->win_mask		= win_size - 1;
+
+	spin_lock_init(&info->lock);
+
+	for (probe_type = rom_probe_types; !info->mtd && *probe_type;
+		probe_type++)
+		info->mtd = do_map_probe(*probe_type, &info->map);
+
+	if (info->mtd == NULL) {
+		dev_err(&dev->dev, "map_probe failed\n");
+		err = -ENODEV;
+		goto iounmap;
+	}
+	info->mtd->owner = THIS_MODULE;
+
+	if (mtd_has_partitions()) {
+
+		err = parse_mtd_partitions(info->mtd, part_probe_types,
+					   &info->parts, 0);
+		if (err > 0) {
+			add_mtd_partitions(info->mtd, info->parts, err);
+			return 0;
+		}
+		if (latch_addr_data->nr_parts) {
+			pr_notice("Using latch-addr-flash partition information\n");
+			add_mtd_partitions(info->mtd, latch_addr_data->parts,
+					latch_addr_data->nr_parts);
+			return 0;
+		}
+	}
+	add_mtd_device(info->mtd);
+	return 0;
+
+iounmap:
+	iounmap(info->map.virt);
+free_res:
+	release_mem_region(info->res->start, resource_size(info->res));
+free_info:
+	kfree(info);
+done:
+	if (latch_addr_data->done)
+		latch_addr_data->done(latch_addr_data->data);
+	return err;
+}
+
+static struct platform_driver latch_addr_flash_driver = {
+	.probe		= latch_addr_flash_probe,
+	.remove		= __devexit_p(latch_addr_flash_remove),
+	.driver		= {
+		.name	= DRIVER_NAME,
+	},
+};
+
+static int __init latch_addr_flash_init(void)
+{
+	return platform_driver_register(&latch_addr_flash_driver);
+}
+module_init(latch_addr_flash_init);
+
+static void __exit latch_addr_flash_exit(void)
+{
+	platform_driver_unregister(&latch_addr_flash_driver);
+}
+module_exit(latch_addr_flash_exit);
+
+MODULE_AUTHOR("David Griego <dgriego at mvista.com>");
+MODULE_DESCRIPTION("MTD map driver for flashes addressed physically with upper "
+		"address lines being set board specifically");
+MODULE_LICENSE("GPL v2");
diff --git a/include/linux/mtd/latch-addr-flash.h b/include/linux/mtd/latch-addr-flash.h
new file mode 100644
index 0000000..c77e7c9
--- /dev/null
+++ b/include/linux/mtd/latch-addr-flash.h
@@ -0,0 +1,29 @@
+/*
+ * Interface for NOR flash driver whose high address lines are latched
+ *
+ * Copyright (C) 2008 MontaVista Software, Inc. <source at mvista.com>
+ *
+ * This file is licensed underthe terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+#ifndef __LATCH_ADDR_FLASH__
+#define __LATCH_ADDR_FLASH__
+
+struct map_info;
+struct mtd_partition;
+
+struct latch_addr_flash_data {
+	unsigned int		width;
+	unsigned int		size;
+
+	int			(*init)(void *data, int cs);
+	void			(*done)(void *data);
+	void			(*set_window)(unsigned long offset, void *data);
+	void			*data;
+
+	unsigned int		nr_parts;
+	struct mtd_partition	*parts;
+};
+
+#endif
-- 
1.5.6



From savinay.dharmappa at ti.com  Thu Nov 11 02:57:37 2010
From: savinay.dharmappa at ti.com (Savinay Dharmappa)
Date: Thu, 11 Nov 2010 13:27:37 +0530
Subject: [PATCH 2/2] davinci: Platform support for OMAP-L137/AM17x NOR flash
	driver
Message-ID: <1289462257-7109-1-git-send-email-savinay.dharmappa@ti.com>

From: Aleksey Makarov <amakarov at ru.mvista.com>

Adds platform support for OMAP-L137/AM17x NOR flash driver.

Also, configures chip select 3 to control NOR flash's upper
address lines.

Signed-off-by: Aleksey Makarov <amakarov at ru.mvista.com>
Signed-off-by: Savinay Dharmappa <savinay.dharmappa at ti.com>
---
 arch/arm/mach-davinci/Kconfig           |    8 +
 arch/arm/mach-davinci/board-da830-evm.c |  220 +++++++++++++++++++++++++++++++
 2 files changed, 228 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 9aca60c..baa39ee 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -142,6 +142,14 @@ config DA830_UI_NAND
 	help
 	  Say Y here to use the NAND flash. Do not forget to setup
 	  the switch correctly.
+
+config DA830_UI_NOR
+        bool "NOR flash"
+        help
+          Configure this option to specify the that AEMIF CE2/CE3 will be used to
+          communicate to the NOR flash. Do not forget to setup the switch SW1
+          on UI card correctly.
+
 endchoice
 
 config MACH_DAVINCI_DA850_EVM
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
index 1bb89d3..c8a5d4b 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -20,6 +20,8 @@
 #include <linux/i2c/at24.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
+#include <linux/mtd/latch-addr-flash.h>
+#include <linux/clk.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -429,6 +431,222 @@ static inline void da830_evm_init_nand(int mux_mode)
 static inline void da830_evm_init_nand(int mux_mode) { }
 #endif
 
+#ifdef CONFIG_DA830_UI_NOR
+/*
+ * Number of Address line going to the NOR flash that are latched using
+ * AEMIF address lines  B_EMIF_BA0-B_EMIF_A12  on CS2.
+ */
+#define NOR_WINDOW_SIZE_LOG2     15
+#define NOR_WINDOW_SIZE         (1 << NOR_WINDOW_SIZE_LOG2)
+
+static struct {
+	struct clk *clk;
+	struct {
+		struct resource *res;
+		void __iomem *addr;
+	} latch, aemif;
+} da830_evm_nor;
+
+static struct davinci_aemif_timing da830_evm_norflash_timing = {
+	.wsetup		= 0,
+	.wstrobe	= 40,
+	.whold		= 0,
+	.rsetup		= 0,
+	.rstrobe	= 130,
+	.rhold		= 0,
+	.ta		= 20,
+};
+
+static void da830_evm_nor_set_window(unsigned long offset, void *data)
+{
+	/*
+	 * CS2 and CS3 address lines are used to address nor flash. Address
+	 * line A0-A14 going to the NOR flash are latched using AEMIF address
+	 * lines B_EMIF_BA0-B_EMIF_A12 on CS2. Address lines A15-A23 of the
+	 * NOR flash are latched using AEMIF address lines B_EMIF_A0-B_EMIF_A6
+	 * on CS3. The offset argument received by this function is the offset
+	 * within NOR flash. Upper address is obtained  by shifting the offset
+	 * by the number of CS2 address lines used (13) and masking it with
+	 * complement of 3 (2 address lines used to address banks) and adding
+	 * the resultant offset value to CS3 base address. Writing a zero to
+	 * this address will latch the upper address lines.
+	 */
+	writeb(0, da830_evm_nor.latch.addr +
+		(~3UL & (offset >> (NOR_WINDOW_SIZE_LOG2 - 2))));
+}
+
+static void da830_evm_nor_done(void *data)
+{
+	clk_disable(da830_evm_nor.clk);
+	clk_put(da830_evm_nor.clk);
+	iounmap(da830_evm_nor.latch.addr);
+	release_mem_region(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE);
+	iounmap(da830_evm_nor.aemif.addr);
+	release_mem_region(DA8XX_AEMIF_CTL_BASE, SZ_32K);
+}
+
+static int da830_evm_nor_init(void *data, int cs)
+{
+	/* Turn on AEMIF clocks */
+	da830_evm_nor.clk = clk_get(NULL, "aemif");
+	if (IS_ERR(da830_evm_nor.clk)) {
+		pr_err("%s: could not get AEMIF clock\n", __func__);
+		da830_evm_nor.clk = NULL;
+		return -ENODEV;
+	}
+	clk_enable(da830_evm_nor.clk);
+
+	da830_evm_nor.aemif.res = request_mem_region(DA8XX_AEMIF_CTL_BASE,
+						     SZ_32K, "AEMIF control");
+	if (da830_evm_nor.aemif.res == NULL) {
+		pr_err("%s: could not request AEMIF control region\n",
+			__func__);
+		goto err_clk;
+	}
+
+	da830_evm_nor.aemif.addr = ioremap_nocache(DA8XX_AEMIF_CTL_BASE,
+						   SZ_32K);
+	if (da830_evm_nor.aemif.addr == NULL) {
+		pr_err("%s: could not remap AEMIF control region\n", __func__);
+		goto err_aemif_region;
+	}
+
+	/* Setup AEMIF -- timings, etc. */
+
+	/* Set maximum wait cycles */
+	davinci_aemif_setup_timing(&da830_evm_norflash_timing,
+						da830_evm_nor.aemif.addr, cs);
+
+	davinci_aemif_setup_timing(&da830_evm_norflash_timing,
+					da830_evm_nor.aemif.addr, cs + 1);
+
+	/* Setup the window to access the latch */
+	da830_evm_nor.latch.res =
+		request_mem_region(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE,
+				   "DA830 UI NOR address latch");
+	if (da830_evm_nor.latch.res == NULL) {
+		pr_err("%s: could not request address latch region\n",
+			__func__);
+		goto err_aemif_ioremap;
+	}
+
+	da830_evm_nor.latch.addr =
+		ioremap_nocache(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE);
+	if (da830_evm_nor.latch.addr == NULL) {
+		pr_err("%s: could not remap address latch region\n", __func__);
+		goto err_latch_region;
+	}
+	return 0;
+
+err_latch_region:
+	release_mem_region(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE);
+	da830_evm_nor.latch.res = NULL;
+err_aemif_ioremap:
+	iounmap(da830_evm_nor.aemif.addr);
+	da830_evm_nor.aemif.addr = NULL;
+err_aemif_region:
+	release_mem_region(DA8XX_AEMIF_CTL_BASE, SZ_32K);
+	da830_evm_nor.aemif.res = NULL;
+err_clk:
+	clk_disable(da830_evm_nor.clk);
+	clk_put(da830_evm_nor.clk);
+	da830_evm_nor.clk  = NULL;
+
+	return -EBUSY;
+}
+
+static struct mtd_partition da830_evm_nor_partitions[] = {
+	/* bootloader (U-Boot, etc) in first 2 sectors */
+	[0] = {
+		.name           = "bootloader",
+		.offset		= 0,
+		.size           = SZ_128K,
+		.mask_flags     = MTD_WRITEABLE, /* force read-only */
+	},
+	/* bootloader parameters in the next 1 sector */
+	[1] = {
+		.name           = "params",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = SZ_64K,
+	},
+	/* kernel */
+	[2] = {
+		.name           = "kernel",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = SZ_2M,
+	},
+	/* file system */
+	[3] = {
+		.name           = "filesystem",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = MTDPART_SIZ_FULL,
+	}
+};
+
+static struct latch_addr_flash_data da830_evm_nor_pdata = {
+	.width          = 1,
+	.size           = SZ_4M,
+	.init           = da830_evm_nor_init,
+	.done           = da830_evm_nor_done,
+	.set_window     = da830_evm_nor_set_window,
+	.nr_parts       = ARRAY_SIZE(da830_evm_nor_partitions),
+	.parts          = da830_evm_nor_partitions,
+};
+
+static struct resource da830_evm_nor_resource[] = {
+	[0] = {
+		.start  = DA8XX_AEMIF_CS2_BASE,
+		.end    = DA8XX_AEMIF_CS2_BASE + NOR_WINDOW_SIZE - 1,
+		.flags  = IORESOURCE_MEM,
+	},
+	[1] = {
+		.start  = DA8XX_AEMIF_CS3_BASE,
+		.end    = DA8XX_AEMIF_CS3_BASE + PAGE_SIZE - 1,
+		.flags  = IORESOURCE_MEM,
+	},
+	[2] = {
+		.start  = DA8XX_AEMIF_CTL_BASE,
+		.end    = DA8XX_AEMIF_CTL_BASE + SZ_32K - 1,
+		.flags  = IORESOURCE_MEM,
+	}
+};
+
+static struct platform_device da830_evm_nor_device = {
+	.name           = "latch-addr-flash",
+	.id             = 0,
+	.dev            = {
+		.platform_data  = &da830_evm_nor_pdata,
+	},
+	.num_resources  = ARRAY_SIZE(da830_evm_nor_resource),
+	.resource       = da830_evm_nor_resource,
+};
+
+static inline void da830_evm_init_nor(int mux_mode)
+{
+	int ret;
+
+	if (HAS_MMC) {
+		pr_warning("WARNING: both MMC/SD and NOR are "
+				"enabled, but they share AEMIF pins.\n"
+					"\tDisable MMC/SD for NOR support.\n");
+		return;
+	}
+
+	ret = davinci_cfg_reg_list(da830_evm_emif25_pins);
+	if (ret)
+		pr_warning("da830_evm_init: emif25 mux setup failed: %d\n",
+			  ret);
+
+	ret = platform_device_register(&da830_evm_nor_device);
+	if (ret)
+		pr_warning("da830_evm_init: NOR device not registered.\n");
+
+	gpio_direction_output(mux_mode, 1);
+}
+#else
+static inline void da830_evm_init_nor(int mux_mode) { }
+#endif  /* CONFIG_DA830_UI_NOR */
+
 #ifdef CONFIG_DA830_UI_LCD
 static inline void da830_evm_init_lcdc(int mux_mode)
 {
@@ -469,6 +687,8 @@ static int __init da830_evm_ui_expander_setup(struct i2c_client *client,
 
 	da830_evm_init_nand(gpio + 6);
 
+	da830_evm_init_nor(gpio + 6);
+
 	return 0;
 }
 
-- 
1.5.6



From lars at metafoo.de  Thu Nov 11 13:02:47 2010
From: lars at metafoo.de (Lars-Peter Clausen)
Date: Thu, 11 Nov 2010 19:02:47 +0100
Subject: [PATCH] MTD: NAND: jz4740: Make 'struct platform_driver
	jz_nand_driver' static
Message-ID: <1289498568-12191-1-git-send-email-lars@metafoo.de>

Signed-off-by: Lars-Peter Clausen <lars at metafoo.de>
---
 drivers/mtd/nand/jz4740_nand.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/jz4740_nand.c b/drivers/mtd/nand/jz4740_nand.c
index 67343fc..c9e2a59 100644
--- a/drivers/mtd/nand/jz4740_nand.c
+++ b/drivers/mtd/nand/jz4740_nand.c
@@ -489,7 +489,7 @@ static int __devexit jz_nand_remove(struct platform_device *pdev)
 	return 0;
 }
 
-struct platform_driver jz_nand_driver = {
+static struct platform_driver jz_nand_driver = {
 	.probe = jz_nand_probe,
 	.remove = __devexit_p(jz_nand_remove),
 	.driver = {
-- 
1.5.6.5



From lars at metafoo.de  Thu Nov 11 13:02:48 2010
From: lars at metafoo.de (Lars-Peter Clausen)
Date: Thu, 11 Nov 2010 19:02:48 +0100
Subject: [PATCH] MTD: NAND: jz4740: Remove custom {read,write}_page handlers
In-Reply-To: <1289498568-12191-1-git-send-email-lars@metafoo.de>
References: <1289498568-12191-1-git-send-email-lars@metafoo.de>
Message-ID: <1289498568-12191-2-git-send-email-lars@metafoo.de>

Now that the mtd core supports more then 64 ecc bytes we can use it instead of
some a custom hack in the jz4740 nand driver.
This patch removes the custom {read,write}_page handlers from the jz4740 nand
driver. Thus the driver will now fallback to the default handlers from the nand
core.

Signed-off-by: Lars-Peter Clausen <lars at metafoo.de>
---
 drivers/mtd/nand/jz4740_nand.c |   55 ----------------------------------------
 1 files changed, 0 insertions(+), 55 deletions(-)

diff --git a/drivers/mtd/nand/jz4740_nand.c b/drivers/mtd/nand/jz4740_nand.c
index c9e2a59..cea38a5 100644
--- a/drivers/mtd/nand/jz4740_nand.c
+++ b/drivers/mtd/nand/jz4740_nand.c
@@ -251,58 +251,6 @@ static int jz_nand_correct_ecc_rs(struct mtd_info *mtd, uint8_t *dat,
 	return 0;
 }
 
-
-/* Copy paste of nand_read_page_hwecc_oob_first except for different eccpos
- * handling. The ecc area is for 4k chips 72 bytes long and thus does not fit
- * into the eccpos array. */
-static int jz_nand_read_page_hwecc_oob_first(struct mtd_info *mtd,
-	struct nand_chip *chip, uint8_t *buf, int page)
-{
-	int i, eccsize = chip->ecc.size;
-	int eccbytes = chip->ecc.bytes;
-	int eccsteps = chip->ecc.steps;
-	uint8_t *p = buf;
-	unsigned int ecc_offset = chip->page_shift;
-
-	/* Read the OOB area first */
-	chip->cmdfunc(mtd, NAND_CMD_READOOB, 0, page);
-	chip->read_buf(mtd, chip->oob_poi, mtd->oobsize);
-	chip->cmdfunc(mtd, NAND_CMD_READ0, 0, page);
-
-	for (i = ecc_offset; eccsteps; eccsteps--, i += eccbytes, p += eccsize) {
-		int stat;
-
-		chip->ecc.hwctl(mtd, NAND_ECC_READ);
-		chip->read_buf(mtd, p, eccsize);
-
-		stat = chip->ecc.correct(mtd, p, &chip->oob_poi[i], NULL);
-		if (stat < 0)
-			mtd->ecc_stats.failed++;
-		else
-			mtd->ecc_stats.corrected += stat;
-	}
-	return 0;
-}
-
-/* Copy-and-paste of nand_write_page_hwecc with different eccpos handling. */
-static void jz_nand_write_page_hwecc(struct mtd_info *mtd,
-	struct nand_chip *chip, const uint8_t *buf)
-{
-	int i, eccsize = chip->ecc.size;
-	int eccbytes = chip->ecc.bytes;
-	int eccsteps = chip->ecc.steps;
-	const uint8_t *p = buf;
-	unsigned int ecc_offset = chip->page_shift;
-
-	for (i = ecc_offset; eccsteps; eccsteps--, i += eccbytes, p += eccsize) {
-		chip->ecc.hwctl(mtd, NAND_ECC_WRITE);
-		chip->write_buf(mtd, p, eccsize);
-		chip->ecc.calculate(mtd, p, &chip->oob_poi[i]);
-	}
-
-	chip->write_buf(mtd, chip->oob_poi, mtd->oobsize);
-}
-
 #ifdef CONFIG_MTD_CMDLINE_PARTS
 static const char *part_probes[] = {"cmdline", NULL};
 #endif
@@ -393,9 +341,6 @@ static int __devinit jz_nand_probe(struct platform_device *pdev)
 	chip->ecc.size		= 512;
 	chip->ecc.bytes		= 9;
 
-	chip->ecc.read_page	= jz_nand_read_page_hwecc_oob_first;
-	chip->ecc.write_page	= jz_nand_write_page_hwecc;
-
 	if (pdata)
 		chip->ecc.layout = pdata->ecc_layout;
 
-- 
1.5.6.5



From sshtylyov at mvista.com  Thu Nov 11 13:15:45 2010
From: sshtylyov at mvista.com (Sergei Shtylyov)
Date: Thu, 11 Nov 2010 21:15:45 +0300
Subject: [PATCH 2/2] davinci: Platform support for OMAP-L137/AM17x NOR
	flash driver
In-Reply-To: <1289462257-7109-1-git-send-email-savinay.dharmappa@ti.com>
References: <1289462257-7109-1-git-send-email-savinay.dharmappa@ti.com>
Message-ID: <4CDC32D1.9030508@mvista.com>

Hello.

Savinay Dharmappa wrote:

> From: Aleksey Makarov <amakarov at ru.mvista.com>

> Adds platform support for OMAP-L137/AM17x NOR flash driver.

> Also, configures chip select 3 to control NOR flash's upper
> address lines.

> Signed-off-by: Aleksey Makarov <amakarov at ru.mvista.com>
> Signed-off-by: Savinay Dharmappa <savinay.dharmappa at ti.com>

    It's not clear why you've dropped my signoff...

>  config MACH_DAVINCI_DA850_EVM
> diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
> index 1bb89d3..c8a5d4b 100644
> --- a/arch/arm/mach-davinci/board-da830-evm.c
> +++ b/arch/arm/mach-davinci/board-da830-evm.c
[...]
> +static void da830_evm_nor_set_window(unsigned long offset, void *data)
> +{
> +	/*
> +	 * CS2 and CS3 address lines are used to address nor flash. Address

    NOR. Please be consistent.

> +	 * line A0-A14 going to the NOR flash are latched using AEMIF address
> +	 * lines B_EMIF_BA0-B_EMIF_A12 on CS2. Address lines A15-A23 of the
> +	 * NOR flash are latched using AEMIF address lines B_EMIF_A0-B_EMIF_A6
> +	 * on CS3. The offset argument received by this function is the offset
> +	 * within NOR flash. Upper address is obtained  by shifting the offset
> +	 * by the number of CS2 address lines used (13) and masking it with
> +	 * complement of 3 (2 address lines used to address banks) and adding
> +	 * the resultant offset value to CS3 base address. Writing a zero to

    Writing anything, not just zero, I guess...

> +	 * this address will latch the upper address lines.
> +	 */
> +	writeb(0, da830_evm_nor.latch.addr +
> +		(~3UL & (offset >> (NOR_WINDOW_SIZE_LOG2 - 2))));
> +}

[...]

> +static int da830_evm_nor_init(void *data, int cs)
> +{
> +	/* Turn on AEMIF clocks */
> +	da830_evm_nor.clk = clk_get(NULL, "aemif");
> +	if (IS_ERR(da830_evm_nor.clk)) {
> +		pr_err("%s: could not get AEMIF clock\n", __func__);
> +		da830_evm_nor.clk = NULL;
> +		return -ENODEV;
> +	}
> +	clk_enable(da830_evm_nor.clk);
> +
> +	da830_evm_nor.aemif.res = request_mem_region(DA8XX_AEMIF_CTL_BASE,
> +						     SZ_32K, "AEMIF control");
> +	if (da830_evm_nor.aemif.res == NULL) {
> +		pr_err("%s: could not request AEMIF control region\n",
> +			__func__);
> +		goto err_clk;
> +	}
> +
> +	da830_evm_nor.aemif.addr = ioremap_nocache(DA8XX_AEMIF_CTL_BASE,
> +						   SZ_32K);
> +	if (da830_evm_nor.aemif.addr == NULL) {
> +		pr_err("%s: could not remap AEMIF control region\n", __func__);
> +		goto err_aemif_region;
> +	}
> +
> +	/* Setup AEMIF -- timings, etc. */
> +
> +	/* Set maximum wait cycles */
> +	davinci_aemif_setup_timing(&da830_evm_norflash_timing,
> +						da830_evm_nor.aemif.addr, cs);
> +
> +	davinci_aemif_setup_timing(&da830_evm_norflash_timing,
> +					da830_evm_nor.aemif.addr, cs + 1);
> +
> +	/* Setup the window to access the latch */
> +	da830_evm_nor.latch.res =
> +		request_mem_region(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE,
> +				   "DA830 UI NOR address latch");
> +	if (da830_evm_nor.latch.res == NULL) {
> +		pr_err("%s: could not request address latch region\n",
> +			__func__);
> +		goto err_aemif_ioremap;
> +	}
> +
> +	da830_evm_nor.latch.addr =
> +		ioremap_nocache(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE);
> +	if (da830_evm_nor.latch.addr == NULL) {
> +		pr_err("%s: could not remap address latch region\n", __func__);
> +		goto err_latch_region;
> +	}
> +	return 0;
> +
> +err_latch_region:
> +	release_mem_region(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE);
> +	da830_evm_nor.latch.res = NULL;

   This assignment is pointless.

> +err_aemif_ioremap:
> +	iounmap(da830_evm_nor.aemif.addr);
> +	da830_evm_nor.aemif.addr = NULL;

    This one likewise...

> +err_aemif_region:
> +	release_mem_region(DA8XX_AEMIF_CTL_BASE, SZ_32K);
> +	da830_evm_nor.aemif.res = NULL;

    And this one too...

> +err_clk:
> +	clk_disable(da830_evm_nor.clk);
> +	clk_put(da830_evm_nor.clk);
> +	da830_evm_nor.clk  = NULL;

    This one as well...

> +static inline void da830_evm_init_nor(int mux_mode)
> +{
> +	int ret;
> +
> +	if (HAS_MMC) {
> +		pr_warning("WARNING: both MMC/SD and NOR are "
> +				"enabled, but they share AEMIF pins.\n"
> +					"\tDisable MMC/SD for NOR support.\n");
> +		return;
> +	}
> +
> +	ret = davinci_cfg_reg_list(da830_evm_emif25_pins);
> +	if (ret)
> +		pr_warning("da830_evm_init: emif25 mux setup failed: %d\n",

   It's called EMIF 2.5, not "emif25".

WBR, Sergei


From sshtylyov at mvista.com  Thu Nov 11 13:18:55 2010
From: sshtylyov at mvista.com (Sergei Shtylyov)
Date: Thu, 11 Nov 2010 21:18:55 +0300
Subject: [PATCH 1/2] mtd: NOR flash driver for OMAP-L137/AM17x
In-Reply-To: <1289462153-4350-1-git-send-email-savinay.dharmappa@ti.com>
References: <1289462153-4350-1-git-send-email-savinay.dharmappa@ti.com>
Message-ID: <4CDC338F.30600@mvista.com>

Hello.

Savinay Dharmappa wrote:

> From: David Griego <dgriego at mvista.com>

> OMAP-L137/AM17x has limited number of dedicated EMIFA
> address pins, enough to interface directly to an SDRAM.
> If a device such as an asynchronous flash needs to be
> attached to the EMIFA, then either GPIO pins or a chip
> select may be used to control the flash device's upper
> address lines.
> 
> This patch adds support for the NOR flash on the OMAP-L137/
> AM17x user interface daughter board using the latch-addr-flash
> MTD mapping driver which allows flashes to be partially
> physically addressed. The upper address lines are set by
> a board specific code which is a separate patch.

> Signed-off-by: David Griego <dgriego at mvista.com>

    It's again not clear why you've dropped my and Alexei's signoff. Did we 
request you to do so?

> Signed-off-by: Savinay Dharmappa <savinay.dharmappa at ti.com>

WBR, Sergei



From savinay.dharmappa at ti.com  Thu Nov 11 23:20:25 2010
From: savinay.dharmappa at ti.com (Savinay Dharmappa)
Date: Fri, 12 Nov 2010 09:50:25 +0530
Subject: [PATCH 1/2] mtd: NOR flash driver for OMAP-L137/AM17x
In-Reply-To: <4CDC338F.30600@mvista.com>
References: <1289462153-4350-1-git-send-email-savinay.dharmappa@ti.com>
	<4CDC338F.30600@mvista.com>
Message-ID: <000901cb8220$edf40df0$c9dc29d0$@dharmappa@ti.com>

On Thu, Nov 11, 2010 at 23:48:55, Sergei Shtylyov wrote:
> Hello.
> 
> Savinay Dharmappa wrote:
> 
> > From: David Griego <dgriego at mvista.com>
> 
> > OMAP-L137/AM17x has limited number of dedicated EMIFA
> > address pins, enough to interface directly to an SDRAM.
> > If a device such as an asynchronous flash needs to be
> > attached to the EMIFA, then either GPIO pins or a chip
> > select may be used to control the flash device's upper
> > address lines.
> > 
> > This patch adds support for the NOR flash on the OMAP-L137/
> > AM17x user interface daughter board using the latch-addr-flash
> > MTD mapping driver which allows flashes to be partially
> > physically addressed. The upper address lines are set by
> > a board specific code which is a separate patch.
> 
> > Signed-off-by: David Griego <dgriego at mvista.com>
> 
>     It's again not clear why you've dropped my and Alexei's signoff. Did
we 
> request you to do so?

I had sent this series to all MV folks to get their signoff but nobody
replied.
If you are OK with the updated version of this patch, which I'll be
submitting
shortly, please add your signoff.

Regards,
Savinay.




From savinay.dharmappa at ti.com  Thu Nov 11 23:24:15 2010
From: savinay.dharmappa at ti.com (Savinay Dharmappa)
Date: Fri, 12 Nov 2010 09:54:15 +0530
Subject: [PATCH 2/2] davinci: Platform support for OMAP-L137/AM17x
	NOR	flash driver
In-Reply-To: <4CDC32D1.9030508@mvista.com>
References: <1289462257-7109-1-git-send-email-savinay.dharmappa@ti.com>
	<4CDC32D1.9030508@mvista.com>
Message-ID: <000a01cb8221$7727f4b0$6577de10$@dharmappa@ti.com>

Hi Sergei,

Thanks for your comments. 

On Thu, Nov 11, 2010 at 23:45:45, Sergei Shtylyov wrote:
> Hello.
> 
> Savinay Dharmappa wrote:
> 
> > From: Aleksey Makarov <amakarov at ru.mvista.com>
> 
> > Adds platform support for OMAP-L137/AM17x NOR flash driver.
> 
> > Also, configures chip select 3 to control NOR flash's upper address 
> > lines.
> 
> > Signed-off-by: Aleksey Makarov <amakarov at ru.mvista.com>
> > Signed-off-by: Savinay Dharmappa <savinay.dharmappa at ti.com>
> 
>     It's not clear why you've dropped my signoff...
> 
> >  config MACH_DAVINCI_DA850_EVM
> > diff --git a/arch/arm/mach-davinci/board-da830-evm.c 
> > b/arch/arm/mach-davinci/board-da830-evm.c
> > index 1bb89d3..c8a5d4b 100644
> > --- a/arch/arm/mach-davinci/board-da830-evm.c
> > +++ b/arch/arm/mach-davinci/board-da830-evm.c
> [...]
> > +static void da830_evm_nor_set_window(unsigned long offset, void 
> > +*data) {
> > +	/*
> > +	 * CS2 and CS3 address lines are used to address nor flash. Address
> 
>     NOR. Please be consistent.

Ok.

> 
> > +	 * line A0-A14 going to the NOR flash are latched using AEMIF
address
> > +	 * lines B_EMIF_BA0-B_EMIF_A12 on CS2. Address lines A15-A23 of the
> > +	 * NOR flash are latched using AEMIF address lines
B_EMIF_A0-B_EMIF_A6
> > +	 * on CS3. The offset argument received by this function is the
offset
> > +	 * within NOR flash. Upper address is obtained  by shifting the
offset
> > +	 * by the number of CS2 address lines used (13) and masking it with
> > +	 * complement of 3 (2 address lines used to address banks) and
adding
> > +	 * the resultant offset value to CS3 base address. Writing a zero to
> 
>     Writing anything, not just zero, I guess...
> 

I'll check this.

> > +	 * this address will latch the upper address lines.
> > +	 */
> > +	writeb(0, da830_evm_nor.latch.addr +
> > +		(~3UL & (offset >> (NOR_WINDOW_SIZE_LOG2 - 2)))); }
> 
> [...]
> 
> > +static int da830_evm_nor_init(void *data, int cs) {
> > +	/* Turn on AEMIF clocks */
> > +	da830_evm_nor.clk = clk_get(NULL, "aemif");
> > +	if (IS_ERR(da830_evm_nor.clk)) {
> > +		pr_err("%s: could not get AEMIF clock\n", __func__);
> > +		da830_evm_nor.clk = NULL;
> > +		return -ENODEV;
> > +	}
> > +	clk_enable(da830_evm_nor.clk);
> > +
> > +	da830_evm_nor.aemif.res = request_mem_region(DA8XX_AEMIF_CTL_BASE,
> > +						     SZ_32K, "AEMIF
control");
> > +	if (da830_evm_nor.aemif.res == NULL) {
> > +		pr_err("%s: could not request AEMIF control region\n",
> > +			__func__);
> > +		goto err_clk;
> > +	}
> > +
> > +	da830_evm_nor.aemif.addr = ioremap_nocache(DA8XX_AEMIF_CTL_BASE,
> > +						   SZ_32K);
> > +	if (da830_evm_nor.aemif.addr == NULL) {
> > +		pr_err("%s: could not remap AEMIF control region\n",
__func__);
> > +		goto err_aemif_region;
> > +	}
> > +
> > +	/* Setup AEMIF -- timings, etc. */
> > +
> > +	/* Set maximum wait cycles */
> > +	davinci_aemif_setup_timing(&da830_evm_norflash_timing,
> > +						da830_evm_nor.aemif.addr,
cs);
> > +
> > +	davinci_aemif_setup_timing(&da830_evm_norflash_timing,
> > +					da830_evm_nor.aemif.addr, cs + 1);
> > +
> > +	/* Setup the window to access the latch */
> > +	da830_evm_nor.latch.res =
> > +		request_mem_region(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE,
> > +				   "DA830 UI NOR address latch");
> > +	if (da830_evm_nor.latch.res == NULL) {
> > +		pr_err("%s: could not request address latch region\n",
> > +			__func__);
> > +		goto err_aemif_ioremap;
> > +	}
> > +
> > +	da830_evm_nor.latch.addr =
> > +		ioremap_nocache(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE);
> > +	if (da830_evm_nor.latch.addr == NULL) {
> > +		pr_err("%s: could not remap address latch region\n",
__func__);
> > +		goto err_latch_region;
> > +	}
> > +	return 0;
> > +
> > +err_latch_region:
> > +	release_mem_region(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE);
> > +	da830_evm_nor.latch.res = NULL;
> 
>    This assignment is pointless.

I'll remove all such unnecessary assignments.

> 
> > +err_aemif_ioremap:
> > +	iounmap(da830_evm_nor.aemif.addr);
> > +	da830_evm_nor.aemif.addr = NULL;
> 
>     This one likewise...
> 
> > +err_aemif_region:
> > +	release_mem_region(DA8XX_AEMIF_CTL_BASE, SZ_32K);
> > +	da830_evm_nor.aemif.res = NULL;
> 
>     And this one too...
> 
> > +err_clk:
> > +	clk_disable(da830_evm_nor.clk);
> > +	clk_put(da830_evm_nor.clk);
> > +	da830_evm_nor.clk  = NULL;
> 
>     This one as well...
> 
> > +static inline void da830_evm_init_nor(int mux_mode) {
> > +	int ret;
> > +
> > +	if (HAS_MMC) {
> > +		pr_warning("WARNING: both MMC/SD and NOR are "
> > +				"enabled, but they share AEMIF pins.\n"
> > +					"\tDisable MMC/SD for NOR
support.\n");
> > +		return;
> > +	}
> > +
> > +	ret = davinci_cfg_reg_list(da830_evm_emif25_pins);
> > +	if (ret)
> > +		pr_warning("da830_evm_init: emif25 mux setup failed: %d\n",
> 
>    It's called EMIF 2.5, not "emif25".

Ok. I'll post the updated version soon.

Regards,
Savinay.




From savinay.dharmappa at ti.com  Fri Nov 12 03:01:51 2010
From: savinay.dharmappa at ti.com (Savinay Dharmappa)
Date: Fri, 12 Nov 2010 13:31:51 +0530
Subject: [PATCH v2 1/2] mtd: NOR flash driver for OMAP-L137/AM17x
Message-ID: <1289548911-21243-1-git-send-email-savinay.dharmappa@ti.com>

From: David Griego <dgriego at mvista.com>

OMAP-L137/AM17x has limited number of dedicated EMIFA
address pins, enough to interface directly to an SDRAM.
If a device such as an asynchronous flash needs to be
attached to the EMIFA, then either GPIO pins or a chip
select may be used to control the flash device's upper
address lines.

This patch adds support for the NOR flash on the OMAP-L137/
AM17x user interface daughter board using the latch-addr-flash
MTD mapping driver which allows flashes to be partially
physically addressed. The upper address lines are set by
a board specific code which is a separate patch.

Signed-off-by: David Griego <dgriego at mvista.com>
Signed-off-by: Savinay Dharmappa <savinay.dharmappa at ti.com>
---
Since v1:
  No modifications. Made v2 because patch 2/2 has changed.

 drivers/mtd/maps/Kconfig             |    9 +
 drivers/mtd/maps/Makefile            |    1 +
 drivers/mtd/maps/latch-addr-flash.c  |  271 ++++++++++++++++++++++++++++++++++
 include/linux/mtd/latch-addr-flash.h |   29 ++++
 4 files changed, 310 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mtd/maps/latch-addr-flash.c
 create mode 100644 include/linux/mtd/latch-addr-flash.h

diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index 701d942..b794ea2 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -543,4 +543,13 @@ config MTD_PISMO
 
 	  When built as a module, it will be called pismo.ko
 
+config MTD_LATCH_ADDR
+        tristate "Latch-assisted Flash Chip Support"
+        depends on MTD_COMPLEX_MAPPINGS
+        help
+          Map driver which allows flashes to be partially physically addressed
+          and have the upper address lines set by a board specific code.
+
+          If compiled as a module, it will be called latch-addr-flash.
+
 endmenu
diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile
index f216bb5..35c3573 100644
--- a/drivers/mtd/maps/Makefile
+++ b/drivers/mtd/maps/Makefile
@@ -58,3 +58,4 @@ obj-$(CONFIG_MTD_BFIN_ASYNC)	+= bfin-async-flash.o
 obj-$(CONFIG_MTD_RBTX4939)	+= rbtx4939-flash.o
 obj-$(CONFIG_MTD_VMU)		+= vmu-flash.o
 obj-$(CONFIG_MTD_GPIO_ADDR)	+= gpio-addr-flash.o
+obj-$(CONFIG_MTD_LATCH_ADDR)	+= latch-addr-flash.o
diff --git a/drivers/mtd/maps/latch-addr-flash.c b/drivers/mtd/maps/latch-addr-flash.c
new file mode 100644
index 0000000..e3a7f91
--- /dev/null
+++ b/drivers/mtd/maps/latch-addr-flash.c
@@ -0,0 +1,271 @@
+/*
+ * Interface for NOR flash driver whose high address lines are latched
+ *
+ * Copyright 2000 Nicolas Pitre <nico at cam.org>
+ * Copyright 2005-2008 Analog Devices Inc.
+ * Coyright (C) 2008 MontaVista Software, Inc. <source at mvista.com>
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#include <linux/mtd/partitions.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/latch-addr-flash.h>
+#include <linux/slab.h>
+
+#define DRIVER_NAME "latch-addr-flash"
+
+struct latch_addr_flash_info {
+	struct mtd_info		*mtd;
+	struct map_info		map;
+	struct resource		*res;
+
+	void			(*set_window)(unsigned long offset, void *data);
+	void			*data;
+
+	/* cache; could be found out of res */
+	unsigned long		win_mask;
+
+	int			nr_parts;
+	struct mtd_partition	*parts;
+
+	spinlock_t		lock;
+};
+
+static map_word lf_read(struct map_info *map, unsigned long ofs)
+{
+	struct latch_addr_flash_info *info;
+	map_word datum;
+
+	info = (struct latch_addr_flash_info *)map->map_priv_1;
+
+	spin_lock(&info->lock);
+
+	info->set_window(ofs, info->data);
+	datum = inline_map_read(map, info->win_mask & ofs);
+
+	spin_unlock(&info->lock);
+
+	return datum;
+}
+
+static void lf_write(struct map_info *map, map_word datum, unsigned long ofs)
+{
+	struct latch_addr_flash_info *info;
+
+	info = (struct latch_addr_flash_info *)map->map_priv_1;
+
+	spin_lock(&info->lock);
+
+	info->set_window(ofs, info->data);
+	inline_map_write(map, datum, info->win_mask & ofs);
+
+	spin_unlock(&info->lock);
+}
+
+static void lf_copy_from(struct map_info *map, void *to,
+		unsigned long from, ssize_t len)
+{
+	struct latch_addr_flash_info *info =
+		(struct latch_addr_flash_info *) map->map_priv_1;
+	unsigned n;
+
+	while (len > 0) {
+		n = info->win_mask + 1 - (from & info->win_mask);
+		if (n > len)
+			n = len;
+
+		spin_lock(&info->lock);
+
+		info->set_window(from, info->data);
+		memcpy_fromio(to, map->virt + (from & info->win_mask), n);
+
+		spin_unlock(&info->lock);
+
+		to += n;
+		from += n;
+		len -= n;
+	}
+}
+
+static const char *rom_probe_types[] = { "cfi_probe", NULL };
+
+static const char *part_probe_types[] = { "cmdlinepart", NULL };
+
+static int latch_addr_flash_remove(struct platform_device *dev)
+{
+	struct latch_addr_flash_info *info;
+	struct latch_addr_flash_data *latch_addr_data;
+
+	info = platform_get_drvdata(dev);
+	if (info == NULL)
+		return 0;
+	platform_set_drvdata(dev, NULL);
+
+	latch_addr_data = dev->dev.platform_data;
+
+	if (info->mtd != NULL) {
+		if (mtd_has_partitions()) {
+			if (info->nr_parts) {
+				del_mtd_partitions(info->mtd);
+				kfree(info->parts);
+			} else if (latch_addr_data->nr_parts) {
+				del_mtd_partitions(info->mtd);
+			} else {
+				del_mtd_device(info->mtd);
+			}
+		} else {
+			del_mtd_device(info->mtd);
+		}
+		map_destroy(info->mtd);
+	}
+
+	if (info->map.virt != NULL)
+		iounmap(info->map.virt);
+
+	if (info->res != NULL)
+		release_mem_region(info->res->start, resource_size(info->res));
+
+	kfree(info);
+
+	if (latch_addr_data->done)
+		latch_addr_data->done(latch_addr_data->data);
+
+	return 0;
+}
+
+static int __devinit latch_addr_flash_probe(struct platform_device *dev)
+{
+	struct latch_addr_flash_data *latch_addr_data;
+	struct latch_addr_flash_info *info;
+	resource_size_t win_base = dev->resource->start;
+	resource_size_t win_size = resource_size(dev->resource);
+	const char **probe_type;
+	int chipsel;
+	int err;
+
+	latch_addr_data = dev->dev.platform_data;
+	if (latch_addr_data == NULL)
+		return -ENODEV;
+
+	pr_notice("latch-addr platform flash device: %#llx byte "
+		  "window at %#.8llx\n",
+		  (unsigned long long)win_size, (unsigned long long)win_base);
+
+	chipsel = dev->id;
+
+	if (latch_addr_data->init) {
+		err = latch_addr_data->init(latch_addr_data->data, chipsel);
+		if (err != 0)
+			return err;
+	}
+
+	info = kzalloc(sizeof(struct latch_addr_flash_info), GFP_KERNEL);
+	if (info == NULL) {
+		err = -ENOMEM;
+		goto done;
+	}
+
+	platform_set_drvdata(dev, info);
+
+	info->res = request_mem_region(win_base, win_size, DRIVER_NAME);
+	if (info->res == NULL) {
+		dev_err(&dev->dev, "Could not reserve memory region\n");
+		err = -EBUSY;
+		goto free_info;
+	}
+
+	info->map.name		= DRIVER_NAME;
+	info->map.size		= latch_addr_data->size;
+	info->map.bankwidth	= latch_addr_data->width;
+
+	info->map.phys		= NO_XIP;
+	info->map.virt		= ioremap(win_base, win_size);
+	if (!info->map.virt) {
+		err = -ENOMEM;
+		goto free_res;
+	}
+
+	info->map.map_priv_1	= (unsigned long)info;
+
+	info->map.read		= lf_read;
+	info->map.copy_from	= lf_copy_from;
+	info->map.write		= lf_write;
+	info->set_window	= latch_addr_data->set_window;
+	info->data		= latch_addr_data->data;
+	info->win_mask		= win_size - 1;
+
+	spin_lock_init(&info->lock);
+
+	for (probe_type = rom_probe_types; !info->mtd && *probe_type;
+		probe_type++)
+		info->mtd = do_map_probe(*probe_type, &info->map);
+
+	if (info->mtd == NULL) {
+		dev_err(&dev->dev, "map_probe failed\n");
+		err = -ENODEV;
+		goto iounmap;
+	}
+	info->mtd->owner = THIS_MODULE;
+
+	if (mtd_has_partitions()) {
+
+		err = parse_mtd_partitions(info->mtd, part_probe_types,
+					   &info->parts, 0);
+		if (err > 0) {
+			add_mtd_partitions(info->mtd, info->parts, err);
+			return 0;
+		}
+		if (latch_addr_data->nr_parts) {
+			pr_notice("Using latch-addr-flash partition information\n");
+			add_mtd_partitions(info->mtd, latch_addr_data->parts,
+					latch_addr_data->nr_parts);
+			return 0;
+		}
+	}
+	add_mtd_device(info->mtd);
+	return 0;
+
+iounmap:
+	iounmap(info->map.virt);
+free_res:
+	release_mem_region(info->res->start, resource_size(info->res));
+free_info:
+	kfree(info);
+done:
+	if (latch_addr_data->done)
+		latch_addr_data->done(latch_addr_data->data);
+	return err;
+}
+
+static struct platform_driver latch_addr_flash_driver = {
+	.probe		= latch_addr_flash_probe,
+	.remove		= __devexit_p(latch_addr_flash_remove),
+	.driver		= {
+		.name	= DRIVER_NAME,
+	},
+};
+
+static int __init latch_addr_flash_init(void)
+{
+	return platform_driver_register(&latch_addr_flash_driver);
+}
+module_init(latch_addr_flash_init);
+
+static void __exit latch_addr_flash_exit(void)
+{
+	platform_driver_unregister(&latch_addr_flash_driver);
+}
+module_exit(latch_addr_flash_exit);
+
+MODULE_AUTHOR("David Griego <dgriego at mvista.com>");
+MODULE_DESCRIPTION("MTD map driver for flashes addressed physically with upper "
+		"address lines being set board specifically");
+MODULE_LICENSE("GPL v2");
diff --git a/include/linux/mtd/latch-addr-flash.h b/include/linux/mtd/latch-addr-flash.h
new file mode 100644
index 0000000..c77e7c9
--- /dev/null
+++ b/include/linux/mtd/latch-addr-flash.h
@@ -0,0 +1,29 @@
+/*
+ * Interface for NOR flash driver whose high address lines are latched
+ *
+ * Copyright (C) 2008 MontaVista Software, Inc. <source at mvista.com>
+ *
+ * This file is licensed underthe terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+#ifndef __LATCH_ADDR_FLASH__
+#define __LATCH_ADDR_FLASH__
+
+struct map_info;
+struct mtd_partition;
+
+struct latch_addr_flash_data {
+	unsigned int		width;
+	unsigned int		size;
+
+	int			(*init)(void *data, int cs);
+	void			(*done)(void *data);
+	void			(*set_window)(unsigned long offset, void *data);
+	void			*data;
+
+	unsigned int		nr_parts;
+	struct mtd_partition	*parts;
+};
+
+#endif
-- 
1.5.6



From savinay.dharmappa at ti.com  Fri Nov 12 03:02:55 2010
From: savinay.dharmappa at ti.com (Savinay Dharmappa)
Date: Fri, 12 Nov 2010 13:32:55 +0530
Subject: [PATCH v2 2/2] davinci: Platform support for OMAP-L137/AM17x NOR
	flash driver
Message-ID: <1289548975-21296-1-git-send-email-savinay.dharmappa@ti.com>

From: Aleksey Makarov <amakarov at ru.mvista.com>

Adds platform support for OMAP-L137/AM17x NOR flash driver.

Also, configures chip select 3 to control NOR flash's upper
address lines.

Signed-off-by: Aleksey Makarov <amakarov at ru.mvista.com>
Signed-off-by: Savinay Dharmappa <savinay.dharmappa at ti.com>
---
Since v1:
  Addressed Sergei's comments at [1].

[1] http://linux.davincidsp.com/pipermail/davinci-linux-open-source/2010-November/020923.html 

 arch/arm/mach-davinci/Kconfig           |    8 +
 arch/arm/mach-davinci/board-da830-evm.c |  219 +++++++++++++++++++++++++++++++
 2 files changed, 227 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 9aca60c..baa39ee 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -142,6 +142,14 @@ config DA830_UI_NAND
 	help
 	  Say Y here to use the NAND flash. Do not forget to setup
 	  the switch correctly.
+
+config DA830_UI_NOR
+        bool "NOR flash"
+        help
+          Configure this option to specify the that AEMIF CE2/CE3 will be used to
+          communicate to the NOR flash. Do not forget to setup the switch SW1
+          on UI card correctly.
+
 endchoice
 
 config MACH_DAVINCI_DA850_EVM
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
index 1bb89d3..cd35198 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -20,6 +20,8 @@
 #include <linux/i2c/at24.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
+#include <linux/mtd/latch-addr-flash.h>
+#include <linux/clk.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -429,6 +431,221 @@ static inline void da830_evm_init_nand(int mux_mode)
 static inline void da830_evm_init_nand(int mux_mode) { }
 #endif
 
+#ifdef CONFIG_DA830_UI_NOR
+/*
+ * Number of Address line going to the NOR flash that are latched using
+ * AEMIF address lines  B_EMIF_BA0-B_EMIF_A12  on CS2.
+ */
+#define NOR_WINDOW_SIZE_LOG2     15
+#define NOR_WINDOW_SIZE         (1 << NOR_WINDOW_SIZE_LOG2)
+
+static struct {
+	struct clk *clk;
+	struct {
+		struct resource *res;
+		void __iomem *addr;
+	} latch, aemif;
+} da830_evm_nor;
+
+static struct davinci_aemif_timing da830_evm_norflash_timing = {
+	.wsetup		= 0,
+	.wstrobe	= 40,
+	.whold		= 0,
+	.rsetup		= 0,
+	.rstrobe	= 130,
+	.rhold		= 0,
+	.ta		= 20,
+};
+
+static void da830_evm_nor_set_window(unsigned long offset, void *data)
+{
+	/*
+	 * CS2 and CS3 address lines are used to address NOR flash. Address
+	 * line A0-A14 going to the NOR flash are latched using AEMIF address
+	 * lines B_EMIF_BA0-B_EMIF_A12 on CS2. Address lines A15-A23 of the
+	 * NOR flash are latched using AEMIF address lines B_EMIF_A0-B_EMIF_A6
+	 * on CS3. The offset argument received by this function is the offset
+	 * within NOR flash. Upper address is obtained  by shifting the offset
+	 * by the number of CS2 address lines used (13) and masking it with
+	 * complement of 3 (2 address lines used to address banks) and adding
+	 * the resultant offset value to CS3 base address. Writing to this
+	 * address will latch the upper address lines.
+	 */
+	writeb(0x0, da830_evm_nor.latch.addr +
+		(~3UL & (offset >> (NOR_WINDOW_SIZE_LOG2 - 2))));
+}
+
+static void da830_evm_nor_done(void *data)
+{
+	clk_disable(da830_evm_nor.clk);
+	clk_put(da830_evm_nor.clk);
+	iounmap(da830_evm_nor.latch.addr);
+	release_mem_region(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE);
+	iounmap(da830_evm_nor.aemif.addr);
+	release_mem_region(DA8XX_AEMIF_CTL_BASE, SZ_32K);
+}
+
+static int da830_evm_nor_init(void *data, int cs)
+{
+	/* Turn on AEMIF clocks */
+	da830_evm_nor.clk = clk_get(NULL, "aemif");
+	if (IS_ERR(da830_evm_nor.clk)) {
+		pr_err("%s: could not get AEMIF clock\n", __func__);
+		da830_evm_nor.clk = NULL;
+		return -ENODEV;
+	}
+	clk_enable(da830_evm_nor.clk);
+
+	da830_evm_nor.aemif.res = request_mem_region(DA8XX_AEMIF_CTL_BASE,
+						     SZ_32K, "AEMIF control");
+	if (da830_evm_nor.aemif.res == NULL) {
+		pr_err("%s: could not request AEMIF control region\n",
+			__func__);
+		goto err_clk;
+	}
+
+	da830_evm_nor.aemif.addr = ioremap_nocache(DA8XX_AEMIF_CTL_BASE,
+						   SZ_32K);
+	if (da830_evm_nor.aemif.addr == NULL) {
+		pr_err("%s: could not remap AEMIF control region\n", __func__);
+		goto err_aemif_region;
+	}
+
+	/* Setup AEMIF -- timings, etc. */
+
+	/* Set maximum wait cycles */
+	davinci_aemif_setup_timing(&da830_evm_norflash_timing,
+						da830_evm_nor.aemif.addr, cs);
+
+	davinci_aemif_setup_timing(&da830_evm_norflash_timing,
+					da830_evm_nor.aemif.addr, cs + 1);
+
+	/* Setup the window to access the latch */
+	da830_evm_nor.latch.res =
+		request_mem_region(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE,
+				   "DA830 UI NOR address latch");
+	if (da830_evm_nor.latch.res == NULL) {
+		pr_err("%s: could not request address latch region\n",
+			__func__);
+		goto err_aemif_ioremap;
+	}
+
+	da830_evm_nor.latch.addr =
+		ioremap_nocache(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE);
+	if (da830_evm_nor.latch.addr == NULL) {
+		pr_err("%s: could not remap address latch region\n", __func__);
+		goto err_latch_region;
+	}
+	return 0;
+
+err_latch_region:
+	release_mem_region(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE);
+
+err_aemif_ioremap:
+	iounmap(da830_evm_nor.aemif.addr);
+
+err_aemif_region:
+	release_mem_region(DA8XX_AEMIF_CTL_BASE, SZ_32K);
+
+err_clk:
+	clk_disable(da830_evm_nor.clk);
+	clk_put(da830_evm_nor.clk);
+
+	return -EBUSY;
+}
+
+static struct mtd_partition da830_evm_nor_partitions[] = {
+	/* bootloader (U-Boot, etc) in first 2 sectors */
+	[0] = {
+		.name           = "bootloader",
+		.offset		= 0,
+		.size           = SZ_128K,
+		.mask_flags     = MTD_WRITEABLE, /* force read-only */
+	},
+	/* bootloader parameters in the next 1 sector */
+	[1] = {
+		.name           = "params",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = SZ_64K,
+	},
+	/* kernel */
+	[2] = {
+		.name           = "kernel",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = SZ_2M,
+	},
+	/* file system */
+	[3] = {
+		.name           = "filesystem",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = MTDPART_SIZ_FULL,
+	}
+};
+
+static struct latch_addr_flash_data da830_evm_nor_pdata = {
+	.width          = 1,
+	.size           = SZ_4M,
+	.init           = da830_evm_nor_init,
+	.done           = da830_evm_nor_done,
+	.set_window     = da830_evm_nor_set_window,
+	.nr_parts       = ARRAY_SIZE(da830_evm_nor_partitions),
+	.parts          = da830_evm_nor_partitions,
+};
+
+static struct resource da830_evm_nor_resource[] = {
+	[0] = {
+		.start  = DA8XX_AEMIF_CS2_BASE,
+		.end    = DA8XX_AEMIF_CS2_BASE + NOR_WINDOW_SIZE - 1,
+		.flags  = IORESOURCE_MEM,
+	},
+	[1] = {
+		.start  = DA8XX_AEMIF_CS3_BASE,
+		.end    = DA8XX_AEMIF_CS3_BASE + PAGE_SIZE - 1,
+		.flags  = IORESOURCE_MEM,
+	},
+	[2] = {
+		.start  = DA8XX_AEMIF_CTL_BASE,
+		.end    = DA8XX_AEMIF_CTL_BASE + SZ_32K - 1,
+		.flags  = IORESOURCE_MEM,
+	}
+};
+
+static struct platform_device da830_evm_nor_device = {
+	.name           = "latch-addr-flash",
+	.id             = 0,
+	.dev            = {
+		.platform_data  = &da830_evm_nor_pdata,
+	},
+	.num_resources  = ARRAY_SIZE(da830_evm_nor_resource),
+	.resource       = da830_evm_nor_resource,
+};
+
+static inline void da830_evm_init_nor(int mux_mode)
+{
+	int ret;
+
+	if (HAS_MMC) {
+		pr_warning("WARNING: both MMC/SD and NOR are "
+				"enabled, but they share AEMIF pins.\n"
+					"\tDisable MMC/SD for NOR support.\n");
+		return;
+	}
+
+	ret = davinci_cfg_reg_list(da830_evm_emif25_pins);
+	if (ret)
+		pr_warning("da830_evm_init: EMIF 2.5 mux setup failed: %d\n",
+			  ret);
+
+	ret = platform_device_register(&da830_evm_nor_device);
+	if (ret)
+		pr_warning("da830_evm_init: NOR device not registered.\n");
+
+	gpio_direction_output(mux_mode, 1);
+}
+#else
+static inline void da830_evm_init_nor(int mux_mode) { }
+#endif  /* CONFIG_DA830_UI_NOR */
+
 #ifdef CONFIG_DA830_UI_LCD
 static inline void da830_evm_init_lcdc(int mux_mode)
 {
@@ -469,6 +686,8 @@ static int __init da830_evm_ui_expander_setup(struct i2c_client *client,
 
 	da830_evm_init_nand(gpio + 6);
 
+	da830_evm_init_nor(gpio + 6);
+
 	return 0;
 }
 
-- 
1.5.6



From sshtylyov at mvista.com  Fri Nov 12 06:48:35 2010
From: sshtylyov at mvista.com (Sergei Shtylyov)
Date: Fri, 12 Nov 2010 14:48:35 +0300
Subject: [PATCH 1/2] mtd: NOR flash driver for OMAP-L137/AM17x
In-Reply-To: <000901cb8220$edf40df0$c9dc29d0$@dharmappa@ti.com>
References: <1289462153-4350-1-git-send-email-savinay.dharmappa@ti.com>	<4CDC338F.30600@mvista.com>
	<000901cb8220$edf40df0$c9dc29d0$@dharmappa@ti.com>
Message-ID: <4CDD2993.9040005@mvista.com>

Hello.

On 12-11-2010 7:20, Savinay Dharmappa wrote:

>>> OMAP-L137/AM17x has limited number of dedicated EMIFA
>>> address pins, enough to interface directly to an SDRAM.
>>> If a device such as an asynchronous flash needs to be
>>> attached to the EMIFA, then either GPIO pins or a chip
>>> select may be used to control the flash device's upper
>>> address lines.

>>> This patch adds support for the NOR flash on the OMAP-L137/
>>> AM17x user interface daughter board using the latch-addr-flash
>>> MTD mapping driver which allows flashes to be partially
>>> physically addressed. The upper address lines are set by
>>> a board specific code which is a separate patch.

>>> Signed-off-by: David Griego<dgriego at mvista.com>

>>      It's again not clear why you've dropped my and Alexei's signoff. Did
> we
>> request you to do so?
>
> I had sent this series to all MV folks to get their signoff but nobody
> replied.

    Why get our signoffs again if they were on the original patches that you used?

> If you are OK with the updated version of this patch, which I'll be
> submitting
> shortly, please add your signoff.

    Well, OK...

> Regards,
> Savinay.

WBR, Sergei


From fabioestevam at yahoo.com  Fri Nov 12 11:03:54 2010
From: fabioestevam at yahoo.com (Fabio Estevam)
Date: Fri, 12 Nov 2010 08:03:54 -0800 (PST)
Subject: [PATCH] mtd: Fix section mismatch on sst25l
Message-ID: <843351.91050.qm@web51004.mail.re2.yahoo.com>

Building the kernel with 'make CONFIG_DEBUG_SECTION_MISMATCH=y?

resulted in:

WARNING: vmlinux.o(.data+0x15938): Section mismatch in reference from
the variable sst25l_driver to the function .init.text:sst25l_probe()
The variable sst25l_driver references
the function __init sst25l_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

Fix the section mismatch.

Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
---
 drivers/mtd/devices/sst25l.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
index 684247a..925b1a9 100644
--- a/drivers/mtd/devices/sst25l.c
+++ b/drivers/mtd/devices/sst25l.c
@@ -375,7 +375,7 @@ static struct flash_info *__init sst25l_match_device(struct spi_device *spi)
 	return flash_info;
 }
 
-static int __init sst25l_probe(struct spi_device *spi)
+static int __devinit sst25l_probe(struct spi_device *spi)
 {
 	struct flash_info *flash_info;
 	struct sst25l_flash *flash;
-- 
1.6.0.4


      


From taliaferro62 at gmail.com  Fri Nov 12 13:47:33 2010
From: taliaferro62 at gmail.com (twebb)
Date: Fri, 12 Nov 2010 13:47:33 -0500
Subject: change in how ubiformat works
Message-ID: <AANLkTi=rE+u0OiGXj=HxGYRB9F4p228GpHzGadJm+982@mail.gmail.com>

I use a sequence as follows: " flash_erase - ubiformat - nanddump -
verify " to confirm that a UBI image was properly stored in NAND
flash.  I realize that flash_erase is not recommended because it
destroys erase counters, but this is only done on virgin flash so
should not be an issue.

However, I recently upgraded the mtd-utils, and particularly ubiformat
from 1.4 to 1.5, and now I see that what I read back (via nanddump)
does not match the original UBI image.  Can anyone confirm whether
ubiformat.c changes sometime between 1.4 and 1.5 would result in this
behavior?  I have looked at ubiformat.c changes and am wondering if it
has to do with image sequence number support.

Thanks,
twebb


From joe at perches.com  Fri Nov 12 16:37:50 2010
From: joe at perches.com (Joe Perches)
Date: Fri, 12 Nov 2010 13:37:50 -0800
Subject: [PATCH 00/14] Use printf extension %pR for struct resource
Message-ID: <cover.1289597644.git.joe@perches.com>

Yet more trivia...

Joe Perches (14):
  arch/frv: Use printf extension %pR for struct resource
  arch/mips: Use printf extension %pR for struct resource
  arch/powerpc: Use printf extension %pR for struct resource
  drivers/dma/ppc4xx: Use printf extension %pR for struct resource
  drivers/infiniband: Use printf extension %pR for struct resource
  drivers/mfd: Use printf extension %pR for struct resource
  drivers/mtd/maps: Use printf extension %pR for struct resource
  drivers/mtd/nand: Use printf extension %pR for struct resource
  drivers/net/can/sja1000: Use printf extension %pR for struct resource
  drivers/parisc: Use printf extension %pR for struct resource
  drivers/rapidio: Use printf extension %pR for struct resource
  drivers/uwb: Use printf extension %pR for struct resource
  drivers/video: Use printf extension %pR for struct resource
  sound/ppc: Use printf extension %pR for struct resource

 arch/frv/mb93090-mb00/pci-vdk.c               |    8 ++------
 arch/mips/txx9/generic/pci.c                  |    7 ++-----
 arch/powerpc/kernel/pci_64.c                  |    3 +--
 arch/powerpc/sysdev/tsi108_dev.c              |    8 ++++----
 drivers/dma/ppc4xx/adma.c                     |    5 ++---
 drivers/infiniband/hw/ipath/ipath_driver.c    |    5 ++---
 drivers/mfd/sm501.c                           |    7 ++-----
 drivers/mtd/maps/amd76xrom.c                  |    7 ++-----
 drivers/mtd/maps/ck804xrom.c                  |    7 ++-----
 drivers/mtd/maps/esb2rom.c                    |    9 +++------
 drivers/mtd/maps/ichxrom.c                    |    9 +++------
 drivers/mtd/maps/physmap_of.c                 |    4 +---
 drivers/mtd/maps/scx200_docflash.c            |    5 ++---
 drivers/mtd/nand/pasemi_nand.c                |    2 +-
 drivers/net/can/sja1000/sja1000_of_platform.c |    8 ++------
 drivers/parisc/dino.c                         |   13 +++++--------
 drivers/parisc/hppb.c                         |    6 ++----
 drivers/rapidio/rio.c                         |    4 ++--
 drivers/uwb/umc-dev.c                         |    7 ++-----
 drivers/video/platinumfb.c                    |    8 ++------
 sound/ppc/pmac.c                              |   12 ++++--------
 21 files changed, 48 insertions(+), 96 deletions(-)

-- 
1.7.3.1.g432b3.dirty



From joe at perches.com  Fri Nov 12 16:37:57 2010
From: joe at perches.com (Joe Perches)
Date: Fri, 12 Nov 2010 13:37:57 -0800
Subject: [PATCH 07/14] drivers/mtd/maps: Use printf extension %pR for struct
	resource
In-Reply-To: <cover.1289597644.git.joe@perches.com>
References: <cover.1289597644.git.joe@perches.com>
Message-ID: <5f4704a88f6e5bf55f19b4e6d8c7abce6ea20f71.1289597644.git.joe@perches.com>

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <joe at perches.com>
---
 drivers/mtd/maps/amd76xrom.c       |    7 ++-----
 drivers/mtd/maps/ck804xrom.c       |    7 ++-----
 drivers/mtd/maps/esb2rom.c         |    9 +++------
 drivers/mtd/maps/ichxrom.c         |    9 +++------
 drivers/mtd/maps/physmap_of.c      |    4 +---
 drivers/mtd/maps/scx200_docflash.c |    5 ++---
 6 files changed, 13 insertions(+), 28 deletions(-)

diff --git a/drivers/mtd/maps/amd76xrom.c b/drivers/mtd/maps/amd76xrom.c
index 19fe92d..77d64ce 100644
--- a/drivers/mtd/maps/amd76xrom.c
+++ b/drivers/mtd/maps/amd76xrom.c
@@ -149,11 +149,8 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev,
 	if (request_resource(&iomem_resource, &window->rsrc)) {
 		window->rsrc.parent = NULL;
 		printk(KERN_ERR MOD_NAME
-			" %s(): Unable to register resource"
-			" 0x%.16llx-0x%.16llx - kernel bug?\n",
-			__func__,
-			(unsigned long long)window->rsrc.start,
-			(unsigned long long)window->rsrc.end);
+		       " %s(): Unable to register resource %pR - kernel bug?\n",
+		       __func__, &window->rsrc);
 	}
 
 
diff --git a/drivers/mtd/maps/ck804xrom.c b/drivers/mtd/maps/ck804xrom.c
index ddb462b..5fdb7b2 100644
--- a/drivers/mtd/maps/ck804xrom.c
+++ b/drivers/mtd/maps/ck804xrom.c
@@ -178,11 +178,8 @@ static int __devinit ck804xrom_init_one (struct pci_dev *pdev,
 	if (request_resource(&iomem_resource, &window->rsrc)) {
 		window->rsrc.parent = NULL;
 		printk(KERN_ERR MOD_NAME
-			" %s(): Unable to register resource"
-			" 0x%.016llx-0x%.016llx - kernel bug?\n",
-			__func__,
-			(unsigned long long)window->rsrc.start,
-			(unsigned long long)window->rsrc.end);
+		       " %s(): Unable to register resource %pR - kernel bug?\n",
+			__func__, &window->rsrc);
 	}
 
 
diff --git a/drivers/mtd/maps/esb2rom.c b/drivers/mtd/maps/esb2rom.c
index d12c93d..4feb750 100644
--- a/drivers/mtd/maps/esb2rom.c
+++ b/drivers/mtd/maps/esb2rom.c
@@ -242,12 +242,9 @@ static int __devinit esb2rom_init_one(struct pci_dev *pdev,
 	window->rsrc.flags = IORESOURCE_MEM | IORESOURCE_BUSY;
 	if (request_resource(&iomem_resource, &window->rsrc)) {
 		window->rsrc.parent = NULL;
-		printk(KERN_DEBUG MOD_NAME
-			": %s(): Unable to register resource"
-			" 0x%.08llx-0x%.08llx - kernel bug?\n",
-			__func__,
-			(unsigned long long)window->rsrc.start,
-			(unsigned long long)window->rsrc.end);
+		printk(KERN_DEBUG MOD_NAME ": "
+		       "%s(): Unable to register resource %pR - kernel bug?\n",
+			__func__, &window->rsrc);
 	}
 
 	/* Map the firmware hub into my address space. */
diff --git a/drivers/mtd/maps/ichxrom.c b/drivers/mtd/maps/ichxrom.c
index f102bf2..1337a41 100644
--- a/drivers/mtd/maps/ichxrom.c
+++ b/drivers/mtd/maps/ichxrom.c
@@ -175,12 +175,9 @@ static int __devinit ichxrom_init_one (struct pci_dev *pdev,
 	window->rsrc.flags = IORESOURCE_MEM | IORESOURCE_BUSY;
 	if (request_resource(&iomem_resource, &window->rsrc)) {
 		window->rsrc.parent = NULL;
-		printk(KERN_DEBUG MOD_NAME
-			": %s(): Unable to register resource"
-			" 0x%.16llx-0x%.16llx - kernel bug?\n",
-			__func__,
-			(unsigned long long)window->rsrc.start,
-			(unsigned long long)window->rsrc.end);
+		printk(KERN_DEBUG MOD_NAME ": "
+		       "%s(): Unable to register resource %pR - kernel bug?\n",
+		       __func__, &window->rsrc);
 	}
 
 	/* Map the firmware hub into my address space. */
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
index 9861814..8506578 100644
--- a/drivers/mtd/maps/physmap_of.c
+++ b/drivers/mtd/maps/physmap_of.c
@@ -274,9 +274,7 @@ static int __devinit of_flash_probe(struct platform_device *dev,
 			continue;
 		}
 
-		dev_dbg(&dev->dev, "of_flash device: %.8llx-%.8llx\n",
-			(unsigned long long)res.start,
-			(unsigned long long)res.end);
+		dev_dbg(&dev->dev, "of_flash device: %pR\n", &res);
 
 		err = -EBUSY;
 		res_size = resource_size(&res);
diff --git a/drivers/mtd/maps/scx200_docflash.c b/drivers/mtd/maps/scx200_docflash.c
index b5391eb..027e628 100644
--- a/drivers/mtd/maps/scx200_docflash.c
+++ b/drivers/mtd/maps/scx200_docflash.c
@@ -166,9 +166,8 @@ static int __init init_scx200_docflash(void)
 		outl(pmr, scx200_cb_base + SCx200_PMR);
 	}
 
-       	printk(KERN_INFO NAME ": DOCCS mapped at 0x%llx-0x%llx, width %d\n",
-			(unsigned long long)docmem.start,
-			(unsigned long long)docmem.end, width);
+	printk(KERN_INFO NAME ": DOCCS mapped at %pR, width %d\n",
+	       &docmem, width);
 
 	scx200_docflash_map.size = size;
 	if (width == 8)
-- 
1.7.3.1.g432b3.dirty



From joe at perches.com  Fri Nov 12 16:37:58 2010
From: joe at perches.com (Joe Perches)
Date: Fri, 12 Nov 2010 13:37:58 -0800
Subject: [PATCH 08/14] drivers/mtd/nand: Use printf extension %pR for struct
	resource
In-Reply-To: <cover.1289597644.git.joe@perches.com>
References: <cover.1289597644.git.joe@perches.com>
Message-ID: <7b7e68efb016f0b0d53bb3119208dd937c79d53c.1289597644.git.joe@perches.com>

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <joe at perches.com>
---
 drivers/mtd/nand/pasemi_nand.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers/mtd/nand/pasemi_nand.c
index 6ddb246..bb277a5 100644
--- a/drivers/mtd/nand/pasemi_nand.c
+++ b/drivers/mtd/nand/pasemi_nand.c
@@ -107,7 +107,7 @@ static int __devinit pasemi_nand_probe(struct platform_device *ofdev,
 	if (pasemi_nand_mtd)
 		return -ENODEV;
 
-	pr_debug("pasemi_nand at %llx-%llx\n", res.start, res.end);
+	pr_debug("pasemi_nand at %pR\n", &res);
 
 	/* Allocate memory for MTD device structure and private data */
 	pasemi_nand_mtd = kzalloc(sizeof(struct mtd_info) +
-- 
1.7.3.1.g432b3.dirty



From taliaferro62 at gmail.com  Fri Nov 12 16:59:55 2010
From: taliaferro62 at gmail.com (twebb)
Date: Fri, 12 Nov 2010 16:59:55 -0500
Subject: severity of bug fixed with commit 180c09d
Message-ID: <AANLkTinOknf6VGWwPXjmcRv6Bhg=Qw4ErrXuuuK4OF0X@mail.gmail.com>

Can someone explain the severity of this bug?  It was fixed in
ubiformat.c in mid-January of this year.  I'm using ubiformat from
prior to this fix and do not see the problem that is described in the
commit log.  I'm trying to understand the bug in order to explain why
I'm not seeing the problem and to determine if I'm susceptible to the
bug.

Thanks,
twebb


From dedekind1 at gmail.com  Sat Nov 13 04:39:17 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 13 Nov 2010 11:39:17 +0200
Subject: [PATCH] mtd: bcm963xx-flash: try JEDEC probe if CFI fails
In-Reply-To: <20101029141749.23774.90495.stgit@dev.siriade.com>
References: <20101029141749.23774.90495.stgit@dev.siriade.com>
Message-ID: <1289641157.2218.3.camel@localhost>

On Fri, 2010-10-29 at 16:17 +0200, Guillaume LECERF wrote:
> Signed-off-by: Guillaume LECERF <glecerf at gmail.com>
> ---
>  drivers/mtd/maps/bcm963xx-flash.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)

Pushed to l2-mtd-2.6.git, thanks you.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Sat Nov 13 04:39:37 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 13 Nov 2010 11:39:37 +0200
Subject: [RFC] mtd: Fix MTD_OF_PARTS for all arch and minor tidy of
	MTD_PARTITIONS
In-Reply-To: <20101030063425.22588.76571.stgit@localhost6.localdomain6>
References: <20101030063425.22588.76571.stgit@localhost6.localdomain6>
Message-ID: <1289641177.2218.4.camel@localhost>

On Sat, 2010-10-30 at 07:35 +0100, Grant Likely wrote:
> MTD_OF_PARTS should be possible on all architectures, not just
> powerpc and microblaze, and it probably should not be a user
> selectable option.  Neither does it need to be in a separate module.
> 
> Also, rework MTD Kconfig to group options dependant on MTD_PARTITIONS
> into a if/endif block.  Do the same for MTD_REDBOOT_PARTS.
> 
> Signed-off-by: Grant Likely <grant.likely at secretlab.ca>

Pushed to l2-mtd-2.6.git, thanks you.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Sat Nov 13 05:25:07 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 13 Nov 2010 12:25:07 +0200
Subject: [PATCH 1/3] mtd: m25p80: Reinstate error print on unrecognized
	flash
In-Reply-To: <fbcf2b0a4d8ebff3378b9522ce81ad82@localhost>
References: <fbcf2b0a4d8ebff3378b9522ce81ad82@localhost>
Message-ID: <1289643907.2218.5.camel@localhost>

On Sat, 2010-10-30 at 21:11 -0700, Kevin Cernekee wrote:
> Commit b34bc037b26e621e5fc13466767e4da110a7b3d3 removed the
> "unrecognized JEDEC id" error message, causing the probe function to
> silently abort if the flash ID is unrecognized.
> 
> It is desirable to produce diagnostic output in this situation so that
> the user has some idea what went wrong.

Pushed the series to l2-mtd-2.6.git, thanks!

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Sat Nov 13 05:38:55 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 13 Nov 2010 12:38:55 +0200
Subject: [PATCH 1/5] mtd: fix bdev exclusive open bugs in
	block2mtd::add_device()
In-Reply-To: <1288628129-12811-2-git-send-email-tj@kernel.org>
References: <1288628129-12811-1-git-send-email-tj@kernel.org>
	<1288628129-12811-2-git-send-email-tj@kernel.org>
Message-ID: <1289644735.2218.8.camel@localhost>

Hi,

On Mon, 2010-11-01 at 17:15 +0100, Tejun Heo wrote:
> +			if (!IS_ERR(bdev)) {
> +				int ret;
> +				ret = bd_claim(bdev, dev);
> +				if (ret) {
> +					blkdev_put(bdev,
> +						   FMODE_READ | FMODE_WRITE);

Would be a bit cleaner to define ea temporary variable:

fmode_t mode = FMODE_READ | FMODE_WRITE;

Would you to re-send with this little change please?

And ideally, 2 independent patches would be nicer because you fix 2
independent issues.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From tj at kernel.org  Sat Nov 13 05:42:58 2010
From: tj at kernel.org (Tejun Heo)
Date: Sat, 13 Nov 2010 11:42:58 +0100
Subject: [PATCH 1/5] mtd: fix bdev exclusive open bugs in
	block2mtd::add_device()
In-Reply-To: <1289644735.2218.8.camel@localhost>
References: <1288628129-12811-1-git-send-email-tj@kernel.org>	
	<1288628129-12811-2-git-send-email-tj@kernel.org>
	<1289644735.2218.8.camel@localhost>
Message-ID: <4CDE6BB2.5070806@kernel.org>

Hello,

On 11/13/2010 11:38 AM, Artem Bityutskiy wrote:
> On Mon, 2010-11-01 at 17:15 +0100, Tejun Heo wrote:
>> +			if (!IS_ERR(bdev)) {
>> +				int ret;
>> +				ret = bd_claim(bdev, dev);
>> +				if (ret) {
>> +					blkdev_put(bdev,
>> +						   FMODE_READ | FMODE_WRITE);
> 
> Would be a bit cleaner to define ea temporary variable:
> 
> fmode_t mode = FMODE_READ | FMODE_WRITE;
> 
> Would you to re-send with this little change please?

Yeap, sure.

> And ideally, 2 independent patches would be nicer because you fix 2
> independent issues.

Hmmm... not really.  The patch is small enough and splitting it won't
really buy as any better bisectability.  Splitting patches into
logical changes is a good thing but it's no religious dogma.  Let's
apply it to the point it actually helps.

Thank you.

-- 
tejun


From dedekind1 at gmail.com  Sat Nov 13 05:48:59 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 13 Nov 2010 12:48:59 +0200
Subject: [PATCH] trivial: nandsim.c spell fixes in comments
In-Reply-To: <AANLkTi=ON7CSbGq=X9wOBNcNjY05-ECJzpjxXFiE0fQM@mail.gmail.com>
References: <AANLkTimGScstLNC2Hs1v-h6BF0y8GFTw4TJw8JEt+j8X@mail.gmail.com>
	<70E876B0EA86DD4BAF101844BC814DFE093EEF9923@Cloud.RL.local>
	<AANLkTi=ON7CSbGq=X9wOBNcNjY05-ECJzpjxXFiE0fQM@mail.gmail.com>
Message-ID: <1289645339.2218.13.camel@localhost>

On Tue, 2010-11-02 at 16:20 +0530, srimugunthan dhandapani wrote:
> attached patch fixes the program->programm and other  spellfixes in
> comments in nandsim.c
> 
> Signed-off-by: srimugunthan  <srimugunthan.dhandapani at gmail.com>

I've applied this patch to l2-mtd-2.6.git, but please, next time send
patches so that I could just save the e-mail and apply with git-am. In
this case I had to do a lot of work:

1. Try git-am to the body and fail
2. Check that your attachment matches the body
3. Edit your attachement and add author/signoff-by/etc for you.

But thanks for the fixes anyway.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Sat Nov 13 05:51:02 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 13 Nov 2010 12:51:02 +0200
Subject: [PATCH] mtd: OneNAND: Fix page offset handling at 2KiB pagesize
In-Reply-To: <20101102012846.GA2470@july>
References: <20101102012846.GA2470@july>
Message-ID: <1289645462.2218.14.camel@localhost>

On Tue, 2010-11-02 at 10:28 +0900, Kyungmin Park wrote:
> From: Kyungmin Park <kyungmin.park at samsung.com>
> 
> When use the 2KiB pagesize, it should be set the correct page offset.
> 
> Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>

Pushed to l2-mtd-2.6.git, thank you.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From tj at kernel.org  Sat Nov 13 05:59:54 2010
From: tj at kernel.org (Tejun Heo)
Date: Sat, 13 Nov 2010 11:59:54 +0100
Subject: [PATCH UPDATED 1/5] mtd: fix bdev exclusive open bugs in
	block2mtd::add_device()
In-Reply-To: <1288628129-12811-2-git-send-email-tj@kernel.org>
References: <1288628129-12811-1-git-send-email-tj@kernel.org>
	<1288628129-12811-2-git-send-email-tj@kernel.org>
Message-ID: <4CDE6FAA.9030605@kernel.org>

There are two bdev exclusive open bugs.

* open_bdev_exclusive() must not be called with NULL holder.  Use dev
  as the holder.

* open_by_devnum() doesn't open the bdev exclusively but
  block2mtd_free_device() always assumes it.  Explicitly claim the
  bdev.

The latter is rather clumsy but will be simplified with future
blkdev_get/put() cleanups.

- Updated to use local variable @mode to cache FMODE_* masks as
  suggested by Artem Bityutskiy.

Signed-off-by: Tejun Heo <tj at kernel.org>
Cc: linux-mtd at lists.infradead.org
Cc: Artem Bityutskiy <dedekind1 at gmail.com>
---

This change will cause two conflicts in the series.  I'm not reposting
them now as they're mostly trivial.  Git tree is fully updated.

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git cleanup-bd_claim

Jens, please let me know when/if you want the full series reposted.

Thanks.

 drivers/mtd/devices/block2mtd.c |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

Index: work/drivers/mtd/devices/block2mtd.c
===================================================================
--- work.orig/drivers/mtd/devices/block2mtd.c
+++ work/drivers/mtd/devices/block2mtd.c
@@ -234,6 +234,7 @@ static void block2mtd_free_device(struct
 /* FIXME: ensure that mtd->size % erase_size == 0 */
 static struct block2mtd_dev *add_device(char *devname, int erase_size)
 {
+	const fmode_t mode = FMODE_READ | FMODE_WRITE;
 	struct block_device *bdev;
 	struct block2mtd_dev *dev;
 	char *name;
@@ -246,7 +247,7 @@ static struct block2mtd_dev *add_device(
 		return NULL;

 	/* Get a handle on the device */
-	bdev = open_bdev_exclusive(devname, FMODE_READ|FMODE_WRITE, NULL);
+	bdev = open_bdev_exclusive(devname, mode, dev);
 #ifndef MODULE
 	if (IS_ERR(bdev)) {

@@ -255,7 +256,15 @@ static struct block2mtd_dev *add_device(

 		dev_t devt = name_to_dev_t(devname);
 		if (devt) {
-			bdev = open_by_devnum(devt, FMODE_WRITE | FMODE_READ);
+			bdev = open_by_devnum(devt, mode);
+			if (!IS_ERR(bdev)) {
+				int ret;
+				ret = bd_claim(bdev, dev);
+				if (ret) {
+					blkdev_put(bdev, mode);
+					bdev = ERR_PTR(ret);
+				}
+			}
 		}
 	}
 #endif


From dedekind1 at gmail.com  Sat Nov 13 06:07:13 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 13 Nov 2010 13:07:13 +0200
Subject: Suggested patch: reset errno after isatty()
In-Reply-To: <AANLkTikQtNwsPkJSkmpmC=kMZpmdqHDW0HROeUBNDOEi@mail.gmail.com>
References: <AANLkTimwumfui-_T1ScDYwMLKbNh1ia-SDMUg56wTfN5@mail.gmail.com>
	<4CD11C03.3090207@parrot.com>
	<AANLkTimfxjrtV4eks5tK68h6TQ20soib+6gaTC+QyB4a@mail.gmail.com>
	<AANLkTinSj2vAJJjeSxF-rvq08OVsnw3YcpRSpuOfv9pQ@mail.gmail.com>
	<AANLkTikQtNwsPkJSkmpmC=kMZpmdqHDW0HROeUBNDOEi@mail.gmail.com>
Message-ID: <1289646433.2218.22.camel@localhost>

On Sun, 2010-11-07 at 23:36 +0100, Ketil Froyn wrote:
> On Sat, Nov 6, 2010 at 9:54 AM, Mike Frysinger <vapier.adi at gmail.com> wrote:
> >
> > doesnt libmtd provide read functions already ?
> > -mike
> 
> I'm not familiar with libmtd, but the latest release (v1.4.1) just did
> it itself with pread, and since that failed I fixed it.
> 
> The new code in the repo, which appears to use libmtd, didn't work for
> me, and the fix appeared more complicated. My patch is for v1.4.1,
> which should also make it easier to integrate for package maintainers,
> if they wish, pending a working rewrite.

Ketil, you have a point, 

however, Mike is right, fixes should be back-ports, or if you fix a
problem in the older release, you should fix it in the master branch as
well, or show that it does not exist in the master branch. This is the
only way it is possible to keep development under control.

We really need to be sure that whatever is fixed in older releases is
also fixed in the newer. Yes, this is more work for you but hey, I'm
also doing this stuff in my spare time.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Sat Nov 13 06:10:34 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 13 Nov 2010 13:10:34 +0200
Subject: [PATCH 1/5] mtd: fix bdev exclusive open bugs in
	block2mtd::add_device()
In-Reply-To: <4CDE6BB2.5070806@kernel.org>
References: <1288628129-12811-1-git-send-email-tj@kernel.org>
	<1288628129-12811-2-git-send-email-tj@kernel.org>
	<1289644735.2218.8.camel@localhost>  <4CDE6BB2.5070806@kernel.org>
Message-ID: <1289646634.2218.25.camel@localhost>

On Sat, 2010-11-13 at 11:42 +0100, Tejun Heo wrote:
> Hmmm... not really.  The patch is small enough and splitting it won't
> really buy as any better bisectability.  Splitting patches into
> logical changes is a good thing but it's no religious dogma.  Let's
> apply it to the point it actually helps.

Well, it is more about if your second fix is buggy, we could revert it
without reverting the first fix. But anyway, this is not a big deal, so
let's forget about this indeed.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Sat Nov 13 06:14:25 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 13 Nov 2010 13:14:25 +0200
Subject: [PATCH UPDATED 1/5] mtd: fix bdev exclusive open bugs in
	block2mtd::add_device()
In-Reply-To: <4CDE6FAA.9030605@kernel.org>
References: <1288628129-12811-1-git-send-email-tj@kernel.org>
	<1288628129-12811-2-git-send-email-tj@kernel.org>
	<4CDE6FAA.9030605@kernel.org>
Message-ID: <1289646865.2218.27.camel@localhost>

On Sat, 2010-11-13 at 11:59 +0100, Tejun Heo wrote:
> There are two bdev exclusive open bugs.
> 
> * open_bdev_exclusive() must not be called with NULL holder.  Use dev
>   as the holder.
> 
> * open_by_devnum() doesn't open the bdev exclusively but
>   block2mtd_free_device() always assumes it.  Explicitly claim the
>   bdev.
> 
> The latter is rather clumsy but will be simplified with future
> blkdev_get/put() cleanups.
> 
> - Updated to use local variable @mode to cache FMODE_* masks as
>   suggested by Artem Bityutskiy.

Do you want this patch to go in via Jens' tree with the rest of the
series, or as an independent patch via the mtd tree?

Anyway,

Acked-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>

Thanks!

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From tj at kernel.org  Sat Nov 13 06:18:03 2010
From: tj at kernel.org (Tejun Heo)
Date: Sat, 13 Nov 2010 12:18:03 +0100
Subject: [PATCH UPDATED 1/5] mtd: fix bdev exclusive open bugs in
	block2mtd::add_device()
In-Reply-To: <1289646865.2218.27.camel@localhost>
References: <1288628129-12811-1-git-send-email-tj@kernel.org>	
	<1288628129-12811-2-git-send-email-tj@kernel.org>	
	<4CDE6FAA.9030605@kernel.org> <1289646865.2218.27.camel@localhost>
Message-ID: <4CDE73EB.2090208@kernel.org>

Hello,

On 11/13/2010 12:14 PM, Artem Bityutskiy wrote:
> On Sat, 2010-11-13 at 11:59 +0100, Tejun Heo wrote:
>> There are two bdev exclusive open bugs.
>>
>> * open_bdev_exclusive() must not be called with NULL holder.  Use dev
>>   as the holder.
>>
>> * open_by_devnum() doesn't open the bdev exclusively but
>>   block2mtd_free_device() always assumes it.  Explicitly claim the
>>   bdev.
>>
>> The latter is rather clumsy but will be simplified with future
>> blkdev_get/put() cleanups.
>>
>> - Updated to use local variable @mode to cache FMODE_* masks as
>>   suggested by Artem Bityutskiy.
> 
> Do you want this patch to go in via Jens' tree with the rest of the
> series, or as an independent patch via the mtd tree?

It probably would be easier if this is routed through Jens' tree as
it's necessary for later patches in the series, but this being a fix,
this should be merged during this cycle rather than the next one.
Jens, how do you want to proceed?

Thank you.

-- 
tejun


From dedekind1 at gmail.com  Sat Nov 13 06:19:25 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 13 Nov 2010 13:19:25 +0200
Subject: [PATCH 16/49] drivers/mtd: Use vzalloc
In-Reply-To: <61af073f284d2169834120889a641cd11c370643.1288925424.git.joe@perches.com>
References: <alpine.DEB.2.00.1011031108260.11625@router.home>
	<61af073f284d2169834120889a641cd11c370643.1288925424.git.joe@perches.com>
Message-ID: <1289647165.2218.29.camel@localhost>

On Thu, 2010-11-04 at 20:07 -0700, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe at perches.com>
> ---
>  drivers/mtd/nand/nandsim.c |    3 +--
>  drivers/mtd/ubi/vtbl.c     |    6 ++----
>  2 files changed, 3 insertions(+), 6 deletions(-)

Pushed to l2-mtd-2.6.git, thanks.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Sat Nov 13 06:19:34 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 13 Nov 2010 13:19:34 +0200
Subject: [PATCH 38/49] fs/jffs2: Use vzalloc
In-Reply-To: <1c6caf522ea9088919a89c8c23c54436c7020cdb.1288925425.git.joe@perches.com>
References: <alpine.DEB.2.00.1011031108260.11625@router.home>
	<1c6caf522ea9088919a89c8c23c54436c7020cdb.1288925425.git.joe@perches.com>
Message-ID: <1289647174.2218.30.camel@localhost>

On Thu, 2010-11-04 at 20:08 -0700, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe at perches.com>
> ---
>  fs/jffs2/build.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)

Pushed to l2-mtd-2.6.git, thanks.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Sat Nov 13 06:31:58 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 13 Nov 2010 13:31:58 +0200
Subject: [PATCH 01/10] mtd-utils: nanddump: Allow 64-bit lengths
In-Reply-To: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
References: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
Message-ID: <1289647918.2218.33.camel@localhost>

On Wed, 2010-11-03 at 01:27 -0700, Brian Norris wrote:
> We should allow the dump length to be 64-bit, especially since the value
> was read in as a "long long" by strtoll().
> 
> Signed-off-by: Brian Norris <computersforpeace at gmail.com>
> ---
>  nanddump.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/nanddump.c b/nanddump.c
> index 86a71c9..fe29596 100644
> --- a/nanddump.c
> +++ b/nanddump.c
> @@ -83,7 +83,7 @@ static bool			noecc = false;		// don't error correct
>  static bool			noskipbad = false;	// don't skip bad blocks
>  static bool			omitoob = false;	// omit oob data
>  static unsigned long long	start_addr;		// start address
> -static unsigned long		length;			// dump length
> +static unsigned long long	length;			// dump length
>  static const char		*mtddev;		// mtd device name
>  static const char		*dumpfile;		// dump file name
>  static bool			omitbad = false;

This patch does not apply. Which version of MTD utils do you use? This
change was done long time ago by the following commit:

commit b16c1b630491a461b3ebb55d714d7bb0cd122737
Author: Grant Erickson <gerickson at nuovations.com>
Date:   Sun Sep 7 20:45:21 2008 +0000

    nanddump: Qualifier Clean-up
    
    Static-qualified all globals except 'main' because they have no use
    beyond file scope.
    Constant-qualified MTD device and input positional parameter globals.
    Constant-qualified argv array.
    
    Signed-off-by: Grant Erickson <gerickson at nuovations.com>
    Acked-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
    Signed-off-by: Josh Boyer <jwboyer at gmail.com>

Forgot to git-pull ? :-))))

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Sat Nov 13 06:37:58 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 13 Nov 2010 13:37:58 +0200
Subject: [PATCH 01/10] mtd-utils: nanddump: Allow 64-bit lengths
In-Reply-To: <1289647918.2218.33.camel@localhost>
References: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
	<1289647918.2218.33.camel@localhost>
Message-ID: <1289648278.2218.35.camel@localhost>

On Sat, 2010-11-13 at 13:31 +0200, Artem Bityutskiy wrote:
> Forgot to git-pull ? :-))))

Brian, ignore this e-mail please :-) I've just pushed this patch,
thanks!

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Sat Nov 13 06:48:39 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 13 Nov 2010 13:48:39 +0200
Subject: [PATCH 06/10] mtd-utils: nandwrite: Use 64-bit offset
In-Reply-To: <1288772847-8120-6-git-send-email-computersforpeace@gmail.com>
References: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
	<1288772847-8120-6-git-send-email-computersforpeace@gmail.com>
Message-ID: <1289648919.2218.39.camel@localhost>

On Wed, 2010-11-03 at 01:27 -0700, Brian Norris wrote:
> -				mtdoffset = strtol(optarg, NULL, 0);
> +				mtdoffset = strtoll(optarg, NULL, 0);

Ideally this should check for strtoll failures, but this just a side
note. Not sure if this is the best way, but I'd do it like this:

char *endp;

mtdoffset = strtoul(optarg, &endp, 0);
if (*endp != '\0' || endp == optarg)
	return errmsg("bad volume alignment: \"%s\"", optarg);

or something like this. The check for negative mtdoffset could be there
as well.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Sat Nov 13 06:53:47 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 13 Nov 2010 13:53:47 +0200
Subject: [PATCH v2 09/10] mtd-utils: nandwrite: full 64-bit support w/
	libmtd
In-Reply-To: <1289457554-24155-1-git-send-email-computersforpeace@gmail.com>
References: <AANLkTimUr8Dvmz7=Owk9dEgWt7hdTFFT+NDXczWd9DfV@mail.gmail.com>
	<1289457554-24155-1-git-send-email-computersforpeace@gmail.com>
Message-ID: <1289649227.2218.40.camel@localhost>

On Wed, 2010-11-10 at 22:39 -0800, Brian Norris wrote:
> Several ioctls are replaced with libmtd calls which should give us 64-bit
> support for large devices. libmtd mostly provides drop-in replacements
> for the functionality we need. However, when we require erasure of a
> badly-written block, mtd_erase() only erases a single block, whereas
> MEMERASE could erase a larger region. In nandwrite, we may have a "virtual
> blocksize" of more than one (when blockalign > 1). Thus, I added a loop
> for this case.

You could as well just introduce another libmtd helper - would be
cleaner, IMO.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Sat Nov 13 06:55:02 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 13 Nov 2010 13:55:02 +0200
Subject: [PATCH 01/10] mtd-utils: nanddump: Allow 64-bit lengths
In-Reply-To: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
References: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
Message-ID: <1289649302.2218.41.camel@localhost>

On Wed, 2010-11-03 at 01:27 -0700, Brian Norris wrote:
> We should allow the dump length to be 64-bit, especially since the value
> was read in as a "long long" by strtoll().
> 
> Signed-off-by: Brian Norris <computersforpeace at gmail.com>

I've pushed whole series, thanks a lot!

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Sat Nov 13 06:55:38 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 13 Nov 2010 13:55:38 +0200
Subject: Suggested patch: reset errno after isatty()
In-Reply-To: <1289646433.2218.22.camel@localhost>
References: <AANLkTimwumfui-_T1ScDYwMLKbNh1ia-SDMUg56wTfN5@mail.gmail.com>
	<4CD11C03.3090207@parrot.com>
	<AANLkTimfxjrtV4eks5tK68h6TQ20soib+6gaTC+QyB4a@mail.gmail.com>
	<AANLkTinSj2vAJJjeSxF-rvq08OVsnw3YcpRSpuOfv9pQ@mail.gmail.com>
	<AANLkTikQtNwsPkJSkmpmC=kMZpmdqHDW0HROeUBNDOEi@mail.gmail.com>
	<1289646433.2218.22.camel@localhost>
Message-ID: <1289649338.2218.42.camel@localhost>

On Sat, 2010-11-13 at 13:07 +0200, Artem Bityutskiy wrote:
> On Sun, 2010-11-07 at 23:36 +0100, Ketil Froyn wrote:
> > On Sat, Nov 6, 2010 at 9:54 AM, Mike Frysinger <vapier.adi at gmail.com> wrote:
> > >
> > > doesnt libmtd provide read functions already ?
> > > -mike
> > 
> > I'm not familiar with libmtd, but the latest release (v1.4.1) just did
> > it itself with pread, and since that failed I fixed it.
> > 
> > The new code in the repo, which appears to use libmtd, didn't work for
> > me, and the fix appeared more complicated. My patch is for v1.4.1,
> > which should also make it easier to integrate for package maintainers,
> > if they wish, pending a working rewrite.
> 
> Ketil, you have a point, 
> 
> however, Mike is right, fixes should be back-ports, or if you fix a
> problem in the older release, you should fix it in the master branch as
> well, or show that it does not exist in the master branch. This is the
> only way it is possible to keep development under control.
> 
> We really need to be sure that whatever is fixed in older releases is
> also fixed in the newer. Yes, this is more work for you but hey, I'm
> also doing this stuff in my spare time.

BTW, with patches from Brian Norris which I just pushed the master
branch may work better for you.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Sat Nov 13 07:01:59 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 13 Nov 2010 14:01:59 +0200
Subject: [PATCHv2 0/3] mtd: onenand: add cache program feature for 4kb
	page onenand
In-Reply-To: <1288781721-31771-1-git-send-email-roman.tereshonkov@nokia.com>
References: <1288781721-31771-1-git-send-email-roman.tereshonkov@nokia.com>
Message-ID: <1289649719.2218.43.camel@localhost>

On Wed, 2010-11-03 at 12:55 +0200, Roman Tereshonkov wrote:
> Implement cache program feature for 4KB page onenand.
> This feature improves the write data performance.
> The observed 128KB data program speed change is
> from 8827KB/s to 14156 KB/s when the feature is enabled.
> 
> Roman Tereshonkov (3):
>   mtd: onenand: add option and variable for cache program feature
>   mtd: onenand: fix omap2 code to handle cache program feature
>   mtd: onenand: implement cache program feature for 4kb page onenand
> 
>  drivers/mtd/onenand/omap2.c        |   12 +++++++++---
>  drivers/mtd/onenand/onenand_base.c |   22 +++++++++++++++++++---
>  include/linux/mtd/onenand.h        |   12 ++++++++++++
>  3 files changed, 40 insertions(+), 6 deletions(-)

Pushed all 3 patches to l2-mtd-2.6.git, thanks.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Sat Nov 13 07:13:59 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 13 Nov 2010 14:13:59 +0200
Subject: [PATCH] nand wait timeout fix
In-Reply-To: <4CD149D2.5080900@parrot.com>
References: <4CD149D2.5080900@parrot.com>
Message-ID: <1289650439.2218.47.camel@localhost>

Matthieu,

On Wed, 2010-11-03 at 12:38 +0100, Matthieu CASTET wrote:
> nand_wait_ready timeout should not depends of HZ value.
> panic_nand_wait take an relative timeout, not a absolute one.
> warn if nand_wait exit while the nand is still busy.
> 
> Signed-off-by: Matthieu CASTET <matthieu.castet at parrot.com>

could you please improve commit message so that it would explain why you
do each of the changes, which problem you solve?

...

> @@ -874,7 +874,7 @@ static int nand_wait(struct mtd_info *mtd, struct nand_chip *chip)
>  		chip->cmdfunc(mtd, NAND_CMD_STATUS, -1, -1);
>  
>  	if (in_interrupt() || oops_in_progress)
> -		panic_nand_wait(mtd, chip, timeo);
> +		panic_nand_wait(mtd, chip, 400);
>  	else {
>  		while (time_before(jiffies, timeo)) {
>  			if (chip->dev_ready) {

In this cas timeo variable and its calculation can be moved to this
inner block, I suppose?

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Sat Nov 13 07:37:11 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 13 Nov 2010 14:37:11 +0200
Subject: ubi deadlock on .36+
In-Reply-To: <AANLkTim-+_98Ezcn3dG5g0mzNLNVrkDKC2f_34A_n2pE@mail.gmail.com>
References: <AANLkTimKc_EtT6NEwbga8g7AKoGnDSt7UMQwgou_jCXD@mail.gmail.com>
	<1288855749.2075.7.camel@localhost>
	<AANLkTim-+_98Ezcn3dG5g0mzNLNVrkDKC2f_34A_n2pE@mail.gmail.com>
Message-ID: <1289651831.2218.48.camel@localhost>

On Thu, 2010-11-04 at 15:07 +0200, Grazvydas Ignotas wrote:
> On Thu, Nov 4, 2010 at 9:29 AM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> > On Wed, 2010-11-03 at 23:30 +0200, Grazvydas Ignotas wrote:
> >> Hi,
> >>
> >> there seems to be some issue with NAND on my OMAP3 board that causes
> >> CRC errors on 2.6.36 and 2.6.37-rc1. Those seem to be triggering a bug
> >> in UBI that makes it loop forever (or very long) printing this:
> >>
> >> uncorrectable error :
> >> UBI error: ubi_io_read: error -74 (ECC error) while reading 512 bytes
> >> from PEB 0:512, read 512 bytes
> >> uncorrectable error :
> >> UBI error: ubi_io_read: error -74 (ECC error) while reading 512 bytes
> >> from PEB 68:512, read 512 bytes
> >> UBI: run torture test for PEB 68
> >> UBI: PEB 68 passed torture test, do not mark it a bad
> >>
> >>
> >> here is full log of one minute session, after which I killed power:
> >> http://notaz.gp2x.de/misc/pnd/logs/linux_20101103_ubi_lockup
> >
> > Hmm, could you please enable UBI debugging and provide me the logs? See
> > here for some hints:
> > http://www.linux-mtd.infradead.org/doc/ubi.html#L_how_send_bugreport
> 
> done:
> http://notaz.gp2x.de/misc/pnd/logs/linux_20101103_ubi_lockup2

But would it be possible to enable all UBI debugging messages?

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Sat Nov 13 08:15:01 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 13 Nov 2010 15:15:01 +0200
Subject: ubi deadlock on .36+
In-Reply-To: <1289651831.2218.48.camel@localhost>
References: <AANLkTimKc_EtT6NEwbga8g7AKoGnDSt7UMQwgou_jCXD@mail.gmail.com>
	<1288855749.2075.7.camel@localhost>
	<AANLkTim-+_98Ezcn3dG5g0mzNLNVrkDKC2f_34A_n2pE@mail.gmail.com>
	<1289651831.2218.48.camel@localhost>
Message-ID: <1289654101.2218.51.camel@localhost>

On Sat, 2010-11-13 at 14:37 +0200, Artem Bityutskiy wrote:
> On Thu, 2010-11-04 at 15:07 +0200, Grazvydas Ignotas wrote:
> > On Thu, Nov 4, 2010 at 9:29 AM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> > > On Wed, 2010-11-03 at 23:30 +0200, Grazvydas Ignotas wrote:
> > >> Hi,
> > >>
> > >> there seems to be some issue with NAND on my OMAP3 board that causes
> > >> CRC errors on 2.6.36 and 2.6.37-rc1. Those seem to be triggering a bug
> > >> in UBI that makes it loop forever (or very long) printing this:
> > >>
> > >> uncorrectable error :
> > >> UBI error: ubi_io_read: error -74 (ECC error) while reading 512 bytes
> > >> from PEB 0:512, read 512 bytes
> > >> uncorrectable error :
> > >> UBI error: ubi_io_read: error -74 (ECC error) while reading 512 bytes
> > >> from PEB 68:512, read 512 bytes
> > >> UBI: run torture test for PEB 68
> > >> UBI: PEB 68 passed torture test, do not mark it a bad
> > >>
> > >>
> > >> here is full log of one minute session, after which I killed power:
> > >> http://notaz.gp2x.de/misc/pnd/logs/linux_20101103_ubi_lockup
> > >
> > > Hmm, could you please enable UBI debugging and provide me the logs? See
> > > here for some hints:
> > > http://www.linux-mtd.infradead.org/doc/ubi.html#L_how_send_bugreport
> > 
> > done:
> > http://notaz.gp2x.de/misc/pnd/logs/linux_20101103_ubi_lockup2
> 
> But would it be possible to enable all UBI debugging messages?

While trying to figure out what is happening in your system, I realized
one possible scenario which may confuse UBI. I've added a patch below.
This probably won't fix your issue (but you could try), I need more time
to think about what was happening. But a log with all messages (not only
I/O) would help. Thanks.


From Artem.Bityutskiy at nokia.com  Sat Nov 13 08:08:29 2010
From: Artem.Bityutskiy at nokia.com (Artem Bityutskiy)
Date: Sat, 13 Nov 2010 15:08:29 +0200
Subject: [PATCH] UBI: improve UBI robustness
Message-ID: <mailman.17.1289654122.1530.linux-mtd@lists.infradead.org>

When reading data from the flash, corrupt the buffer we are about to
read to before reading. The idea is to fix the following possible
situation:

1. The buffer contains data from previous operation, e.g., read from
   another PEB previously. The data looks like expected, e.g., if we
   just do not read anything and return - the caller would not
   notice this. E.g., if we are reading a VID header, the buffer may
   contain a valid VID header from another PEB.
2. The driver is buggy and returns use success or -EBADMSG or
   -EUCLEAN, but it does not actually put any data to the buffer.

This may confuse UBI or upper layers - they may think the buffer
contains valid data while in fact it is just old data. This is
especially possible because UBI (and UBIFS) relies on CRC, and
treats data as correct even in case of ECC errors if the CRC is
correct.

Try to prevent this situation by changing the first byte of the
buffer.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
---
 drivers/mtd/ubi/io.c |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c
index c2960ac..9ab1a33 100644
--- a/drivers/mtd/ubi/io.c
+++ b/drivers/mtd/ubi/io.c
@@ -146,6 +146,28 @@ int ubi_io_read(const struct ubi_device *ubi, void *buf, int pnum, int offset,
 	if (err)
 		return err;
 
+	/*
+	 * Deliberately corrupt the buffer to improve robustness. Indeed, if we
+	 * do not do this, the following may happen:
+	 * 1. The buffer contains data from previous operation, e.g., read from
+	 *    another PEB previously. The data looks like expected, e.g., if we
+	 *    just do not read anything and return - the caller would not
+	 *    notice this. E.g., if we are reading a VID header, the buffer may
+	 *    contain a valid VID header from another PEB.
+	 * 2. The driver is buggy and returns us success or -EBADMSG or
+	 *    -EUCLEAN, but it does not actually put any data to the buffer.
+	 *
+	 * This may confuse UBI or upper layers - they may think the buffer
+	 * contains valid data while in fact it is just old data. This is
+	 * especially possible because UBI (and UBIFS) relies on CRC, and
+	 * treats data as correct even in case of ECC errors if the CRC is
+	 * correct.
+	 *
+	 * Try to prevent this situation by changing the first byte of the
+	 * buffer.
+	 */
+	*((uint8_t *)buf) ^= 0xFF;
+
 	addr = (loff_t)pnum * ubi->peb_size + offset;
 retry:
 	err = ubi->mtd->read(ubi->mtd, addr, len, &read, buf);
-- 
1.7.2.3

-- 
Best Regards,
Artem Bityutskiy (?????????? ????????????????)



From notasas at gmail.com  Sat Nov 13 09:23:34 2010
From: notasas at gmail.com (Grazvydas Ignotas)
Date: Sat, 13 Nov 2010 16:23:34 +0200
Subject: ubi deadlock on .36+
In-Reply-To: <1289654101.2218.51.camel@localhost>
References: <AANLkTimKc_EtT6NEwbga8g7AKoGnDSt7UMQwgou_jCXD@mail.gmail.com>
	<1288855749.2075.7.camel@localhost>
	<AANLkTim-+_98Ezcn3dG5g0mzNLNVrkDKC2f_34A_n2pE@mail.gmail.com>
	<1289651831.2218.48.camel@localhost>
	<1289654101.2218.51.camel@localhost>
Message-ID: <AANLkTimOqCaPB2gyCaBS2DxFAnkD_rGv+R=p5pD5c2hX@mail.gmail.com>

On Sat, Nov 13, 2010 at 3:15 PM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> While trying to figure out what is happening in your system, I realized
> one possible scenario which may confuse UBI. I've added a patch below.
> This probably won't fix your issue (but you could try), I need more time
> to think about what was happening. But a log with all messages (not only
> I/O) would help. Thanks.

Well I think I already know what's wrong with my driver - it has
subpage reads broken. So UBI tries to read a subpage, driver fails
there, then it runs a torture test on full PEB that passes (because
page reads work right), marks that PEB as good and retries the subpage
read that fails again, and the story repeats. Does that sound like
reasonable scenario, or do you still want more debugging logs?


From vapier.adi at gmail.com  Sat Nov 13 17:45:51 2010
From: vapier.adi at gmail.com (Mike Frysinger)
Date: Sat, 13 Nov 2010 17:45:51 -0500
Subject: [PATCH 06/10] mtd-utils: nandwrite: Use 64-bit offset
In-Reply-To: <1289648919.2218.39.camel@localhost>
References: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
	<1288772847-8120-6-git-send-email-computersforpeace@gmail.com>
	<1289648919.2218.39.camel@localhost>
Message-ID: <AANLkTinOWWgUX4y6KR4C=zshV4sjpmUxZu3xPKk4z8np@mail.gmail.com>

On Sat, Nov 13, 2010 at 06:48, Artem Bityutskiy wrote:
> On Wed, 2010-11-03 at 01:27 -0700, Brian Norris wrote:
>> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? mtdoffset = strtol(optarg, NULL, 0);
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? mtdoffset = strtoll(optarg, NULL, 0);
>
> Ideally this should check for strtoll failures, but this just a side
> note. Not sure if this is the best way, but I'd do it like this:
>
> char *endp;
>
> mtdoffset = strtoul(optarg, &endp, 0);
> if (*endp != '\0' || endp == optarg)
> ? ? ? ?return errmsg("bad volume alignment: \"%s\"", optarg);
>
> or something like this. The check for negative mtdoffset could be there
> as well.

or use simple_strtoll() from common.h as that includes error handling ...
-mike


From dedekind1 at gmail.com  Sun Nov 14 02:49:10 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sun, 14 Nov 2010 09:49:10 +0200
Subject: [PATCH 06/10] mtd-utils: nandwrite: Use 64-bit offset
In-Reply-To: <AANLkTinOWWgUX4y6KR4C=zshV4sjpmUxZu3xPKk4z8np@mail.gmail.com>
References: <1288772847-8120-1-git-send-email-computersforpeace@gmail.com>
	<1288772847-8120-6-git-send-email-computersforpeace@gmail.com>
	<1289648919.2218.39.camel@localhost>
	<AANLkTinOWWgUX4y6KR4C=zshV4sjpmUxZu3xPKk4z8np@mail.gmail.com>
Message-ID: <1289720950.1978.0.camel@koala>

On Sat, 2010-11-13 at 17:45 -0500, Mike Frysinger wrote:
> On Sat, Nov 13, 2010 at 06:48, Artem Bityutskiy wrote:
> > On Wed, 2010-11-03 at 01:27 -0700, Brian Norris wrote:
> >> -                             mtdoffset = strtol(optarg, NULL, 0);
> >> +                             mtdoffset = strtoll(optarg, NULL, 0);
> >
> > Ideally this should check for strtoll failures, but this just a side
> > note. Not sure if this is the best way, but I'd do it like this:
> >
> > char *endp;
> >
> > mtdoffset = strtoul(optarg, &endp, 0);
> > if (*endp != '\0' || endp == optarg)
> >        return errmsg("bad volume alignment: \"%s\"", optarg);
> >
> > or something like this. The check for negative mtdoffset could be there
> > as well.
> 
> or use simple_strtoll() from common.h as that includes error handling ...

Oh, even better.

-- 
Best Regards,
Artem Bityutskiy (???????? ?????)



From dedekind1 at gmail.com  Sun Nov 14 02:50:07 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sun, 14 Nov 2010 09:50:07 +0200
Subject: ubi deadlock on .36+
In-Reply-To: <AANLkTimOqCaPB2gyCaBS2DxFAnkD_rGv+R=p5pD5c2hX@mail.gmail.com>
References: <AANLkTimKc_EtT6NEwbga8g7AKoGnDSt7UMQwgou_jCXD@mail.gmail.com>
	<1288855749.2075.7.camel@localhost>
	<AANLkTim-+_98Ezcn3dG5g0mzNLNVrkDKC2f_34A_n2pE@mail.gmail.com>
	<1289651831.2218.48.camel@localhost>
	<1289654101.2218.51.camel@localhost>
	<AANLkTimOqCaPB2gyCaBS2DxFAnkD_rGv+R=p5pD5c2hX@mail.gmail.com>
Message-ID: <1289721007.1978.1.camel@koala>

On Sat, 2010-11-13 at 16:23 +0200, Grazvydas Ignotas wrote:
> On Sat, Nov 13, 2010 at 3:15 PM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> > While trying to figure out what is happening in your system, I realized
> > one possible scenario which may confuse UBI. I've added a patch below.
> > This probably won't fix your issue (but you could try), I need more time
> > to think about what was happening. But a log with all messages (not only
> > I/O) would help. Thanks.
> 
> Well I think I already know what's wrong with my driver - it has
> subpage reads broken. So UBI tries to read a subpage, driver fails
> there, then it runs a torture test on full PEB that passes (because
> page reads work right), marks that PEB as good and retries the subpage
> read that fails again, and the story repeats. Does that sound like
> reasonable scenario, or do you still want more debugging logs?

Yaeah, obviously you have driver problems, I'm just interested to
improve UBI's resilience.
 
-- 
Best Regards,
Artem Bityutskiy (???????? ?????)



From fabio.giovagnini at aurion-tech.com  Sun Nov 14 03:19:17 2010
From: fabio.giovagnini at aurion-tech.com (Fabio Giovagnini)
Date: Sun, 14 Nov 2010 09:19:17 +0100
Subject: Hi all,
Message-ID: <201011140919.18136.fabio.giovagnini@aurion-tech.com>

I'm writing a simple software for a system without OS driving the 
MT29F16G08DAA WP EP A

Where can I find the datasheet?

Thanks in advange

-- 
Ing. Fabio Giovagnini

Aurion s.r.l.
P.I e C.F.
00885711200
skype: aurion.giovagnini
Tel. +39.051.594.78.24
Fax. +39.051.082.14.49
Cell. +39.335.83.50.919
www.aurion-tech.com


From segoon at openwall.com  Sun Nov 14 15:08:39 2010
From: segoon at openwall.com (Vasiliy Kulikov)
Date: Sun, 14 Nov 2010 23:08:39 +0300
Subject: [PATCH] fs: jffs2: fix error value sign
Message-ID: <1289765320-6071-1-git-send-email-segoon@openwall.com>

do_verify_xattr_datum(), do_load_xattr_datum(), load_xattr_datum()
and verify_xattr_ref() should return negative value on error.
Sometimes they return EIO that is positive.  Change this to -EIO.

Signed-off-by: Vasiliy Kulikov <segoon at openwall.com>
---
 This driver is not compilable, so the patch is not tested.

 fs/jffs2/xattr.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/jffs2/xattr.c b/fs/jffs2/xattr.c
index 9b572ca..4f9cc04 100644
--- a/fs/jffs2/xattr.c
+++ b/fs/jffs2/xattr.c
@@ -151,7 +151,7 @@ static int do_verify_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_dat
 		JFFS2_ERROR("node CRC failed at %#08x, read=%#08x, calc=%#08x\n",
 			    offset, je32_to_cpu(rx.hdr_crc), crc);
 		xd->flags |= JFFS2_XFLAGS_INVALID;
-		return EIO;
+		return -EIO;
 	}
 	totlen = PAD(sizeof(rx) + rx.name_len + 1 + je16_to_cpu(rx.value_len));
 	if (je16_to_cpu(rx.magic) != JFFS2_MAGIC_BITMASK
@@ -167,7 +167,7 @@ static int do_verify_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_dat
 			    je32_to_cpu(rx.xid), xd->xid,
 			    je32_to_cpu(rx.version), xd->version);
 		xd->flags |= JFFS2_XFLAGS_INVALID;
-		return EIO;
+		return -EIO;
 	}
 	xd->xprefix = rx.xprefix;
 	xd->name_len = rx.name_len;
@@ -230,7 +230,7 @@ static int do_load_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datum
 			      ref_offset(xd->node), xd->data_crc, crc);
 		kfree(data);
 		xd->flags |= JFFS2_XFLAGS_INVALID;
-		return EIO;
+		return -EIO;
 	}
 
 	xd->flags |= JFFS2_XFLAGS_HOT;
@@ -268,7 +268,7 @@ static int load_xattr_datum(struct jffs2_sb_info *c, struct jffs2_xattr_datum *x
 	if (xd->xname)
 		return 0;
 	if (xd->flags & JFFS2_XFLAGS_INVALID)
-		return EIO;
+		return -EIO;
 	if (unlikely(is_xattr_datum_unchecked(c, xd)))
 		rc = do_verify_xattr_datum(c, xd);
 	if (!rc)
@@ -460,7 +460,7 @@ static int verify_xattr_ref(struct jffs2_sb_info *c, struct jffs2_xattr_ref *ref
 	if (crc != je32_to_cpu(rr.node_crc)) {
 		JFFS2_ERROR("node CRC failed at %#08x, read=%#08x, calc=%#08x\n",
 			    offset, je32_to_cpu(rr.node_crc), crc);
-		return EIO;
+		return -EIO;
 	}
 	if (je16_to_cpu(rr.magic) != JFFS2_MAGIC_BITMASK
 	    || je16_to_cpu(rr.nodetype) != JFFS2_NODETYPE_XREF
@@ -470,7 +470,7 @@ static int verify_xattr_ref(struct jffs2_sb_info *c, struct jffs2_xattr_ref *ref
 			    offset, je16_to_cpu(rr.magic), JFFS2_MAGIC_BITMASK,
 			    je16_to_cpu(rr.nodetype), JFFS2_NODETYPE_XREF,
 			    je32_to_cpu(rr.totlen), PAD(sizeof(rr)));
-		return EIO;
+		return -EIO;
 	}
 	ref->ino = je32_to_cpu(rr.ino);
 	ref->xid = je32_to_cpu(rr.xid);
-- 
1.7.0.4



From error27 at gmail.com  Sun Nov 14 15:29:05 2010
From: error27 at gmail.com (Dan Carpenter)
Date: Sun, 14 Nov 2010 23:29:05 +0300
Subject: [PATCH] fs: jffs2: fix error value sign
In-Reply-To: <1289765320-6071-1-git-send-email-segoon@openwall.com>
References: <1289765320-6071-1-git-send-email-segoon@openwall.com>
Message-ID: <20101114202905.GA21614@bicker>

On Sun, Nov 14, 2010 at 11:08:39PM +0300, Vasiliy Kulikov wrote:
> do_verify_xattr_datum(), do_load_xattr_datum(), load_xattr_datum()
> and verify_xattr_ref() should return negative value on error.
> Sometimes they return EIO that is positive.  Change this to -EIO.
> 
> Signed-off-by: Vasiliy Kulikov <segoon at openwall.com>
> ---
>  This driver is not compilable, so the patch is not tested.
> 

It compiles.

regards,
dan carpenter




From joe at perches.com  Sun Nov 14 22:04:19 2010
From: joe at perches.com (Joe Perches)
Date: Sun, 14 Nov 2010 19:04:19 -0800
Subject: [PATCH 00/44] remove unnecessary semicolons
Message-ID: <cover.1289789604.git.joe@perches.com>

ya trivial series...

Joe Perches (44):
  arch/arm: Remove unnecessary semicolons
  arch/microblaze: Remove unnecessary semicolons
  arch/um: Remove unnecessary semicolons
  drivers/cpufreq: Remove unnecessary semicolons
  drivers/gpio: Remove unnecessary semicolons
  drivers/i2c: Remove unnecessary semicolons
  drivers/isdn: Remove unnecessary semicolons
  drivers/leds: Remove unnecessary semicolons
  drivers/media/video: Remove unnecessary semicolons
  drivers/misc: Remove unnecessary semicolons
  drivers/mmc: Remove unnecessary semicolons
  drivers/net/bnx2x: Remove unnecessary semicolons
  drivers/net/e1000e: Remove unnecessary semicolons
  drivers/net/ixgbe: Remove unnecessary semicolons
  drivers/net/vxge: Remove unnecessary semicolons
  drivers/net/wireless/ath: Remove unnecessary semicolons
  drivers/net/wireless/iwlwifi: Remove unnecessary semicolons
  drivers/net/cnic.c: Remove unnecessary semicolons
  drivers/platform/x86: Remove unnecessary semicolons
  drivers/power: Remove unnecessary semicolons
  drivers/s390/net: Remove unnecessary semicolons
  drivers/scsi/be2iscsi: Remove unnecessary semicolons
  drivers/scsi/bfa: Remove unnecessary semicolons
  drivers/scsi/lpfc: Remove unnecessary semicolons
  drivers/scsi/pm8001: Remove unnecessary semicolons
  drivers/scsi/qla2xxx: Remove unnecessary semicolons
  drivers/serial: Remove unnecessary semicolons
  drivers/spi: Remove unnecessary semicolons
  drivers/staging: Remove unnecessary semicolons
  drivers/usb/gadget: Remove unnecessary semicolons
  drivers/xen: Remove unnecessary semicolons
  fs/9p: Remove unnecessary semicolons
  fs/ceph: Remove unnecessary semicolons
  fs/logfs: Remove unnecessary semicolons
  fs/nfs: Remove unnecessary semicolons
  fs/ocfs2: Remove unnecessary semicolons
  fs/ubifs: Remove unnecessary semicolons
  include/linux/if_macvlan.h: Remove unnecessary semicolons
  include/net/caif/cfctrl.h: Remove unnecessary semicolons
  mm/hugetlb.c: Remove unnecessary semicolons
  net/ipv6/mcast.c: Remove unnecessary semicolons
  net/sunrpc/addr.c: Remove unnecessary semicolons
  sound/core/pcm_lib.c: Remove unnecessary semicolons
  sound/soc/codecs: Remove unnecessary semicolons

 arch/arm/mach-at91/at91cap9_devices.c              |    2 +-
 arch/arm/mach-at91/at91sam9g45_devices.c           |    2 +-
 arch/arm/mach-at91/at91sam9rl_devices.c            |    2 +-
 arch/arm/mach-nuc93x/time.c                        |    2 +-
 arch/arm/mach-tegra/tegra2_clocks.c                |    2 +-
 arch/arm/mach-w90x900/cpu.c                        |    2 +-
 arch/arm/plat-mxc/irq.c                            |    2 +-
 arch/microblaze/lib/memmove.c                      |    2 +-
 arch/um/drivers/mmapper_kern.c                     |    2 +-
 drivers/cpufreq/cpufreq_conservative.c             |    2 +-
 drivers/gpio/langwell_gpio.c                       |    2 +-
 drivers/i2c/busses/i2c-designware.c                |    2 +-
 drivers/isdn/hardware/mISDN/mISDNinfineon.c        |    4 ++--
 drivers/isdn/hardware/mISDN/mISDNisar.c            |    2 +-
 drivers/leds/leds-mc13783.c                        |    2 +-
 drivers/media/video/cx88/cx88-blackbird.c          |    2 +-
 drivers/media/video/davinci/vpfe_capture.c         |    2 +-
 drivers/media/video/em28xx/em28xx-cards.c          |    2 +-
 drivers/misc/bmp085.c                              |    2 +-
 drivers/misc/isl29020.c                            |    2 +-
 drivers/mmc/host/davinci_mmc.c                     |    2 +-
 drivers/net/bnx2x/bnx2x_link.c                     |    4 ++--
 drivers/net/bnx2x/bnx2x_main.c                     |    2 +-
 drivers/net/cnic.c                                 |    2 +-
 drivers/net/e1000e/netdev.c                        |    2 +-
 drivers/net/ixgbe/ixgbe_sriov.c                    |    2 +-
 drivers/net/vxge/vxge-main.c                       |    2 +-
 drivers/net/wireless/ath/ath9k/htc.h               |    2 +-
 drivers/net/wireless/iwlwifi/iwl-agn.c             |    2 +-
 drivers/platform/x86/classmate-laptop.c            |    2 +-
 drivers/platform/x86/thinkpad_acpi.c               |    2 +-
 drivers/power/intel_mid_battery.c                  |    2 +-
 drivers/s390/net/qeth_core_sys.c                   |    2 +-
 drivers/scsi/be2iscsi/be_main.c                    |    4 ++--
 drivers/scsi/bfa/bfa_fcs_lport.c                   |    2 +-
 drivers/scsi/lpfc/lpfc_bsg.c                       |    2 +-
 drivers/scsi/pm8001/pm8001_init.c                  |    2 +-
 drivers/scsi/qla2xxx/qla_isr.c                     |    4 ++--
 drivers/scsi/qla2xxx/qla_nx.c                      |    2 +-
 drivers/serial/mrst_max3110.c                      |    2 +-
 drivers/spi/amba-pl022.c                           |    2 +-
 drivers/spi/spi_nuc900.c                           |    2 +-
 .../staging/ath6kl/hif/sdio/linux_sdio/src/hif.c   |    2 +-
 drivers/staging/ath6kl/os/linux/ar6000_drv.c       |    2 +-
 drivers/staging/bcm/InterfaceInit.c                |    2 +-
 drivers/staging/bcm/InterfaceIsr.c                 |    2 +-
 drivers/staging/bcm/Misc.c                         |    4 ++--
 .../comedi/drivers/addi-data/APCI1710_Tor.c        |    2 +-
 .../comedi/drivers/addi-data/hwdrv_apci1500.c      |    2 +-
 .../comedi/drivers/addi-data/hwdrv_apci1516.c      |    2 +-
 .../comedi/drivers/addi-data/hwdrv_apci3501.c      |    2 +-
 drivers/staging/comedi/drivers/amplc_pci230.c      |    2 +-
 drivers/staging/comedi/drivers/cb_das16_cs.c       |    2 +-
 drivers/staging/comedi/drivers/comedi_bond.c       |    2 +-
 drivers/staging/crystalhd/crystalhd_hw.c           |    2 +-
 drivers/staging/go7007/go7007-driver.c             |    2 +-
 drivers/staging/iio/accel/lis3l02dq_ring.c         |    2 +-
 .../staging/intel_sst/intel_sst_drv_interface.c    |    4 ++--
 drivers/staging/keucr/smilmain.c                   |    4 ++--
 drivers/staging/keucr/smilsub.c                    |    4 ++--
 drivers/staging/msm/lcdc_toshiba_wvga_pt.c         |    2 +-
 drivers/staging/rt2860/common/cmm_data_pci.c       |    4 ++--
 drivers/staging/rt2860/rt_linux.c                  |    2 +-
 drivers/staging/rt2860/rtmp.h                      |    2 +-
 drivers/staging/rtl8192e/ieee80211/ieee80211_tx.c  |    2 +-
 drivers/staging/rtl8192e/r819xE_phy.c              |    2 +-
 drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c  |    2 +-
 drivers/staging/rtl8192u/r8192U_core.c             |    2 +-
 drivers/staging/rtl8192u/r819xU_phy.c              |    2 +-
 drivers/staging/rtl8712/rtl8712_efuse.c            |    2 +-
 drivers/staging/rtl8712/rtl8712_xmit.c             |    2 +-
 drivers/staging/rtl8712/rtl871x_xmit.c             |    2 +-
 drivers/staging/tidspbridge/core/tiomap3430.c      |    4 ++--
 drivers/staging/tidspbridge/rmgr/nldr.c            |    2 +-
 drivers/staging/vt6655/card.c                      |    2 +-
 drivers/staging/vt6655/iwctl.c                     |    2 +-
 drivers/staging/vt6655/wpa2.c                      |    4 ++--
 drivers/staging/vt6656/baseband.c                  |    2 +-
 drivers/staging/vt6656/iwctl.c                     |    2 +-
 drivers/staging/vt6656/power.c                     |    2 +-
 drivers/staging/vt6656/wpa2.c                      |    4 ++--
 drivers/usb/gadget/f_fs.c                          |    2 +-
 drivers/xen/swiotlb-xen.c                          |    2 +-
 fs/9p/acl.c                                        |    2 +-
 fs/9p/xattr.c                                      |    2 +-
 fs/ceph/mds_client.c                               |    2 +-
 fs/logfs/readwrite.c                               |    2 +-
 fs/nfs/getroot.c                                   |    2 +-
 fs/ocfs2/refcounttree.c                            |    2 +-
 fs/ubifs/scan.c                                    |    2 +-
 include/linux/if_macvlan.h                         |    2 +-
 include/net/caif/cfctrl.h                          |    2 +-
 mm/hugetlb.c                                       |    2 +-
 net/ipv6/mcast.c                                   |    2 +-
 net/sunrpc/addr.c                                  |    2 +-
 sound/core/pcm_lib.c                               |    2 +-
 sound/soc/codecs/wm8904.c                          |    2 +-
 sound/soc/codecs/wm8940.c                          |    1 -
 sound/soc/codecs/wm8993.c                          |    2 +-
 sound/soc/codecs/wm_hubs.c                         |    2 +-
 100 files changed, 111 insertions(+), 112 deletions(-)

-- 
1.7.3.1.g432b3.dirty



From joe at perches.com  Sun Nov 14 22:04:56 2010
From: joe at perches.com (Joe Perches)
Date: Sun, 14 Nov 2010 19:04:56 -0800
Subject: [PATCH 37/44] fs/ubifs: Remove unnecessary semicolons
In-Reply-To: <cover.1289789604.git.joe@perches.com>
References: <cover.1289789604.git.joe@perches.com>
Message-ID: <902d76520da2f65e5dc44339dccb07159947f23d.1289789605.git.joe@perches.com>

Signed-off-by: Joe Perches <joe at perches.com>
---
 fs/ubifs/scan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/ubifs/scan.c b/fs/ubifs/scan.c
index 3e1ee57..36216b4 100644
--- a/fs/ubifs/scan.c
+++ b/fs/ubifs/scan.c
@@ -328,7 +328,7 @@ struct ubifs_scan_leb *ubifs_scan(const struct ubifs_info *c, int lnum,
 		if (!quiet)
 			ubifs_err("empty space starts at non-aligned offset %d",
 				  offs);
-		goto corrupted;;
+		goto corrupted;
 	}
 
 	ubifs_end_scan(c, sleb, lnum, offs);
-- 
1.7.3.1.g432b3.dirty



From segoon at openwall.com  Mon Nov 15 09:37:37 2010
From: segoon at openwall.com (Vasiliy Kulikov)
Date: Mon, 15 Nov 2010 17:37:37 +0300
Subject: [PATCH] fs: jffs2: fix error value sign
In-Reply-To: <20101114202905.GA21614@bicker>
References: <1289765320-6071-1-git-send-email-segoon@openwall.com>
	<20101114202905.GA21614@bicker>
Message-ID: <20101115143735.GA4548@albatros>

On Sun, Nov 14, 2010 at 23:29 +0300, Dan Carpenter wrote:
> On Sun, Nov 14, 2010 at 11:08:39PM +0300, Vasiliy Kulikov wrote:
> > do_verify_xattr_datum(), do_load_xattr_datum(), load_xattr_datum()
> > and verify_xattr_ref() should return negative value on error.
> > Sometimes they return EIO that is positive.  Change this to -EIO.
> > 
> > Signed-off-by: Vasiliy Kulikov <segoon at openwall.com>
> > ---
> >  This driver is not compilable, so the patch is not tested.
> > 
> 
> It compiles.

Really?

x86_64, linux-next:

make -C /home/vasya/linux fs/jffs2/xattr.o
make: ???? ? ??????? `/home/vasya/dev/linux-next'
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CC      fs/jffs2/xattr.o
fs/jffs2/xattr.c: In function ?unload_xattr_datum?:
fs/jffs2/xattr.c:87: error: ?struct jffs2_sb_info? has no member named ?xdatum_mem_usage?
fs/jffs2/xattr.c: In function ?reclaim_xattr_datum?: fs/jffs2/xattr.c:105: error: ?struct jffs2_sb_info? has no member named
?xdatum_mem_threshold? fs/jffs2/xattr.c:105: error: ?struct jffs2_sb_info? has no member named
?xdatum_mem_usage? fs/jffs2/xattr.c:108: error: ?struct jffs2_sb_info? has no member named
?xdatum_mem_usage? fs/jffs2/xattr.c:109: error: ?struct jffs2_sb_info? has no member named
?xdatum_mem_usage? fs/jffs2/xattr.c:110: error: ?XATTRINDEX_HASHSIZE? undeclared (first use
in this function) fs/jffs2/xattr.c:110: error: (Each undeclared identifier is reported
only once
fs/jffs2/xattr.c:110: error: for each function it appears in.)


For both defconfig and allyesconfig.

> regards,
> dan carpenter
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Vasiliy


From error27 at gmail.com  Mon Nov 15 13:20:05 2010
From: error27 at gmail.com (Dan Carpenter)
Date: Mon, 15 Nov 2010 21:20:05 +0300
Subject: [patch] jffs2: typo in comment
Message-ID: <20101115182005.GA3941@bicker>

It says FB instead of FS (file system).

Signed-off-by: Dan Carpenter <error27 at gmail.com>

diff --git a/fs/jffs2/jffs2_fs_sb.h b/fs/jffs2/jffs2_fs_sb.h
index f864005..0bc6a6c 100644
--- a/fs/jffs2/jffs2_fs_sb.h
+++ b/fs/jffs2/jffs2_fs_sb.h
@@ -144,4 +144,4 @@ struct jffs2_sb_info {
 	void *os_priv;
 };
 
-#endif /* _JFFS2_FB_SB */
+#endif /* _JFFS2_FS_SB */


From error27 at gmail.com  Mon Nov 15 13:45:31 2010
From: error27 at gmail.com (Dan Carpenter)
Date: Mon, 15 Nov 2010 21:45:31 +0300
Subject: [PATCH] fs: jffs2: fix error value sign
In-Reply-To: <20101115143735.GA4548@albatros>
References: <1289765320-6071-1-git-send-email-segoon@openwall.com>
	<20101114202905.GA21614@bicker> <20101115143735.GA4548@albatros>
Message-ID: <20101115184531.GA24643@bicker>

On Mon, Nov 15, 2010 at 05:37:37PM +0300, Vasiliy Kulikov wrote:
> 
> x86_64, linux-next:
> 
> make -C /home/vasya/linux fs/jffs2/xattr.o
> make: ???? ? ??????? `/home/vasya/dev/linux-next'
        ^^^^^^^^^^^^^^

This means "Entering directory" right?  So /home/vasya/linux is a
symlink to /home/vasya/dev/linux-next.  It still compiles for me
when I create a symlink and use the -C option...

>   CHK     include/linux/version.h
>   CHK     include/generated/utsrelease.h
>   CALL    scripts/checksyscalls.sh
>   CC      fs/jffs2/xattr.o
> fs/jffs2/xattr.c: In function ?unload_xattr_datum?:
> fs/jffs2/xattr.c:87: error: ?struct jffs2_sb_info? has no member named ?xdatum_mem_usage?
> fs/jffs2/xattr.c: In function ?reclaim_xattr_datum?: fs/jffs2/xattr.c:105: error: ?struct jffs2_sb_info? has no member named
> ?xdatum_mem_threshold? fs/jffs2/xattr.c:105: error: ?struct jffs2_sb_info? has no member named
> ?xdatum_mem_usage? fs/jffs2/xattr.c:108: error: ?struct jffs2_sb_info? has no member named
> ?xdatum_mem_usage? fs/jffs2/xattr.c:109: error: ?struct jffs2_sb_info? has no member named
> ?xdatum_mem_usage? fs/jffs2/xattr.c:110: error: ?XATTRINDEX_HASHSIZE? undeclared (first use
> in this function) fs/jffs2/xattr.c:110: error: (Each undeclared identifier is reported
> only once
> fs/jffs2/xattr.c:110: error: for each function it appears in.)
> 

It's not pulling in the CONFIG_JFFS2_FS_XATTR=y for some reason.  Is
there an environment variable which it uses to pull in your config
file?  An allyesconfig or an allmodconfig should work.

regards,
dan carpenter


From segoon at openwall.com  Mon Nov 15 14:18:51 2010
From: segoon at openwall.com (Vasiliy Kulikov)
Date: Mon, 15 Nov 2010 22:18:51 +0300
Subject: [PATCH] fs: jffs2: fix error value sign
In-Reply-To: <20101115184531.GA24643@bicker>
References: <1289765320-6071-1-git-send-email-segoon@openwall.com>
	<20101114202905.GA21614@bicker> <20101115143735.GA4548@albatros>
	<20101115184531.GA24643@bicker>
Message-ID: <20101115191851.GA6450@albatros>

On Mon, Nov 15, 2010 at 21:45 +0300, Dan Carpenter wrote:
> On Mon, Nov 15, 2010 at 05:37:37PM +0300, Vasiliy Kulikov wrote:
> > 
> > x86_64, linux-next:
> > 
> > make -C /home/vasya/linux fs/jffs2/xattr.o
> > make: ???? ? ??????? `/home/vasya/dev/linux-next'
>         ^^^^^^^^^^^^^^
> 
> This means "Entering directory" right?  So /home/vasya/linux is a
> symlink to /home/vasya/dev/linux-next.  It still compiles for me
> when I create a symlink and use the -C option...

Correct, but the same with cd ~linux/ && make fs/jffs2/xattr.o.

I've just updated to next-2010111 and it became compilable ;)
linux next is just very nonstable...

Thanks,

-- 
Vasiliy


From info at irisa.fr  Tue Nov 16 04:22:20 2010
From: info at irisa.fr (Money Gram Transfer)
Date: Tue, 16 Nov 2010 10:22:20 +0100
Subject: No subject
Message-ID: <021a3ce7614b9521800a8055040d8fae.squirrel@mail.irisa.fr>




The Central Bank of Nigeria, (CBN), working in relationship with
HSBC London has concluded that our working
partner has helped us to send you first payment of US$7,500 to you as
instructed by Mr. David Cameron and will
keep sending you $5000 twice a week until
the payment of (US$820,000) is completed
within six months and here is the information

MONEY TRANSFER REFRENCE:2116-3297


SENDER'S NAME: Mike Marx
AMOUNT: US$5000

To track your funds forward money gram
Transfer agent your Full Names and
Mobile Number via Email to:

Mr Allen Davis
E-mail:moneygramservices at pkuit.com
D/L: Tel:+44 702 407 3631
         +234-816-311-8957

Please direct all enquiring to:
moneygramservices at pkuit.com

Best Regards,
Mr Allen Davis



From s-ghorai at ti.com  Tue Nov 16 09:32:36 2010
From: s-ghorai at ti.com (Ghorai, Sukumar)
Date: Tue, 16 Nov 2010 20:02:36 +0530
Subject: [PATCH v5 1/5] omap gpmc: enable irq mode in gpmc
In-Reply-To: <20101105211238.GT9264@atomide.com>
References: <1285594634-19277-1-git-send-email-s-ghorai@ti.com>
	<1285594634-19277-2-git-send-email-s-ghorai@ti.com>
	<20100928222727.GS3117@atomide.com>
	<2A3DCF3DA181AD40BDE86A3150B27B6B0356AEEDE2@dbde02.ent.ti.com>
	<20101105211238.GT9264@atomide.com>
Message-ID: <2A3DCF3DA181AD40BDE86A3150B27B6B0356E0F690@dbde02.ent.ti.com>



> -----Original Message-----
> From: Tony Lindgren [mailto:tony at atomide.com]
> Sent: Saturday, November 06, 2010 2:43 AM
> To: Ghorai, Sukumar
> Cc: linux-omap at vger.kernel.org; linux-mtd at lists.infradead.org; linux-arm-
> kernel at lists.infradead.org
> Subject: Re: [PATCH v5 1/5] omap gpmc: enable irq mode in gpmc
> 
> * Ghorai, Sukumar <s-ghorai at ti.com> [101028 07:02]:
> > Tony,
> >
> > > -----Original Message-----
> > > From: Ghorai, Sukumar
> > > Sent: Wednesday, September 29, 2010 12:08 PM
> > > To: 'Tony Lindgren'
> > > Cc: linux-omap at vger.kernel.org; linux-mtd at lists.infradead.org; linux-
> arm-
> > > kernel at lists.infradead.org
> > > Subject: RE: [PATCH v5 1/5] omap gpmc: enable irq mode in gpmc
> > >
> > >
> > [..snip..]
> >
> > > > > diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-
> > > > omap2/board-3430sdp.c
> > > > > index 67b95b5..549cd62 100644
> > > > > --- a/arch/arm/mach-omap2/board-3430sdp.c
> > > > > +++ b/arch/arm/mach-omap2/board-3430sdp.c
> > > > > @@ -328,6 +328,7 @@ static void __init omap_3430sdp_init_irq(void)
> > > > >  	omap3_pm_init_cpuidle(omap3_cpuidle_params_table);
> > > > >  	omap2_init_common_hw(hyb18m512160af6_sdrc_params, NULL);
> > > > >  	omap_init_irq();
> > > > > +	gpmc_init();
> > > > >  	omap_gpio_init();
> > > > >  }
> > > > ...
> > > >
> > > > You can avoid adding gpmc_init() by making it a subsys_initcall().
> > > > Just make sure you return early from it with if
> (!cpu_class_is_omap2()).
> > > [Ghorai] will do
> > > >
> > [Ghorai] I was trying this and no success, as nand_init() get called
> before  subsys_initcall(gpmc_init);
> >
> > 126 MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
> > ..
> > 130         .init_irq       = omap_zoom_init_irq,
> > 131         .init_machine   = omap_zoom_init,
> > ..
> >
> > Step-(n):
> > 	kernel_init() -> customize_machine()
> >              -> omap_zoom_init() -> gpmc_nand_init() -> which call gpmc
> >                 functions, that's crashing, as gpmc is not initialized.
> >
> > Step-(n+1):
> > 	Followed by subsys_initcall(gpmc_init)
> >
> > So I will incorporate the other input and will re-submit.
> > [..snip..]
> 
> I don't see why you could not make gpmc_nand_init happen later?
> Also, some of these calls can be moved to omap2_init_common_hw()?
> 
[Ghorai] is it that gpmc_nand_init() better to call inside omap2_init_common_hw()? 
27 files used the omap2_init_common_hw(); including omap4, and 
15 files used the gpmc_nand_init directly or via board_nand_init()
Just thinking how to put gpmc_nand_init() inside omap2_init_common_hw(), when board may not have the nand.


From computersforpeace at gmail.com  Tue Nov 16 12:06:00 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Tue, 16 Nov 2010 09:06:00 -0800
Subject: [PATCH v2 09/10] mtd-utils: nandwrite: full 64-bit support w/
	libmtd
In-Reply-To: <1289649227.2218.40.camel@localhost>
References: <AANLkTimUr8Dvmz7=Owk9dEgWt7hdTFFT+NDXczWd9DfV@mail.gmail.com>	
	<1289457554-24155-1-git-send-email-computersforpeace@gmail.com>
	<1289649227.2218.40.camel@localhost>
Message-ID: <4CE2B9F8.3050806@gmail.com>

On 11/13/2010 3:53 AM, Artem Bityutskiy wrote:
> You could as well just introduce another libmtd helper - would be
> cleaner, IMO.

OK, I'll look at this and the "simple_strtoll()" suggestion sometime. I
should probably examine "common.h" more before patching mtd-utils next time!

And thanks for the push.

Brian


From vapier.adi at gmail.com  Tue Nov 16 14:57:23 2010
From: vapier.adi at gmail.com (Mike Frysinger)
Date: Tue, 16 Nov 2010 14:57:23 -0500
Subject: [PATCH v2 09/10] mtd-utils: nandwrite: full 64-bit support w/
	libmtd
In-Reply-To: <4CE2B9F8.3050806@gmail.com>
References: <AANLkTimUr8Dvmz7=Owk9dEgWt7hdTFFT+NDXczWd9DfV@mail.gmail.com>
	<1289457554-24155-1-git-send-email-computersforpeace@gmail.com>
	<1289649227.2218.40.camel@localhost> <4CE2B9F8.3050806@gmail.com>
Message-ID: <AANLkTim7o=NS2MsE59Y3xrRyb7GP1bsvu_njXjMWWPV_@mail.gmail.com>

On Tue, Nov 16, 2010 at 12:06, Brian Norris wrote:
> On 11/13/2010 3:53 AM, Artem Bityutskiy wrote:
>> You could as well just introduce another libmtd helper - would be
>> cleaner, IMO.
>
> OK, I'll look at this and the "simple_strtoll()" suggestion sometime. I
> should probably examine "common.h" more before patching mtd-utils next time!

it's an evolving helper, so if you come across generally useful funcs
that are in an app or two, feel free to propose moving them to the
header for all to benefit
-mike


From glecerf at gmail.com  Wed Nov 17 06:35:50 2010
From: glecerf at gmail.com (Guillaume LECERF)
Date: Wed, 17 Nov 2010 12:35:50 +0100
Subject: [PATCH] mtd: cfi_fixup: remove unused 'param' parameter
Message-ID: <20101117113550.15860.31152.stgit@dev.siriade.com>

The 'param' parameter has never been used since its introduction, so
simply remove it.

Signed-off-by: Guillaume LECERF <glecerf at gmail.com>
---
 drivers/mtd/chips/cfi_cmdset_0001.c |   54 ++++++++++----------
 drivers/mtd/chips/cfi_cmdset_0002.c |   94 ++++++++++++++++++-----------------
 drivers/mtd/chips/cfi_util.c        |    2 -
 drivers/mtd/chips/fwh_lock.h        |    2 -
 include/linux/mtd/cfi.h             |    3 -
 5 files changed, 77 insertions(+), 78 deletions(-)

diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index ad9268b..44cbfc0 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -162,7 +162,7 @@ static void cfi_tell_features(struct cfi_pri_intelext *extp)
 #endif
 
 /* Atmel chips don't use the same PRI format as Intel chips */
-static void fixup_convert_atmel_pri(struct mtd_info *mtd, void *param)
+static void fixup_convert_atmel_pri(struct mtd_info *mtd)
 {
 	struct map_info *map = mtd->priv;
 	struct cfi_private *cfi = map->fldrv_priv;
@@ -202,7 +202,7 @@ static void fixup_convert_atmel_pri(struct mtd_info *mtd, void *param)
 	cfi->cfiq->BufWriteTimeoutMax = 0;
 }
 
-static void fixup_at49bv640dx_lock(struct mtd_info *mtd, void *param)
+static void fixup_at49bv640dx_lock(struct mtd_info *mtd)
 {
 	struct map_info *map = mtd->priv;
 	struct cfi_private *cfi = map->fldrv_priv;
@@ -214,7 +214,7 @@ static void fixup_at49bv640dx_lock(struct mtd_info *mtd, void *param)
 
 #ifdef CMDSET0001_DISABLE_ERASE_SUSPEND_ON_WRITE
 /* Some Intel Strata Flash prior to FPO revision C has bugs in this area */
-static void fixup_intel_strataflash(struct mtd_info *mtd, void* param)
+static void fixup_intel_strataflash(struct mtd_info *mtd)
 {
 	struct map_info *map = mtd->priv;
 	struct cfi_private *cfi = map->fldrv_priv;
@@ -227,7 +227,7 @@ static void fixup_intel_strataflash(struct mtd_info *mtd, void* param)
 #endif
 
 #ifdef CMDSET0001_DISABLE_WRITE_SUSPEND
-static void fixup_no_write_suspend(struct mtd_info *mtd, void* param)
+static void fixup_no_write_suspend(struct mtd_info *mtd)
 {
 	struct map_info *map = mtd->priv;
 	struct cfi_private *cfi = map->fldrv_priv;
@@ -240,7 +240,7 @@ static void fixup_no_write_suspend(struct mtd_info *mtd, void* param)
 }
 #endif
 
-static void fixup_st_m28w320ct(struct mtd_info *mtd, void* param)
+static void fixup_st_m28w320ct(struct mtd_info *mtd)
 {
 	struct map_info *map = mtd->priv;
 	struct cfi_private *cfi = map->fldrv_priv;
@@ -249,7 +249,7 @@ static void fixup_st_m28w320ct(struct mtd_info *mtd, void* param)
 	cfi->cfiq->BufWriteTimeoutMax = 0;	/* Not supported */
 }
 
-static void fixup_st_m28w320cb(struct mtd_info *mtd, void* param)
+static void fixup_st_m28w320cb(struct mtd_info *mtd)
 {
 	struct map_info *map = mtd->priv;
 	struct cfi_private *cfi = map->fldrv_priv;
@@ -259,7 +259,7 @@ static void fixup_st_m28w320cb(struct mtd_info *mtd, void* param)
 		(cfi->cfiq->EraseRegionInfo[1] & 0xffff0000) | 0x3e;
 };
 
-static void fixup_use_point(struct mtd_info *mtd, void *param)
+static void fixup_use_point(struct mtd_info *mtd)
 {
 	struct map_info *map = mtd->priv;
 	if (!mtd->point && map_is_linear(map)) {
@@ -268,7 +268,7 @@ static void fixup_use_point(struct mtd_info *mtd, void *param)
 	}
 }
 
-static void fixup_use_write_buffers(struct mtd_info *mtd, void *param)
+static void fixup_use_write_buffers(struct mtd_info *mtd)
 {
 	struct map_info *map = mtd->priv;
 	struct cfi_private *cfi = map->fldrv_priv;
@@ -282,7 +282,7 @@ static void fixup_use_write_buffers(struct mtd_info *mtd, void *param)
 /*
  * Some chips power-up with all sectors locked by default.
  */
-static void fixup_unlock_powerup_lock(struct mtd_info *mtd, void *param)
+static void fixup_unlock_powerup_lock(struct mtd_info *mtd)
 {
 	struct map_info *map = mtd->priv;
 	struct cfi_private *cfi = map->fldrv_priv;
@@ -295,31 +295,31 @@ static void fixup_unlock_powerup_lock(struct mtd_info *mtd, void *param)
 }
 
 static struct cfi_fixup cfi_fixup_table[] = {
-	{ CFI_MFR_ATMEL, CFI_ID_ANY, fixup_convert_atmel_pri, NULL },
-	{ CFI_MFR_ATMEL, AT49BV640D, fixup_at49bv640dx_lock, NULL },
-	{ CFI_MFR_ATMEL, AT49BV640DT, fixup_at49bv640dx_lock, NULL },
+	{ CFI_MFR_ATMEL, CFI_ID_ANY, fixup_convert_atmel_pri },
+	{ CFI_MFR_ATMEL, AT49BV640D, fixup_at49bv640dx_lock },
+	{ CFI_MFR_ATMEL, AT49BV640DT, fixup_at49bv640dx_lock },
 #ifdef CMDSET0001_DISABLE_ERASE_SUSPEND_ON_WRITE
-	{ CFI_MFR_ANY, CFI_ID_ANY, fixup_intel_strataflash, NULL },
+	{ CFI_MFR_ANY, CFI_ID_ANY, fixup_intel_strataflash },
 #endif
 #ifdef CMDSET0001_DISABLE_WRITE_SUSPEND
-	{ CFI_MFR_ANY, CFI_ID_ANY, fixup_no_write_suspend, NULL },
+	{ CFI_MFR_ANY, CFI_ID_ANY, fixup_no_write_suspend },
 #endif
 #if !FORCE_WORD_WRITE
-	{ CFI_MFR_ANY, CFI_ID_ANY, fixup_use_write_buffers, NULL },
+	{ CFI_MFR_ANY, CFI_ID_ANY, fixup_use_write_buffers },
 #endif
-	{ CFI_MFR_ST, 0x00ba, /* M28W320CT */ fixup_st_m28w320ct, NULL },
-	{ CFI_MFR_ST, 0x00bb, /* M28W320CB */ fixup_st_m28w320cb, NULL },
-	{ CFI_MFR_INTEL, CFI_ID_ANY, fixup_unlock_powerup_lock, NULL, },
-	{ 0, 0, NULL, NULL }
+	{ CFI_MFR_ST, 0x00ba, /* M28W320CT */ fixup_st_m28w320ct },
+	{ CFI_MFR_ST, 0x00bb, /* M28W320CB */ fixup_st_m28w320cb },
+	{ CFI_MFR_INTEL, CFI_ID_ANY, fixup_unlock_powerup_lock },
+	{ 0, 0, NULL }
 };
 
 static struct cfi_fixup jedec_fixup_table[] = {
-	{ CFI_MFR_INTEL, I82802AB,   fixup_use_fwh_lock, NULL, },
-	{ CFI_MFR_INTEL, I82802AC,   fixup_use_fwh_lock, NULL, },
-	{ CFI_MFR_ST,    M50LPW080,  fixup_use_fwh_lock, NULL, },
-	{ CFI_MFR_ST,    M50FLW080A, fixup_use_fwh_lock, NULL, },
-	{ CFI_MFR_ST,    M50FLW080B, fixup_use_fwh_lock, NULL, },
-	{ 0, 0, NULL, NULL }
+	{ CFI_MFR_INTEL, I82802AB,   fixup_use_fwh_lock },
+	{ CFI_MFR_INTEL, I82802AC,   fixup_use_fwh_lock },
+	{ CFI_MFR_ST,    M50LPW080,  fixup_use_fwh_lock },
+	{ CFI_MFR_ST,    M50FLW080A, fixup_use_fwh_lock },
+	{ CFI_MFR_ST,    M50FLW080B, fixup_use_fwh_lock },
+	{ 0, 0, NULL }
 };
 static struct cfi_fixup fixup_table[] = {
 	/* The CFI vendor ids and the JEDEC vendor IDs appear
@@ -327,8 +327,8 @@ static struct cfi_fixup fixup_table[] = {
 	 * well.  This table is to pick all cases where
 	 * we know that is the case.
 	 */
-	{ CFI_MFR_ANY, CFI_ID_ANY, fixup_use_point, NULL },
-	{ 0, 0, NULL, NULL }
+	{ CFI_MFR_ANY, CFI_ID_ANY, fixup_use_point },
+	{ 0, 0, NULL }
 };
 
 static void cfi_fixup_major_minor(struct cfi_private *cfi,
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index 3b8e32d..9d68ab9 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -134,7 +134,7 @@ static void cfi_tell_features(struct cfi_pri_amdstd *extp)
 
 #ifdef AMD_BOOTLOC_BUG
 /* Wheee. Bring me the head of someone at AMD. */
-static void fixup_amd_bootblock(struct mtd_info *mtd, void* param)
+static void fixup_amd_bootblock(struct mtd_info *mtd)
 {
 	struct map_info *map = mtd->priv;
 	struct cfi_private *cfi = map->fldrv_priv;
@@ -186,7 +186,7 @@ static void fixup_amd_bootblock(struct mtd_info *mtd, void* param)
 }
 #endif
 
-static void fixup_use_write_buffers(struct mtd_info *mtd, void *param)
+static void fixup_use_write_buffers(struct mtd_info *mtd)
 {
 	struct map_info *map = mtd->priv;
 	struct cfi_private *cfi = map->fldrv_priv;
@@ -197,7 +197,7 @@ static void fixup_use_write_buffers(struct mtd_info *mtd, void *param)
 }
 
 /* Atmel chips don't use the same PRI format as AMD chips */
-static void fixup_convert_atmel_pri(struct mtd_info *mtd, void *param)
+static void fixup_convert_atmel_pri(struct mtd_info *mtd)
 {
 	struct map_info *map = mtd->priv;
 	struct cfi_private *cfi = map->fldrv_priv;
@@ -228,14 +228,14 @@ static void fixup_convert_atmel_pri(struct mtd_info *mtd, void *param)
 	cfi->cfiq->BufWriteTimeoutMax = 0;
 }
 
-static void fixup_use_secsi(struct mtd_info *mtd, void *param)
+static void fixup_use_secsi(struct mtd_info *mtd)
 {
 	/* Setup for chips with a secsi area */
 	mtd->read_user_prot_reg = cfi_amdstd_secsi_read;
 	mtd->read_fact_prot_reg = cfi_amdstd_secsi_read;
 }
 
-static void fixup_use_erase_chip(struct mtd_info *mtd, void *param)
+static void fixup_use_erase_chip(struct mtd_info *mtd)
 {
 	struct map_info *map = mtd->priv;
 	struct cfi_private *cfi = map->fldrv_priv;
@@ -250,7 +250,7 @@ static void fixup_use_erase_chip(struct mtd_info *mtd, void *param)
  * Some Atmel chips (e.g. the AT49BV6416) power-up with all sectors
  * locked by default.
  */
-static void fixup_use_atmel_lock(struct mtd_info *mtd, void *param)
+static void fixup_use_atmel_lock(struct mtd_info *mtd)
 {
 	mtd->lock = cfi_atmel_lock;
 	mtd->unlock = cfi_atmel_unlock;
@@ -271,7 +271,7 @@ static void fixup_old_sst_eraseregion(struct mtd_info *mtd)
 	cfi->cfiq->NumEraseRegions = 1;
 }
 
-static void fixup_sst39vf(struct mtd_info *mtd, void *param)
+static void fixup_sst39vf(struct mtd_info *mtd)
 {
 	struct map_info *map = mtd->priv;
 	struct cfi_private *cfi = map->fldrv_priv;
@@ -282,7 +282,7 @@ static void fixup_sst39vf(struct mtd_info *mtd, void *param)
 	cfi->addr_unlock2 = 0x2AAA;
 }
 
-static void fixup_sst39vf_rev_b(struct mtd_info *mtd, void *param)
+static void fixup_sst39vf_rev_b(struct mtd_info *mtd)
 {
 	struct map_info *map = mtd->priv;
 	struct cfi_private *cfi = map->fldrv_priv;
@@ -295,12 +295,12 @@ static void fixup_sst39vf_rev_b(struct mtd_info *mtd, void *param)
 	cfi->sector_erase_cmd = CMD(0x50);
 }
 
-static void fixup_sst38vf640x_sectorsize(struct mtd_info *mtd, void *param)
+static void fixup_sst38vf640x_sectorsize(struct mtd_info *mtd)
 {
 	struct map_info *map = mtd->priv;
 	struct cfi_private *cfi = map->fldrv_priv;
 
-	fixup_sst39vf_rev_b(mtd, param);
+	fixup_sst39vf_rev_b(mtd);
 
 	/*
 	 * CFI reports 1024 sectors (0x03ff+1) of 64KBytes (0x0100*256) where
@@ -310,7 +310,7 @@ static void fixup_sst38vf640x_sectorsize(struct mtd_info *mtd, void *param)
 	pr_warning("%s: Bad 38VF640x CFI data; adjusting sector size from 64 to 8KiB\n", mtd->name);
 }
 
-static void fixup_s29gl064n_sectors(struct mtd_info *mtd, void *param)
+static void fixup_s29gl064n_sectors(struct mtd_info *mtd)
 {
 	struct map_info *map = mtd->priv;
 	struct cfi_private *cfi = map->fldrv_priv;
@@ -321,7 +321,7 @@ static void fixup_s29gl064n_sectors(struct mtd_info *mtd, void *param)
 	}
 }
 
-static void fixup_s29gl032n_sectors(struct mtd_info *mtd, void *param)
+static void fixup_s29gl032n_sectors(struct mtd_info *mtd)
 {
 	struct map_info *map = mtd->priv;
 	struct cfi_private *cfi = map->fldrv_priv;
@@ -334,47 +334,47 @@ static void fixup_s29gl032n_sectors(struct mtd_info *mtd, void *param)
 
 /* Used to fix CFI-Tables of chips without Extended Query Tables */
 static struct cfi_fixup cfi_nopri_fixup_table[] = {
-	{ CFI_MFR_SST, 0x234A, fixup_sst39vf, NULL, }, /* SST39VF1602 */
-	{ CFI_MFR_SST, 0x234B, fixup_sst39vf, NULL, }, /* SST39VF1601 */
-	{ CFI_MFR_SST, 0x235A, fixup_sst39vf, NULL, }, /* SST39VF3202 */
-	{ CFI_MFR_SST, 0x235B, fixup_sst39vf, NULL, }, /* SST39VF3201 */
-	{ CFI_MFR_SST, 0x235C, fixup_sst39vf_rev_b, NULL, }, /* SST39VF3202B */
-	{ CFI_MFR_SST, 0x235D, fixup_sst39vf_rev_b, NULL, }, /* SST39VF3201B */
-	{ CFI_MFR_SST, 0x236C, fixup_sst39vf_rev_b, NULL, }, /* SST39VF6402B */
-	{ CFI_MFR_SST, 0x236D, fixup_sst39vf_rev_b, NULL, }, /* SST39VF6401B */
-	{ 0, 0, NULL, NULL }
+	{ CFI_MFR_SST, 0x234a, fixup_sst39vf }, /* SST39VF1602 */
+	{ CFI_MFR_SST, 0x234b, fixup_sst39vf }, /* SST39VF1601 */
+	{ CFI_MFR_SST, 0x235a, fixup_sst39vf }, /* SST39VF3202 */
+	{ CFI_MFR_SST, 0x235b, fixup_sst39vf }, /* SST39VF3201 */
+	{ CFI_MFR_SST, 0x235c, fixup_sst39vf_rev_b }, /* SST39VF3202B */
+	{ CFI_MFR_SST, 0x235d, fixup_sst39vf_rev_b }, /* SST39VF3201B */
+	{ CFI_MFR_SST, 0x236c, fixup_sst39vf_rev_b }, /* SST39VF6402B */
+	{ CFI_MFR_SST, 0x236d, fixup_sst39vf_rev_b }, /* SST39VF6401B */
+	{ 0, 0, NULL }
 };
 
 static struct cfi_fixup cfi_fixup_table[] = {
-	{ CFI_MFR_ATMEL, CFI_ID_ANY, fixup_convert_atmel_pri, NULL },
+	{ CFI_MFR_ATMEL, CFI_ID_ANY, fixup_convert_atmel_pri },
 #ifdef AMD_BOOTLOC_BUG
-	{ CFI_MFR_AMD, CFI_ID_ANY, fixup_amd_bootblock, NULL },
-	{ CFI_MFR_MACRONIX, CFI_ID_ANY, fixup_amd_bootblock, NULL },
+	{ CFI_MFR_AMD, CFI_ID_ANY, fixup_amd_bootblock },
+	{ CFI_MFR_MACRONIX, CFI_ID_ANY, fixup_amd_bootblock },
 #endif
-	{ CFI_MFR_AMD, 0x0050, fixup_use_secsi, NULL, },
-	{ CFI_MFR_AMD, 0x0053, fixup_use_secsi, NULL, },
-	{ CFI_MFR_AMD, 0x0055, fixup_use_secsi, NULL, },
-	{ CFI_MFR_AMD, 0x0056, fixup_use_secsi, NULL, },
-	{ CFI_MFR_AMD, 0x005C, fixup_use_secsi, NULL, },
-	{ CFI_MFR_AMD, 0x005F, fixup_use_secsi, NULL, },
-	{ CFI_MFR_AMD, 0x0c01, fixup_s29gl064n_sectors, NULL, },
-	{ CFI_MFR_AMD, 0x1301, fixup_s29gl064n_sectors, NULL, },
-	{ CFI_MFR_AMD, 0x1a00, fixup_s29gl032n_sectors, NULL, },
-	{ CFI_MFR_AMD, 0x1a01, fixup_s29gl032n_sectors, NULL, },
-	{ CFI_MFR_SST, 0x536A, fixup_sst38vf640x_sectorsize, NULL, }, /* SST38VF6402 */
-	{ CFI_MFR_SST, 0x536B, fixup_sst38vf640x_sectorsize, NULL, }, /* SST38VF6401 */
-	{ CFI_MFR_SST, 0x536C, fixup_sst38vf640x_sectorsize, NULL, }, /* SST38VF6404 */
-	{ CFI_MFR_SST, 0x536D, fixup_sst38vf640x_sectorsize, NULL, }, /* SST38VF6403 */
+	{ CFI_MFR_AMD, 0x0050, fixup_use_secsi },
+	{ CFI_MFR_AMD, 0x0053, fixup_use_secsi },
+	{ CFI_MFR_AMD, 0x0055, fixup_use_secsi },
+	{ CFI_MFR_AMD, 0x0056, fixup_use_secsi },
+	{ CFI_MFR_AMD, 0x005C, fixup_use_secsi },
+	{ CFI_MFR_AMD, 0x005F, fixup_use_secsi },
+	{ CFI_MFR_AMD, 0x0c01, fixup_s29gl064n_sectors },
+	{ CFI_MFR_AMD, 0x1301, fixup_s29gl064n_sectors },
+	{ CFI_MFR_AMD, 0x1a00, fixup_s29gl032n_sectors },
+	{ CFI_MFR_AMD, 0x1a01, fixup_s29gl032n_sectors },
+	{ CFI_MFR_SST, 0x536a, fixup_sst38vf640x_sectorsize }, /* SST38VF6402 */
+	{ CFI_MFR_SST, 0x536b, fixup_sst38vf640x_sectorsize }, /* SST38VF6401 */
+	{ CFI_MFR_SST, 0x536c, fixup_sst38vf640x_sectorsize }, /* SST38VF6404 */
+	{ CFI_MFR_SST, 0x536d, fixup_sst38vf640x_sectorsize }, /* SST38VF6403 */
 #if !FORCE_WORD_WRITE
-	{ CFI_MFR_ANY, CFI_ID_ANY, fixup_use_write_buffers, NULL, },
+	{ CFI_MFR_ANY, CFI_ID_ANY, fixup_use_write_buffers },
 #endif
-	{ 0, 0, NULL, NULL }
+	{ 0, 0, NULL }
 };
 static struct cfi_fixup jedec_fixup_table[] = {
-	{ CFI_MFR_SST, SST49LF004B, fixup_use_fwh_lock, NULL, },
-	{ CFI_MFR_SST, SST49LF040B, fixup_use_fwh_lock, NULL, },
-	{ CFI_MFR_SST, SST49LF008A, fixup_use_fwh_lock, NULL, },
-	{ 0, 0, NULL, NULL }
+	{ CFI_MFR_SST, SST49LF004B, fixup_use_fwh_lock },
+	{ CFI_MFR_SST, SST49LF040B, fixup_use_fwh_lock },
+	{ CFI_MFR_SST, SST49LF008A, fixup_use_fwh_lock },
+	{ 0, 0, NULL }
 };
 
 static struct cfi_fixup fixup_table[] = {
@@ -383,9 +383,9 @@ static struct cfi_fixup fixup_table[] = {
 	 * well.  This table is to pick all cases where
 	 * we know that is the case.
 	 */
-	{ CFI_MFR_ANY, CFI_ID_ANY, fixup_use_erase_chip, NULL },
-	{ CFI_MFR_ATMEL, AT49BV6416, fixup_use_atmel_lock, NULL },
-	{ 0, 0, NULL, NULL }
+	{ CFI_MFR_ANY, CFI_ID_ANY, fixup_use_erase_chip },
+	{ CFI_MFR_ATMEL, AT49BV6416, fixup_use_atmel_lock },
+	{ 0, 0, NULL }
 };
 
 
diff --git a/drivers/mtd/chips/cfi_util.c b/drivers/mtd/chips/cfi_util.c
index 360525c..6ae3d11 100644
--- a/drivers/mtd/chips/cfi_util.c
+++ b/drivers/mtd/chips/cfi_util.c
@@ -156,7 +156,7 @@ void cfi_fixup(struct mtd_info *mtd, struct cfi_fixup *fixups)
 	for (f=fixups; f->fixup; f++) {
 		if (((f->mfr == CFI_MFR_ANY) || (f->mfr == cfi->mfr)) &&
 		    ((f->id  == CFI_ID_ANY)  || (f->id  == cfi->id))) {
-			f->fixup(mtd, f->param);
+			f->fixup(mtd);
 		}
 	}
 }
diff --git a/drivers/mtd/chips/fwh_lock.h b/drivers/mtd/chips/fwh_lock.h
index d180649..5e3cc80 100644
--- a/drivers/mtd/chips/fwh_lock.h
+++ b/drivers/mtd/chips/fwh_lock.h
@@ -98,7 +98,7 @@ static int fwh_unlock_varsize(struct mtd_info *mtd, loff_t ofs, uint64_t len)
 	return ret;
 }
 
-static void fixup_use_fwh_lock(struct mtd_info *mtd, void *param)
+static void fixup_use_fwh_lock(struct mtd_info *mtd)
 {
 	printk(KERN_NOTICE "using fwh lock/unlock method\n");
 	/* Setup for the chips with the fwh lock method */
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h
index 4dd0c2c..a9baee6 100644
--- a/include/linux/mtd/cfi.h
+++ b/include/linux/mtd/cfi.h
@@ -527,8 +527,7 @@ struct cfi_extquery *cfi_read_pri(struct map_info *map, uint16_t adr, uint16_t s
 struct cfi_fixup {
 	uint16_t mfr;
 	uint16_t id;
-	void (*fixup)(struct mtd_info *mtd, void* param);
-	void* param;
+	void (*fixup)(struct mtd_info *mtd);
 };
 
 #define CFI_MFR_ANY		0xFFFF



From ketil at froyn.name  Wed Nov 17 10:50:47 2010
From: ketil at froyn.name (Ketil Froyn)
Date: Wed, 17 Nov 2010 16:50:47 +0100
Subject: Suggested patch: reset errno after isatty()
In-Reply-To: <1289649338.2218.42.camel@localhost>
References: <AANLkTimwumfui-_T1ScDYwMLKbNh1ia-SDMUg56wTfN5@mail.gmail.com>
	<4CD11C03.3090207@parrot.com>
	<AANLkTimfxjrtV4eks5tK68h6TQ20soib+6gaTC+QyB4a@mail.gmail.com>
	<AANLkTinSj2vAJJjeSxF-rvq08OVsnw3YcpRSpuOfv9pQ@mail.gmail.com>
	<AANLkTikQtNwsPkJSkmpmC=kMZpmdqHDW0HROeUBNDOEi@mail.gmail.com>
	<1289646433.2218.22.camel@localhost>
	<1289649338.2218.42.camel@localhost>
Message-ID: <AANLkTink+0WvCmQWwd4+Vf8TETjR5-6BsGU=a071Rk0+@mail.gmail.com>

On Sat, Nov 13, 2010 at 12:55 PM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> On Sat, 2010-11-13 at 13:07 +0200, Artem Bityutskiy wrote:
>>
>> however, Mike is right, fixes should be back-ports, or if you fix a
>> problem in the older release, you should fix it in the master branch as
>> well, or show that it does not exist in the master branch. This is the
>> only way it is possible to keep development under control.
>>
>> We really need to be sure that whatever is fixed in older releases is
>> also fixed in the newer. Yes, this is more work for you but hey, I'm
>> also doing this stuff in my spare time.
>
> BTW, with patches from Brian Norris which I just pushed the master
> branch may work better for you.

I've managed to build mtd-utils for my android device, using
codesourcery's toolchain. I built a static nanddump executable, copied
it to my device, and ran it. Here's what happened:

# nanddump -f /sdcard/mtd5.dump /dev/mtd/mtd5
ECC failed: 0
ECC corrected: 0
Number of bad blocks: 0
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 0
Dumping data starting at 0x00000000 and ending at 0x0a5c0000...
Segmentation fault

The OOB size shown is 0, which is wrong, while the detected block size
and page size are correct. The old version used to complain:

# nanddump -f /sdcard/mtd5.dump /dev/mtd/mtd5
Unknown flash (not normal NAND)

until I did some debugging and found out that my device has an OOB
size of 56... This patch against v1.4.1 fixed that version:

--- a/nanddump.c
+++ b/nanddump.c
@@ -308,6 +308,7 @@ int main(int argc, char * const argv[])
                        !(meminfo.oobsize == 128 && meminfo.writesize == 4096) &
                        !(meminfo.oobsize == 64 && meminfo.writesize == 4096) &&
                        !(meminfo.oobsize == 64 && meminfo.writesize == 2048) &&
+                       !(meminfo.oobsize == 56 && meminfo.writesize == 2048) &&
                        !(meminfo.oobsize == 32 && meminfo.writesize == 1024) &&
                        !(meminfo.oobsize == 16 && meminfo.writesize == 512) &&
                        !(meminfo.oobsize == 8 && meminfo.writesize == 256)) {


I've done some digging around in the new code, but I haven't worked
out exactly why the OOB size is set to 0. I haven't figured out
exactly what it does yet... Or could it have anything to do with my
build environment?

Cheers, Ketil


From manningc2 at actrix.gen.nz  Wed Nov 17 18:44:04 2010
From: manningc2 at actrix.gen.nz (Charles Manning)
Date: Thu, 18 Nov 2010 12:44:04 +1300
Subject: Are there UBI layout changes between 2.6.35 and 2.6.36?
Message-ID: <201011181244.04745.manningc2@actrix.gen.nz>

Folk

I have been helping some people get an omap3 overo-based system going. 
Everything is working fine using 2.6.35 and software ECC, but when I changed 
I change to 2.6.36 and hwecc things stop working. I get the following 
problem, and obviously no boot :-(.

UBI: attaching mtd7 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: corrupted PEBs will be formatted
UBI: max. sequence number:       0
UBI error: vtbl_check: bad CRC at record 0: 0xc4ef3d92, not 0x639e7026
UBI error: vtbl_check: bad CRC at record 0: 0xc4ef3d92, not 0x639e7026
UBI error: process_lvol: both volume tables are corrupted
UBI error: ubi_attach_mtd_dev: failed to attach by scanning, error -22
UBI error: ubi_init: cannot attach mtd7

I don't think this is just a straight forward software/hardware ECC issue I 
don't get the ECC error reports I would get if I load the NAND using software 
ECC.

OK, the background...

The roofts is created by mkfs.ubifs, then ubinized, then programmed via u-boot 
using hw or sw ecc as appropriate.

The following are used to create the image:

ubinize.cmd is
[rootfs-volume]
mode=ubi
image=ubifs.tmp
vol_name=root
vol_size=20MiB
vol_id=0
EOF

mkfs.ubifs  -m 2048 -e 126KiB -c 1000 -r .  $tmp_dir/ubifs.tmp	
ubinize -o $out_file -p 128KiB -s 512 -m 2048 ubinize.cmd

Has something changed between 2.6.35 and 2.6.36 that will mess up the way the 
volumes are managed?

Thanks

Charles




From beanblossom7328 at yahoo.com.tw  Wed Nov 17 19:29:53 2010
From: beanblossom7328 at yahoo.com.tw (Cvafl)
Date: Thu, 18 Nov 2010 08:29:53 +0800
Subject: Pxchntx
Message-ID: <60137.33399.qm@smtp110.mail.tp2.yahoo.com>

?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????
?????????????

From Postmaster at sharevdc2.nhanhoa.com  Wed Nov 17 21:38:08 2010
From: Postmaster at sharevdc2.nhanhoa.com (Postmaster at sharevdc2.nhanhoa.com)
Date: Thu, 18 Nov 2010 09:38:08 +0700
Subject: MDaemon Notification -- Attachment Removed
Message-ID: <MDAEMON0029201011180938.AA3808303@sharevdc2.nhanhoa.com>

-------------------------------------------------------------------
MDaemon has detected restricted attachments within an email message
-------------------------------------------------------------------


From error27 at gmail.com  Wed Nov 17 22:58:04 2010
From: error27 at gmail.com (Dan Carpenter)
Date: Thu, 18 Nov 2010 06:58:04 +0300
Subject: [patch] UBI: release locks in check_corruption()
Message-ID: <20101118035804.GM31724@bicker>

Commit 45aafd32996e27 "UBI: tighten the corrupted PEB criteria"
introduced some return paths that didn't release the ubi->buf_mutex;

Signed-off-by: Dan Carpenter <error27 at gmail.com>

diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
index 3c63186..204345b 100644
--- a/drivers/mtd/ubi/scan.c
+++ b/drivers/mtd/ubi/scan.c
@@ -787,16 +787,15 @@ static int check_corruption(struct ubi_device *ubi, struct ubi_vid_hdr *vid_hdr,
 		 * erased, so it became unstable and corrupted, and should be
 		 * erased.
 		 */
-		return 0;
+		err = 0;
+		goto out_unlock;
 	}
 
 	if (err)
-		return err;
+		goto out_unlock;
 
-	if (ubi_check_pattern(ubi->peb_buf1, 0xFF, ubi->leb_size)) {
-		mutex_unlock(&ubi->buf_mutex);
-		return 0;
-	}
+	if (ubi_check_pattern(ubi->peb_buf1, 0xFF, ubi->leb_size))
+		goto out_unlock;
 
 	ubi_err("PEB %d contains corrupted VID header, and the data does not "
 		"contain all 0xFF, this may be a non-UBI PEB or a severe VID "
@@ -806,8 +805,11 @@ static int check_corruption(struct ubi_device *ubi, struct ubi_vid_hdr *vid_hdr,
 		pnum, ubi->leb_start, ubi->leb_size);
 	ubi_dbg_print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 32, 1,
 			       ubi->peb_buf1, ubi->leb_size, 1);
+	err = 1;
+
+out_unlock:
 	mutex_unlock(&ubi->buf_mutex);
-	return 1;
+	return err;
 }
 
 /**


From dedekind1 at gmail.com  Thu Nov 18 03:22:09 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Thu, 18 Nov 2010 10:22:09 +0200
Subject: Are there UBI layout changes between 2.6.35 and 2.6.36?
In-Reply-To: <201011181244.04745.manningc2@actrix.gen.nz>
References: <201011181244.04745.manningc2@actrix.gen.nz>
Message-ID: <1290068529.2270.5.camel@localhost>

On Thu, 2010-11-18 at 12:44 +1300, Charles Manning wrote:
> Folk
> 
> I have been helping some people get an omap3 overo-based system going. 
> Everything is working fine using 2.6.35 and software ECC, but when I changed 
> I change to 2.6.36 and hwecc things stop working. I get the following 
> problem, and obviously no boot :-(.

Hmm, should not be, at least not intentional. Could you please try to
bisect - there are not so many UBI changes so you can probably find the
offending one.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Thu Nov 18 03:28:43 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Thu, 18 Nov 2010 10:28:43 +0200
Subject: Are there UBI layout changes between 2.6.35 and 2.6.36?
In-Reply-To: <1290068529.2270.5.camel@localhost>
References: <201011181244.04745.manningc2@actrix.gen.nz>
	<1290068529.2270.5.camel@localhost>
Message-ID: <1290068923.2270.6.camel@localhost>

On Thu, 2010-11-18 at 10:22 +0200, Artem Bityutskiy wrote:
> On Thu, 2010-11-18 at 12:44 +1300, Charles Manning wrote:
> > Folk
> > 
> > I have been helping some people get an omap3 overo-based system going. 
> > Everything is working fine using 2.6.35 and software ECC, but when I changed 
> > I change to 2.6.36 and hwecc things stop working. I get the following 
> > problem, and obviously no boot :-(.
> 
> Hmm, should not be, at least not intentional. Could you please try to
> bisect - there are not so many UBI changes so you can probably find the
> offending one.

And in fact, you can even revert all UBI changes which happened after
2.6.35 and try it.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From Jon.Povey at racelogic.co.uk  Thu Nov 18 04:41:55 2010
From: Jon.Povey at racelogic.co.uk (Jon Povey)
Date: Thu, 18 Nov 2010 09:41:55 +0000
Subject: Are there UBI layout changes between 2.6.35 and 2.6.36?
In-Reply-To: <201011181244.04745.manningc2@actrix.gen.nz>
Message-ID: <70E876B0EA86DD4BAF101844BC814DFE093EF69021@Cloud.RL.local>

linux-mtd-bounces at lists.infradead.org wrote:
> Folk
>
> I have been helping some people get an omap3 overo-based system going.
> Everything is working fine using 2.6.35 and software ECC, but
> when I changed
> I change to 2.6.36 and hwecc things stop working. I get the following
> problem, and obviously no boot :-(.
>
> UBI: attaching mtd7 to ubi0
> UBI: physical eraseblock size:   131072 bytes (128 KiB)
> UBI: logical eraseblock size:    129024 bytes
> UBI: smallest flash I/O unit:    2048
> UBI: sub-page size:              512
> UBI: VID header offset:          512 (aligned 512)
> UBI: data offset:                2048
> UBI: corrupted PEBs will be formatted
> UBI: max. sequence number:       0
> UBI error: vtbl_check: bad CRC at record 0: 0xc4ef3d92, not 0x639e7026
> UBI error: vtbl_check: bad CRC at record 0: 0xc4ef3d92, not 0x639e7026
> UBI error: process_lvol: both volume tables are corrupted
> UBI error: ubi_attach_mtd_dev: failed to attach by scanning, error -22
> UBI error: ubi_init: cannot attach mtd7

...

> mkfs.ubifs  -m 2048 -e 126KiB -c 1000 -r .  $tmp_dir/ubifs.tmp
> ubinize -o $out_file -p 128KiB -s 512 -m 2048 ubinize.cmd
>
> Has something changed between 2.6.35 and 2.6.36 that will
> mess up the way the
> volumes are managed?

A couple of months ago there was a bad patch to mtd.utils that
caused mkfs.ubifs to generate bogus CRCs. That cause similar
symptoms for me. It was fixed before 2.6.36 came out of -rc.

Did you update your mtd.utils as well as the kernel?

--
Jon Povey
jon.povey at racelogic.co.uk

Racelogic is a limited company registered in England. Registered number 2743719 .
Registered Office Unit 10, Swan Business Centre, Osier Way, Buckingham, Bucks, MK18 1TB .

The information contained in this electronic mail transmission is intended by Racelogic Ltd for the use of the named individual or entity to which it is directed and may contain information that is confidential or privileged. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email so that the sender's address records can be corrected. The views expressed by the sender of this communication do not necessarily represent those of Racelogic Ltd. Please note that Racelogic reserves the right to monitor e-mail communications passing through its network




From microworldwide at winning.com  Thu Nov 18 05:53:53 2010
From: microworldwide at winning.com (UK SHELL PETROLEUM LOTERY)
Date: Thu, 18 Nov 2010 02:53:53 -0800 (PST)
Subject: OFFICIAL WINNING LETTER
Message-ID: <22411.69481.qm@web180607.mail.sp1.yahoo.com>


















































































































UK?SHELL PETROLEUM END 
OF THE YEAR LOTTERY PROMOTION AWARD.
Seafield House Hill of Rublislaw?Aberdeen AB15 6BL 
London?.
?
?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 
? ? ??OFFICIAL 
WINNING LETTER
REF N?: 
EGS/2251256003/02
BATCH N?: 
14/0017/1PD
WINNING N?: 
60/84/27/17/36????????????????????????????????? 
??????????

Dear Lucky 
Winner,
?
Please open the attached file of your winning letter and contact 
our payment processing? manager?Mr.Wool 
Deon?for the processing and releasing of your award winning 
funds .???
congratulations !!
Mrs. Wright D. Cruz
( 
Uk Lottery Promotional Coordinator)



































?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20101118/a8103698/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WINNING LETTER.bmp
Type: image/bmp
Size: 741366 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20101118/a8103698/attachment-0001.bmp>

From ketil at froyn.name  Thu Nov 18 06:13:36 2010
From: ketil at froyn.name (Ketil Froyn)
Date: Thu, 18 Nov 2010 12:13:36 +0100
Subject: Suggested patch: reset errno after isatty()
In-Reply-To: <AANLkTink+0WvCmQWwd4+Vf8TETjR5-6BsGU=a071Rk0+@mail.gmail.com>
References: <AANLkTimwumfui-_T1ScDYwMLKbNh1ia-SDMUg56wTfN5@mail.gmail.com>
	<4CD11C03.3090207@parrot.com>
	<AANLkTimfxjrtV4eks5tK68h6TQ20soib+6gaTC+QyB4a@mail.gmail.com>
	<AANLkTinSj2vAJJjeSxF-rvq08OVsnw3YcpRSpuOfv9pQ@mail.gmail.com>
	<AANLkTikQtNwsPkJSkmpmC=kMZpmdqHDW0HROeUBNDOEi@mail.gmail.com>
	<1289646433.2218.22.camel@localhost>
	<1289649338.2218.42.camel@localhost>
	<AANLkTink+0WvCmQWwd4+Vf8TETjR5-6BsGU=a071Rk0+@mail.gmail.com>
Message-ID: <AANLkTim7TT8ydMiSX8B2ehJP2kQ6jtGSnEZU98AZjWUf@mail.gmail.com>

On Wed, Nov 17, 2010 at 4:50 PM, Ketil Froyn <ketil at froyn.name> wrote:
>
> I've done some digging around in the new code, but I haven't worked
> out exactly why the OOB size is set to 0. I haven't figured out
> exactly what it does yet... Or could it have anything to do with my
> build environment?

I rebuilt nanddump from v1.4.1 with my patches using the CodeSourcery
toolchain (I'd been using the AOSP toolchain before). It works fine,
so I guess that rules out problems in my build environment. Here's
what the run looks like:

/ # nanddump-old -f /sdcard/mtd5.dump /dev/mtd/mtd5
ECC failed: 0
ECC corrected: 0
Number of bad blocks: 0
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 56
Dumping data starting at 0x00000000 and ending at 0x0a5c0000...
/ #

This particular system appears to use MTD partitioning, maybe
redboot(?) or something like that. I haven't had the opportunity to
delve into how that works yet - could it be that the partitioning
takes 8 bytes of the OOB?

Cheers, Ketil


From sshtylyov at mvista.com  Thu Nov 18 06:22:12 2010
From: sshtylyov at mvista.com (Sergei Shtylyov)
Date: Thu, 18 Nov 2010 14:22:12 +0300
Subject: [PATCH v2 1/2] mtd: NOR flash driver for OMAP-L137/AM17x
In-Reply-To: <1289548911-21243-1-git-send-email-savinay.dharmappa@ti.com>
References: <1289548911-21243-1-git-send-email-savinay.dharmappa@ti.com>
Message-ID: <4CE50C64.60001@mvista.com>

Hello.

On 12-11-2010 11:01, Savinay Dharmappa wrote:

> From: David Griego <dgriego at mvista.com>

> OMAP-L137/AM17x has limited number of dedicated EMIFA
> address pins, enough to interface directly to an SDRAM.
> If a device such as an asynchronous flash needs to be
> attached to the EMIFA, then either GPIO pins or a chip
> select may be used to control the flash device's upper
> address lines.
>
> This patch adds support for the NOR flash on the OMAP-L137/
> AM17x user interface daughter board using the latch-addr-flash
> MTD mapping driver which allows flashes to be partially
> physically addressed. The upper address lines are set by
> a board specific code which is a separate patch.

    Please add back my signoff, omitted in this version. Some of the code, 
including a bug fix, was authored by me.

> Signed-off-by: David Griego <dgriego at mvista.com>

Signed-off-by: Sergei Shtylyov <sshtylyov at ru.mvista.com>

> Signed-off-by: Savinay Dharmappa <savinay.dharmappa at ti.com>

 > diff --git a/include/linux/mtd/latch-addr-flash.h 
b/include/linux/mtd/latch-addr-flash.h
 > new file mode 100644
 > index 0000000..c77e7c9
 > --- /dev/null
 > +++ b/include/linux/mtd/latch-addr-flash.h
 > @@ -0,0 +1,29 @@
 > +/*
 > + * Interface for NOR flash driver whose high address lines are latched
 > + *
 > + * Copyright (C) 2008 MontaVista Software, Inc.<source at mvista.com>
 > + *
 > + * This file is licensed underthe terms of the GNU General Public License
                                  ^
    Oops, forgot a space here.

WBR, Sergei


From sshtylyov at mvista.com  Thu Nov 18 06:52:26 2010
From: sshtylyov at mvista.com (Sergei Shtylyov)
Date: Thu, 18 Nov 2010 14:52:26 +0300
Subject: [PATCH v2 2/2] davinci: Platform support for OMAP-L137/AM17x
	NOR flash driver
In-Reply-To: <1289548975-21296-1-git-send-email-savinay.dharmappa@ti.com>
References: <1289548975-21296-1-git-send-email-savinay.dharmappa@ti.com>
Message-ID: <4CE5137A.8060507@mvista.com>

Hello.

On 12-11-2010 11:02, Savinay Dharmappa wrote:

> From: Aleksey Makarov<amakarov at ru.mvista.com>

> Adds platform support for OMAP-L137/AM17x NOR flash driver.

> Also, configures chip select 3 to control NOR flash's upper
> address lines.

    Please add back my signoff, omitted in this version. Some of the code, 
including bug fixes, was authored by me.

> Signed-off-by: Aleksey Makarov <amakarov at ru.mvista.com>

Signed-off-by: Sergei Shtylyov <sshtylyov at ru.mvista.com>

> Signed-off-by: Savinay Dharmappa <savinay.dharmappa at ti.com>

> diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
> index 1bb89d3..cd35198 100644
> --- a/arch/arm/mach-davinci/board-da830-evm.c
> +++ b/arch/arm/mach-davinci/board-da830-evm.c
[...]
> @@ -429,6 +431,221 @@ static inline void da830_evm_init_nand(int mux_mode)
>   static inline void da830_evm_init_nand(int mux_mode) { }
>   #endif
>
> +#ifdef CONFIG_DA830_UI_NOR
> +/*
> + * Number of Address line

    Only "lines".

> going to the NOR flash that are latched using
> + * AEMIF address lines  B_EMIF_BA0-B_EMIF_A12  on CS2.
> +#define NOR_WINDOW_SIZE_LOG2     15
> +#define NOR_WINDOW_SIZE         (1 << NOR_WINDOW_SIZE_LOG2)
> +
> +static struct {
> +	struct clk *clk;
> +	struct {
> +		struct resource *res;

    You're not using this field outside da830_evm_nor_init() now, so there's 
not much point in keeping it...

> +		void __iomem *addr;
> +	} latch, aemif;
> +} da830_evm_nor;

> +static void da830_evm_nor_set_window(unsigned long offset, void *data)
> +{
> +	/*
> +	 * CS2 and CS3 address lines are used to address NOR flash. Address
> +	 * line A0-A14 going to the NOR flash are latched using AEMIF address
> +	 * lines B_EMIF_BA0-B_EMIF_A12 on CS2.

    Are they really latched, and not just used live when the NOR chip is 
accessed? What's the point of latching them?

> +static int da830_evm_nor_init(void *data, int cs)
> +{
> +	/* Turn on AEMIF clocks */
> +	da830_evm_nor.clk = clk_get(NULL, "aemif");
> +	if (IS_ERR(da830_evm_nor.clk)) {
> +		pr_err("%s: could not get AEMIF clock\n", __func__);
> +		da830_evm_nor.clk = NULL;
> +		return -ENODEV;
> +	}
> +	clk_enable(da830_evm_nor.clk);
> +
> +	da830_evm_nor.aemif.res = request_mem_region(DA8XX_AEMIF_CTL_BASE,
> +						     SZ_32K, "AEMIF control");

    No need to store it -- you don't use it afterwards.

> +	if (da830_evm_nor.aemif.res == NULL) {
> +		pr_err("%s: could not request AEMIF control region\n",
> +			__func__);
> +		goto err_clk;
> +	}

[...]

> +	/* Setup the window to access the latch */
> +	da830_evm_nor.latch.res =
> +		request_mem_region(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE,
> +				   "DA830 UI NOR address latch");

    Same comment here...

> +	if (da830_evm_nor.latch.res == NULL) {
> +		pr_err("%s: could not request address latch region\n",
> +			__func__);
> +		goto err_aemif_ioremap;
> +	}

[...]

> +static inline void da830_evm_init_nor(int mux_mode)
> +{
> +	int ret;
> +
> +	if (HAS_MMC) {
> +		pr_warning("WARNING: both MMC/SD and NOR are "
> +				"enabled, but they share AEMIF pins.\n"
> +					"\tDisable MMC/SD for NOR support.\n");

    This line is over-indented.

WBR, Sergei


From savinay.dharmappa at ti.com  Thu Nov 18 06:50:32 2010
From: savinay.dharmappa at ti.com (Savinay Dharmappa)
Date: Thu, 18 Nov 2010 17:20:32 +0530
Subject: [PATCH v2 1/2] mtd: NOR flash driver for OMAP-L137/AM17x
In-Reply-To: <4CE50C64.60001@mvista.com>
References: <1289548911-21243-1-git-send-email-savinay.dharmappa@ti.com>
	<4CE50C64.60001@mvista.com>
Message-ID: <003c01cb8716$ce4bb750$6ae325f0$@dharmappa@ti.com>

Hi Sergei,

On Thu, Nov 18, 2010 at 16:52:12, Sergei Shtylyov wrote:
> Hello.
> 
> On 12-11-2010 11:01, Savinay Dharmappa wrote:
> 
> > From: David Griego <dgriego at mvista.com>
> 
> > OMAP-L137/AM17x has limited number of dedicated EMIFA
> > address pins, enough to interface directly to an SDRAM.
> > If a device such as an asynchronous flash needs to be
> > attached to the EMIFA, then either GPIO pins or a chip
> > select may be used to control the flash device's upper
> > address lines.
> >
> > This patch adds support for the NOR flash on the OMAP-L137/
> > AM17x user interface daughter board using the latch-addr-flash
> > MTD mapping driver which allows flashes to be partially
> > physically addressed. The upper address lines are set by
> > a board specific code which is a separate patch.
> 
>     Please add back my signoff, omitted in this version. Some of the code,

> including a bug fix, was authored by me.
> 

I'll surely do this. What about your Sign-off on 2/2 patch? Also shall I add
Aleksey's Sign-off on this patch and David's Sign-off on 2/2 patch?

Thanks,
Savinay.




From sshtylyov at mvista.com  Thu Nov 18 07:09:00 2010
From: sshtylyov at mvista.com (Sergei Shtylyov)
Date: Thu, 18 Nov 2010 15:09:00 +0300
Subject: [PATCH v2 1/2] mtd: NOR flash driver for OMAP-L137/AM17x
In-Reply-To: <003c01cb8716$ce4bb750$6ae325f0$@dharmappa@ti.com>
References: <1289548911-21243-1-git-send-email-savinay.dharmappa@ti.com>
	<4CE50C64.60001@mvista.com>
	<003c01cb8716$ce4bb750$6ae325f0$@dharmappa@ti.com>
Message-ID: <4CE5175C.2080505@mvista.com>

Hello.

On 18-11-2010 14:50, Savinay Dharmappa wrote:

>>> OMAP-L137/AM17x has limited number of dedicated EMIFA
>>> address pins, enough to interface directly to an SDRAM.
>>> If a device such as an asynchronous flash needs to be
>>> attached to the EMIFA, then either GPIO pins or a chip
>>> select may be used to control the flash device's upper
>>> address lines.

>>> This patch adds support for the NOR flash on the OMAP-L137/
>>> AM17x user interface daughter board using the latch-addr-flash
>>> MTD mapping driver which allows flashes to be partially
>>> physically addressed. The upper address lines are set by
>>> a board specific code which is a separate patch.

>>      Please add back my signoff, omitted in this version. Some of the code,
>> including a bug fix, was authored by me.

> I'll surely do this. What about your Sign-off on 2/2 patch?

    Already replied.

> Also shall I add
> Aleksey's Sign-off on this patch

    AFAIR, there was his signoff on it, so yes.

> and David's Sign-off on 2/2 patch?

    David didn't touch patch 2/2.

> Thanks,
> Savinay.

WBR, Sergei


From ANDY.KENNEDY at adtran.com  Thu Nov 18 08:11:49 2010
From: ANDY.KENNEDY at adtran.com (ANDY KENNEDY)
Date: Thu, 18 Nov 2010 07:11:49 -0600
Subject: mtdparts question
Message-ID: <9AC3F0E75060224C8BBC5BA2DDC8853A1E133300@EXV1.corp.adtran.com>

Attempting to configure mtdparts from the command line.  The parts are
set statically in the kernel, however, the COMMENT prior to the config
declares that the this is what will happen IF there is no definition on
the command line.

Bootup info shows:

<snip>
Kernel command line: mtdparts=NAND 128MiB 3,3V
8-bit:256k(hidden),-(root) ip=192.168.1.10 root=/dev/ram
console=ttyS0,115200n8r <snip> Scanning for NAND chip NAND device:
Manufacturer ID: 0x20, Chip ID: 0xf1 (ST Micro NAND 128MiB 3,3V 8-bit)
Scanning device for bad blocks Bad eraseblock 1012 at 0x000007e80000
Setting up NAND partitions Creating 2 MTD partitions on "NAND 128MiB
3,3V 8-bit":
0x000000000000-0x000000400000 : "Kernel partition"
0x000000400000-0x000008000000 : "Root partition"
<snip>
physmap platform flash device: 01000000 at 1f000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank  Amd/Fujitsu
Extended Query Table at 0x0040
physmap-flash.0: CFI does not contain boot bank location. Assuming top.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
cmdlinepart partition parsing not available RedBoot partition parsing
not available Using physmap partition information Creating 1 MTD
partitions on "physmap-flash.0":
0x000000440000-0x000000a40000 : "filesystem"
<snip>

The system has two flash chips, one a NOR and the other a NAND.

Q1:  Can we configure mtdparts from the command line if the definition
is already in arch/mips/<mysys>/platform.c.
Q2:  Is the definition `mtdparts=NAND 128MiB 3,3V
8-bit:256k(hidden),-(root)` correct to do this for the NAND?
Q3:  Can we define partitions for BOTH of these flash on the command
line? (my answer= NO -- am I correct?)

If this has been asked prior, I could not locate it.  Sorry for the
repeat if it has been asked previously.

Thanks,
Andy


From s-ghorai at ti.com  Thu Nov 18 09:22:10 2010
From: s-ghorai at ti.com (Sukumar Ghorai)
Date: Thu, 18 Nov 2010 19:52:10 +0530
Subject: [PATCH] omap: nand: remove hardware ECC as default
Message-ID: <1290090130-20835-1-git-send-email-s-ghorai@ti.com>

CONFIG_MTD_NAND_OMAP_HWECC defined wronly in patch submitted during 2.6.36
that using the hardware ECC by default

Signed-off-by: Sukumar Ghorai <s-ghorai at ti.com>
---
 drivers/mtd/nand/omap2.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index cd41c58..15682ec 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -7,7 +7,6 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#define CONFIG_MTD_NAND_OMAP_HWECC
 
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
-- 
1.7.0.4



From tony at atomide.com  Thu Nov 18 13:01:37 2010
From: tony at atomide.com (Tony Lindgren)
Date: Thu, 18 Nov 2010 10:01:37 -0800
Subject: [PATCH] omap: nand: remove hardware ECC as default
In-Reply-To: <1290090130-20835-1-git-send-email-s-ghorai@ti.com>
References: <1290090130-20835-1-git-send-email-s-ghorai@ti.com>
Message-ID: <20101118180137.GG9264@atomide.com>

* Sukumar Ghorai <s-ghorai at ti.com> [101118 06:12]:
> CONFIG_MTD_NAND_OMAP_HWECC defined wronly in patch submitted during 2.6.36
> that using the hardware ECC by default
> 
> Signed-off-by: Sukumar Ghorai <s-ghorai at ti.com>
> ---
>  drivers/mtd/nand/omap2.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
> index cd41c58..15682ec 100644
> --- a/drivers/mtd/nand/omap2.c
> +++ b/drivers/mtd/nand/omap2.c
> @@ -7,7 +7,6 @@
>   * it under the terms of the GNU General Public License version 2 as
>   * published by the Free Software Foundation.
>   */
> -#define CONFIG_MTD_NAND_OMAP_HWECC
>  
>  #include <linux/platform_device.h>
>  #include <linux/dma-mapping.h>

This looks like a fix for the -rc cycle. Can you please update
the description a bit to specify which commit broke it and
what the error is now?

Regards,

Tony


From randy.dunlap at oracle.com  Thu Nov 18 18:02:21 2010
From: randy.dunlap at oracle.com (Randy Dunlap)
Date: Thu, 18 Nov 2010 15:02:21 -0800
Subject: [PATCH] mtd: fix nand kernel-doc warnings
Message-ID: <20101118150221.2f38e9b0.randy.dunlap@oracle.com>

From: Randy Dunlap <randy.dunlap at oracle.com>

Warning(include/linux/mtd/nand.h:543): No description found for parameter 'badblockbits'
Warning(drivers/mtd/nand/nand_bbt.c:1101): No description found for parameter 'mtd'

Signed-off-by: Randy Dunlap <randy.dunlap at oracle.com>
Cc:	David Woodhouse <dwmw2 at infradead.org>
Cc:	linux-mtd at lists.infradead.org
---
 drivers/mtd/nand/nand_bbt.c |    3 ++-
 include/linux/mtd/nand.h    |    2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

--- lnx-2637-r2g4-kerndoc.orig/include/linux/mtd/nand.h
+++ lnx-2637-r2g4-kerndoc/include/linux/mtd/nand.h
@@ -448,6 +448,8 @@ struct nand_buffers {
  *			See the defines for further explanation.
  * @badblockpos:	[INTERN] position of the bad block marker in the oob
  *			area.
+ * @badblockbits:	[INTERN] number of bits to left-shift the bad block
+ *			number
  * @cellinfo:		[INTERN] MLC/multichip data from chip ident
  * @numchips:		[INTERN] number of physical chips
  * @chipsize:		[INTERN] the size of one chip for multichip arrays
--- lnx-2637-r2g4-kerndoc.orig/drivers/mtd/nand/nand_bbt.c
+++ lnx-2637-r2g4-kerndoc/drivers/mtd/nand/nand_bbt.c
@@ -1092,7 +1092,8 @@ static void mark_bbt_region(struct mtd_i
 
 /**
  * verify_bbt_descr - verify the bad block description
- * @bd:			the table to verify
+ * @mtd:	MTD device structure
+ * @bd:		the table to verify
  *
  * This functions performs a few sanity checks on the bad block description
  * table.


From adrian.wenl at gmail.com  Thu Nov 18 23:42:47 2010
From: adrian.wenl at gmail.com (Lei Wen)
Date: Fri, 19 Nov 2010 12:42:47 +0800
Subject: [PATCH V3 0/6] pxa3xx_nand update series set
In-Reply-To: <AANLkTikVAU5KAN072O7xp=A3meFTw5AadUSoqbzEGofO@mail.gmail.com>
References: <1287742484-4276-1-git-send-email-leiwen@marvell.com>
	<AANLkTikVAU5KAN072O7xp=A3meFTw5AadUSoqbzEGofO@mail.gmail.com>
Message-ID: <AANLkTin2O-mQi9jxnJsgBr82T1FRrRavMA5MMnvzueJ7@mail.gmail.com>

Hi David,

Would you mind check whether those patches need any fix, or could be merged now?

Thanks,
Lei

On Fri, Oct 22, 2010 at 6:15 PM, Haojian Zhuang
<haojian.zhuang at gmail.com> wrote:
> On Fri, Oct 22, 2010 at 6:14 PM, Lei Wen <leiwen at marvell.com> wrote:
>> [PATCH V3 1/6] pxa3xx_nand: make scan procedure more clear
>> [PATCH V3 2/6] pxa3xx_nand: rework irq logic
>> [PATCH V3 3/6] pxa3xx_nand: discard wait_for_event,write_cmd,__readid function
>> [PATCH V3 4/6] pxa3xx_nand: unify prepare command
>> [PATCH V3 5/6] pxa3xx_nand: mtd scan id process could be defined by driver itself
>> [PATCH V3 6/6] pxa3xx_nand: clean the keep configure code
>>
>
> Hi Eric and all,
>
> Patches are refreshed. Please help to review.
>
> Best Regards
> Haojian
>


From savinay.dharmappa at ti.com  Fri Nov 19 00:39:58 2010
From: savinay.dharmappa at ti.com (Savinay Dharmappa)
Date: Fri, 19 Nov 2010 11:09:58 +0530
Subject: [PATCH v2 2/2] davinci: Platform support for OMAP-L137/AM17x NOR
	flash driver
In-Reply-To: <4CE5137A.8060507@mvista.com>
References: <1289548975-21296-1-git-send-email-savinay.dharmappa@ti.com>
	<4CE5137A.8060507@mvista.com>
Message-ID: <004601cb87ac$33a1d680$9ae58380$@dharmappa@ti.com>

Hi Sergei,

On Thu, Nov 18, 2010 at 17:22:26, Sergei Shtylyov wrote:
> Hello.
> 
> On 12-11-2010 11:02, Savinay Dharmappa wrote:
> 
> > From: Aleksey Makarov<amakarov at ru.mvista.com>
> 
> > Adds platform support for OMAP-L137/AM17x NOR flash driver.
> 
> > Also, configures chip select 3 to control NOR flash's upper
> > address lines.
> 
>     Please add back my signoff, omitted in this version. Some of the code,

> including bug fixes, was authored by me.
> 

I'll add your sign-off.

> > Signed-off-by: Aleksey Makarov <amakarov at ru.mvista.com>
> 
> Signed-off-by: Sergei Shtylyov <sshtylyov at ru.mvista.com>
> 
> > Signed-off-by: Savinay Dharmappa <savinay.dharmappa at ti.com>
> 
> > diff --git a/arch/arm/mach-davinci/board-da830-evm.c
b/arch/arm/mach-davinci/board-da830-evm.c
> > index 1bb89d3..cd35198 100644
> > --- a/arch/arm/mach-davinci/board-da830-evm.c
> > +++ b/arch/arm/mach-davinci/board-da830-evm.c
> [...]
> > @@ -429,6 +431,221 @@ static inline void da830_evm_init_nand(int
mux_mode)
> >   static inline void da830_evm_init_nand(int mux_mode) { }
> >   #endif
> >
> > +#ifdef CONFIG_DA830_UI_NOR
> > +/*
> > + * Number of Address line
> 
>     Only "lines".
> 

Ok.

> > going to the NOR flash that are latched using
> > + * AEMIF address lines  B_EMIF_BA0-B_EMIF_A12  on CS2.
> > +#define NOR_WINDOW_SIZE_LOG2     15
> > +#define NOR_WINDOW_SIZE         (1 << NOR_WINDOW_SIZE_LOG2)
> > +
> > +static struct {
> > +	struct clk *clk;
> > +	struct {
> > +		struct resource *res;
> 
>     You're not using this field outside da830_evm_nor_init() now, so
there's 
> not much point in keeping it...
> 

Ok. I'll use it as a local variable in da830_evm_nor_init().

> > +		void __iomem *addr;
> > +	} latch, aemif;
> > +} da830_evm_nor;
> 
> > +static void da830_evm_nor_set_window(unsigned long offset, void *data)
> > +{
> > +	/*
> > +	 * CS2 and CS3 address lines are used to address NOR flash. Address
> > +	 * line A0-A14 going to the NOR flash are latched using AEMIF
address
> > +	 * lines B_EMIF_BA0-B_EMIF_A12 on CS2.
> 
>     Are they really latched, and not just used live when the NOR chip is 
> accessed? What's the point of latching them?
> 

You are right. I'll correct the comment.

> > +static int da830_evm_nor_init(void *data, int cs)
> > +{
> > +	/* Turn on AEMIF clocks */
> > +	da830_evm_nor.clk = clk_get(NULL, "aemif");
> > +	if (IS_ERR(da830_evm_nor.clk)) {
> > +		pr_err("%s: could not get AEMIF clock\n", __func__);
> > +		da830_evm_nor.clk = NULL;
> > +		return -ENODEV;
> > +	}
> > +	clk_enable(da830_evm_nor.clk);
> > +
> > +	da830_evm_nor.aemif.res = request_mem_region(DA8XX_AEMIF_CTL_BASE,
> > +						     SZ_32K, "AEMIF
control");
> 
>     No need to store it -- you don't use it afterwards.
> 

Ok.

> > +	if (da830_evm_nor.aemif.res == NULL) {
> > +		pr_err("%s: could not request AEMIF control region\n",
> > +			__func__);
> > +		goto err_clk;
> > +	}
> 
> [...]
> 
> > +	/* Setup the window to access the latch */
> > +	da830_evm_nor.latch.res =
> > +		request_mem_region(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE,
> > +				   "DA830 UI NOR address latch");
> 
>     Same comment here...
> 
> > +	if (da830_evm_nor.latch.res == NULL) {
> > +		pr_err("%s: could not request address latch region\n",
> > +			__func__);
> > +		goto err_aemif_ioremap;
> > +	}
> 
> [...]
> 
> > +static inline void da830_evm_init_nor(int mux_mode)
> > +{
> > +	int ret;
> > +
> > +	if (HAS_MMC) {
> > +		pr_warning("WARNING: both MMC/SD and NOR are "
> > +				"enabled, but they share AEMIF pins.\n"
> > +					"\tDisable MMC/SD for NOR
support.\n");
> 
>     This line is over-indented.

Ok. Will address your comments and send an updated an version

Thanks,
Savinay




From r64343 at freescale.com  Fri Nov 19 03:40:45 2010
From: r64343 at freescale.com (Jason Liu)
Date: Fri, 19 Nov 2010 16:40:45 +0800
Subject: [PATCH 1/1] mtd: nand: add check for out of page read
Message-ID: <1290156045-11719-1-git-send-email-r64343@freescale.com>

When run mtd_oobtest case, there will be one error for step(4),
which turned out it need add one check for out of page read in
nand_do_read_oob just like mtd_do_write_oob did it already.
This commit also fix one typo error for comments in mtd_do_write_oob

Signed-off-by: Jason Liu <r64343 at freescale.com>
---
 drivers/mtd/nand/nand_base.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 1f75a1b..75d199e 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -1782,6 +1782,13 @@ static int nand_do_read_oob(struct mtd_info *mtd, loff_t from,
 	else
 		len = mtd->oobsize;
 
+	/* Do not allow read past end of page */
+	if ((ops->ooboffs + readlen) > len) {
+		DEBUG(MTD_DEBUG_LEVEL0, "%s: Attempt to read "
+				"past end of page\n", __func__);
+		return -EINVAL;
+	}
+
 	if (unlikely(ops->ooboffs >= len)) {
 		DEBUG(MTD_DEBUG_LEVEL0, "%s: Attempt to start read "
 					"outside oob\n", __func__);
@@ -2377,7 +2384,7 @@ static int nand_do_write_oob(struct mtd_info *mtd, loff_t to,
 		return -EINVAL;
 	}
 
-	/* Do not allow reads past end of device */
+	/* Do not allow write past end of device */
 	if (unlikely(to >= mtd->size ||
 		     ops->ooboffs + ops->ooblen >
 			((mtd->size >> chip->page_shift) -
-- 
1.7.0.4




From jgq516 at gmail.com  Fri Nov 19 04:35:42 2010
From: jgq516 at gmail.com (jgq516 at gmail.com)
Date: Fri, 19 Nov 2010 17:35:42 +0800
Subject: No subject
Message-ID: <1290159342-20528-1-git-send-email-jgq516@gmail.com>

Hello,

I encountered the kernel warning "MTD do_write_buffer(): software timeout" when copy 20KB file to nor flash with flashcp cmd. The flash type is s29gl256p, and the suitable driver for the flash is cfi_cmdset_0002.c.

I think the issue should caused by the following codes in do_write_buffer func.

if (time_after(jiffies, timeo) && !chip_ready(map, adr))
                        break;
[snip]
printk(KERN_WARNING "MTD %s(): software timeout\n",
               __func__ );

After experiments, I found if flashcp a file less than 12kB, the warning is disappeared. Or add some delay before check the chip is ready or not, then I could flashcp a larger size file, more delay can flashcp more size.

However I don't think add delay it is a good solution, from Figure"Write Buffer Programming Operation" of the flash datasheet, we should perform polling algorithm and check the polling status after write buffer program confirm. and xip_udelay implement the polling algorithm, is it right?  But it seems only the arch which support MTD_XIP can use xip_udelay, otherwise UDELAY is defined with cfi_udelay rather than xip_udelay,.

Unfortunately, the cpu in my board doesn't support MTD_XIP now, is this means these archs without MTD_XIP support don't need poll after write buffer?  or is there any good idea to handle the warning? Thanks.
Ps: I used 2.6.34 kernel, and the driver doesn't have obviously change after compare with the latest version.

Best Regards,
Xiao Jiang


From savinay.dharmappa at ti.com  Fri Nov 19 04:54:13 2010
From: savinay.dharmappa at ti.com (Savinay Dharmappa)
Date: Fri, 19 Nov 2010 15:24:13 +0530
Subject: [PATCH v3 1/2] mtd: NOR flash driver for OMAP-L137/AM17x
Message-ID: <1290160453-9316-1-git-send-email-savinay.dharmappa@ti.com>

From: David Griego <dgriego at mvista.com>

OMAP-L137/AM17x has limited number of dedicated EMIFA
address pins, enough to interface directly to an SDRAM.
If a device such as an asynchronous flash needs to be
attached to the EMIFA, then either GPIO pins or a chip
select may be used to control the flash device's upper
address lines.

This patch adds support for the NOR flash on the OMAP-L137/
AM17x user interface daughter board using the latch-addr-flash
MTD mapping driver which allows flashes to be partially
physically addressed. The upper address lines are set by
a board specific code which is a separate patch.

Signed-off-by: David Griego <dgriego at mvista.com>
Signed-off-by: Aleksey Makarov <amakarov at ru.mvista.com>
Signed-off-by: Sergei Shtylyov <sshtylyov at ru.mvista.com>
Signed-off-by: Savinay Dharmappa <savinay.dharmappa at ti.com>
---
Since v2:
a. Added signoff from Aleksey Makarov and Sergei Shtylyov.
b. Fixed a minor commenting issue.

 drivers/mtd/maps/Kconfig             |    9 +
 drivers/mtd/maps/Makefile            |    1 +
 drivers/mtd/maps/latch-addr-flash.c  |  272 ++++++++++++++++++++++++++++++++++
 include/linux/mtd/latch-addr-flash.h |   29 ++++
 4 files changed, 311 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mtd/maps/latch-addr-flash.c
 create mode 100644 include/linux/mtd/latch-addr-flash.h

diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index a0dd7bb..c0993d0 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -552,4 +552,13 @@ config MTD_PISMO
 
 	  When built as a module, it will be called pismo.ko
 
+config MTD_LATCH_ADDR
+        tristate "Latch-assisted Flash Chip Support"
+        depends on MTD_COMPLEX_MAPPINGS
+        help
+          Map driver which allows flashes to be partially physically addressed
+          and have the upper address lines set by a board specific code.
+
+          If compiled as a module, it will be called latch-addr-flash.
+
 endmenu
diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile
index c7869c7..08533bd 100644
--- a/drivers/mtd/maps/Makefile
+++ b/drivers/mtd/maps/Makefile
@@ -59,3 +59,4 @@ obj-$(CONFIG_MTD_RBTX4939)	+= rbtx4939-flash.o
 obj-$(CONFIG_MTD_VMU)		+= vmu-flash.o
 obj-$(CONFIG_MTD_GPIO_ADDR)	+= gpio-addr-flash.o
 obj-$(CONFIG_MTD_BCM963XX)	+= bcm963xx-flash.o
+obj-$(CONFIG_MTD_LATCH_ADDR)	+= latch-addr-flash.o
diff --git a/drivers/mtd/maps/latch-addr-flash.c b/drivers/mtd/maps/latch-addr-flash.c
new file mode 100644
index 0000000..2f91291
--- /dev/null
+++ b/drivers/mtd/maps/latch-addr-flash.c
@@ -0,0 +1,272 @@
+/*
+ * Interface for NOR flash driver whose high address lines are latched
+ *
+ * Copyright 2000 Nicolas Pitre <nico at cam.org>
+ * Copyright 2005-2008 Analog Devices Inc.
+ * Coyright (C) 2008 MontaVista Software, Inc. <source at mvista.com>
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#include <linux/mtd/partitions.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/latch-addr-flash.h>
+#include <linux/slab.h>
+
+#define DRIVER_NAME "latch-addr-flash"
+
+struct latch_addr_flash_info {
+	struct mtd_info		*mtd;
+	struct map_info		map;
+	struct resource		*res;
+
+	void			(*set_window)(unsigned long offset, void *data);
+	void			*data;
+
+	/* cache; could be found out of res */
+	unsigned long		win_mask;
+
+	int			nr_parts;
+	struct mtd_partition	*parts;
+
+	spinlock_t		lock;
+};
+
+static map_word lf_read(struct map_info *map, unsigned long ofs)
+{
+	struct latch_addr_flash_info *info;
+	map_word datum;
+
+	info = (struct latch_addr_flash_info *)map->map_priv_1;
+
+	spin_lock(&info->lock);
+
+	info->set_window(ofs, info->data);
+	datum = inline_map_read(map, info->win_mask & ofs);
+
+	spin_unlock(&info->lock);
+
+	return datum;
+}
+
+static void lf_write(struct map_info *map, map_word datum, unsigned long ofs)
+{
+	struct latch_addr_flash_info *info;
+
+	info = (struct latch_addr_flash_info *)map->map_priv_1;
+
+	spin_lock(&info->lock);
+
+	info->set_window(ofs, info->data);
+	inline_map_write(map, datum, info->win_mask & ofs);
+
+	spin_unlock(&info->lock);
+}
+
+static void lf_copy_from(struct map_info *map, void *to,
+		unsigned long from, ssize_t len)
+{
+	struct latch_addr_flash_info *info =
+		(struct latch_addr_flash_info *) map->map_priv_1;
+	unsigned n;
+
+	while (len > 0) {
+		n = info->win_mask + 1 - (from & info->win_mask);
+		if (n > len)
+			n = len;
+
+		spin_lock(&info->lock);
+
+		info->set_window(from, info->data);
+		memcpy_fromio(to, map->virt + (from & info->win_mask), n);
+
+		spin_unlock(&info->lock);
+
+		to += n;
+		from += n;
+		len -= n;
+	}
+}
+
+static char *rom_probe_types[] = { "cfi_probe", NULL };
+
+static char *part_probe_types[] = { "cmdlinepart", NULL };
+
+static int latch_addr_flash_remove(struct platform_device *dev)
+{
+	struct latch_addr_flash_info *info;
+	struct latch_addr_flash_data *latch_addr_data;
+
+	info = platform_get_drvdata(dev);
+	if (info == NULL)
+		return 0;
+	platform_set_drvdata(dev, NULL);
+
+	latch_addr_data = dev->dev.platform_data;
+
+	if (info->mtd != NULL) {
+		if (mtd_has_partitions()) {
+			if (info->nr_parts) {
+				del_mtd_partitions(info->mtd);
+				kfree(info->parts);
+			} else if (latch_addr_data->nr_parts) {
+				del_mtd_partitions(info->mtd);
+			} else {
+				del_mtd_device(info->mtd);
+			}
+		} else {
+			del_mtd_device(info->mtd);
+		}
+		map_destroy(info->mtd);
+	}
+
+	if (info->map.virt != NULL)
+		iounmap(info->map.virt);
+
+	if (info->res != NULL)
+		release_mem_region(info->res->start, resource_size(info->res));
+
+	kfree(info);
+
+	if (latch_addr_data->done)
+		latch_addr_data->done(latch_addr_data->data);
+
+	return 0;
+}
+
+static int __devinit latch_addr_flash_probe(struct platform_device *dev)
+{
+	struct latch_addr_flash_data *latch_addr_data;
+	struct latch_addr_flash_info *info;
+	resource_size_t win_base = dev->resource->start;
+	resource_size_t win_size = resource_size(dev->resource);
+	char **probe_type;
+	int chipsel;
+	int err;
+
+	latch_addr_data = dev->dev.platform_data;
+	if (latch_addr_data == NULL)
+		return -ENODEV;
+
+	pr_notice("latch-addr platform flash device: %#llx byte "
+		  "window at %#.8llx\n",
+		  (unsigned long long)win_size, (unsigned long long)win_base);
+
+	chipsel = dev->id;
+
+	if (latch_addr_data->init) {
+		err = latch_addr_data->init(latch_addr_data->data, chipsel);
+		if (err != 0)
+			return err;
+	}
+
+	info = kzalloc(sizeof(struct latch_addr_flash_info), GFP_KERNEL);
+	if (info == NULL) {
+		err = -ENOMEM;
+		goto done;
+	}
+
+	platform_set_drvdata(dev, info);
+
+	info->res = request_mem_region(win_base, win_size, DRIVER_NAME);
+	if (info->res == NULL) {
+		dev_err(&dev->dev, "Could not reserve memory region\n");
+		err = -EBUSY;
+		goto free_info;
+	}
+
+	info->map.name		= DRIVER_NAME;
+	info->map.size		= latch_addr_data->size;
+	info->map.bankwidth	= latch_addr_data->width;
+
+	info->map.phys		= NO_XIP;
+	info->map.virt		= ioremap(win_base, win_size);
+	if (!info->map.virt) {
+		err = -ENOMEM;
+		goto free_res;
+	}
+
+	info->map.map_priv_1	= (unsigned long)info;
+
+	info->map.read		= lf_read;
+	info->map.copy_from	= lf_copy_from;
+	info->map.write		= lf_write;
+	info->set_window	= latch_addr_data->set_window;
+	info->data		= latch_addr_data->data;
+	info->win_mask		= win_size - 1;
+
+	spin_lock_init(&info->lock);
+
+	for (probe_type = rom_probe_types; !info->mtd && *probe_type;
+		probe_type++)
+		info->mtd = do_map_probe(*probe_type, &info->map);
+
+	if (info->mtd == NULL) {
+		dev_err(&dev->dev, "map_probe failed\n");
+		err = -ENODEV;
+		goto iounmap;
+	}
+	info->mtd->owner = THIS_MODULE;
+
+	if (mtd_has_partitions()) {
+
+		err = parse_mtd_partitions(info->mtd,
+					   (const char **)part_probe_types,
+					   &info->parts, 0);
+		if (err > 0) {
+			add_mtd_partitions(info->mtd, info->parts, err);
+			return 0;
+		}
+		if (latch_addr_data->nr_parts) {
+			pr_notice("Using latch-addr-flash partition information\n");
+			add_mtd_partitions(info->mtd, latch_addr_data->parts,
+					latch_addr_data->nr_parts);
+			return 0;
+		}
+	}
+	add_mtd_device(info->mtd);
+	return 0;
+
+iounmap:
+	iounmap(info->map.virt);
+free_res:
+	release_mem_region(info->res->start, resource_size(info->res));
+free_info:
+	kfree(info);
+done:
+	if (latch_addr_data->done)
+		latch_addr_data->done(latch_addr_data->data);
+	return err;
+}
+
+static struct platform_driver latch_addr_flash_driver = {
+	.probe		= latch_addr_flash_probe,
+	.remove		= __devexit_p(latch_addr_flash_remove),
+	.driver		= {
+		.name	= DRIVER_NAME,
+	},
+};
+
+static int __init latch_addr_flash_init(void)
+{
+	return platform_driver_register(&latch_addr_flash_driver);
+}
+module_init(latch_addr_flash_init);
+
+static void __exit latch_addr_flash_exit(void)
+{
+	platform_driver_unregister(&latch_addr_flash_driver);
+}
+module_exit(latch_addr_flash_exit);
+
+MODULE_AUTHOR("David Griego <dgriego at mvista.com>");
+MODULE_DESCRIPTION("MTD map driver for flashes addressed physically with upper "
+		"address lines being set board specifically");
+MODULE_LICENSE("GPL v2");
diff --git a/include/linux/mtd/latch-addr-flash.h b/include/linux/mtd/latch-addr-flash.h
new file mode 100644
index 0000000..d35d070
--- /dev/null
+++ b/include/linux/mtd/latch-addr-flash.h
@@ -0,0 +1,29 @@
+/*
+ * Interface for NOR flash driver whose high address lines are latched
+ *
+ * Copyright (C) 2008 MontaVista Software, Inc. <source at mvista.com>
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+#ifndef __LATCH_ADDR_FLASH__
+#define __LATCH_ADDR_FLASH__
+
+struct map_info;
+struct mtd_partition;
+
+struct latch_addr_flash_data {
+	unsigned int		width;
+	unsigned int		size;
+
+	int			(*init)(void *data, int cs);
+	void			(*done)(void *data);
+	void			(*set_window)(unsigned long offset, void *data);
+	void			*data;
+
+	unsigned int		nr_parts;
+	struct mtd_partition	*parts;
+};
+
+#endif
-- 
1.5.6



From savinay.dharmappa at ti.com  Fri Nov 19 04:54:48 2010
From: savinay.dharmappa at ti.com (Savinay Dharmappa)
Date: Fri, 19 Nov 2010 15:24:48 +0530
Subject: [PATCH v3 2/2] davinci: Platform support for OMAP-L137/AM17x NOR
	flash driver
Message-ID: <1290160488-10344-1-git-send-email-savinay.dharmappa@ti.com>

From: Aleksey Makarov <amakarov at ru.mvista.com>

Adds platform support for OMAP-L137/AM17x NOR flash driver.

Also, configures chip select 3 to control NOR flash's upper
address lines.

Signed-off-by: Aleksey Makarov <amakarov at ru.mvista.com>
Signed-off-by: Sergei Shtylyov <sshtylyov at ru.mvista.com>
Signed-off-by: Savinay Dharmappa <savinay.dharmappa at ti.com>
---
Since v2:
a. Added signoff from Sergei Shtylyov.
b. Removed resource member from the da830_evm_nor structure
   and used a local member inside the da830_evm_nor_init()
   function.
c. Fixed few commenting/indenting issues. 

 arch/arm/mach-davinci/Kconfig           |    8 +
 arch/arm/mach-davinci/board-da830-evm.c |  218 +++++++++++++++++++++++++++++++
 2 files changed, 226 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index b77b860..89cc62e 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -142,6 +142,14 @@ config DA830_UI_NAND
 	help
 	  Say Y here to use the NAND flash. Do not forget to setup
 	  the switch correctly.
+
+config DA830_UI_NOR
+        bool "NOR flash"
+        help
+          Configure this option to specify the that AEMIF CE2/CE3 will be used to
+          communicate to the NOR flash. Do not forget to setup the switch SW1
+          on UI card correctly.
+
 endchoice
 
 config MACH_DAVINCI_DA850_EVM
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
index b52a3a1..c807c1b 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -20,6 +20,8 @@
 #include <linux/i2c/at24.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
+#include <linux/mtd/latch-addr-flash.h>
+#include <linux/clk.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -429,6 +431,220 @@ static inline void da830_evm_init_nand(int mux_mode)
 static inline void da830_evm_init_nand(int mux_mode) { }
 #endif
 
+#ifdef CONFIG_DA830_UI_NOR
+/*
+ * Number of lines going to the NOR flash that are latched using
+ * AEMIF address lines B_EMIF_BA0-B_EMIF_A12 on CS2.
+ */
+#define NOR_WINDOW_SIZE_LOG2     15
+#define NOR_WINDOW_SIZE         (1 << NOR_WINDOW_SIZE_LOG2)
+
+static struct {
+	struct clk *clk;
+	struct {
+		void __iomem *addr;
+	} latch, aemif;
+} da830_evm_nor;
+
+static struct davinci_aemif_timing da830_evm_norflash_timing = {
+	.wsetup		= 0,
+	.wstrobe	= 40,
+	.whold		= 0,
+	.rsetup		= 0,
+	.rstrobe	= 130,
+	.rhold		= 0,
+	.ta		= 20,
+};
+
+static void da830_evm_nor_set_window(unsigned long offset, void *data)
+{
+	/*
+	 * CS2 and CS3 address lines are used to address NOR flash. Address
+	 * line A0-A14 going to the NOR flash are connected to AEMIF address
+	 * lines B_EMIF_BA0-B_EMIF_A12 on CS2. Address lines A15-A23 of the
+	 * NOR flash are connected to AEMIF address lines B_EMIF_A0-B_EMIF_A6
+	 * on CS3. The offset argument received by this function is the offset
+	 * within NOR flash. Upper address is obtained  by shifting the offset
+	 * by the number of CS2 address lines used (13) and masking it with
+	 * complement of 3 (2 address lines used to address banks) and adding
+	 * the resultant offset value to CS3 base address. Writing to this
+	 * address will latch the upper address lines.
+	 */
+	writeb(0x0, da830_evm_nor.latch.addr +
+		(~3UL & (offset >> (NOR_WINDOW_SIZE_LOG2 - 2))));
+}
+
+static void da830_evm_nor_done(void *data)
+{
+	clk_disable(da830_evm_nor.clk);
+	clk_put(da830_evm_nor.clk);
+	iounmap(da830_evm_nor.latch.addr);
+	release_mem_region(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE);
+	iounmap(da830_evm_nor.aemif.addr);
+	release_mem_region(DA8XX_AEMIF_CTL_BASE, SZ_32K);
+}
+
+static int da830_evm_nor_init(void *data, int cs)
+{
+	struct resource *res = NULL;
+
+	/* Turn on AEMIF clocks */
+	da830_evm_nor.clk = clk_get(NULL, "aemif");
+	if (IS_ERR(da830_evm_nor.clk)) {
+		pr_err("%s: could not get AEMIF clock\n", __func__);
+		da830_evm_nor.clk = NULL;
+		return -ENODEV;
+	}
+	clk_enable(da830_evm_nor.clk);
+
+	res = request_mem_region(DA8XX_AEMIF_CTL_BASE, SZ_32K, "AEMIF control");
+	if (res == NULL) {
+		pr_err("%s: could not request AEMIF control region\n",
+			__func__);
+		goto err_clk;
+	}
+
+	da830_evm_nor.aemif.addr = ioremap_nocache(DA8XX_AEMIF_CTL_BASE,
+						   SZ_32K);
+	if (da830_evm_nor.aemif.addr == NULL) {
+		pr_err("%s: could not remap AEMIF control region\n", __func__);
+		goto err_aemif_region;
+	}
+
+	/* Setup AEMIF -- timings, etc. */
+
+	/* Set maximum wait cycles */
+	davinci_aemif_setup_timing(&da830_evm_norflash_timing,
+						da830_evm_nor.aemif.addr, cs);
+
+	davinci_aemif_setup_timing(&da830_evm_norflash_timing,
+					da830_evm_nor.aemif.addr, cs + 1);
+
+	/* Setup the window to access the latch */
+	res = request_mem_region(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE,
+				"DA830 UI NOR address latch");
+	if (res == NULL) {
+		pr_err("%s: could not request address latch region\n",
+			__func__);
+		goto err_aemif_ioremap;
+	}
+
+	da830_evm_nor.latch.addr =
+		ioremap_nocache(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE);
+	if (da830_evm_nor.latch.addr == NULL) {
+		pr_err("%s: could not remap address latch region\n", __func__);
+		goto err_latch_region;
+	}
+	return 0;
+
+err_latch_region:
+	release_mem_region(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE);
+
+err_aemif_ioremap:
+	iounmap(da830_evm_nor.aemif.addr);
+
+err_aemif_region:
+	release_mem_region(DA8XX_AEMIF_CTL_BASE, SZ_32K);
+
+err_clk:
+	clk_disable(da830_evm_nor.clk);
+	clk_put(da830_evm_nor.clk);
+
+	return -EBUSY;
+}
+
+static struct mtd_partition da830_evm_nor_partitions[] = {
+	/* bootloader (U-Boot, etc) in first 2 sectors */
+	[0] = {
+		.name           = "bootloader",
+		.offset		= 0,
+		.size           = SZ_128K,
+		.mask_flags     = MTD_WRITEABLE, /* force read-only */
+	},
+	/* bootloader parameters in the next 1 sector */
+	[1] = {
+		.name           = "params",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = SZ_64K,
+	},
+	/* kernel */
+	[2] = {
+		.name           = "kernel",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = SZ_2M,
+	},
+	/* file system */
+	[3] = {
+		.name           = "filesystem",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = MTDPART_SIZ_FULL,
+	}
+};
+
+static struct latch_addr_flash_data da830_evm_nor_pdata = {
+	.width          = 1,
+	.size           = SZ_4M,
+	.init           = da830_evm_nor_init,
+	.done           = da830_evm_nor_done,
+	.set_window     = da830_evm_nor_set_window,
+	.nr_parts       = ARRAY_SIZE(da830_evm_nor_partitions),
+	.parts          = da830_evm_nor_partitions,
+};
+
+static struct resource da830_evm_nor_resource[] = {
+	[0] = {
+		.start  = DA8XX_AEMIF_CS2_BASE,
+		.end    = DA8XX_AEMIF_CS2_BASE + NOR_WINDOW_SIZE - 1,
+		.flags  = IORESOURCE_MEM,
+	},
+	[1] = {
+		.start  = DA8XX_AEMIF_CS3_BASE,
+		.end    = DA8XX_AEMIF_CS3_BASE + PAGE_SIZE - 1,
+		.flags  = IORESOURCE_MEM,
+	},
+	[2] = {
+		.start  = DA8XX_AEMIF_CTL_BASE,
+		.end    = DA8XX_AEMIF_CTL_BASE + SZ_32K - 1,
+		.flags  = IORESOURCE_MEM,
+	}
+};
+
+static struct platform_device da830_evm_nor_device = {
+	.name           = "latch-addr-flash",
+	.id             = 0,
+	.dev            = {
+		.platform_data  = &da830_evm_nor_pdata,
+	},
+	.num_resources  = ARRAY_SIZE(da830_evm_nor_resource),
+	.resource       = da830_evm_nor_resource,
+};
+
+static inline void da830_evm_init_nor(int mux_mode)
+{
+	int ret;
+
+	if (HAS_MMC) {
+		pr_warning("WARNING: both MMC/SD and NOR are "
+			   "enabled, but they share AEMIF pins.\n"
+			   "\tDisable MMC/SD for NOR support.\n");
+		return;
+	}
+
+	ret = davinci_cfg_reg_list(da830_evm_emif25_pins);
+	if (ret)
+		pr_warning("da830_evm_init: EMIF 2.5 mux setup failed: %d\n",
+			  ret);
+
+	ret = platform_device_register(&da830_evm_nor_device);
+	if (ret)
+		pr_warning("da830_evm_init: NOR device not registered.\n");
+
+	gpio_direction_output(mux_mode, 1);
+}
+#else
+static inline void da830_evm_init_nor(int mux_mode) { }
+#endif  /* CONFIG_DA830_UI_NOR */
+
 #ifdef CONFIG_DA830_UI_LCD
 static inline void da830_evm_init_lcdc(int mux_mode)
 {
@@ -469,6 +685,8 @@ static int __init da830_evm_ui_expander_setup(struct i2c_client *client,
 
 	da830_evm_init_nand(gpio + 6);
 
+	da830_evm_init_nor(gpio + 6);
+
 	return 0;
 }
 
-- 
1.5.6



From notasas at gmail.com  Fri Nov 19 05:44:07 2010
From: notasas at gmail.com (Grazvydas Ignotas)
Date: Fri, 19 Nov 2010 12:44:07 +0200
Subject: [PATCH] omap: nand: remove hardware ECC as default
In-Reply-To: <20101118180137.GG9264@atomide.com>
References: <1290090130-20835-1-git-send-email-s-ghorai@ti.com>
	<20101118180137.GG9264@atomide.com>
Message-ID: <AANLkTik8rX+wYWQ8VmRGb6cxZrUHQmoPm5mGOvk=Z80j@mail.gmail.com>

On Thu, Nov 18, 2010 at 8:01 PM, Tony Lindgren <tony at atomide.com> wrote:
> * Sukumar Ghorai <s-ghorai at ti.com> [101118 06:12]:
>> CONFIG_MTD_NAND_OMAP_HWECC defined wronly in patch submitted during 2.6.36
>> that using the hardware ECC by default

wrongly

>>
>> Signed-off-by: Sukumar Ghorai <s-ghorai at ti.com>
>> ---
>> ?drivers/mtd/nand/omap2.c | ? ?1 -
>> ?1 files changed, 0 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
>> index cd41c58..15682ec 100644
>> --- a/drivers/mtd/nand/omap2.c
>> +++ b/drivers/mtd/nand/omap2.c
>> @@ -7,7 +7,6 @@
>> ? * it under the terms of the GNU General Public License version 2 as
>> ? * published by the Free Software Foundation.
>> ? */
>> -#define CONFIG_MTD_NAND_OMAP_HWECC
>>
>> ?#include <linux/platform_device.h>
>> ?#include <linux/dma-mapping.h>
>
> This looks like a fix for the -rc cycle. Can you please update
> the description a bit to specify which commit broke it and
> what the error is now?

Well it broke NAND for beagle and pandora at least, as those have been
using sw ecc, all IO simply results in ECC errors with that define.


From sshtylyov at mvista.com  Fri Nov 19 06:42:28 2010
From: sshtylyov at mvista.com (Sergei Shtylyov)
Date: Fri, 19 Nov 2010 14:42:28 +0300
Subject: [PATCH v3 2/2] davinci: Platform support for OMAP-L137/AM17x
	NOR flash driver
In-Reply-To: <1290160488-10344-1-git-send-email-savinay.dharmappa@ti.com>
References: <1290160488-10344-1-git-send-email-savinay.dharmappa@ti.com>
Message-ID: <4CE662A4.6060204@mvista.com>

Hello.

On 19-11-2010 12:54, Savinay Dharmappa wrote:

> From: Aleksey Makarov <amakarov at ru.mvista.com>

> Adds platform support for OMAP-L137/AM17x NOR flash driver.

> Also, configures chip select 3 to control NOR flash's upper
> address lines.

> Signed-off-by: Aleksey Makarov <amakarov at ru.mvista.com>
> Signed-off-by: Sergei Shtylyov <sshtylyov at ru.mvista.com>
> Signed-off-by: Savinay Dharmappa <savinay.dharmappa at ti.com>
[...]

> diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
> index b52a3a1..c807c1b 100644
> --- a/arch/arm/mach-davinci/board-da830-evm.c
> +++ b/arch/arm/mach-davinci/board-da830-evm.c
> @@ -20,6 +20,8 @@
>   #include<linux/i2c/at24.h>
>   #include<linux/mtd/mtd.h>
>   #include<linux/mtd/partitions.h>
> +#include<linux/mtd/latch-addr-flash.h>
> +#include<linux/clk.h>
>
>   #include<asm/mach-types.h>
>   #include<asm/mach/arch.h>
> @@ -429,6 +431,220 @@ static inline void da830_evm_init_nand(int mux_mode)
>   static inline void da830_evm_init_nand(int mux_mode) { }
>   #endif
>
> +#ifdef CONFIG_DA830_UI_NOR
> +/*
> + * Number of lines going to the NOR flash that are latched using
> + * AEMIF address lines B_EMIF_BA0-B_EMIF_A12 on CS2.

    You still left the words about latching the low address bytes...

> + */
> +#define NOR_WINDOW_SIZE_LOG2     15
> +#define NOR_WINDOW_SIZE         (1<<  NOR_WINDOW_SIZE_LOG2)
> +
> +static struct {
> +	struct clk *clk;
> +	struct {
> +		void __iomem *addr;
> +	} latch, aemif;

    Don't need a structure here anymore.

> +static void da830_evm_nor_set_window(unsigned long offset, void *data)
> +{
> +	/*
> +	 * CS2 and CS3 address lines are used to address NOR flash. Address
> +	 * line

    Only "lines".

> A0-A14 going to

    Rather "from"...

> the NOR flash are connected to AEMIF address
> +	 * lines B_EMIF_BA0-B_EMIF_A12 on CS2. Address lines A15-A23 of the
> +	 * NOR flash are connected to AEMIF address lines B_EMIF_A0-B_EMIF_A6
> +	 * on CS3.

    They are not connected but latched from B_EMIF_A0-B_EMIF_A6 on CS3.

> +	/* Setup AEMIF -- timings, etc. */
> +
> +	/* Set maximum wait cycles */
> +	davinci_aemif_setup_timing(&da830_evm_norflash_timing,
> +						da830_evm_nor.aemif.addr, cs);
> +
> +	davinci_aemif_setup_timing(&da830_evm_norflash_timing,
> +					da830_evm_nor.aemif.addr, cs + 1);
> +
> +	/* Setup the window to access the latch */
> +	res = request_mem_region(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE,
> +				"DA830 UI NOR address latch");
> +	if (res == NULL) {
> +		pr_err("%s: could not request address latch region\n",
> +			__func__);
> +		goto err_aemif_ioremap;
> +	}
> +
> +	da830_evm_nor.latch.addr =
> +		ioremap_nocache(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE);
> +	if (da830_evm_nor.latch.addr == NULL) {
> +		pr_err("%s: could not remap address latch region\n", __func__);
> +		goto err_latch_region;
> +	}
> +	return 0;
> +
> +err_latch_region:
> +	release_mem_region(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE);
> +
> +err_aemif_ioremap:
> +	iounmap(da830_evm_nor.aemif.addr);
> +
> +err_aemif_region:
> +	release_mem_region(DA8XX_AEMIF_CTL_BASE, SZ_32K);
> +
> +err_clk:
> +	clk_disable(da830_evm_nor.clk);
> +	clk_put(da830_evm_nor.clk);
> +
> +	return -EBUSY;

    You should return -ENOMEM for ioremap() failures...

WBR, Sergei



From dedekind1 at gmail.com  Fri Nov 19 08:20:23 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Fri, 19 Nov 2010 15:20:23 +0200
Subject: [patch] UBI: release locks in check_corruption()
In-Reply-To: <20101118035804.GM31724@bicker>
References: <20101118035804.GM31724@bicker>
Message-ID: <1290172823.4768.1.camel@localhost>

On Thu, 2010-11-18 at 06:58 +0300, Dan Carpenter wrote:
> Commit 45aafd32996e27 "UBI: tighten the corrupted PEB criteria"
> introduced some return paths that didn't release the ubi->buf_mutex;
> 
> Signed-off-by: Dan Carpenter <error27 at gmail.com>
> 
> diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c

Thank you, pushed to ubi-2.6.git tree.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Fri Nov 19 08:21:08 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Fri, 19 Nov 2010 15:21:08 +0200
Subject: [PATCH 37/44] fs/ubifs: Remove unnecessary semicolons
In-Reply-To: <902d76520da2f65e5dc44339dccb07159947f23d.1289789605.git.joe@perches.com>
References: <cover.1289789604.git.joe@perches.com>
	<902d76520da2f65e5dc44339dccb07159947f23d.1289789605.git.joe@perches.com>
Message-ID: <1290172868.4768.2.camel@localhost>

On Sun, 2010-11-14 at 19:04 -0800, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe at perches.com>
> ---
>  fs/ubifs/scan.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Thanks, I'll pick this up.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From s-ghorai at ti.com  Fri Nov 19 09:45:26 2010
From: s-ghorai at ti.com (Sukumar Ghorai)
Date: Fri, 19 Nov 2010 20:15:26 +0530
Subject: [PATCH V2] omap: nand: remove hardware ECC as default
Message-ID: <1290177926-3526-1-git-send-email-s-ghorai@ti.com>

CONFIG_MTD_NAND_OMAP_HWECC defined wrongly in patch submitted for 2.6.36.
This flag enables hw ecc by default. Boards like beagle and pandora uses
sw ecc for write (e.g. binary flushed from u-boot) and read from kernel.
https://patchwork.kernel.org/patch/111036/

Signed-off-by: Sukumar Ghorai <s-ghorai at ti.com>
---
 drivers/mtd/nand/omap2.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index cd41c58..15682ec 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -7,7 +7,6 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#define CONFIG_MTD_NAND_OMAP_HWECC
 
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
-- 
1.7.0.4



From linus.walleij at stericsson.com  Fri Nov 19 16:11:42 2010
From: linus.walleij at stericsson.com (Linus Walleij)
Date: Fri, 19 Nov 2010 22:11:42 +0100
Subject: [PATCH 1/4] mtd: FSMC NAND remove PARTITION macro and fix compile
	noise
Message-ID: <1290201102-15227-1-git-send-email-linus.walleij@stericsson.com>

This removes the PARTITION macro that David didn't like and also
removes a local variable that was dangling unused in some #ifdefs
by being a bit more clever.

Signed-off-by: Linus Walleij <linus.walleij at stericsson.com>
---
 drivers/mtd/nand/fsmc_nand.c |   66 ++++++++++++++++++++++++++++++-----------
 1 files changed, 48 insertions(+), 18 deletions(-)

diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index 02edfba..5af4b3c 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -119,21 +119,36 @@ static struct fsmc_eccplace fsmc_ecc4_sp_place = {
 	}
 };
 
-/*
- * Default partition tables to be used if the partition information not
- * provided through platform data
- */
-#define PARTITION(n, off, sz)	{.name = n, .offset = off, .size = sz}
 
+#ifdef CONFIG_MTD_PARTITIONS
 /*
+ * Default partition tables to be used if the partition information not
+ * provided through platform data.
+ *
  * Default partition layout for small page(= 512 bytes) devices
  * Size for "Root file system" is updated in driver based on actual device size
  */
 static struct mtd_partition partition_info_16KB_blk[] = {
-	PARTITION("X-loader", 0, 4 * 0x4000),
-	PARTITION("U-Boot", 0x10000, 20 * 0x4000),
-	PARTITION("Kernel", 0x60000, 256 * 0x4000),
-	PARTITION("Root File System", 0x460000, 0),
+	{
+		.name = "X-loader",
+		.offset = 0,
+		.size = 4*0x4000,
+	},
+	{
+		.name = "U-Boot",
+		.offset = 0x10000,
+		.size = 20*0x4000,
+	},
+	{
+		.name = "Kernel",
+		.offset = 0x60000,
+		.size = 256*0x4000,
+	},
+	{
+		.name = "Root File System",
+		.offset = 0x460000,
+		.size = 0,
+	},
 };
 
 /*
@@ -141,15 +156,32 @@ static struct mtd_partition partition_info_16KB_blk[] = {
  * Size for "Root file system" is updated in driver based on actual device size
  */
 static struct mtd_partition partition_info_128KB_blk[] = {
-	PARTITION("X-loader", 0, 4 * 0x20000),
-	PARTITION("U-Boot", 0x80000, 12 * 0x20000),
-	PARTITION("Kernel", 0x200000, 48 * 0x20000),
-	PARTITION("Root File System", 0x800000, 0),
+	{
+		.name = "X-loader",
+		.offset = 0,
+		.size = 4*0x20000,
+	},
+	{
+		.name = "U-Boot",
+		.offset = 0x80000,
+		.size = 12*0x20000,
+	},
+	{
+		.name = "Kernel",
+		.offset = 0x200000,
+		.size = 48*0x20000,
+	},
+	{
+		.name = "Root File System",
+		.offset = 0x800000,
+		.size = 0,
+	},
 };
 
 #ifdef CONFIG_MTD_CMDLINE_PARTS
 const char *part_probes[] = { "cmdlinepart", NULL };
 #endif
+#endif
 
 /**
  * struct fsmc_nand_data - atructure for FSMC NAND device state
@@ -508,7 +540,7 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
 	struct nand_chip *nand;
 	struct fsmc_regs *regs;
 	struct resource *res;
-	int nr_parts, ret = 0;
+	int ret = 0;
 
 	if (!pdata) {
 		dev_err(&pdev->dev, "platform data is NULL\n");
@@ -676,11 +708,9 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
 	 * Check if partition info passed via command line
 	 */
 	host->mtd.name = "nand";
-	nr_parts = parse_mtd_partitions(&host->mtd, part_probes,
+	host->nr_partitions = parse_mtd_partitions(&host->mtd, part_probes,
 			&host->partitions, 0);
-	if (nr_parts > 0) {
-		host->nr_partitions = nr_parts;
-	} else {
+	if (host->nr_partitions <= 0) {
 #endif
 		/*
 		 * Check if partition info passed via command line
-- 
1.7.3.2



From linus.walleij at stericsson.com  Fri Nov 19 16:12:01 2010
From: linus.walleij at stericsson.com (Linus Walleij)
Date: Fri, 19 Nov 2010 22:12:01 +0100
Subject: [PATCH 2/4] mtd: FSMC NAND replace all use of uintNN_t with uN
Message-ID: <1290201121-15263-1-git-send-email-linus.walleij@stericsson.com>

The short kernel versions of the basic types makes the world more
readable.

Signed-off-by: Linus Walleij <linus.walleij at stericsson.com>
---
 drivers/mtd/nand/fsmc_nand.c |   84 +++++++++++++++++++++---------------------
 include/linux/mtd/fsmc.h     |   50 ++++++++++++------------
 2 files changed, 67 insertions(+), 67 deletions(-)

diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index 5af4b3c..7405bf5 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -220,7 +220,7 @@ struct fsmc_nand_data {
 	void __iomem		*addr_va;
 	void __iomem		*regs_va;
 
-	void			(*select_chip)(uint32_t bank, uint32_t busw);
+	void			(*select_chip)(u32 bank, u32 busw);
 };
 
 /* Assert CS signal based on chipnr */
@@ -294,10 +294,10 @@ static void fsmc_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
  * This routine initializes timing parameters related to NAND memory access in
  * FSMC registers
  */
-static void __init fsmc_nand_setup(struct fsmc_regs *regs, uint32_t bank,
-				   uint32_t busw)
+static void __init fsmc_nand_setup(struct fsmc_regs *regs, u32 bank,
+				   u32 busw)
 {
-	uint32_t value = FSMC_DEVTYPE_NAND | FSMC_ENABLE | FSMC_WAITON;
+	u32 value = FSMC_DEVTYPE_NAND | FSMC_ENABLE | FSMC_WAITON;
 
 	if (busw)
 		writel(value | FSMC_DEVWID_16, &regs->bank_regs[bank].pc);
@@ -320,7 +320,7 @@ static void fsmc_enable_hwecc(struct mtd_info *mtd, int mode)
 	struct fsmc_nand_data *host = container_of(mtd,
 					struct fsmc_nand_data, mtd);
 	struct fsmc_regs *regs = host->regs_va;
-	uint32_t bank = host->bank;
+	u32 bank = host->bank;
 
 	writel(readl(&regs->bank_regs[bank].pc) & ~FSMC_ECCPLEN_256,
 		       &regs->bank_regs[bank].pc);
@@ -335,14 +335,14 @@ static void fsmc_enable_hwecc(struct mtd_info *mtd, int mode)
  * FSMC. ECC is 13 bytes for 512 bytes of data (supports error correction upto
  * max of 8-bits)
  */
-static int fsmc_read_hwecc_ecc4(struct mtd_info *mtd, const uint8_t *data,
-				uint8_t *ecc)
+static int fsmc_read_hwecc_ecc4(struct mtd_info *mtd, const u8 *data,
+				u8 *ecc)
 {
 	struct fsmc_nand_data *host = container_of(mtd,
 					struct fsmc_nand_data, mtd);
 	struct fsmc_regs *regs = host->regs_va;
-	uint32_t bank = host->bank;
-	uint32_t ecc_tmp;
+	u32 bank = host->bank;
+	u32 ecc_tmp;
 	unsigned long deadline = jiffies + FSMC_BUSY_WAIT_TIMEOUT;
 
 	do {
@@ -353,25 +353,25 @@ static int fsmc_read_hwecc_ecc4(struct mtd_info *mtd, const uint8_t *data,
 	} while (!time_after_eq(jiffies, deadline));
 
 	ecc_tmp = readl(&regs->bank_regs[bank].ecc1);
-	ecc[0] = (uint8_t) (ecc_tmp >> 0);
-	ecc[1] = (uint8_t) (ecc_tmp >> 8);
-	ecc[2] = (uint8_t) (ecc_tmp >> 16);
-	ecc[3] = (uint8_t) (ecc_tmp >> 24);
+	ecc[0] = (u8) (ecc_tmp >> 0);
+	ecc[1] = (u8) (ecc_tmp >> 8);
+	ecc[2] = (u8) (ecc_tmp >> 16);
+	ecc[3] = (u8) (ecc_tmp >> 24);
 
 	ecc_tmp = readl(&regs->bank_regs[bank].ecc2);
-	ecc[4] = (uint8_t) (ecc_tmp >> 0);
-	ecc[5] = (uint8_t) (ecc_tmp >> 8);
-	ecc[6] = (uint8_t) (ecc_tmp >> 16);
-	ecc[7] = (uint8_t) (ecc_tmp >> 24);
+	ecc[4] = (u8) (ecc_tmp >> 0);
+	ecc[5] = (u8) (ecc_tmp >> 8);
+	ecc[6] = (u8) (ecc_tmp >> 16);
+	ecc[7] = (u8) (ecc_tmp >> 24);
 
 	ecc_tmp = readl(&regs->bank_regs[bank].ecc3);
-	ecc[8] = (uint8_t) (ecc_tmp >> 0);
-	ecc[9] = (uint8_t) (ecc_tmp >> 8);
-	ecc[10] = (uint8_t) (ecc_tmp >> 16);
-	ecc[11] = (uint8_t) (ecc_tmp >> 24);
+	ecc[8] = (u8) (ecc_tmp >> 0);
+	ecc[9] = (u8) (ecc_tmp >> 8);
+	ecc[10] = (u8) (ecc_tmp >> 16);
+	ecc[11] = (u8) (ecc_tmp >> 24);
 
 	ecc_tmp = readl(&regs->bank_regs[bank].sts);
-	ecc[12] = (uint8_t) (ecc_tmp >> 16);
+	ecc[12] = (u8) (ecc_tmp >> 16);
 
 	return 0;
 }
@@ -381,19 +381,19 @@ static int fsmc_read_hwecc_ecc4(struct mtd_info *mtd, const uint8_t *data,
  * FSMC. ECC is 3 bytes for 512 bytes of data (supports error correction upto
  * max of 1-bit)
  */
-static int fsmc_read_hwecc_ecc1(struct mtd_info *mtd, const uint8_t *data,
-				uint8_t *ecc)
+static int fsmc_read_hwecc_ecc1(struct mtd_info *mtd, const u8 *data,
+				u8 *ecc)
 {
 	struct fsmc_nand_data *host = container_of(mtd,
 					struct fsmc_nand_data, mtd);
 	struct fsmc_regs *regs = host->regs_va;
-	uint32_t bank = host->bank;
-	uint32_t ecc_tmp;
+	u32 bank = host->bank;
+	u32 ecc_tmp;
 
 	ecc_tmp = readl(&regs->bank_regs[bank].ecc1);
-	ecc[0] = (uint8_t) (ecc_tmp >> 0);
-	ecc[1] = (uint8_t) (ecc_tmp >> 8);
-	ecc[2] = (uint8_t) (ecc_tmp >> 16);
+	ecc[0] = (u8) (ecc_tmp >> 0);
+	ecc[1] = (u8) (ecc_tmp >> 8);
+	ecc[2] = (u8) (ecc_tmp >> 16);
 
 	return 0;
 }
@@ -412,7 +412,7 @@ static int fsmc_read_hwecc_ecc1(struct mtd_info *mtd, const uint8_t *data,
  * max of 8 bits)
  */
 static int fsmc_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip,
-				 uint8_t *buf, int page)
+				 u8 *buf, int page)
 {
 	struct fsmc_nand_data *host = container_of(mtd,
 					struct fsmc_nand_data, mtd);
@@ -420,17 +420,17 @@ static int fsmc_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip,
 	int i, j, s, stat, eccsize = chip->ecc.size;
 	int eccbytes = chip->ecc.bytes;
 	int eccsteps = chip->ecc.steps;
-	uint8_t *p = buf;
-	uint8_t *ecc_calc = chip->buffers->ecccalc;
-	uint8_t *ecc_code = chip->buffers->ecccode;
+	u8 *p = buf;
+	u8 *ecc_calc = chip->buffers->ecccalc;
+	u8 *ecc_code = chip->buffers->ecccode;
 	int off, len, group = 0;
 	/*
-	 * ecc_oob is intentionally taken as uint16_t. In 16bit devices, we
+	 * ecc_oob is intentionally taken as u16. In 16bit devices, we
 	 * end up reading 14 bytes (7 words) from oob. The local array is
 	 * to maintain word alignment
 	 */
-	uint16_t ecc_oob[7];
-	uint8_t *oob = (uint8_t *)&ecc_oob[0];
+	u16 ecc_oob[7];
+	u8 *oob = (u8 *)&ecc_oob[0];
 
 	for (i = 0, s = 0; s < eccsteps; s++, i += eccbytes, p += eccsize) {
 
@@ -477,16 +477,16 @@ static int fsmc_read_page_hwecc(struct mtd_info *mtd, struct nand_chip *chip,
  * calc_ecc is a 104 bit information containing maximum of 8 error
  * offset informations of 13 bits each in 512 bytes of read data.
  */
-static int fsmc_correct_data(struct mtd_info *mtd, uint8_t *dat,
-			     uint8_t *read_ecc, uint8_t *calc_ecc)
+static int fsmc_correct_data(struct mtd_info *mtd, u8 *dat,
+			     u8 *read_ecc, u8 *calc_ecc)
 {
 	struct fsmc_nand_data *host = container_of(mtd,
 					struct fsmc_nand_data, mtd);
 	struct fsmc_regs *regs = host->regs_va;
 	unsigned int bank = host->bank;
-	uint16_t err_idx[8];
-	uint64_t ecc_data[2];
-	uint32_t num_err, i;
+	u16 err_idx[8];
+	u64 ecc_data[2];
+	u32 num_err, i;
 
 	/* The calculated ecc is actually the correction index in data */
 	memcpy(ecc_data, calc_ecc, 13);
@@ -497,7 +497,7 @@ static int fsmc_correct_data(struct mtd_info *mtd, uint8_t *dat,
 	 *
 	 * calc_ecc is a 104 bit information containing maximum of 8 error
 	 * offset informations of 13 bits each. calc_ecc is copied into a
-	 * uint64_t array and error offset indexes are populated in err_idx
+	 * u64 array and error offset indexes are populated in err_idx
 	 * array
 	 */
 	for (i = 0; i < 8; i++) {
diff --git a/include/linux/mtd/fsmc.h b/include/linux/mtd/fsmc.h
index 5d25567..ed14564 100644
--- a/include/linux/mtd/fsmc.h
+++ b/include/linux/mtd/fsmc.h
@@ -45,8 +45,8 @@
 #define FSMC_FLASH_WIDTH16	2
 
 struct fsmc_nor_bank_regs {
-	uint32_t ctrl;
-	uint32_t ctrl_tim;
+	u32 ctrl;
+	u32 ctrl_tim;
 };
 
 /* ctrl register definitions */
@@ -63,31 +63,31 @@ struct fsmc_nor_bank_regs {
 /* ctrl_tim register definitions */
 
 struct fsms_nand_bank_regs {
-	uint32_t pc;
-	uint32_t sts;
-	uint32_t comm;
-	uint32_t attrib;
-	uint32_t ioata;
-	uint32_t ecc1;
-	uint32_t ecc2;
-	uint32_t ecc3;
+	u32 pc;
+	u32 sts;
+	u32 comm;
+	u32 attrib;
+	u32 ioata;
+	u32 ecc1;
+	u32 ecc2;
+	u32 ecc3;
 };
 
 #define FSMC_NOR_REG_SIZE	0x40
 
 struct fsmc_regs {
 	struct fsmc_nor_bank_regs nor_bank_regs[FSMC_MAX_NOR_BANKS];
-	uint8_t reserved_1[0x40 - 0x20];
+	u8 reserved_1[0x40 - 0x20];
 	struct fsms_nand_bank_regs bank_regs[FSMC_MAX_NAND_BANKS];
-	uint8_t reserved_2[0xfe0 - 0xc0];
-	uint32_t peripid0;			/* 0xfe0 */
-	uint32_t peripid1;			/* 0xfe4 */
-	uint32_t peripid2;			/* 0xfe8 */
-	uint32_t peripid3;			/* 0xfec */
-	uint32_t pcellid0;			/* 0xff0 */
-	uint32_t pcellid1;			/* 0xff4 */
-	uint32_t pcellid2;			/* 0xff8 */
-	uint32_t pcellid3;			/* 0xffc */
+	u8 reserved_2[0xfe0 - 0xc0];
+	u32 peripid0;			/* 0xfe0 */
+	u32 peripid1;			/* 0xfe4 */
+	u32 peripid2;			/* 0xfe8 */
+	u32 peripid3;			/* 0xfec */
+	u32 pcellid0;			/* 0xff0 */
+	u32 pcellid1;			/* 0xff4 */
+	u32 pcellid2;			/* 0xff8 */
+	u32 pcellid3;			/* 0xffc */
 };
 
 #define FSMC_BUSY_WAIT_TIMEOUT	(1 * HZ)
@@ -127,7 +127,7 @@ struct fsmc_regs {
 #define FSMC_VER7		7
 #define FSMC_VER8		8
 
-static inline uint32_t get_fsmc_version(struct fsmc_regs *regs)
+static inline u32 get_fsmc_version(struct fsmc_regs *regs)
 {
 	return (readl(&regs->peripid2) >> FSMC_REVISION_SHFT) &
 				FSMC_REVISION_MSK;
@@ -143,8 +143,8 @@ static inline uint32_t get_fsmc_version(struct fsmc_regs *regs)
 #define MAX_ECCPLACE_ENTRIES	32
 
 struct fsmc_nand_eccplace {
-	uint8_t offset;
-	uint8_t length;
+	u8 offset;
+	u8 length;
 };
 
 struct fsmc_eccplace {
@@ -169,11 +169,11 @@ struct fsmc_nand_platform_data {
 	unsigned int		options;
 	unsigned int		width;
 	unsigned int		bank;
-	void			(*select_bank)(uint32_t bank, uint32_t busw);
+	void			(*select_bank)(u32 bank, u32 busw);
 };
 
 extern int __init fsmc_nor_init(struct platform_device *pdev,
-		unsigned long base, uint32_t bank, uint32_t width);
+		unsigned long base, u32 bank, u32 width);
 extern void __init fsmc_init_board_info(struct platform_device *pdev,
 		struct mtd_partition *partitions, unsigned int nr_partitions,
 		unsigned int width);
-- 
1.7.3.2



From linus.walleij at stericsson.com  Fri Nov 19 16:12:11 2010
From: linus.walleij at stericsson.com (Linus Walleij)
Date: Fri, 19 Nov 2010 22:12:11 +0100
Subject: [PATCH 3/4] mtd: FSMC NAND use the PrimeCell identifier macros
Message-ID: <1290201131-15297-1-git-send-email-linus.walleij@stericsson.com>

The FSMC actually has a standard ARM PrimeCell ID register, and
the "revision" part of that register contains the thing that
the code is looking at. Reuse the infrastructure from the AMBA
bus abstraction and rid local defines.

Signed-off-by: Linus Walleij <linus.walleij at stericsson.com>
---
 drivers/mtd/nand/fsmc_nand.c |   23 ++++++++++++++++++++---
 include/linux/mtd/fsmc.h     |   19 -------------------
 2 files changed, 20 insertions(+), 22 deletions(-)

diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index 7405bf5..204e156 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -31,6 +31,7 @@
 #include <linux/io.h>
 #include <linux/slab.h>
 #include <linux/mtd/fsmc.h>
+#include <linux/amba/bus.h>
 #include <mtd/mtd-abi.h>
 
 static struct nand_ecclayout fsmc_ecc1_layout = {
@@ -184,8 +185,9 @@ const char *part_probes[] = { "cmdlinepart", NULL };
 #endif
 
 /**
- * struct fsmc_nand_data - atructure for FSMC NAND device state
+ * struct fsmc_nand_data - structure for FSMC NAND device state
  *
+ * @pid:		Part ID on the AMBA PrimeCell format
  * @mtd:		MTD info for a NAND flash.
  * @nand:		Chip related info for a NAND flash.
  * @partitions:		Partition info for a NAND Flash.
@@ -201,6 +203,7 @@ const char *part_probes[] = { "cmdlinepart", NULL };
  * @regs_va:		FSMC regs base address.
  */
 struct fsmc_nand_data {
+	u32			pid;
 	struct mtd_info		mtd;
 	struct nand_chip	nand;
 	struct mtd_partition	*partitions;
@@ -541,6 +544,8 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
 	struct fsmc_regs *regs;
 	struct resource *res;
 	int ret = 0;
+	u32 pid;
+	int i;
 
 	if (!pdata) {
 		dev_err(&pdev->dev, "platform data is NULL\n");
@@ -630,6 +635,18 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_probe1;
 
+	/*
+	 * This device ID is actually a common AMBA ID as used on the
+	 * AMBA PrimeCell bus. However it is not a PrimeCell.
+	 */
+	for (pid = 0, i = 0; i < 4; i++)
+		pid |= (readl(host->regs_va + resource_size(res) - 0x20 + 4 * i) & 255) << (i * 8);
+	host->pid = pid;
+	dev_info(&pdev->dev, "FSMC device partno %03x, manufacturer %02x, "
+		 "revision %02x, config %02x\n",
+		 AMBA_PART_BITS(pid), AMBA_MANF_BITS(pid),
+		 AMBA_REV_BITS(pid), AMBA_CONFIG_BITS(pid));
+
 	host->bank = pdata->bank;
 	host->select_chip = pdata->select_bank;
 	regs = host->regs_va;
@@ -657,7 +674,7 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
 
 	fsmc_nand_setup(regs, host->bank, nand->options & NAND_BUSWIDTH_16);
 
-	if (get_fsmc_version(host->regs_va) == FSMC_VER8) {
+	if (AMBA_REV_BITS(host->pid) >= 8) {
 		nand->ecc.read_page = fsmc_read_page_hwecc;
 		nand->ecc.calculate = fsmc_read_hwecc_ecc4;
 		nand->ecc.correct = fsmc_correct_data;
@@ -677,7 +694,7 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
 		goto err_probe;
 	}
 
-	if (get_fsmc_version(host->regs_va) == FSMC_VER8) {
+	if (AMBA_REV_BITS(host->pid) >= 8) {
 		if (host->mtd.writesize == 512) {
 			nand->ecc.layout = &fsmc_ecc4_sp_layout;
 			host->ecc_place = &fsmc_ecc4_sp_place;
diff --git a/include/linux/mtd/fsmc.h b/include/linux/mtd/fsmc.h
index ed14564..91f5e6f 100644
--- a/include/linux/mtd/fsmc.h
+++ b/include/linux/mtd/fsmc.h
@@ -114,25 +114,6 @@ struct fsmc_regs {
 #define FSMC_THOLD_4		(4 << 16)
 #define FSMC_THIZ_1		(1 << 24)
 
-/* peripid2 register definitions */
-#define FSMC_REVISION_MSK	(0xf)
-#define FSMC_REVISION_SHFT	(0x4)
-
-#define FSMC_VER1		1
-#define FSMC_VER2		2
-#define FSMC_VER3		3
-#define FSMC_VER4		4
-#define FSMC_VER5		5
-#define FSMC_VER6		6
-#define FSMC_VER7		7
-#define FSMC_VER8		8
-
-static inline u32 get_fsmc_version(struct fsmc_regs *regs)
-{
-	return (readl(&regs->peripid2) >> FSMC_REVISION_SHFT) &
-				FSMC_REVISION_MSK;
-}
-
 /*
  * There are 13 bytes of ecc for every 512 byte block in FSMC version 8
  * and it has to be read consecutively and immediately after the 512
-- 
1.7.3.2



From linus.walleij at stericsson.com  Fri Nov 19 16:12:23 2010
From: linus.walleij at stericsson.com (Linus Walleij)
Date: Fri, 19 Nov 2010 22:12:23 +0100
Subject: [PATCH 4/4] mtd: FSMC NAND fix obvious speling errors
Message-ID: <1290201143-15332-1-git-send-email-linus.walleij@stericsson.com>

Fix spelling in the interface file.

Signed-off-by: Linus Walleij <linus.walleij at stericsson.com>
---
 include/linux/mtd/fsmc.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/mtd/fsmc.h b/include/linux/mtd/fsmc.h
index 91f5e6f..4dd8114 100644
--- a/include/linux/mtd/fsmc.h
+++ b/include/linux/mtd/fsmc.h
@@ -27,7 +27,7 @@
 
 /*
  * The placement of the Command Latch Enable (CLE) and
- * Address Latch Enable (ALE) is twised around in the
+ * Address Latch Enable (ALE) is twisted around in the
  * SPEAR310 implementation.
  */
 #if defined(CONFIG_MACH_SPEAR310)
@@ -62,7 +62,7 @@ struct fsmc_nor_bank_regs {
 
 /* ctrl_tim register definitions */
 
-struct fsms_nand_bank_regs {
+struct fsmc_nand_bank_regs {
 	u32 pc;
 	u32 sts;
 	u32 comm;
@@ -78,7 +78,7 @@ struct fsms_nand_bank_regs {
 struct fsmc_regs {
 	struct fsmc_nor_bank_regs nor_bank_regs[FSMC_MAX_NOR_BANKS];
 	u8 reserved_1[0x40 - 0x20];
-	struct fsms_nand_bank_regs bank_regs[FSMC_MAX_NAND_BANKS];
+	struct fsmc_nand_bank_regs bank_regs[FSMC_MAX_NAND_BANKS];
 	u8 reserved_2[0xfe0 - 0xc0];
 	u32 peripid0;			/* 0xfe0 */
 	u32 peripid1;			/* 0xfe4 */
-- 
1.7.3.2



From halloween-l-request at wildrice.com  Fri Nov 19 21:15:58 2010
From: halloween-l-request at wildrice.com (halloween-l-request at wildrice.com)
Date: Fri, 19 Nov 2010 20:15:58 -0600
Subject: dlist_confirm linux-mtd@lists.infradead.org 32533
Message-ID: <1290219358_4487@smail.wildrice.com>

To activate your list membership, reply with 
just the following line:
	activate linux-mtd at lists.infradead.org 32533
or simply preserve the subject above

+----------------------------------------------------------------------------------
| Control your membership by using these special email addresses:
|    halloween-l at wildrice.com              Send a post to the list.
|    halloween-l-join at wildrice.com         Join the list.
|    halloween-l-digest at wildrice.com       Join the list in digest mode.
|    halloween-l-leave at wildrice.com        Leave the list.


From viriketo at gmail.com  Sat Nov 20 12:58:58 2010
From: viriketo at gmail.com (=?iso-8859-1?Q?Llu=EDs?= Batlle i Rossell)
Date: Sat, 20 Nov 2010 18:58:58 +0100
Subject: block2mtd and ubi
Message-ID: <20101120175856.GD9645@vicerveza.homeunix.net>

Hello,

I'm trying to use the qemu mipsel malta board to boot an ubifs image, prepared
with 'ubinize', and using block2mtd on /dev/hda, where qemu receives the image
through -hda ubifs.img.

The problem I have summarizes in this UBI complain while booting:
block2mtd: mtd0: [/dev/hda] erase_size = 512KiB [524288]
UBI: attaching mtd0 to ubi0
UBI: physical eraseblock size:   524288 bytes (512 KiB)
UBI: logical eraseblock size:    524160 bytes
UBI: smallest flash I/O unit:    1
UBI: VID header offset:          64 (aligned 64)
UBI: data offset:                128
UBI warning: check_what_we_have: 1008 PEBs are corrupted
corrupted PEBs are: 0 1 2 3 4 5 6 7 .....
UBI error: check_what_we_have: too many corrupted PEBs, refusing this device
UBI error: ubi_init: cannot attach mtd0

The ubifs.img file I create first with ubinize, and then I append zeros until it
has the size of 512MiB.
The ubi volume is set to be dynamic and of 256MiB in size (so there should be
plenty of space in the block2mtd mtd0 device)

The kernel commandline I use is
root=ubi0:rootfs rootfstype=ubifs block2mtd.block2mtd=/dev/hda,524288 ubi.mtd=0

I don't know what I am doing bad. Other examples I see on the net seem to do as
I do, and everything works. Not in my case.

Can somebody explain me what I am missing on block2mtd and ubi?

Thank you,
Llu?s.


From viriketo at gmail.com  Sat Nov 20 19:01:47 2010
From: viriketo at gmail.com (=?iso-8859-1?Q?Llu=EDs?= Batlle i Rossell)
Date: Sun, 21 Nov 2010 01:01:47 +0100
Subject: block2mtd and ubi
In-Reply-To: <20101120175856.GD9645@vicerveza.homeunix.net>
References: <20101120175856.GD9645@vicerveza.homeunix.net>
Message-ID: <20101121000145.GF9645@vicerveza.homeunix.net>

On Sat, Nov 20, 2010 at 06:58:56PM +0100, Llu?s Batlle i Rossell wrote:
> Hello,
> 
> I'm trying to use the qemu mipsel malta board to boot an ubifs image, prepared
> with 'ubinize', and using block2mtd on /dev/hda, where qemu receives the image
> through -hda ubifs.img.
> 
> The problem I have summarizes in this UBI complain while booting:
> block2mtd: mtd0: [/dev/hda] erase_size = 512KiB [524288]
> UBI: attaching mtd0 to ubi0
> UBI: physical eraseblock size:   524288 bytes (512 KiB)
> UBI: logical eraseblock size:    524160 bytes
> UBI: smallest flash I/O unit:    1
> UBI: VID header offset:          64 (aligned 64)
> UBI: data offset:                128
> UBI warning: check_what_we_have: 1008 PEBs are corrupted
> corrupted PEBs are: 0 1 2 3 4 5 6 7 .....
> UBI error: check_what_we_have: too many corrupted PEBs, refusing this device
> UBI error: ubi_init: cannot attach mtd0
Solved!

The first PEBs were corrupt because I was using 'dd' wrong. Nevertheless,
filling the rest of image with zeros gave corrupt PEBs on the rest. joer on #mtd
(oftc irc) helped me suggesting maybe 0xff would work. And appending 0xff
instead of 0x00 worked great.

It's a pity that the same 'ubinize' cannot do that job automatically, and give
an image filling all the memory blocks. That would easy down a lot the job for
block2mtd.

Regards,
Llu?s.


From andreacunha at lognet.com.br  Sun Nov 21 10:21:59 2010
From: andreacunha at lognet.com.br (GoogleUK Giveaway Team)
Date: Sun, 21 Nov 2010 13:21:59 -0200
Subject: Your email just W o n =?iso-8859-1?b?ow==?= 850,000 UK Pounds in
	our on-going Google 11th Anniversary Promo!
Message-ID: <20101121132159.rde9rrqp4wok8okw@www.radionet.psi.br>


YOUR DETAILS:
L u c k y # : 12-12-23-35-40-41(12)
T i c k e t # : 00869575733664
C G P N : 7-22-71-00-66-12

FOR MORE DETAILS CONTACT CLAIM/PROCESSING OFFICER:
==========================================================
MR.GRAHAMS BENFIELD,
Emails : grahamsben13 at gmail.com
==========================================================
Congrat!!
(c)2010 Google Online Coordinator/Announcer.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




From manningc2 at actrix.gen.nz  Sun Nov 21 15:19:16 2010
From: manningc2 at actrix.gen.nz (Charles Manning)
Date: Mon, 22 Nov 2010 09:19:16 +1300
Subject: Are there UBI layout changes between 2.6.35 and 2.6.36?
In-Reply-To: <70E876B0EA86DD4BAF101844BC814DFE093EF69021@Cloud.RL.local>
References: <70E876B0EA86DD4BAF101844BC814DFE093EF69021@Cloud.RL.local>
Message-ID: <201011220919.17031.manningc2@actrix.gen.nz>

On Thursday 18 November 2010 22:41:55 Jon Povey wrote:
> linux-mtd-bounces at lists.infradead.org wrote:
> > Folk
> >
> > I have been helping some people get an omap3 overo-based system going.
> > Everything is working fine using 2.6.35 and software ECC, but
> > when I changed
> > I change to 2.6.36 and hwecc things stop working. I get the following
> > problem, and obviously no boot :-(.
> >
> > UBI: attaching mtd7 to ubi0
> > UBI: physical eraseblock size:   131072 bytes (128 KiB)
> > UBI: logical eraseblock size:    129024 bytes
> > UBI: smallest flash I/O unit:    2048
> > UBI: sub-page size:              512
> > UBI: VID header offset:          512 (aligned 512)
> > UBI: data offset:                2048
> > UBI: corrupted PEBs will be formatted
> > UBI: max. sequence number:       0
> > UBI error: vtbl_check: bad CRC at record 0: 0xc4ef3d92, not 0x639e7026
> > UBI error: vtbl_check: bad CRC at record 0: 0xc4ef3d92, not 0x639e7026
> > UBI error: process_lvol: both volume tables are corrupted
> > UBI error: ubi_attach_mtd_dev: failed to attach by scanning, error -22
> > UBI error: ubi_init: cannot attach mtd7
>
> ...
>
> > mkfs.ubifs  -m 2048 -e 126KiB -c 1000 -r .  $tmp_dir/ubifs.tmp
> > ubinize -o $out_file -p 128KiB -s 512 -m 2048 ubinize.cmd
> >
> > Has something changed between 2.6.35 and 2.6.36 that will
> > mess up the way the
> > volumes are managed?
>
> A couple of months ago there was a bad patch to mtd.utils that
> caused mkfs.ubifs to generate bogus CRCs. That cause similar
> symptoms for me. It was fixed before 2.6.36 came out of -rc.
>
> Did you update your mtd.utils as well as the kernel?
>

I too stumbled across that bug.
I am using the latest utils from git with both .35 and .36 so that should not 
be the problem unless there was a volume format change.

I shall investigate further.

Thanks

Charles







From dedekind1 at gmail.com  Mon Nov 22 03:12:42 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Mon, 22 Nov 2010 10:12:42 +0200
Subject: block2mtd and ubi
In-Reply-To: <20101121000145.GF9645@vicerveza.homeunix.net>
References: <20101120175856.GD9645@vicerveza.homeunix.net>
	<20101121000145.GF9645@vicerveza.homeunix.net>
Message-ID: <1290413562.2289.14.camel@localhost>

On Sun, 2010-11-21 at 01:01 +0100, Llu?s Batlle i Rossell wrote:
> On Sat, Nov 20, 2010 at 06:58:56PM +0100, Llu?s Batlle i Rossell wrote:
> > Hello,
> > 
> > I'm trying to use the qemu mipsel malta board to boot an ubifs image, prepared
> > with 'ubinize', and using block2mtd on /dev/hda, where qemu receives the image
> > through -hda ubifs.img.
> > 
> > The problem I have summarizes in this UBI complain while booting:
> > block2mtd: mtd0: [/dev/hda] erase_size = 512KiB [524288]
> > UBI: attaching mtd0 to ubi0
> > UBI: physical eraseblock size:   524288 bytes (512 KiB)
> > UBI: logical eraseblock size:    524160 bytes
> > UBI: smallest flash I/O unit:    1
> > UBI: VID header offset:          64 (aligned 64)
> > UBI: data offset:                128
> > UBI warning: check_what_we_have: 1008 PEBs are corrupted
> > corrupted PEBs are: 0 1 2 3 4 5 6 7 .....
> > UBI error: check_what_we_have: too many corrupted PEBs, refusing this device
> > UBI error: ubi_init: cannot attach mtd0
> Solved!
> 
> The first PEBs were corrupt because I was using 'dd' wrong. Nevertheless,
> filling the rest of image with zeros gave corrupt PEBs on the rest. joer on #mtd
> (oftc irc) helped me suggesting maybe 0xff would work. And appending 0xff
> instead of 0x00 worked great.
> 
> It's a pity that the same 'ubinize' cannot do that job automatically, and give
> an image filling all the memory blocks. That would easy down a lot the job for
> block2mtd.

Use ubiformat - it should get it right:

http://www.linux-mtd.infradead.org/faq/ubi.html#L_flash_img

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From viriketo at gmail.com  Mon Nov 22 04:09:41 2010
From: viriketo at gmail.com (=?iso-8859-1?Q?Llu=EDs?= Batlle i Rossell)
Date: Mon, 22 Nov 2010 10:09:41 +0100
Subject: block2mtd and ubi
In-Reply-To: <1290413562.2289.14.camel@localhost>
References: <20101120175856.GD9645@vicerveza.homeunix.net>
	<20101121000145.GF9645@vicerveza.homeunix.net>
	<1290413562.2289.14.camel@localhost>
Message-ID: <20101122090940.GK9645@vicerveza.homeunix.net>

On Mon, Nov 22, 2010 at 10:12:42AM +0200, Artem Bityutskiy wrote:
> On Sun, 2010-11-21 at 01:01 +0100, Llu?s Batlle i Rossell wrote:
> > On Sat, Nov 20, 2010 at 06:58:56PM +0100, Llu?s Batlle i Rossell wrote:
> > It's a pity that the same 'ubinize' cannot do that job automatically, and give
> > an image filling all the memory blocks. That would easy down a lot the job for
> > block2mtd.
> 
> Use ubiformat - it should get it right:
> 
> http://www.linux-mtd.infradead.org/faq/ubi.html#L_flash_img

I know, but I cannot do that on a block2mtd, if the block2mtd device I use is
the rootfs of the system. All I have is a kernel, qemu, and a rootfs in a
'ubinize' ubi image.

Regards,
Llu?s.


From dedekind1 at gmail.com  Mon Nov 22 04:32:45 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Mon, 22 Nov 2010 11:32:45 +0200
Subject: block2mtd and ubi
In-Reply-To: <20101122090940.GK9645@vicerveza.homeunix.net>
References: <20101120175856.GD9645@vicerveza.homeunix.net>
	<20101121000145.GF9645@vicerveza.homeunix.net>
	<1290413562.2289.14.camel@localhost>
	<20101122090940.GK9645@vicerveza.homeunix.net>
Message-ID: <1290418365.2289.25.camel@localhost>

On Mon, 2010-11-22 at 10:09 +0100, Llu?s Batlle i Rossell wrote:
> On Mon, Nov 22, 2010 at 10:12:42AM +0200, Artem Bityutskiy wrote:
> > On Sun, 2010-11-21 at 01:01 +0100, Llu?s Batlle i Rossell wrote:
> > > On Sat, Nov 20, 2010 at 06:58:56PM +0100, Llu?s Batlle i Rossell wrote:
> > > It's a pity that the same 'ubinize' cannot do that job automatically, and give
> > > an image filling all the memory blocks. That would easy down a lot the job for
> > > block2mtd.
> > 
> > Use ubiformat - it should get it right:
> > 
> > http://www.linux-mtd.infradead.org/faq/ubi.html#L_flash_img
> 
> I know, but I cannot do that on a block2mtd, if the block2mtd device I use is
> the rootfs of the system. All I have is a kernel, qemu, and a rootfs in a
> 'ubinize' ubi image.

Why you can dd buy cannot ubiformat? What is the fundamental difference?

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From alexis.rodet at bvs-tech.com  Mon Nov 22 04:58:06 2010
From: alexis.rodet at bvs-tech.com (Alexis RODET)
Date: Mon, 22 Nov 2010 10:58:06 +0100
Subject: [PATCH] Renaming 'struct flash_platform_data' into 'struct
	spi_flash_platform_data' in include/linux/spi/flash.h
In-Reply-To: <20101121044720.GA6088@tarshish>
References: <20101117160514.GA5308@n2100.arm.linux.org.uk>
	<4CE6B27D.2000909@bvs-tech.com> <20101121044720.GA6088@tarshish>
Message-ID: <4CEA3EAE.4080700@bvs-tech.com>

Hello,

As I discussed with Russell King on the list
linux-arm-kernel at lists.infradead.org, there is a problem with the double
definition of 'struct flash_platform_data' that are incompatible:

in arch/arm/include/asm/mach/flash.h:
struct flash_platform_data {
    const char    *map_name;
    const char    *name;
    unsigned int    width;
    int        (*init)(void);
    void        (*exit)(void);
    void        (*set_vpp)(int on);
    void        (*mmcontrol)(struct mtd_info *mtd, int sync_read);
    struct mtd_partition *parts;
    unsigned int    nr_parts;
};

in include/linux/spi/flash.h:
struct flash_platform_data {
    char        *name;
    struct mtd_partition *parts;
    unsigned int    nr_parts;

    char        *type;

    /* we'll likely add more ... use JEDEC IDs, etc */
};


Both headers are included in a number of machines or driver.
They make conflict when one has both spi flash and an other type of mtd flash on the same machine (my case).

I suppose the ARM version has no reason not to be platform independent, but that is an other problem.

I propose to rename SPI version of the structure as it is the younger and it is included in a less number of files.
The patch (already sent on linux-arm-kernel at lists.infradead.org) is in attachment.

Best regards,
Alexis RODET


Le 21/11/2010 05:47, Baruch Siach a ?crit :
> Hi Alexis,
>
> On Fri, Nov 19, 2010 at 06:23:09PM +0100, Alexis RODET wrote:
>>> It would, however, be nice if _someone_ out there could produce a patch
>> Here is the patch and here is the command line used for doing this:
> You need to CC the MTD maintainer and mailing list (David Woodhouse 
> <dwmw2 at infradead.org>, and linux-mtd at lists.infradead.org respectively), and 
> maybe also the SPI subsystem maintainers (David Brownell 
> <dbrownell at users.sourceforge.net>, Grant Likely <grant.likely at secretlab.ca>, 
> spi-devel-general at lists.sourceforge.net).
>
> baruch
>

-------------- next part --------------
An embedded message was scrubbed...
From: Alexis RODET <alexis.rodet at bvs-tech.com>
Subject: [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data'
 in include/linux/spi/flash.h
Date: Fri, 19 Nov 2010 18:23:09 +0100
Size: 25208
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20101122/8f4f2919/attachment-0001.mht>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alexis_rodet.vcf
Type: text/x-vcard
Size: 315 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20101122/8f4f2919/attachment-0001.vcf>

From viriketo at gmail.com  Mon Nov 22 05:00:10 2010
From: viriketo at gmail.com (=?iso-8859-1?Q?Llu=EDs?= Batlle i Rossell)
Date: Mon, 22 Nov 2010 11:00:10 +0100
Subject: block2mtd and ubi
In-Reply-To: <1290418365.2289.25.camel@localhost>
References: <20101120175856.GD9645@vicerveza.homeunix.net>
	<20101121000145.GF9645@vicerveza.homeunix.net>
	<1290413562.2289.14.camel@localhost>
	<20101122090940.GK9645@vicerveza.homeunix.net>
	<1290418365.2289.25.camel@localhost>
Message-ID: <20101122100008.GL9645@vicerveza.homeunix.net>

On Mon, Nov 22, 2010 at 11:32:45AM +0200, Artem Bityutskiy wrote:
> On Mon, 2010-11-22 at 10:09 +0100, Llu?s Batlle i Rossell wrote:
> > On Mon, Nov 22, 2010 at 10:12:42AM +0200, Artem Bityutskiy wrote:
> > > On Sun, 2010-11-21 at 01:01 +0100, Llu?s Batlle i Rossell wrote:
> > > > On Sat, Nov 20, 2010 at 06:58:56PM +0100, Llu?s Batlle i Rossell wrote:
> > > > It's a pity that the same 'ubinize' cannot do that job automatically, and give
> > > > an image filling all the memory blocks. That would easy down a lot the job for
> > > > block2mtd.
> > > 
> > > Use ubiformat - it should get it right:
> > > 
> > > http://www.linux-mtd.infradead.org/faq/ubi.html#L_flash_img
> > 
> > I know, but I cannot do that on a block2mtd, if the block2mtd device I use is
> > the rootfs of the system. All I have is a kernel, qemu, and a rootfs in a
> > 'ubinize' ubi image.
> 
> Why you can dd buy cannot ubiformat? What is the fundamental difference?
ubiformat works on a mtd character device, while dd works on a block device.
Maybe ubiformat can work on a 'file'? I think I tried and it did not work.



From dedekind1 at gmail.com  Mon Nov 22 05:21:23 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Mon, 22 Nov 2010 12:21:23 +0200
Subject: block2mtd and ubi
In-Reply-To: <20101122100008.GL9645@vicerveza.homeunix.net>
References: <20101120175856.GD9645@vicerveza.homeunix.net>
	<20101121000145.GF9645@vicerveza.homeunix.net>
	<1290413562.2289.14.camel@localhost>
	<20101122090940.GK9645@vicerveza.homeunix.net>
	<1290418365.2289.25.camel@localhost>
	<20101122100008.GL9645@vicerveza.homeunix.net>
Message-ID: <1290421283.2289.32.camel@localhost>

On Mon, 2010-11-22 at 11:00 +0100, Llu?s Batlle i Rossell wrote:
> On Mon, Nov 22, 2010 at 11:32:45AM +0200, Artem Bityutskiy wrote:
> > On Mon, 2010-11-22 at 10:09 +0100, Llu?s Batlle i Rossell wrote:
> > > On Mon, Nov 22, 2010 at 10:12:42AM +0200, Artem Bityutskiy wrote:
> > > > On Sun, 2010-11-21 at 01:01 +0100, Llu?s Batlle i Rossell wrote:
> > > > > On Sat, Nov 20, 2010 at 06:58:56PM +0100, Llu?s Batlle i Rossell wrote:
> > > > > It's a pity that the same 'ubinize' cannot do that job automatically, and give
> > > > > an image filling all the memory blocks. That would easy down a lot the job for
> > > > > block2mtd.
> > > > 
> > > > Use ubiformat - it should get it right:
> > > > 
> > > > http://www.linux-mtd.infradead.org/faq/ubi.html#L_flash_img
> > > 
> > > I know, but I cannot do that on a block2mtd, if the block2mtd device I use is
> > > the rootfs of the system. All I have is a kernel, qemu, and a rootfs in a
> > > 'ubinize' ubi image.
> > 
> > Why you can dd buy cannot ubiformat? What is the fundamental difference?
> ubiformat works on a mtd character device, while dd works on a block device.

But you can turn a block device into mtd device using block2mtd, so I do
not still see the fundamental difference.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From viriketo at gmail.com  Mon Nov 22 05:37:52 2010
From: viriketo at gmail.com (=?iso-8859-1?Q?Llu=EDs?= Batlle i Rossell)
Date: Mon, 22 Nov 2010 11:37:52 +0100
Subject: block2mtd and ubi
In-Reply-To: <1290421283.2289.32.camel@localhost>
References: <20101120175856.GD9645@vicerveza.homeunix.net>
	<20101121000145.GF9645@vicerveza.homeunix.net>
	<1290413562.2289.14.camel@localhost>
	<20101122090940.GK9645@vicerveza.homeunix.net>
	<1290418365.2289.25.camel@localhost>
	<20101122100008.GL9645@vicerveza.homeunix.net>
	<1290421283.2289.32.camel@localhost>
Message-ID: <20101122103751.GM9645@vicerveza.homeunix.net>

On Mon, Nov 22, 2010 at 12:21:23PM +0200, Artem Bityutskiy wrote:
> On Mon, 2010-11-22 at 11:00 +0100, Llu?s Batlle i Rossell wrote:
> > On Mon, Nov 22, 2010 at 11:32:45AM +0200, Artem Bityutskiy wrote:
> > > On Mon, 2010-11-22 at 10:09 +0100, Llu?s Batlle i Rossell wrote:
> > > > On Mon, Nov 22, 2010 at 10:12:42AM +0200, Artem Bityutskiy wrote:
> > > > > On Sun, 2010-11-21 at 01:01 +0100, Llu?s Batlle i Rossell wrote:
> > > > > > On Sat, Nov 20, 2010 at 06:58:56PM +0100, Llu?s Batlle i Rossell wrote:
> > > > > > It's a pity that the same 'ubinize' cannot do that job automatically, and give
> > > > > > an image filling all the memory blocks. That would easy down a lot the job for
> > > > > > block2mtd.
> > > > > 
> > > > > Use ubiformat - it should get it right:
> > > > > 
> > > > > http://www.linux-mtd.infradead.org/faq/ubi.html#L_flash_img
> > > > 
> > > > I know, but I cannot do that on a block2mtd, if the block2mtd device I use is
> > > > the rootfs of the system. All I have is a kernel, qemu, and a rootfs in a
> > > > 'ubinize' ubi image.
> > > 
> > > Why you can dd buy cannot ubiformat? What is the fundamental difference?
> > ubiformat works on a mtd character device, while dd works on a block device.
> 
> But you can turn a block device into mtd device using block2mtd, so I do
> not still see the fundamental difference.

That requires root access in the machine, which is something I want to avoid.
And quite a complex setup for the host system:
- make a file of the size I want
- set up a loop device
- load a block2mtd for it
- ubiformat it
- unload block2mtd
- detach loop device

Notice that I use block2mtd as rootfs in a qemu guest passing something like
"-hda flash_image -append blockmtd.blockmtd=/dev/hda". Appending 0xff to the
ubinized image is for me a far easier solution than that above requiring road
access.

Regards,
Llu?s.


From david-b at pacbell.net  Mon Nov 22 08:59:29 2010
From: david-b at pacbell.net (David Brownell)
Date: Mon, 22 Nov 2010 05:59:29 -0800
Subject: [PATCH] Renaming 'struct flash_platform_data' into 'struct
	spi_flash_platform_data' in include/linux/spi/flash.h
In-Reply-To: <4CEA3EAE.4080700@bvs-tech.com>
References: <20101117160514.GA5308@n2100.arm.linux.org.uk>
	<4CE6B27D.2000909@bvs-tech.com> <20101121044720.GA6088@tarshish>
	<4CEA3EAE.4080700@bvs-tech.com>
Message-ID: <1290434369.2529.38.camel@helium>

On Mon, 2010-11-22 at 10:58 +0100, Alexis RODET wrote:
> Hello,
> 
>  there is a problem with the double
> definition of 'struct flash_platform_data' that are incompatible:
> 
> in arch/arm/include/asm/mach/flash.h:
> in include/linux/spi/flash.h:

> 
> 
> Both headers are included in a number of machines or driver.

And this patch doesn't touch machine or driver code, so it's incomplete.

ISTR the last time this issue was raised, a similar incomplete patch was
proposed.

How about a patch that does the full rename??

- Dave




From alexis.rodet at bvs-tech.com  Mon Nov 22 09:15:12 2010
From: alexis.rodet at bvs-tech.com (Alexis RODET)
Date: Mon, 22 Nov 2010 15:15:12 +0100
Subject: [PATCH] Renaming 'struct flash_platform_data' into 'struct
	spi_flash_platform_data' in include/linux/spi/flash.h
In-Reply-To: <1290434369.2529.38.camel@helium>
References: <20101117160514.GA5308@n2100.arm.linux.org.uk>	
	<4CE6B27D.2000909@bvs-tech.com> <20101121044720.GA6088@tarshish>	
	<4CEA3EAE.4080700@bvs-tech.com> <1290434369.2529.38.camel@helium>
Message-ID: <4CEA7AF0.6000804@bvs-tech.com>

Hi David,

Le 22/11/2010 14:59, David Brownell a ?crit :
> On Mon, 2010-11-22 at 10:58 +0100, Alexis RODET wrote:
>> Hello,
>>
>>  there is a problem with the double
>> definition of 'struct flash_platform_data' that are incompatible:
>>
>> in arch/arm/include/asm/mach/flash.h:
>> in include/linux/spi/flash.h:
>> Both headers are included in a number of machines or driver.
> And this patch doesn't touch machine or driver code, so it's incomplete.
Look at the patch in previous mail attachment and you'll see it does.

39 files changed, 41 insertions(+), 41 deletions(-)

Sorry I didn't put it in message core because I already posted it on
linux-mtd at lists.infradead.org.
I don't know the good usage.

> ISTR the last time this issue was raised, a similar incomplete patch was
> proposed.
>
> How about a patch that does the full rename??
What do you mean ?
Renaming 'struct flash_platform_data' from
arch/arm/include/asm/mach/flash.h also ?
Or moving arch/arm/include/asm/mach/flash.h in common includes ?

Alexis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alexis_rodet.vcf
Type: text/x-vcard
Size: 315 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20101122/2e1368c2/attachment.vcf>

From david-b at pacbell.net  Mon Nov 22 16:52:17 2010
From: david-b at pacbell.net (David Brownell)
Date: Mon, 22 Nov 2010 13:52:17 -0800 (PST)
Subject: [PATCH] Renaming 'struct flash_platform_data' into 'struct
	spi_flash_platform_data' in include/linux/spi/flash.h
In-Reply-To: <4CEA7AF0.6000804@bvs-tech.com>
Message-ID: <327178.68946.qm@web180303.mail.gq1.yahoo.com>



--- On Mon, 11/22/10, Alexis RODET <alexis.rodet at bvs-tech.com> wrote:

> > And this patch doesn't touch machine or driver code,
> so it's incomplete.
> Look at the patch in previous mail attachment and you'll
> see it does.


Couldn't do that.  Submit another patch, or
combine it with this one.  Either way,  once it
merges, "git bisect" needs to work"...


> > How about a patch that does the full rename??
> What do you mean ?

Apply the patch and everthing builds and works;
and if it's a series, "git bisect" also works".



From alexis.rodet at bvs-tech.com  Tue Nov 23 04:30:46 2010
From: alexis.rodet at bvs-tech.com (Alexis RODET)
Date: Tue, 23 Nov 2010 10:30:46 +0100
Subject: [PATCH] Renaming 'struct flash_platform_data' into 'struct
	spi_flash_platform_data' in include/linux/spi/flash.h
In-Reply-To: <327178.68946.qm@web180303.mail.gq1.yahoo.com>
References: <327178.68946.qm@web180303.mail.gq1.yahoo.com>
Message-ID: <4CEB89C6.3080603@bvs-tech.com>

Hello David,

Le 22/11/2010 22:52, David Brownell a ?crit :
>
> --- On Mon, 11/22/10, Alexis RODET <alexis.rodet at bvs-tech.com> wrote:
>
>>> And this patch doesn't touch machine or driver code,
>> so it's incomplete.
>> Look at the patch in previous mail attachment and you'll
>> see it does.
>
> Couldn't do that.  Submit another patch, or
> combine it with this one.  Either way,  once it
> merges, "git bisect" needs to work"...
>
>
>>> How about a patch that does the full rename??
>> What do you mean ?
> Apply the patch and everthing builds and works;
> and if it's a series, "git bisect" also works".
>
So Here is the patch:
It modifies all *.c files that include <linux/spi/flash.h> and also the
include/linux/spi/flash.h file to rename 'struct flash_platform_data'
into 'struct spi_flash_platform_data'
Here is the command line used for doing this:

find . \( -name .git -prune -false -o -path \
./include/linux/spi/flash.h \ -o \( -name \*.c -execdir grep -q \
'#include <linux/spi/flash.h>' \{\} \; \) \) -execdir sed -i -e \
's/struct flash_platform_data/struct spi_flash_platform_data/' \
\{\} \+ -execdir git add \{\} \+ -print

I didn't test all compilations as I don't have blackfin nor mips compiler installed.
I compiled successfully for x86 with allyesconfig and for Freescale mx27
with allmodconfig minus some incompatible drivers.

Best regards,
Alexis RODET

---
 arch/arm/mach-at91/board-cam60.c               |    2 +-
 arch/arm/mach-at91/board-ecbat91.c             |    2 +-
 arch/arm/mach-dove/dove-db-setup.c             |    2 +-
 arch/arm/mach-kirkwood/lacie_v2-common.c       |    2 +-
 arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c |    2 +-
 arch/arm/mach-kirkwood/rd88f6192-nas-setup.c   |    2 +-
 arch/arm/mach-kirkwood/t5325-setup.c           |    2 +-
 arch/arm/mach-kirkwood/tsx1x-common.c          |    2 +-
 arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c   |    2 +-
 arch/arm/mach-w90x900/dev.c                    |    2 +-
 arch/blackfin/mach-bf518/boards/ezbrd.c        |    2 +-
 arch/blackfin/mach-bf518/boards/tcm-bf518.c    |    2 +-
 arch/blackfin/mach-bf527/boards/ad7160eval.c   |    2 +-
 arch/blackfin/mach-bf527/boards/cm_bf527.c     |    2 +-
 arch/blackfin/mach-bf527/boards/ezbrd.c        |    2 +-
 arch/blackfin/mach-bf527/boards/ezkit.c        |    2 +-
 arch/blackfin/mach-bf527/boards/tll6527m.c     |    2 +-
 arch/blackfin/mach-bf533/boards/H8606.c        |    2 +-
 arch/blackfin/mach-bf533/boards/blackstamp.c   |    2 +-
 arch/blackfin/mach-bf533/boards/cm_bf533.c     |    2 +-
 arch/blackfin/mach-bf533/boards/ezkit.c        |    2 +-
 arch/blackfin/mach-bf533/boards/stamp.c        |    2 +-
 arch/blackfin/mach-bf537/boards/cm_bf537e.c    |    2 +-
 arch/blackfin/mach-bf537/boards/cm_bf537u.c    |    2 +-
 arch/blackfin/mach-bf537/boards/minotaur.c     |    2 +-
 arch/blackfin/mach-bf537/boards/pnav10.c       |    2 +-
 arch/blackfin/mach-bf537/boards/stamp.c        |    4 ++--
 arch/blackfin/mach-bf537/boards/tcm_bf537.c    |    2 +-
 arch/blackfin/mach-bf538/boards/ezkit.c        |    2 +-
 arch/blackfin/mach-bf548/boards/cm_bf548.c     |    2 +-
 arch/blackfin/mach-bf548/boards/ezkit.c        |    2 +-
 arch/blackfin/mach-bf561/boards/acvilon.c      |    2 +-
 arch/blackfin/mach-bf561/boards/cm_bf561.c     |    2 +-
 arch/mips/alchemy/devboards/db1200/platform.c  |    2 +-
 drivers/mtd/devices/m25p80.c                   |    2 +-
 drivers/mtd/devices/mtd_dataflash.c            |    2 +-
 drivers/mtd/devices/sst25l.c                   |    2 +-
 drivers/spi/spi_butterfly.c                    |    2 +-
 include/linux/spi/flash.h                      |    4 ++--
 39 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/arch/arm/mach-at91/board-cam60.c
b/arch/arm/mach-at91/board-cam60.c
index b54e3e6..50780b2 100644
--- a/arch/arm/mach-at91/board-cam60.c
+++ b/arch/arm/mach-at91/board-cam60.c
@@ -98,7 +98,7 @@ static struct mtd_partition cam60_spi_partitions[] = {
 	},
 };
 -static struct flash_platform_data cam60_spi_flash_platform_data = {
+static struct spi_flash_platform_data cam60_spi_flash_platform_data = {
 	.name		= "spi_flash",
 	.parts		= cam60_spi_partitions,
 	.nr_parts	= ARRAY_SIZE(cam60_spi_partitions)
diff --git a/arch/arm/mach-at91/board-ecbat91.c
b/arch/arm/mach-at91/board-ecbat91.c
index 7b58c94..8598237 100644
--- a/arch/arm/mach-at91/board-ecbat91.c
+++ b/arch/arm/mach-at91/board-ecbat91.c
@@ -110,7 +110,7 @@ static struct mtd_partition __initdata
my_flash0_partitions[] =
 	}
 };
 -static struct flash_platform_data __initdata my_flash0_platform = {
+static struct spi_flash_platform_data __initdata my_flash0_platform = {
 	.name		= "Removable flash card",
 	.parts		= my_flash0_partitions,
 	.nr_parts	= ARRAY_SIZE(my_flash0_partitions)
diff --git a/arch/arm/mach-dove/dove-db-setup.c
b/arch/arm/mach-dove/dove-db-setup.c
index 95925aa..90f8f95 100644
--- a/arch/arm/mach-dove/dove-db-setup.c
+++ b/arch/arm/mach-dove/dove-db-setup.c
@@ -40,7 +40,7 @@ static struct mv_sata_platform_data dove_db_sata_data = {
  * SPI Devices:
  * 	SPI0: 4M Flash ST-M25P32-VMF6P

****************************************************************************/
-static const struct flash_platform_data dove_db_spi_flash_data = {
+static const struct spi_flash_platform_data dove_db_spi_flash_data = {
 	.type		= "m25p64",
 };
 diff --git a/arch/arm/mach-kirkwood/lacie_v2-common.c
b/arch/arm/mach-kirkwood/lacie_v2-common.c
index 285edab..b60003f 100644
--- a/arch/arm/mach-kirkwood/lacie_v2-common.c
+++ b/arch/arm/mach-kirkwood/lacie_v2-common.c
@@ -33,7 +33,7 @@ static struct mtd_partition lacie_v2_flash_parts[] = {
 	},
 };
 -static const struct flash_platform_data lacie_v2_flash = {
+static const struct spi_flash_platform_data lacie_v2_flash = {
 	.type		= "mx25l4005a",
 	.name		= "spi_flash",
 	.parts		= lacie_v2_flash_parts,
diff --git a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
index 1e5266f..16356c8 100644
--- a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
+++ b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
@@ -52,7 +52,7 @@ static struct dsa_platform_data
mv88f6281gtw_ge_switch_plat_data = {
 	.chip		= &mv88f6281gtw_ge_switch_chip_data,
 };
 -static const struct flash_platform_data mv88f6281gtw_ge_spi_slave_data = {
+static const struct spi_flash_platform_data
mv88f6281gtw_ge_spi_slave_data = {
 	.type		= "mx25l12805d",
 };
 diff --git a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
index 0049614..d3b706f 100644
--- a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
+++ b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
@@ -32,7 +32,7 @@ static struct mv_sata_platform_data
rd88f6192_sata_data = {
 	.n_ports	= 2,
 };
 -static const struct flash_platform_data rd88F6192_spi_slave_data = {
+static const struct spi_flash_platform_data rd88F6192_spi_slave_data = {
 	.type		= "m25p128",
 };
 diff --git a/arch/arm/mach-kirkwood/t5325-setup.c
b/arch/arm/mach-kirkwood/t5325-setup.c
index ce50e61..d086983 100644
--- a/arch/arm/mach-kirkwood/t5325-setup.c
+++ b/arch/arm/mach-kirkwood/t5325-setup.c
@@ -59,7 +59,7 @@ struct mtd_partition hp_t5325_partitions[] = {
 	},
 };
 -const struct flash_platform_data hp_t5325_flash = {
+const struct spi_flash_platform_data hp_t5325_flash = {
 	.type		= "mx25l8005",
 	.name		= "spi_flash",
 	.parts		= hp_t5325_partitions,
diff --git a/arch/arm/mach-kirkwood/tsx1x-common.c
b/arch/arm/mach-kirkwood/tsx1x-common.c
index f781164..14c7825 100644
--- a/arch/arm/mach-kirkwood/tsx1x-common.c
+++ b/arch/arm/mach-kirkwood/tsx1x-common.c
@@ -59,7 +59,7 @@ struct mtd_partition qnap_tsx1x_partitions[] = {
 	},
 };
 -const struct flash_platform_data qnap_tsx1x_flash = {
+const struct spi_flash_platform_data qnap_tsx1x_flash = {
 	.type		= "m25p128",
 	.name		= "spi_flash",
 	.parts		= qnap_tsx1x_partitions,
diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
index 02ff45f..b18bb24 100644
--- a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
+++ b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
@@ -65,7 +65,7 @@ static struct mtd_partition
rd88f6183ap_ge_partitions[] = {
 	},
 };
 -static struct flash_platform_data rd88f6183ap_ge_spi_slave_data = {
+static struct spi_flash_platform_data rd88f6183ap_ge_spi_slave_data = {
 	.type		= "m25p64",
 	.nr_parts	= ARRAY_SIZE(rd88f6183ap_ge_partitions),
 	.parts		= rd88f6183ap_ge_partitions,
diff --git a/arch/arm/mach-w90x900/dev.c b/arch/arm/mach-w90x900/dev.c
index 7a1fa6a..12d7f7c 100644
--- a/arch/arm/mach-w90x900/dev.c
+++ b/arch/arm/mach-w90x900/dev.c
@@ -246,7 +246,7 @@ static struct mtd_partition
nuc900_spi_flash_partitions[] = {
 	},
 };
 -static struct flash_platform_data nuc900_spi_flash_data = {
+static struct spi_flash_platform_data nuc900_spi_flash_data = {
 	.name = "m25p80",
 	.parts =  nuc900_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(nuc900_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c
b/arch/blackfin/mach-bf518/boards/ezbrd.c
index b894c8a..ded02c1 100644
--- a/arch/blackfin/mach-bf518/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf518/boards/ezbrd.c
@@ -178,7 +178,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
 	.name = "m25p80",
 	.parts = bfin_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf518/boards/tcm-bf518.c
b/arch/blackfin/mach-bf518/boards/tcm-bf518.c
index e6ce1d7..66817b0 100644
--- a/arch/blackfin/mach-bf518/boards/tcm-bf518.c
+++ b/arch/blackfin/mach-bf518/boards/tcm-bf518.c
@@ -128,7 +128,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
 	.name = "m25p80",
 	.parts = bfin_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf527/boards/ad7160eval.c
b/arch/blackfin/mach-bf527/boards/ad7160eval.c
index fc767ac..c43724b 100644
--- a/arch/blackfin/mach-bf527/boards/ad7160eval.c
+++ b/arch/blackfin/mach-bf527/boards/ad7160eval.c
@@ -254,7 +254,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
 	.name = "m25p80",
 	.parts = bfin_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c
b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index 2c31af7..3d5a3dc 100644
--- a/arch/blackfin/mach-bf527/boards/cm_bf527.c
+++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c
@@ -341,7 +341,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
 	.name = "m25p80",
 	.parts = bfin_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c
b/arch/blackfin/mach-bf527/boards/ezbrd.c
index 9a736a8..6670939 100644
--- a/arch/blackfin/mach-bf527/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf527/boards/ezbrd.c
@@ -240,7 +240,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
 	.name = "m25p80",
 	.parts = bfin_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c
b/arch/blackfin/mach-bf527/boards/ezkit.c
index 9222bc0..78a07e7 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -434,7 +434,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
 	.name = "m25p80",
 	.parts = bfin_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf527/boards/tll6527m.c
b/arch/blackfin/mach-bf527/boards/tll6527m.c
index 9ec5757..147374b 100644
--- a/arch/blackfin/mach-bf527/boards/tll6527m.c
+++ b/arch/blackfin/mach-bf527/boards/tll6527m.c
@@ -304,7 +304,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
 	.name = "m25p80",
 	.parts = bfin_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c
b/arch/blackfin/mach-bf533/boards/H8606.c
index 2ce7b16..60ff37f 100644
--- a/arch/blackfin/mach-bf533/boards/H8606.c
+++ b/arch/blackfin/mach-bf533/boards/H8606.c
@@ -149,7 +149,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
 	.name = "m25p80",
 	.parts = bfin_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf533/boards/blackstamp.c
b/arch/blackfin/mach-bf533/boards/blackstamp.c
index 20c1022..cbdcca1 100644
--- a/arch/blackfin/mach-bf533/boards/blackstamp.c
+++ b/arch/blackfin/mach-bf533/boards/blackstamp.c
@@ -93,7 +93,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
 	.name = "m25p80",
 	.parts = bfin_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c
b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index adbe62a..6448686 100644
--- a/arch/blackfin/mach-bf533/boards/cm_bf533.c
+++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c
@@ -49,7 +49,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
 	.name = "m25p80",
 	.parts = bfin_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c
b/arch/blackfin/mach-bf533/boards/ezkit.c
index a1cb8e7..4e1ee73 100644
--- a/arch/blackfin/mach-bf533/boards/ezkit.c
+++ b/arch/blackfin/mach-bf533/boards/ezkit.c
@@ -200,7 +200,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
 	.name = "m25p80",
 	.parts = bfin_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c
b/arch/blackfin/mach-bf533/boards/stamp.c
index b3b1cde..8554b38 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -163,7 +163,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
 	.name = "m25p80",
 	.parts = bfin_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537e.c
b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
index 836698c..c1bb193 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537e.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
@@ -51,7 +51,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
 	.name = "m25p80",
 	.parts = bfin_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537u.c
b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
index 2a85670..da1886e 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537u.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
@@ -52,7 +52,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
 	.name = "m25p80",
 	.parts = bfin_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/minotaur.c
b/arch/blackfin/mach-bf537/boards/minotaur.c
index 4980051..c360f10 100644
--- a/arch/blackfin/mach-bf537/boards/minotaur.c
+++ b/arch/blackfin/mach-bf537/boards/minotaur.c
@@ -149,7 +149,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
 	.name = "m25p80",
 	.parts = bfin_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c
b/arch/blackfin/mach-bf537/boards/pnav10.c
index b958078..aab7edd 100644
--- a/arch/blackfin/mach-bf537/boards/pnav10.c
+++ b/arch/blackfin/mach-bf537/boards/pnav10.c
@@ -174,7 +174,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
 	.name = "m25p80",
 	.parts = bfin_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c
b/arch/blackfin/mach-bf537/boards/stamp.c
index 3aa344c..633cbf0 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -526,7 +526,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
 	.name = "m25p80",
 	.parts = bfin_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
@@ -1003,7 +1003,7 @@ static struct mtd_partition
bfin_spi_dataflash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_dataflash_data = {
+static struct spi_flash_platform_data bfin_spi_dataflash_data = {
 	.name = "SPI Dataflash",
 	.parts = bfin_spi_dataflash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_dataflash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c
b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
index 31498ad..557747f 100644
--- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
@@ -52,7 +52,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
 	.name = "m25p80",
 	.parts = bfin_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c
b/arch/blackfin/mach-bf538/boards/ezkit.c
index c6fb0a5..de9ab68 100644
--- a/arch/blackfin/mach-bf538/boards/ezkit.c
+++ b/arch/blackfin/mach-bf538/boards/ezkit.c
@@ -493,7 +493,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
 	.name = "m25p80",
 	.parts = bfin_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c
b/arch/blackfin/mach-bf548/boards/cm_bf548.c
index f0c0eef..7effe25 100644
--- a/arch/blackfin/mach-bf548/boards/cm_bf548.c
+++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c
@@ -849,7 +849,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
 	.name = "m25p80",
 	.parts = bfin_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c
b/arch/blackfin/mach-bf548/boards/ezkit.c
index 216e269..1ab35e3 100644
--- a/arch/blackfin/mach-bf548/boards/ezkit.c
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -957,7 +957,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
 	.name = "m25p80",
 	.parts = bfin_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf561/boards/acvilon.c
b/arch/blackfin/mach-bf561/boards/acvilon.c
index 0b1c20f..7f69032 100644
--- a/arch/blackfin/mach-bf561/boards/acvilon.c
+++ b/arch/blackfin/mach-bf561/boards/acvilon.c
@@ -359,7 +359,7 @@ static struct mtd_partition
bfin_spi_dataflash_partitions[] = {
 	 }
 };
 -static struct flash_platform_data bfin_spi_dataflash_data = {
+static struct spi_flash_platform_data bfin_spi_dataflash_data = {
 	.name = "SPI Dataflash",
 	.parts = bfin_spi_dataflash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_dataflash_partitions),
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c
b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index 087b6b0..80073ac 100644
--- a/arch/blackfin/mach-bf561/boards/cm_bf561.c
+++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c
@@ -50,7 +50,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
 	}
 };
 -static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
 	.name = "m25p80",
 	.parts = bfin_spi_flash_partitions,
 	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/mips/alchemy/devboards/db1200/platform.c
b/arch/mips/alchemy/devboards/db1200/platform.c
index fbb5593..ea9bf90 100644
--- a/arch/mips/alchemy/devboards/db1200/platform.c
+++ b/arch/mips/alchemy/devboards/db1200/platform.c
@@ -50,7 +50,7 @@ static struct mtd_partition db1200_spiflash_parts[] = {
 	},
 };
 -static struct flash_platform_data db1200_spiflash_data = {
+static struct spi_flash_platform_data db1200_spiflash_data = {
 	.name		= "s25fl001",
 	.parts		= db1200_spiflash_parts,
 	.nr_parts	= ARRAY_SIZE(db1200_spiflash_parts),
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index bf5a002..4244468 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -776,7 +776,7 @@ static const struct spi_device_id *__devinit
jedec_probe(struct spi_device *spi)
 static int __devinit m25p_probe(struct spi_device *spi)
 {
 	const struct spi_device_id	*id = spi_get_device_id(spi);
-	struct flash_platform_data	*data;
+	struct spi_flash_platform_data	*data;
 	struct m25p			*flash;
 	struct flash_info		*info;
 	unsigned			i;
diff --git a/drivers/mtd/devices/mtd_dataflash.c
b/drivers/mtd/devices/mtd_dataflash.c
index c5015cc..9cb2727 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -634,7 +634,7 @@ add_dataflash_otp(struct spi_device *spi, char *name,
 {
 	struct dataflash		*priv;
 	struct mtd_info			*device;
-	struct flash_platform_data	*pdata = spi->dev.platform_data;
+	struct spi_flash_platform_data	*pdata = spi->dev.platform_data;
 	char				*otp_tag = "";
 	int				err = 0;
 diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
index 684247a..989758d 100644
--- a/drivers/mtd/devices/sst25l.c
+++ b/drivers/mtd/devices/sst25l.c
@@ -379,7 +379,7 @@ static int __init sst25l_probe(struct spi_device *spi)
 {
 	struct flash_info *flash_info;
 	struct sst25l_flash *flash;
-	struct flash_platform_data *data;
+	struct spi_flash_platform_data *data;
 	int ret, i;
  	flash_info = sst25l_match_device(spi);
diff --git a/drivers/spi/spi_butterfly.c b/drivers/spi/spi_butterfly.c
index 0d4ceba..a9ac6b2 100644
--- a/drivers/spi/spi_butterfly.c
+++ b/drivers/spi/spi_butterfly.c
@@ -183,7 +183,7 @@ static struct mtd_partition partitions[] = { {
 	.size		= MTDPART_SIZ_FULL,
 } };
 -static struct flash_platform_data flash = {
+static struct spi_flash_platform_data flash = {
 	.name		= "butterflash",
 	.parts		= partitions,
 	.nr_parts	= ARRAY_SIZE(partitions),
diff --git a/include/linux/spi/flash.h b/include/linux/spi/flash.h
index 3f22932..946145e 100644
--- a/include/linux/spi/flash.h
+++ b/include/linux/spi/flash.h
@@ -4,7 +4,7 @@
 struct mtd_partition;
  /**
- * struct flash_platform_data: board-specific flash data
+ * struct spi_flash_platform_data: board-specific flash data
  * @name: optional flash device name (eg, as used with mtdparts=)
  * @parts: optional array of mtd_partitions for static partitioning
  * @nr_parts: number of mtd_partitions for static partitoning
@@ -18,7 +18,7 @@ struct mtd_partition;
  * Note that for DataFlash, sizes for pages, blocks, and sectors are
  * rarely powers of two; and partitions should be sector-aligned.
  */
-struct flash_platform_data {
+struct spi_flash_platform_data {
 	char		*name;
 	struct mtd_partition *parts;
 	unsigned int	nr_parts;
-- 1.7.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: alexis_rodet.vcf
Type: text/x-vcard
Size: 315 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20101123/b622f1d9/attachment-0001.vcf>

From baruch at tkos.co.il  Tue Nov 23 04:36:43 2010
From: baruch at tkos.co.il (Baruch Siach)
Date: Tue, 23 Nov 2010 11:36:43 +0200
Subject: [PATCH] Renaming 'struct flash_platform_data' into 'struct
	spi_flash_platform_data' in include/linux/spi/flash.h
In-Reply-To: <4CEB89C6.3080603@bvs-tech.com>
References: <327178.68946.qm@web180303.mail.gq1.yahoo.com>
	<4CEB89C6.3080603@bvs-tech.com>
Message-ID: <20101123093643.GC6156@jasper.tkos.co.il>

Hi Alexis,

On Tue, Nov 23, 2010 at 10:30:46AM +0100, Alexis RODET wrote:
> Le 22/11/2010 22:52, David Brownell a ?crit :
> >
> > --- On Mon, 11/22/10, Alexis RODET <alexis.rodet at bvs-tech.com> wrote:
> >
> >>> And this patch doesn't touch machine or driver code,
> >> so it's incomplete.
> >> Look at the patch in previous mail attachment and you'll
> >> see it does.
> >
> > Couldn't do that.  Submit another patch, or
> > combine it with this one.  Either way,  once it
> > merges, "git bisect" needs to work"...
> >
> >
> >>> How about a patch that does the full rename??
> >> What do you mean ?
> > Apply the patch and everthing builds and works;
> > and if it's a series, "git bisect" also works".
> >
> So Here is the patch:

[snip]

>  -static struct flash_platform_data __initdata my_flash0_platform = {
> +static struct spi_flash_platform_data __initdata my_flash0_platform = {

Your patch seems to have been mangled by your mailer. A whitespace were added 
at the beginning of the line before '-static'.

baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -


From alexis.rodet at bvs-tech.com  Tue Nov 23 04:41:13 2010
From: alexis.rodet at bvs-tech.com (Alexis RODET)
Date: Tue, 23 Nov 2010 10:41:13 +0100
Subject: [PATCH] Renaming 'struct flash_platform_data' into 'struct
	spi_flash_platform_data' in include/linux/spi/flash.h
In-Reply-To: <20101123093643.GC6156@jasper.tkos.co.il>
References: <327178.68946.qm@web180303.mail.gq1.yahoo.com>
	<4CEB89C6.3080603@bvs-tech.com>
	<20101123093643.GC6156@jasper.tkos.co.il>
Message-ID: <4CEB8C39.1060801@bvs-tech.com>



Le 23/11/2010 10:36, Baruch Siach a ?crit :
> Hi Alexis,
>
>> So Here is the patch:
> [snip]
>
>>  -static struct flash_platform_data __initdata my_flash0_platform = {
>> +static struct spi_flash_platform_data __initdata my_flash0_platform = {
> Your patch seems to have been mangled by your mailer. A whitespace were added 
> at the beginning of the line before '-static'.
>
> baruch
>
I hope mail mailer will respect the copy-paste.

Alexis

From alexis.rodet at bvs-tech.com  Thu Nov 18 04:34:59 2010
From: alexis.rodet at bvs-tech.com (Alexis RODET)
Date: Thu, 18 Nov 2010 10:34:59 +0100
Subject: [PATCH] Renaming 'struct flash_platform_data' into 'struct
In-Reply-To: <20101117160514.GA5308@n2100.arm.linux.org.uk>
References: <20101117160514.GA5308@n2100.arm.linux.org.uk>
Message-ID: <mailman.23.1290505282.1530.linux-mtd@lists.infradead.org>

spi_flash_platform_data' in include/linux/spi/flash.h
To: linux-arm-kernel at lists.infradead.org
Signed-off-by: Alexis RODET <alexis.rodet at bvs-tech.com>

Here is the command line used for doing this:
find . \( -name .git -prune -false -o -path ./include/linux/spi/flash.h
-o \( -name \*.c -execdir grep -q '#include <linux/spi/flash.h>' \{\} \;
\) \) -execdir sed -i -e 's/struct flash_platform_data/struct
spi_flash_platform_data/' \{\} \+ -execdir git add \{\} \+ -print
I didn't test all compilation as I don't have blackfin compiler
installed and I'm quite lasy and also busy.
I compiled for my x86 with allyesconfig and for Freescale mx27 with
allyesconfig minus a number of buggy drivers.

---
 arch/arm/mach-at91/board-cam60.c               |    2 +-
 arch/arm/mach-at91/board-ecbat91.c             |    2 +-
 arch/arm/mach-dove/dove-db-setup.c             |    2 +-
 arch/arm/mach-kirkwood/lacie_v2-common.c       |    2 +-
 arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c |    2 +-
 arch/arm/mach-kirkwood/rd88f6192-nas-setup.c   |    2 +-
 arch/arm/mach-kirkwood/t5325-setup.c           |    2 +-
 arch/arm/mach-kirkwood/tsx1x-common.c          |    2 +-
 arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c   |    2 +-
 arch/arm/mach-w90x900/dev.c                    |    2 +-
 arch/blackfin/mach-bf518/boards/ezbrd.c        |    2 +-
 arch/blackfin/mach-bf518/boards/tcm-bf518.c    |    2 +-
 arch/blackfin/mach-bf527/boards/ad7160eval.c   |    2 +-
 arch/blackfin/mach-bf527/boards/cm_bf527.c     |    2 +-
 arch/blackfin/mach-bf527/boards/ezbrd.c        |    2 +-
 arch/blackfin/mach-bf527/boards/ezkit.c        |    2 +-
 arch/blackfin/mach-bf527/boards/tll6527m.c     |    2 +-
 arch/blackfin/mach-bf533/boards/H8606.c        |    2 +-
 arch/blackfin/mach-bf533/boards/blackstamp.c   |    2 +-
 arch/blackfin/mach-bf533/boards/cm_bf533.c     |    2 +-
 arch/blackfin/mach-bf533/boards/ezkit.c        |    2 +-
 arch/blackfin/mach-bf533/boards/stamp.c        |    2 +-
 arch/blackfin/mach-bf537/boards/cm_bf537e.c    |    2 +-
 arch/blackfin/mach-bf537/boards/cm_bf537u.c    |    2 +-
 arch/blackfin/mach-bf537/boards/minotaur.c     |    2 +-
 arch/blackfin/mach-bf537/boards/pnav10.c       |    2 +-
 arch/blackfin/mach-bf537/boards/stamp.c        |    4 ++--
 arch/blackfin/mach-bf537/boards/tcm_bf537.c    |    2 +-
 arch/blackfin/mach-bf538/boards/ezkit.c        |    2 +-
 arch/blackfin/mach-bf548/boards/cm_bf548.c     |    2 +-
 arch/blackfin/mach-bf548/boards/ezkit.c        |    2 +-
 arch/blackfin/mach-bf561/boards/acvilon.c      |    2 +-
 arch/blackfin/mach-bf561/boards/cm_bf561.c     |    2 +-
 arch/mips/alchemy/devboards/db1200/platform.c  |    2 +-
 drivers/mtd/devices/m25p80.c                   |    2 +-
 drivers/mtd/devices/mtd_dataflash.c            |    2 +-
 drivers/mtd/devices/sst25l.c                   |    2 +-
 drivers/spi/spi_butterfly.c                    |    2 +-
 include/linux/spi/flash.h                      |    4 ++--
 39 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/arch/arm/mach-at91/board-cam60.c
b/arch/arm/mach-at91/board-cam60.c
index b54e3e6..50780b2 100644
--- a/arch/arm/mach-at91/board-cam60.c
+++ b/arch/arm/mach-at91/board-cam60.c
@@ -98,7 +98,7 @@ static struct mtd_partition cam60_spi_partitions[] = {
     },
 };
 
-static struct flash_platform_data cam60_spi_flash_platform_data = {
+static struct spi_flash_platform_data cam60_spi_flash_platform_data = {
     .name        = "spi_flash",
     .parts        = cam60_spi_partitions,
     .nr_parts    = ARRAY_SIZE(cam60_spi_partitions)
diff --git a/arch/arm/mach-at91/board-ecbat91.c
b/arch/arm/mach-at91/board-ecbat91.c
index 7b58c94..8598237 100644
--- a/arch/arm/mach-at91/board-ecbat91.c
+++ b/arch/arm/mach-at91/board-ecbat91.c
@@ -110,7 +110,7 @@ static struct mtd_partition __initdata
my_flash0_partitions[] =
     }
 };
 
-static struct flash_platform_data __initdata my_flash0_platform = {
+static struct spi_flash_platform_data __initdata my_flash0_platform = {
     .name        = "Removable flash card",
     .parts        = my_flash0_partitions,
     .nr_parts    = ARRAY_SIZE(my_flash0_partitions)
diff --git a/arch/arm/mach-dove/dove-db-setup.c
b/arch/arm/mach-dove/dove-db-setup.c
index 95925aa..90f8f95 100644
--- a/arch/arm/mach-dove/dove-db-setup.c
+++ b/arch/arm/mach-dove/dove-db-setup.c
@@ -40,7 +40,7 @@ static struct mv_sata_platform_data dove_db_sata_data = {
  * SPI Devices:
  *     SPI0: 4M Flash ST-M25P32-VMF6P
 
****************************************************************************/
-static const struct flash_platform_data dove_db_spi_flash_data = {
+static const struct spi_flash_platform_data dove_db_spi_flash_data = {
     .type        = "m25p64",
 };
 
diff --git a/arch/arm/mach-kirkwood/lacie_v2-common.c
b/arch/arm/mach-kirkwood/lacie_v2-common.c
index 285edab..b60003f 100644
--- a/arch/arm/mach-kirkwood/lacie_v2-common.c
+++ b/arch/arm/mach-kirkwood/lacie_v2-common.c
@@ -33,7 +33,7 @@ static struct mtd_partition lacie_v2_flash_parts[] = {
     },
 };
 
-static const struct flash_platform_data lacie_v2_flash = {
+static const struct spi_flash_platform_data lacie_v2_flash = {
     .type        = "mx25l4005a",
     .name        = "spi_flash",
     .parts        = lacie_v2_flash_parts,
diff --git a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
index 1e5266f..16356c8 100644
--- a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
+++ b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
@@ -52,7 +52,7 @@ static struct dsa_platform_data
mv88f6281gtw_ge_switch_plat_data = {
     .chip        = &mv88f6281gtw_ge_switch_chip_data,
 };
 
-static const struct flash_platform_data mv88f6281gtw_ge_spi_slave_data = {
+static const struct spi_flash_platform_data
mv88f6281gtw_ge_spi_slave_data = {
     .type        = "mx25l12805d",
 };
 
diff --git a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
index 0049614..d3b706f 100644
--- a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
+++ b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
@@ -32,7 +32,7 @@ static struct mv_sata_platform_data
rd88f6192_sata_data = {
     .n_ports    = 2,
 };
 
-static const struct flash_platform_data rd88F6192_spi_slave_data = {
+static const struct spi_flash_platform_data rd88F6192_spi_slave_data = {
     .type        = "m25p128",
 };
 
diff --git a/arch/arm/mach-kirkwood/t5325-setup.c
b/arch/arm/mach-kirkwood/t5325-setup.c
index ce50e61..d086983 100644
--- a/arch/arm/mach-kirkwood/t5325-setup.c
+++ b/arch/arm/mach-kirkwood/t5325-setup.c
@@ -59,7 +59,7 @@ struct mtd_partition hp_t5325_partitions[] = {
     },
 };
 
-const struct flash_platform_data hp_t5325_flash = {
+const struct spi_flash_platform_data hp_t5325_flash = {
     .type        = "mx25l8005",
     .name        = "spi_flash",
     .parts        = hp_t5325_partitions,
diff --git a/arch/arm/mach-kirkwood/tsx1x-common.c
b/arch/arm/mach-kirkwood/tsx1x-common.c
index f781164..14c7825 100644
--- a/arch/arm/mach-kirkwood/tsx1x-common.c
+++ b/arch/arm/mach-kirkwood/tsx1x-common.c
@@ -59,7 +59,7 @@ struct mtd_partition qnap_tsx1x_partitions[] = {
     },
 };
 
-const struct flash_platform_data qnap_tsx1x_flash = {
+const struct spi_flash_platform_data qnap_tsx1x_flash = {
     .type        = "m25p128",
     .name        = "spi_flash",
     .parts        = qnap_tsx1x_partitions,
diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
index 02ff45f..b18bb24 100644
--- a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
+++ b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
@@ -65,7 +65,7 @@ static struct mtd_partition
rd88f6183ap_ge_partitions[] = {
     },
 };
 
-static struct flash_platform_data rd88f6183ap_ge_spi_slave_data = {
+static struct spi_flash_platform_data rd88f6183ap_ge_spi_slave_data = {
     .type        = "m25p64",
     .nr_parts    = ARRAY_SIZE(rd88f6183ap_ge_partitions),
     .parts        = rd88f6183ap_ge_partitions,
diff --git a/arch/arm/mach-w90x900/dev.c b/arch/arm/mach-w90x900/dev.c
index 7a1fa6a..12d7f7c 100644
--- a/arch/arm/mach-w90x900/dev.c
+++ b/arch/arm/mach-w90x900/dev.c
@@ -246,7 +246,7 @@ static struct mtd_partition
nuc900_spi_flash_partitions[] = {
     },
 };
 
-static struct flash_platform_data nuc900_spi_flash_data = {
+static struct spi_flash_platform_data nuc900_spi_flash_data = {
     .name = "m25p80",
     .parts =  nuc900_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(nuc900_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c
b/arch/blackfin/mach-bf518/boards/ezbrd.c
index b894c8a..ded02c1 100644
--- a/arch/blackfin/mach-bf518/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf518/boards/ezbrd.c
@@ -178,7 +178,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf518/boards/tcm-bf518.c
b/arch/blackfin/mach-bf518/boards/tcm-bf518.c
index e6ce1d7..66817b0 100644
--- a/arch/blackfin/mach-bf518/boards/tcm-bf518.c
+++ b/arch/blackfin/mach-bf518/boards/tcm-bf518.c
@@ -128,7 +128,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf527/boards/ad7160eval.c
b/arch/blackfin/mach-bf527/boards/ad7160eval.c
index fc767ac..c43724b 100644
--- a/arch/blackfin/mach-bf527/boards/ad7160eval.c
+++ b/arch/blackfin/mach-bf527/boards/ad7160eval.c
@@ -254,7 +254,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c
b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index 2c31af7..3d5a3dc 100644
--- a/arch/blackfin/mach-bf527/boards/cm_bf527.c
+++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c
@@ -341,7 +341,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c
b/arch/blackfin/mach-bf527/boards/ezbrd.c
index 9a736a8..6670939 100644
--- a/arch/blackfin/mach-bf527/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf527/boards/ezbrd.c
@@ -240,7 +240,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c
b/arch/blackfin/mach-bf527/boards/ezkit.c
index 9222bc0..78a07e7 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -434,7 +434,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf527/boards/tll6527m.c
b/arch/blackfin/mach-bf527/boards/tll6527m.c
index 9ec5757..147374b 100644
--- a/arch/blackfin/mach-bf527/boards/tll6527m.c
+++ b/arch/blackfin/mach-bf527/boards/tll6527m.c
@@ -304,7 +304,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c
b/arch/blackfin/mach-bf533/boards/H8606.c
index 2ce7b16..60ff37f 100644
--- a/arch/blackfin/mach-bf533/boards/H8606.c
+++ b/arch/blackfin/mach-bf533/boards/H8606.c
@@ -149,7 +149,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf533/boards/blackstamp.c
b/arch/blackfin/mach-bf533/boards/blackstamp.c
index 20c1022..cbdcca1 100644
--- a/arch/blackfin/mach-bf533/boards/blackstamp.c
+++ b/arch/blackfin/mach-bf533/boards/blackstamp.c
@@ -93,7 +93,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c
b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index adbe62a..6448686 100644
--- a/arch/blackfin/mach-bf533/boards/cm_bf533.c
+++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c
@@ -49,7 +49,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c
b/arch/blackfin/mach-bf533/boards/ezkit.c
index a1cb8e7..4e1ee73 100644
--- a/arch/blackfin/mach-bf533/boards/ezkit.c
+++ b/arch/blackfin/mach-bf533/boards/ezkit.c
@@ -200,7 +200,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c
b/arch/blackfin/mach-bf533/boards/stamp.c
index b3b1cde..8554b38 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -163,7 +163,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537e.c
b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
index 836698c..c1bb193 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537e.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
@@ -51,7 +51,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537u.c
b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
index 2a85670..da1886e 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537u.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
@@ -52,7 +52,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/minotaur.c
b/arch/blackfin/mach-bf537/boards/minotaur.c
index 4980051..c360f10 100644
--- a/arch/blackfin/mach-bf537/boards/minotaur.c
+++ b/arch/blackfin/mach-bf537/boards/minotaur.c
@@ -149,7 +149,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c
b/arch/blackfin/mach-bf537/boards/pnav10.c
index b958078..aab7edd 100644
--- a/arch/blackfin/mach-bf537/boards/pnav10.c
+++ b/arch/blackfin/mach-bf537/boards/pnav10.c
@@ -174,7 +174,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c
b/arch/blackfin/mach-bf537/boards/stamp.c
index 3aa344c..633cbf0 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -526,7 +526,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
@@ -1003,7 +1003,7 @@ static struct mtd_partition
bfin_spi_dataflash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_dataflash_data = {
+static struct spi_flash_platform_data bfin_spi_dataflash_data = {
     .name = "SPI Dataflash",
     .parts = bfin_spi_dataflash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_dataflash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c
b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
index 31498ad..557747f 100644
--- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
@@ -52,7 +52,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c
b/arch/blackfin/mach-bf538/boards/ezkit.c
index c6fb0a5..de9ab68 100644
--- a/arch/blackfin/mach-bf538/boards/ezkit.c
+++ b/arch/blackfin/mach-bf538/boards/ezkit.c
@@ -493,7 +493,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c
b/arch/blackfin/mach-bf548/boards/cm_bf548.c
index f0c0eef..7effe25 100644
--- a/arch/blackfin/mach-bf548/boards/cm_bf548.c
+++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c
@@ -849,7 +849,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c
b/arch/blackfin/mach-bf548/boards/ezkit.c
index 216e269..1ab35e3 100644
--- a/arch/blackfin/mach-bf548/boards/ezkit.c
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -957,7 +957,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf561/boards/acvilon.c
b/arch/blackfin/mach-bf561/boards/acvilon.c
index 0b1c20f..7f69032 100644
--- a/arch/blackfin/mach-bf561/boards/acvilon.c
+++ b/arch/blackfin/mach-bf561/boards/acvilon.c
@@ -359,7 +359,7 @@ static struct mtd_partition
bfin_spi_dataflash_partitions[] = {
      }
 };
 
-static struct flash_platform_data bfin_spi_dataflash_data = {
+static struct spi_flash_platform_data bfin_spi_dataflash_data = {
     .name = "SPI Dataflash",
     .parts = bfin_spi_dataflash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_dataflash_partitions),
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c
b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index 087b6b0..80073ac 100644
--- a/arch/blackfin/mach-bf561/boards/cm_bf561.c
+++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c
@@ -50,7 +50,7 @@ static struct mtd_partition
bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/mips/alchemy/devboards/db1200/platform.c
b/arch/mips/alchemy/devboards/db1200/platform.c
index fbb5593..ea9bf90 100644
--- a/arch/mips/alchemy/devboards/db1200/platform.c
+++ b/arch/mips/alchemy/devboards/db1200/platform.c
@@ -50,7 +50,7 @@ static struct mtd_partition db1200_spiflash_parts[] = {
     },
 };
 
-static struct flash_platform_data db1200_spiflash_data = {
+static struct spi_flash_platform_data db1200_spiflash_data = {
     .name        = "s25fl001",
     .parts        = db1200_spiflash_parts,
     .nr_parts    = ARRAY_SIZE(db1200_spiflash_parts),
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index bf5a002..4244468 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -776,7 +776,7 @@ static const struct spi_device_id *__devinit
jedec_probe(struct spi_device *spi)
 static int __devinit m25p_probe(struct spi_device *spi)
 {
     const struct spi_device_id    *id = spi_get_device_id(spi);
-    struct flash_platform_data    *data;
+    struct spi_flash_platform_data    *data;
     struct m25p            *flash;
     struct flash_info        *info;
     unsigned            i;
diff --git a/drivers/mtd/devices/mtd_dataflash.c
b/drivers/mtd/devices/mtd_dataflash.c
index c5015cc..9cb2727 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -634,7 +634,7 @@ add_dataflash_otp(struct spi_device *spi, char *name,
 {
     struct dataflash        *priv;
     struct mtd_info            *device;
-    struct flash_platform_data    *pdata = spi->dev.platform_data;
+    struct spi_flash_platform_data    *pdata = spi->dev.platform_data;
     char                *otp_tag = "";
     int                err = 0;
 
diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
index 684247a..989758d 100644
--- a/drivers/mtd/devices/sst25l.c
+++ b/drivers/mtd/devices/sst25l.c
@@ -379,7 +379,7 @@ static int __init sst25l_probe(struct spi_device *spi)
 {
     struct flash_info *flash_info;
     struct sst25l_flash *flash;
-    struct flash_platform_data *data;
+    struct spi_flash_platform_data *data;
     int ret, i;
 
     flash_info = sst25l_match_device(spi);
diff --git a/drivers/spi/spi_butterfly.c b/drivers/spi/spi_butterfly.c
index 0d4ceba..a9ac6b2 100644
--- a/drivers/spi/spi_butterfly.c
+++ b/drivers/spi/spi_butterfly.c
@@ -183,7 +183,7 @@ static struct mtd_partition partitions[] = { {
     .size        = MTDPART_SIZ_FULL,
 } };
 
-static struct flash_platform_data flash = {
+static struct spi_flash_platform_data flash = {
     .name        = "butterflash",
     .parts        = partitions,
     .nr_parts    = ARRAY_SIZE(partitions),
diff --git a/include/linux/spi/flash.h b/include/linux/spi/flash.h
index 3f22932..946145e 100644
--- a/include/linux/spi/flash.h
+++ b/include/linux/spi/flash.h
@@ -4,7 +4,7 @@
 struct mtd_partition;
 
 /**
- * struct flash_platform_data: board-specific flash data
+ * struct spi_flash_platform_data: board-specific flash data
  * @name: optional flash device name (eg, as used with mtdparts=)
  * @parts: optional array of mtd_partitions for static partitioning
  * @nr_parts: number of mtd_partitions for static partitoning
@@ -18,7 +18,7 @@ struct mtd_partition;
  * Note that for DataFlash, sizes for pages, blocks, and sectors are
  * rarely powers of two; and partitions should be sector-aligned.
  */
-struct flash_platform_data {
+struct spi_flash_platform_data {
     char        *name;
     struct mtd_partition *parts;
     unsigned int    nr_parts;
-- 
1.7.1


--------------060709080905090008050504
Content-Type: text/x-vcard; charset=utf-8;
 name="alexis_rodet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="alexis_rodet.vcf"

YmVnaW46dmNhcmQNCmZuOkFsZXhpcyBST0RFVA0KbjpST0RFVDtBbGV4aXMNCm9yZzpCcmFp
biBWaXNpb24gU3lzdGVtcw0KYWRyOjs7MzIgcnVlIGR1IEphdmVsb3Q7UEFSSVM7Ozc1MDEz
O0ZSQU5DRQ0KZW1haWw7aW50ZXJuZXQ6YWxleGlzLnJvZGV0QGJ2cy10ZWNoLmNvbQ0KdGl0
bGU6SGFyZHdhcmUgRW5naW5lZXINCnRlbDt3b3JrOiszMyA5IDUzIDkyIDE0IDQxDQp0ZWw7
ZmF4OiszMyA5IDU4IDkyIDE0IDQxDQp4LW1vemlsbGEtaHRtbDpGQUxTRQ0KdXJsOmh0dHA6
Ly93d3cuYnZzLXRlY2guY29tDQp2ZXJzaW9uOjIuMQ0KZW5kOnZjYXJkDQoNCg==
--------------060709080905090008050504--


From baruch at tkos.co.il  Tue Nov 23 04:44:14 2010
From: baruch at tkos.co.il (Baruch Siach)
Date: Tue, 23 Nov 2010 11:44:14 +0200
Subject: [PATCH] Renaming 'struct flash_platform_data' into 'struct
	spi_flash_platform_data' in include/linux/spi/flash.h
In-Reply-To: <4CEB8C39.1060801@bvs-tech.com>
References: <327178.68946.qm@web180303.mail.gq1.yahoo.com>
	<4CEB89C6.3080603@bvs-tech.com>
	<20101123093643.GC6156@jasper.tkos.co.il>
	<4CEB8C39.1060801@bvs-tech.com>
Message-ID: <20101123094414.GD6156@jasper.tkos.co.il>

Hi Alexis,

On Tue, Nov 23, 2010 at 10:41:13AM +0100, Alexis RODET wrote:
> Le 23/11/2010 10:36, Baruch Siach a ?crit :
> > Hi Alexis,
> >
> >> So Here is the patch:
> > [snip]
> >
> >>  -static struct flash_platform_data __initdata my_flash0_platform = {
> >> +static struct spi_flash_platform_data __initdata my_flash0_platform = {
> > Your patch seems to have been mangled by your mailer. A whitespace were added 
> > at the beginning of the line before '-static'.
> >
> > baruch
> >
> I hope mail mailer will respect the copy-paste.

Well, you mailer still breaks lines, e.g.:

> @@ -52,7 +52,7 @@ static struct dsa_platform_data
> mv88f6281gtw_ge_switch_plat_data = {

baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -


From alexis.rodet at bvs-tech.com  Tue Nov 23 04:55:08 2010
From: alexis.rodet at bvs-tech.com (Alexis RODET)
Date: Tue, 23 Nov 2010 10:55:08 +0100
Subject: [PATCH] Renaming 'struct flash_platform_data' into 'struct
	spi_flash_platform_data' in include/linux/spi/flash.h
In-Reply-To: <20101123094414.GD6156@jasper.tkos.co.il>
References: <327178.68946.qm@web180303.mail.gq1.yahoo.com>
	<4CEB89C6.3080603@bvs-tech.com>
	<20101123093643.GC6156@jasper.tkos.co.il>
	<4CEB8C39.1060801@bvs-tech.com>
	<20101123094414.GD6156@jasper.tkos.co.il>
Message-ID: <4CEB8F7C.6070102@bvs-tech.com>

Hi baruch,

I hope this time every thing is OK.

Le 23/11/2010 10:44, Baruch Siach a ?crit :
> Hi Alexis,
> Well, you mailer still breaks lines, e.g.:
>
>> @@ -52,7 +52,7 @@ static struct dsa_platform_data
>> mv88f6281gtw_ge_switch_plat_data = {
> baruch
>

From alexis.rodet at bvs-tech.com  Thu Nov 18 04:34:59 2010
From: alexis.rodet at bvs-tech.com (Alexis RODET)
Date: Thu, 18 Nov 2010 10:34:59 +0100
Subject: [PATCH] Renaming 'struct flash_platform_data' into 'struct spi_flash_platform_data' in include/linux/spi/flash.h
In-Reply-To: <20101117160514.GA5308@n2100.arm.linux.org.uk>
References: <20101117160514.GA5308@n2100.arm.linux.org.uk>
Message-ID: <mailman.24.1290506116.1530.linux-mtd@lists.infradead.org>

Here is the command line used for doing this:
find . \( -name .git -prune -false -o -path ./include/linux/spi/flash.h -o \( -name \*.c -execdir grep -q '#include <linux/spi/flash.h>' \{\} \; \) \) -execdir sed -i -e 's/struct flash_platform_data/struct spi_flash_platform_data/' \{\} \+ -execdir git add \{\} \+ -print
I didn't test all compilation as I don't have blackfin compiler installed and I'm quite lasy and also busy.
I compiled for my x86 with allyesconfig and for Freescale mx27 with allyesconfig minus a number of buggy drivers.

---
 arch/arm/mach-at91/board-cam60.c               |    2 +-
 arch/arm/mach-at91/board-ecbat91.c             |    2 +-
 arch/arm/mach-dove/dove-db-setup.c             |    2 +-
 arch/arm/mach-kirkwood/lacie_v2-common.c       |    2 +-
 arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c |    2 +-
 arch/arm/mach-kirkwood/rd88f6192-nas-setup.c   |    2 +-
 arch/arm/mach-kirkwood/t5325-setup.c           |    2 +-
 arch/arm/mach-kirkwood/tsx1x-common.c          |    2 +-
 arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c   |    2 +-
 arch/arm/mach-w90x900/dev.c                    |    2 +-
 arch/blackfin/mach-bf518/boards/ezbrd.c        |    2 +-
 arch/blackfin/mach-bf518/boards/tcm-bf518.c    |    2 +-
 arch/blackfin/mach-bf527/boards/ad7160eval.c   |    2 +-
 arch/blackfin/mach-bf527/boards/cm_bf527.c     |    2 +-
 arch/blackfin/mach-bf527/boards/ezbrd.c        |    2 +-
 arch/blackfin/mach-bf527/boards/ezkit.c        |    2 +-
 arch/blackfin/mach-bf527/boards/tll6527m.c     |    2 +-
 arch/blackfin/mach-bf533/boards/H8606.c        |    2 +-
 arch/blackfin/mach-bf533/boards/blackstamp.c   |    2 +-
 arch/blackfin/mach-bf533/boards/cm_bf533.c     |    2 +-
 arch/blackfin/mach-bf533/boards/ezkit.c        |    2 +-
 arch/blackfin/mach-bf533/boards/stamp.c        |    2 +-
 arch/blackfin/mach-bf537/boards/cm_bf537e.c    |    2 +-
 arch/blackfin/mach-bf537/boards/cm_bf537u.c    |    2 +-
 arch/blackfin/mach-bf537/boards/minotaur.c     |    2 +-
 arch/blackfin/mach-bf537/boards/pnav10.c       |    2 +-
 arch/blackfin/mach-bf537/boards/stamp.c        |    4 ++--
 arch/blackfin/mach-bf537/boards/tcm_bf537.c    |    2 +-
 arch/blackfin/mach-bf538/boards/ezkit.c        |    2 +-
 arch/blackfin/mach-bf548/boards/cm_bf548.c     |    2 +-
 arch/blackfin/mach-bf548/boards/ezkit.c        |    2 +-
 arch/blackfin/mach-bf561/boards/acvilon.c      |    2 +-
 arch/blackfin/mach-bf561/boards/cm_bf561.c     |    2 +-
 arch/mips/alchemy/devboards/db1200/platform.c  |    2 +-
 drivers/mtd/devices/m25p80.c                   |    2 +-
 drivers/mtd/devices/mtd_dataflash.c            |    2 +-
 drivers/mtd/devices/sst25l.c                   |    2 +-
 drivers/spi/spi_butterfly.c                    |    2 +-
 include/linux/spi/flash.h                      |    4 ++--
 39 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c
index b54e3e6..50780b2 100644
--- a/arch/arm/mach-at91/board-cam60.c
+++ b/arch/arm/mach-at91/board-cam60.c
@@ -98,7 +98,7 @@ static struct mtd_partition cam60_spi_partitions[] = {
     },
 };
 
-static struct flash_platform_data cam60_spi_flash_platform_data = {
+static struct spi_flash_platform_data cam60_spi_flash_platform_data = {
     .name        = "spi_flash",
     .parts        = cam60_spi_partitions,
     .nr_parts    = ARRAY_SIZE(cam60_spi_partitions)
diff --git a/arch/arm/mach-at91/board-ecbat91.c b/arch/arm/mach-at91/board-ecbat91.c
index 7b58c94..8598237 100644
--- a/arch/arm/mach-at91/board-ecbat91.c
+++ b/arch/arm/mach-at91/board-ecbat91.c
@@ -110,7 +110,7 @@ static struct mtd_partition __initdata my_flash0_partitions[] =
     }
 };
 
-static struct flash_platform_data __initdata my_flash0_platform = {
+static struct spi_flash_platform_data __initdata my_flash0_platform = {
     .name        = "Removable flash card",
     .parts        = my_flash0_partitions,
     .nr_parts    = ARRAY_SIZE(my_flash0_partitions)
diff --git a/arch/arm/mach-dove/dove-db-setup.c b/arch/arm/mach-dove/dove-db-setup.c
index 95925aa..90f8f95 100644
--- a/arch/arm/mach-dove/dove-db-setup.c
+++ b/arch/arm/mach-dove/dove-db-setup.c
@@ -40,7 +40,7 @@ static struct mv_sata_platform_data dove_db_sata_data = {
  * SPI Devices:
  *     SPI0: 4M Flash ST-M25P32-VMF6P
  ****************************************************************************/
-static const struct flash_platform_data dove_db_spi_flash_data = {
+static const struct spi_flash_platform_data dove_db_spi_flash_data = {
     .type        = "m25p64",
 };
 
diff --git a/arch/arm/mach-kirkwood/lacie_v2-common.c b/arch/arm/mach-kirkwood/lacie_v2-common.c
index 285edab..b60003f 100644
--- a/arch/arm/mach-kirkwood/lacie_v2-common.c
+++ b/arch/arm/mach-kirkwood/lacie_v2-common.c
@@ -33,7 +33,7 @@ static struct mtd_partition lacie_v2_flash_parts[] = {
     },
 };
 
-static const struct flash_platform_data lacie_v2_flash = {
+static const struct spi_flash_platform_data lacie_v2_flash = {
     .type        = "mx25l4005a",
     .name        = "spi_flash",
     .parts        = lacie_v2_flash_parts,
diff --git a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
index 1e5266f..16356c8 100644
--- a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
+++ b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c
@@ -52,7 +52,7 @@ static struct dsa_platform_data mv88f6281gtw_ge_switch_plat_data = {
     .chip        = &mv88f6281gtw_ge_switch_chip_data,
 };
 
-static const struct flash_platform_data mv88f6281gtw_ge_spi_slave_data = {
+static const struct spi_flash_platform_data mv88f6281gtw_ge_spi_slave_data = {
     .type        = "mx25l12805d",
 };
 
diff --git a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
index 0049614..d3b706f 100644
--- a/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
+++ b/arch/arm/mach-kirkwood/rd88f6192-nas-setup.c
@@ -32,7 +32,7 @@ static struct mv_sata_platform_data rd88f6192_sata_data = {
     .n_ports    = 2,
 };
 
-static const struct flash_platform_data rd88F6192_spi_slave_data = {
+static const struct spi_flash_platform_data rd88F6192_spi_slave_data = {
     .type        = "m25p128",
 };
 
diff --git a/arch/arm/mach-kirkwood/t5325-setup.c b/arch/arm/mach-kirkwood/t5325-setup.c
index ce50e61..d086983 100644
--- a/arch/arm/mach-kirkwood/t5325-setup.c
+++ b/arch/arm/mach-kirkwood/t5325-setup.c
@@ -59,7 +59,7 @@ struct mtd_partition hp_t5325_partitions[] = {
     },
 };
 
-const struct flash_platform_data hp_t5325_flash = {
+const struct spi_flash_platform_data hp_t5325_flash = {
     .type        = "mx25l8005",
     .name        = "spi_flash",
     .parts        = hp_t5325_partitions,
diff --git a/arch/arm/mach-kirkwood/tsx1x-common.c b/arch/arm/mach-kirkwood/tsx1x-common.c
index f781164..14c7825 100644
--- a/arch/arm/mach-kirkwood/tsx1x-common.c
+++ b/arch/arm/mach-kirkwood/tsx1x-common.c
@@ -59,7 +59,7 @@ struct mtd_partition qnap_tsx1x_partitions[] = {
     },
 };
 
-const struct flash_platform_data qnap_tsx1x_flash = {
+const struct spi_flash_platform_data qnap_tsx1x_flash = {
     .type        = "m25p128",
     .name        = "spi_flash",
     .parts        = qnap_tsx1x_partitions,
diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
index 02ff45f..b18bb24 100644
--- a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
+++ b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
@@ -65,7 +65,7 @@ static struct mtd_partition rd88f6183ap_ge_partitions[] = {
     },
 };
 
-static struct flash_platform_data rd88f6183ap_ge_spi_slave_data = {
+static struct spi_flash_platform_data rd88f6183ap_ge_spi_slave_data = {
     .type        = "m25p64",
     .nr_parts    = ARRAY_SIZE(rd88f6183ap_ge_partitions),
     .parts        = rd88f6183ap_ge_partitions,
diff --git a/arch/arm/mach-w90x900/dev.c b/arch/arm/mach-w90x900/dev.c
index 7a1fa6a..12d7f7c 100644
--- a/arch/arm/mach-w90x900/dev.c
+++ b/arch/arm/mach-w90x900/dev.c
@@ -246,7 +246,7 @@ static struct mtd_partition nuc900_spi_flash_partitions[] = {
     },
 };
 
-static struct flash_platform_data nuc900_spi_flash_data = {
+static struct spi_flash_platform_data nuc900_spi_flash_data = {
     .name = "m25p80",
     .parts =  nuc900_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(nuc900_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c b/arch/blackfin/mach-bf518/boards/ezbrd.c
index b894c8a..ded02c1 100644
--- a/arch/blackfin/mach-bf518/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf518/boards/ezbrd.c
@@ -178,7 +178,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf518/boards/tcm-bf518.c b/arch/blackfin/mach-bf518/boards/tcm-bf518.c
index e6ce1d7..66817b0 100644
--- a/arch/blackfin/mach-bf518/boards/tcm-bf518.c
+++ b/arch/blackfin/mach-bf518/boards/tcm-bf518.c
@@ -128,7 +128,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf527/boards/ad7160eval.c b/arch/blackfin/mach-bf527/boards/ad7160eval.c
index fc767ac..c43724b 100644
--- a/arch/blackfin/mach-bf527/boards/ad7160eval.c
+++ b/arch/blackfin/mach-bf527/boards/ad7160eval.c
@@ -254,7 +254,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index 2c31af7..3d5a3dc 100644
--- a/arch/blackfin/mach-bf527/boards/cm_bf527.c
+++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c
@@ -341,7 +341,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c
index 9a736a8..6670939 100644
--- a/arch/blackfin/mach-bf527/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf527/boards/ezbrd.c
@@ -240,7 +240,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index 9222bc0..78a07e7 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -434,7 +434,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf527/boards/tll6527m.c b/arch/blackfin/mach-bf527/boards/tll6527m.c
index 9ec5757..147374b 100644
--- a/arch/blackfin/mach-bf527/boards/tll6527m.c
+++ b/arch/blackfin/mach-bf527/boards/tll6527m.c
@@ -304,7 +304,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c
index 2ce7b16..60ff37f 100644
--- a/arch/blackfin/mach-bf533/boards/H8606.c
+++ b/arch/blackfin/mach-bf533/boards/H8606.c
@@ -149,7 +149,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf533/boards/blackstamp.c b/arch/blackfin/mach-bf533/boards/blackstamp.c
index 20c1022..cbdcca1 100644
--- a/arch/blackfin/mach-bf533/boards/blackstamp.c
+++ b/arch/blackfin/mach-bf533/boards/blackstamp.c
@@ -93,7 +93,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index adbe62a..6448686 100644
--- a/arch/blackfin/mach-bf533/boards/cm_bf533.c
+++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c
@@ -49,7 +49,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c
index a1cb8e7..4e1ee73 100644
--- a/arch/blackfin/mach-bf533/boards/ezkit.c
+++ b/arch/blackfin/mach-bf533/boards/ezkit.c
@@ -200,7 +200,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index b3b1cde..8554b38 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -163,7 +163,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537e.c b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
index 836698c..c1bb193 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537e.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
@@ -51,7 +51,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537u.c b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
index 2a85670..da1886e 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537u.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
@@ -52,7 +52,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/minotaur.c b/arch/blackfin/mach-bf537/boards/minotaur.c
index 4980051..c360f10 100644
--- a/arch/blackfin/mach-bf537/boards/minotaur.c
+++ b/arch/blackfin/mach-bf537/boards/minotaur.c
@@ -149,7 +149,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c
index b958078..aab7edd 100644
--- a/arch/blackfin/mach-bf537/boards/pnav10.c
+++ b/arch/blackfin/mach-bf537/boards/pnav10.c
@@ -174,7 +174,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 3aa344c..633cbf0 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -526,7 +526,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
@@ -1003,7 +1003,7 @@ static struct mtd_partition bfin_spi_dataflash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_dataflash_data = {
+static struct spi_flash_platform_data bfin_spi_dataflash_data = {
     .name = "SPI Dataflash",
     .parts = bfin_spi_dataflash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_dataflash_partitions),
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
index 31498ad..557747f 100644
--- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
@@ -52,7 +52,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c b/arch/blackfin/mach-bf538/boards/ezkit.c
index c6fb0a5..de9ab68 100644
--- a/arch/blackfin/mach-bf538/boards/ezkit.c
+++ b/arch/blackfin/mach-bf538/boards/ezkit.c
@@ -493,7 +493,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c
index f0c0eef..7effe25 100644
--- a/arch/blackfin/mach-bf548/boards/cm_bf548.c
+++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c
@@ -849,7 +849,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c
index 216e269..1ab35e3 100644
--- a/arch/blackfin/mach-bf548/boards/ezkit.c
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -957,7 +957,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/blackfin/mach-bf561/boards/acvilon.c b/arch/blackfin/mach-bf561/boards/acvilon.c
index 0b1c20f..7f69032 100644
--- a/arch/blackfin/mach-bf561/boards/acvilon.c
+++ b/arch/blackfin/mach-bf561/boards/acvilon.c
@@ -359,7 +359,7 @@ static struct mtd_partition bfin_spi_dataflash_partitions[] = {
      }
 };
 
-static struct flash_platform_data bfin_spi_dataflash_data = {
+static struct spi_flash_platform_data bfin_spi_dataflash_data = {
     .name = "SPI Dataflash",
     .parts = bfin_spi_dataflash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_dataflash_partitions),
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c
index 087b6b0..80073ac 100644
--- a/arch/blackfin/mach-bf561/boards/cm_bf561.c
+++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c
@@ -50,7 +50,7 @@ static struct mtd_partition bfin_spi_flash_partitions[] = {
     }
 };
 
-static struct flash_platform_data bfin_spi_flash_data = {
+static struct spi_flash_platform_data bfin_spi_flash_data = {
     .name = "m25p80",
     .parts = bfin_spi_flash_partitions,
     .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
diff --git a/arch/mips/alchemy/devboards/db1200/platform.c b/arch/mips/alchemy/devboards/db1200/platform.c
index fbb5593..ea9bf90 100644
--- a/arch/mips/alchemy/devboards/db1200/platform.c
+++ b/arch/mips/alchemy/devboards/db1200/platform.c
@@ -50,7 +50,7 @@ static struct mtd_partition db1200_spiflash_parts[] = {
     },
 };
 
-static struct flash_platform_data db1200_spiflash_data = {
+static struct spi_flash_platform_data db1200_spiflash_data = {
     .name        = "s25fl001",
     .parts        = db1200_spiflash_parts,
     .nr_parts    = ARRAY_SIZE(db1200_spiflash_parts),
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index bf5a002..4244468 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -776,7 +776,7 @@ static const struct spi_device_id *__devinit jedec_probe(struct spi_device *spi)
 static int __devinit m25p_probe(struct spi_device *spi)
 {
     const struct spi_device_id    *id = spi_get_device_id(spi);
-    struct flash_platform_data    *data;
+    struct spi_flash_platform_data    *data;
     struct m25p            *flash;
     struct flash_info        *info;
     unsigned            i;
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index c5015cc..9cb2727 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -634,7 +634,7 @@ add_dataflash_otp(struct spi_device *spi, char *name,
 {
     struct dataflash        *priv;
     struct mtd_info            *device;
-    struct flash_platform_data    *pdata = spi->dev.platform_data;
+    struct spi_flash_platform_data    *pdata = spi->dev.platform_data;
     char                *otp_tag = "";
     int                err = 0;
 
diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
index 684247a..989758d 100644
--- a/drivers/mtd/devices/sst25l.c
+++ b/drivers/mtd/devices/sst25l.c
@@ -379,7 +379,7 @@ static int __init sst25l_probe(struct spi_device *spi)
 {
     struct flash_info *flash_info;
     struct sst25l_flash *flash;
-    struct flash_platform_data *data;
+    struct spi_flash_platform_data *data;
     int ret, i;
 
     flash_info = sst25l_match_device(spi);
diff --git a/drivers/spi/spi_butterfly.c b/drivers/spi/spi_butterfly.c
index 0d4ceba..a9ac6b2 100644
--- a/drivers/spi/spi_butterfly.c
+++ b/drivers/spi/spi_butterfly.c
@@ -183,7 +183,7 @@ static struct mtd_partition partitions[] = { {
     .size        = MTDPART_SIZ_FULL,
 } };
 
-static struct flash_platform_data flash = {
+static struct spi_flash_platform_data flash = {
     .name        = "butterflash",
     .parts        = partitions,
     .nr_parts    = ARRAY_SIZE(partitions),
diff --git a/include/linux/spi/flash.h b/include/linux/spi/flash.h
index 3f22932..946145e 100644
--- a/include/linux/spi/flash.h
+++ b/include/linux/spi/flash.h
@@ -4,7 +4,7 @@
 struct mtd_partition;
 
 /**
- * struct flash_platform_data: board-specific flash data
+ * struct spi_flash_platform_data: board-specific flash data
  * @name: optional flash device name (eg, as used with mtdparts=)
  * @parts: optional array of mtd_partitions for static partitioning
  * @nr_parts: number of mtd_partitions for static partitoning
@@ -18,7 +18,7 @@ struct mtd_partition;
  * Note that for DataFlash, sizes for pages, blocks, and sectors are
  * rarely powers of two; and partitions should be sector-aligned.
  */
-struct flash_platform_data {
+struct spi_flash_platform_data {
     char        *name;
     struct mtd_partition *parts;
     unsigned int    nr_parts;
-- 
1.7.1


--------------030503060802050707000105
Content-Type: text/x-vcard; charset=utf-8;
 name="alexis_rodet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="alexis_rodet.vcf"

YmVnaW46dmNhcmQNCmZuOkFsZXhpcyBST0RFVA0KbjpST0RFVDtBbGV4aXMNCm9yZzpCcmFp
biBWaXNpb24gU3lzdGVtcw0KYWRyOjs7MzIgcnVlIGR1IEphdmVsb3Q7UEFSSVM7Ozc1MDEz
O0ZSQU5DRQ0KZW1haWw7aW50ZXJuZXQ6YWxleGlzLnJvZGV0QGJ2cy10ZWNoLmNvbQ0KdGl0
bGU6SGFyZHdhcmUgRW5naW5lZXINCnRlbDt3b3JrOiszMyA5IDUzIDkyIDE0IDQxDQp0ZWw7
ZmF4OiszMyA5IDU4IDkyIDE0IDQxDQp4LW1vemlsbGEtaHRtbDpGQUxTRQ0KdXJsOmh0dHA6
Ly93d3cuYnZzLXRlY2guY29tDQp2ZXJzaW9uOjIuMQ0KZW5kOnZjYXJkDQoNCg==
--------------030503060802050707000105--


From roman.tereshonkov at nokia.com  Tue Nov 23 07:17:17 2010
From: roman.tereshonkov at nokia.com (Roman Tereshonkov)
Date: Tue, 23 Nov 2010 14:17:17 +0200
Subject: [PATCH] mtd: mtdchar/mtdpart: fix master device identification for
	mtd repartition
Message-ID: <1290514637-15869-1-git-send-email-roman.tereshonkov@nokia.com>

Function mtd_has_master renamed as mtd_is_partition to follow the function logic.
The patch fixes the problem of checking the right mtd device for partition creation.
To delete partition checking is not needed here so as it is done in mtd_del_partition.
By master we consider the mtd device which does not belong to any partition.

Signed-off-by: Roman Tereshonkov <roman.tereshonkov at nokia.com>
---
 drivers/mtd/mtdchar.c          |    8 ++++----
 drivers/mtd/mtdpart.c          |   10 +++++-----
 include/linux/mtd/partitions.h |    2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index 4759d82..9fe3df5 100644
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -522,10 +522,6 @@ static int mtd_blkpg_ioctl(struct mtd_info *mtd,
 	if (!capable(CAP_SYS_ADMIN))
 		return -EPERM;
 
-	/* Only master mtd device must be used to control partitions */
-	if (!mtd_is_master(mtd))
-		return -EINVAL;
-
 	if (copy_from_user(&a, arg, sizeof(struct blkpg_ioctl_arg)))
 		return -EFAULT;
 
@@ -535,6 +531,10 @@ static int mtd_blkpg_ioctl(struct mtd_info *mtd,
 	switch (a.op) {
 	case BLKPG_ADD_PARTITION:
 
+		/* Only master mtd device must be used to add partitions */
+		if (mtd_is_partition(mtd))
+			return -EINVAL;
+
 		return mtd_add_partition(mtd, p.devname, p.start, p.length);
 
 	case BLKPG_DEL_PARTITION:
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 79e3689..1047ff0 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -720,19 +720,19 @@ int parse_mtd_partitions(struct mtd_info *master, const char **types,
 }
 EXPORT_SYMBOL_GPL(parse_mtd_partitions);
 
-int mtd_is_master(struct mtd_info *mtd)
+int mtd_is_partition(struct mtd_info *mtd)
 {
 	struct mtd_part *part;
-	int nopart = 0;
+	int ispart = 0;
 
 	mutex_lock(&mtd_partitions_mutex);
 	list_for_each_entry(part, &mtd_partitions, list)
 		if (&part->mtd == mtd) {
-			nopart = 1;
+			ispart = 1;
 			break;
 		}
 	mutex_unlock(&mtd_partitions_mutex);
 
-	return nopart;
+	return ispart;
 }
-EXPORT_SYMBOL_GPL(mtd_is_master);
+EXPORT_SYMBOL_GPL(mtd_is_partition);
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h
index 2b54316..4a0a8ba 100644
--- a/include/linux/mtd/partitions.h
+++ b/include/linux/mtd/partitions.h
@@ -89,7 +89,7 @@ static inline int mtd_has_cmdlinepart(void) { return 1; }
 static inline int mtd_has_cmdlinepart(void) { return 0; }
 #endif
 
-int mtd_is_master(struct mtd_info *mtd);
+int mtd_is_partition(struct mtd_info *mtd);
 int mtd_add_partition(struct mtd_info *master, char *name,
 		      long long offset, long long length);
 int mtd_del_partition(struct mtd_info *master, int partno);
-- 
1.7.0.4



From Sergej.Stepanov at ids.de  Tue Nov 23 12:38:36 2010
From: Sergej.Stepanov at ids.de (Sergej.Stepanov at ids.de)
Date: Tue, 23 Nov 2010 18:38:36 +0100
Subject: [PATCH][v2] Fixing the garbage collector problem after NAND-flash
	image record in u-boot
Message-ID: <4206182445660643B9AEB8D4E55BBD0A106A0AA93A@HERMES2>

This patch should fix the following problem:
 1. the  jffs2-image update in the u-boot was ok
 2. first restart and first mount of the NAND-flash-partition was also ok
 3. before the restart of controller there are no any activity on NAND-flash except of the jffs2_gcd_mtdX-process ...
 4. BUT after the second restart the NAND-flash-partition could not be really used after the second mount,
    dmesg filled with messages:
...
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x03ce0000: 0xc0ff instead
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x03d00000: 0xc0ff instead
....
Just for for info:
the behaviour observed on mpc8313-based board with the large-page NAND.
The only activity on NAND-flash was the garbage collector process, that looks for CLEANMARKER-nodes

As Scott said it was broken by commit 3ab8f2a2e7011c5e83363b42950757e46ef06824

Signed-off-by: Sergej Stepanov <Sergej.Stepanov at ids.de>
Cc: Rolf Riehle <Rolf.Riehle at ids.de>
Cc: Scott Wood <scottwood at freescale.com>
Cc: David Woodhouse <dwmw2 at infradead.org>
--

diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
index c141b07..7a13d42 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -388,6 +388,8 @@ static void fsl_elbc_cmdfunc(struct mtd_info *mtd, unsigned int command,
 		         "page_addr: 0x%x, column: 0x%x.\n",
 		         page_addr, column);
 
+		elbc_fcm_ctrl->column = column;
+		elbc_fcm_ctrl->oob = 0;
 		elbc_fcm_ctrl->use_mdr = 1;
 
 		fcr = (NAND_CMD_STATUS   << FCR_CMD1_SHIFT) |


From fabio.estevam at freescale.com  Tue Nov 23 14:02:13 2010
From: fabio.estevam at freescale.com (Fabio Estevam)
Date: Tue, 23 Nov 2010 17:02:13 -0200
Subject: [PATCH] mtd: mxc_nand: Fix warning on nr_parts unused variable
Message-ID: <1290538933-12607-1-git-send-email-fabio.estevam@freescale.com>

If CONFIG_MTD_PARTITIONS is not selected, then the following warning is generated:

  CC      drivers/mtd/nand/mxc_nand.o
drivers/mtd/nand/mxc_nand.c: In function 'mxcnd_probe':
drivers/mtd/nand/mxc_nand.c:1014: warning: unused variable 'nr_parts'

Fix it by marking nr_parts as __maybe_unused.

Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
---
 drivers/mtd/nand/mxc_nand.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index 214b03a..ef932ba 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -1009,7 +1009,7 @@ static int __init mxcnd_probe(struct platform_device *pdev)
 	struct mxc_nand_platform_data *pdata = pdev->dev.platform_data;
 	struct mxc_nand_host *host;
 	struct resource *res;
-	int err = 0, nr_parts = 0;
+	int err = 0, __maybe_unused nr_parts = 0;
 	struct nand_ecclayout *oob_smallpage, *oob_largepage;
 
 	/* Allocate memory for MTD device structure and private data */
-- 
1.6.0.4




From vapier.adi at gmail.com  Wed Nov 24 02:50:42 2010
From: vapier.adi at gmail.com (Mike Frysinger)
Date: Wed, 24 Nov 2010 02:50:42 -0500
Subject: Suggested patch: reset errno after isatty()
In-Reply-To: <AANLkTim7TT8ydMiSX8B2ehJP2kQ6jtGSnEZU98AZjWUf@mail.gmail.com>
References: <AANLkTimwumfui-_T1ScDYwMLKbNh1ia-SDMUg56wTfN5@mail.gmail.com>
	<4CD11C03.3090207@parrot.com>
	<AANLkTimfxjrtV4eks5tK68h6TQ20soib+6gaTC+QyB4a@mail.gmail.com>
	<AANLkTinSj2vAJJjeSxF-rvq08OVsnw3YcpRSpuOfv9pQ@mail.gmail.com>
	<AANLkTikQtNwsPkJSkmpmC=kMZpmdqHDW0HROeUBNDOEi@mail.gmail.com>
	<1289646433.2218.22.camel@localhost>
	<1289649338.2218.42.camel@localhost>
	<AANLkTink+0WvCmQWwd4+Vf8TETjR5-6BsGU=a071Rk0+@mail.gmail.com>
	<AANLkTim7TT8ydMiSX8B2ehJP2kQ6jtGSnEZU98AZjWUf@mail.gmail.com>
Message-ID: <AANLkTimHCBNCcc3suXv4kJ4+MXUSf5Tw2r876A7tqtoL@mail.gmail.com>

On Thu, Nov 18, 2010 at 06:13, Ketil Froyn wrote:
> On Wed, Nov 17, 2010 at 4:50 PM, Ketil Froyn wrote:
>> I've done some digging around in the new code, but I haven't worked
>> out exactly why the OOB size is set to 0. I haven't figured out
>> exactly what it does yet... Or could it have anything to do with my
>> build environment?
>
> I rebuilt nanddump from v1.4.1 with my patches using the CodeSourcery
> toolchain (I'd been using the AOSP toolchain before). It works fine,
> so I guess that rules out problems in my build environment. Here's
> what the run looks like:
>
> / # nanddump-old -f /sdcard/mtd5.dump /dev/mtd/mtd5
> ECC failed: 0
> ECC corrected: 0
> Number of bad blocks: 0
> Number of bbt blocks: 0
> Block size 131072, page size 2048, OOB size 56
> Dumping data starting at 0x00000000 and ending at 0x0a5c0000...
> / #

so you'll want to dive into the ioctls to see what isnt working right.
 strace is your friend.

> This particular system appears to use MTD partitioning, maybe
> redboot(?) or something like that. I haven't had the opportunity to
> delve into how that works yet - could it be that the partitioning
> takes 8 bytes of the OOB?

no
-mike


From ketil at froyn.name  Wed Nov 24 04:59:01 2010
From: ketil at froyn.name (Ketil Froyn)
Date: Wed, 24 Nov 2010 10:59:01 +0100
Subject: Suggested patch: reset errno after isatty()
In-Reply-To: <AANLkTimHCBNCcc3suXv4kJ4+MXUSf5Tw2r876A7tqtoL@mail.gmail.com>
References: <AANLkTimwumfui-_T1ScDYwMLKbNh1ia-SDMUg56wTfN5@mail.gmail.com>
	<4CD11C03.3090207@parrot.com>
	<AANLkTimfxjrtV4eks5tK68h6TQ20soib+6gaTC+QyB4a@mail.gmail.com>
	<AANLkTinSj2vAJJjeSxF-rvq08OVsnw3YcpRSpuOfv9pQ@mail.gmail.com>
	<AANLkTikQtNwsPkJSkmpmC=kMZpmdqHDW0HROeUBNDOEi@mail.gmail.com>
	<1289646433.2218.22.camel@localhost>
	<1289649338.2218.42.camel@localhost>
	<AANLkTink+0WvCmQWwd4+Vf8TETjR5-6BsGU=a071Rk0+@mail.gmail.com>
	<AANLkTim7TT8ydMiSX8B2ehJP2kQ6jtGSnEZU98AZjWUf@mail.gmail.com>
	<AANLkTimHCBNCcc3suXv4kJ4+MXUSf5Tw2r876A7tqtoL@mail.gmail.com>
Message-ID: <AANLkTinzqwsEFoG+Z0S0ep7JN3p4jHugkHhN-J19Y3cn@mail.gmail.com>

On Wed, Nov 24, 2010 at 8:50 AM, Mike Frysinger <vapier.adi at gmail.com> wrote:
> On Thu, Nov 18, 2010 at 06:13, Ketil Froyn wrote:
>
> so you'll want to dive into the ioctls to see what isnt working right.
> ?strace is your friend.

Thanks for the kick. I had tried that, but for some reason strace was
dying with the error "syscall: unknown syscall trap 0xe8bd8008". A
little more searching now led me to this patch, which fixed it for me:

http://www.fluff.org/ben/patches/strace/strace-fix-arm-bad-syscall.patch

Anyway, here's the full output:

execve("/system/nanddump", ["/system/nanddump", "-f", "/sdcard/dump",
"/dev/mtd/mtd5"], [/* 6 vars */]) = 0
uname({sys="Linux", node="localhost", ...}) = 0
brk(0)                                  = 0x94000
brk(0x94d00)                            = 0x94d00
syscall_983045(0x944c0, 0x917d0, 0xffffffe0, 0x10, 0x92048, 0x8, 0x10,
0xf0005, 0x9185c, 0x4, 0x28, 0x944c0, 0, 0xbeccad00, 0xe474, 0xe484,
0x40000010, 0x944c0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) = 0
brk(0xb5d00)                            = 0xb5d00
brk(0xb6000)                            = 0xb6000
open("/sys/class/mtd", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|0x80000) = 3
fcntl64(3, F_GETFD)                     = 0x1 (flags FD_CLOEXEC)
pivot_root(0x3, "")                     = 384
close(3)                                = 0
open("/sys/class/mtd/mtd0/name", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No
such file or directory)
open("/dev/mtd/mtd5", O_RDONLY|O_LARGEFILE) = 3
stat64("/dev/mtd/mtd5", {st_mode=S_IFCHR|0600, st_rdev=makedev(90,
10), ...}) = 0
open("/dev/mtd/mtd5", O_RDWR|O_LARGEFILE) = 4
ioctl(4, 0x80204d01, 0xbecca978)        = 0
ioctl(4, 0x40084d0b, 0xbecca998)        = 0
close(4)                                = 0
open("/proc/mtd", O_RDONLY|O_LARGEFILE) = 4
read(4, "dev:    size   erasesize  name\nmtd0: 00040000 00020000
\"misc\"\nmtd1: 00500000 00020000 \"recovery\"\nmtd2: 00280000
00020000 \"boot\"\nmtd3: 0aa00000 00020000 \"system\"\nmtd4: 08200000
00020000 \"cache\"\nmtd5: 0a5c0000 00020000 \"userdata\"\n", 4096) =
228
close(4)                                = 0
ioctl(3, 0x80104d12, 0xbeccacfc)        = 0
write(2, "ECC failed: 0\n", 14)         = 14
write(2, "ECC corrected: 0\n", 17)      = 17
write(2, "Number of bad blocks: 0\n", 24) = 24
write(2, "Number of bbt blocks: 0\n", 24) = 24
open("/sdcard/dump", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0644) = 4
ioctl(4, TCGETS or SNDCTL_TMR_TIMEBASE, 0xbecca9ec) = -1 ENOTTY (Not a
typewriter)
write(2, "Block size 131072, page size 2048, OOB size 0\n", 46) = 46
write(2, "Dumping data starting at 0x00000000 and ending at
0x0a5c0000...\n", 64) = 64
ioctl(3, 0x40084d0b, 0xbeccaa48)        = 0
_llseek(3, 0, [0], SEEK_SET)            = 0
read(3, "[snip]"..., 2048) = 2048
ioctl(3, 0x80104d12, 0xbeccacec)        = 0
write(4, "[snip]"..., 2048) = 2048
ioctl(3, 0xc0184d16, 0xbecca9e8)        = -1 ENOTTY (Not a typewriter)
ioctl(3, 0xc00c4d04 <unfinished ...>
+++ killed by SIGSEGV +++

The old version of nanddump (with my patches) works fine on the same
system. It looks like this:

execve("/system/nanddump-old", ["/system/nanddump-old", "-f",
"/sdcard/old-dump", "/dev/mtd/mtd5"], [/* 6 vars */]) = 0
uname({sys="Linux", node="localhost", ...}) = 0
brk(0)                                  = 0x96000
brk(0x96d00)                            = 0x96d00
syscall_983045(0x964c0, 0x92010, 0xffffffe0, 0x10, 0x939a0, 0x8, 0x10,
0xf0005, 0x920c8, 0x4, 0x28, 0x964c0, 0, 0xbeeb6cf0, 0xb0b4, 0xb0c4,
0x40000010, 0x964c0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) = 0
brk(0xb7d00)                            = 0xb7d00
brk(0xb8000)                            = 0xb8000
open("/dev/mtd/mtd5", O_RDONLY|O_LARGEFILE) = 3
ioctl(3, 0x80204d01, 0xbeeb6ca4)        = 0
ioctl(3, 0x80104d12, 0xbeeb6cd4)        = 0
write(2, "ECC failed: 0\n", 14)         = 14
write(2, "ECC corrected: 0\n", 17)      = 17
write(2, "Number of bad blocks: 0\n", 24) = 24
write(2, "Number of bbt blocks: 0\n", 24) = 24
open("/sdcard/old-dump", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0644) = 4
ioctl(4, TCGETS or SNDCTL_TMR_TIMEBASE, 0xbeeb6aec) = -1 ENOTTY (Not a
typewriter)
write(2, "Block size 131072, page size 2048, OOB size 56\n", 47) = 47
write(2, "Dumping data starting at 0x00000000 and ending at
0x0a5c0000...\n", 64) = 64
ioctl(3, 0x40084d0b, 0xbeeb6cf0)        = 0
read(3, "[snip]"..., 2048) = 2048
ioctl(3, 0x80104d12, 0xbeeb6cc4)        = 0
write(4, "[snip]"..., 2048) = 2048
ioctl(3, 0xc00c4d04, 0xbeeb6ce4)        = 0
write(4, "[snip]", 56) = 56
read(3, "[snip]"..., 2048) = 2048
ioctl(3, 0x80104d12, 0xbeeb6cc4)        = 0
write(4, "[snip]"..., 2048) = 2048
ioctl(3, 0xc00c4d04, 0xbeeb6ce4)        = 0
write(4, "[snip]", 56) = 56
etc...

>> This particular system appears to use MTD partitioning, maybe
>> redboot(?) or something like that. I haven't had the opportunity to
>> delve into how that works yet - could it be that the partitioning
>> takes 8 bytes of the OOB?
>
> no

Thanks for the clarification. I guess those are the actual physical
parameters, then.

Cheers, Ketil


From dedekind1 at gmail.com  Wed Nov 24 09:12:39 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Wed, 24 Nov 2010 16:12:39 +0200
Subject: Suggested patch: reset errno after isatty()
In-Reply-To: <AANLkTinzqwsEFoG+Z0S0ep7JN3p4jHugkHhN-J19Y3cn@mail.gmail.com>
References: <AANLkTimwumfui-_T1ScDYwMLKbNh1ia-SDMUg56wTfN5@mail.gmail.com>
	<4CD11C03.3090207@parrot.com>
	<AANLkTimfxjrtV4eks5tK68h6TQ20soib+6gaTC+QyB4a@mail.gmail.com>
	<AANLkTinSj2vAJJjeSxF-rvq08OVsnw3YcpRSpuOfv9pQ@mail.gmail.com>
	<AANLkTikQtNwsPkJSkmpmC=kMZpmdqHDW0HROeUBNDOEi@mail.gmail.com>
	<1289646433.2218.22.camel@localhost>
	<1289649338.2218.42.camel@localhost>
	<AANLkTink+0WvCmQWwd4+Vf8TETjR5-6BsGU=a071Rk0+@mail.gmail.com>
	<AANLkTim7TT8ydMiSX8B2ehJP2kQ6jtGSnEZU98AZjWUf@mail.gmail.com>
	<AANLkTimHCBNCcc3suXv4kJ4+MXUSf5Tw2r876A7tqtoL@mail.gmail.com>
	<AANLkTinzqwsEFoG+Z0S0ep7JN3p4jHugkHhN-J19Y3cn@mail.gmail.com>
Message-ID: <1290607959.2793.11.camel@localhost>

On Wed, 2010-11-24 at 10:59 +0100, Ketil Froyn wrote:
> On Wed, Nov 24, 2010 at 8:50 AM, Mike Frysinger <vapier.adi at gmail.com> wrote:
> > On Thu, Nov 18, 2010 at 06:13, Ketil Froyn wrote:
> >
> > so you'll want to dive into the ioctls to see what isnt working right.
> >  strace is your friend.
> 
> Thanks for the kick. I had tried that, but for some reason strace was
> dying with the error "syscall: unknown syscall trap 0xe8bd8008". A
> little more searching now led me to this patch, which fixed it for me:
> 
> http://www.fluff.org/ben/patches/strace/strace-fix-arm-bad-syscall.patch
> 
> Anyway, here's the full output:

So it dies very soon. You should easily find the line of code where this
happens with gdb. Just compile nanddump with -g -O0

But I guess we are calling some new ioctl on the system which does not
support it, and do not fall-back to the new ioctl. We tried to be
careful about this, though.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From ketil at froyn.name  Wed Nov 24 09:30:39 2010
From: ketil at froyn.name (Ketil Froyn)
Date: Wed, 24 Nov 2010 15:30:39 +0100
Subject: Suggested patch: reset errno after isatty()
In-Reply-To: <1290607959.2793.11.camel@localhost>
References: <AANLkTimwumfui-_T1ScDYwMLKbNh1ia-SDMUg56wTfN5@mail.gmail.com>
	<4CD11C03.3090207@parrot.com>
	<AANLkTimfxjrtV4eks5tK68h6TQ20soib+6gaTC+QyB4a@mail.gmail.com>
	<AANLkTinSj2vAJJjeSxF-rvq08OVsnw3YcpRSpuOfv9pQ@mail.gmail.com>
	<AANLkTikQtNwsPkJSkmpmC=kMZpmdqHDW0HROeUBNDOEi@mail.gmail.com>
	<1289646433.2218.22.camel@localhost>
	<1289649338.2218.42.camel@localhost>
	<AANLkTink+0WvCmQWwd4+Vf8TETjR5-6BsGU=a071Rk0+@mail.gmail.com>
	<AANLkTim7TT8ydMiSX8B2ehJP2kQ6jtGSnEZU98AZjWUf@mail.gmail.com>
	<AANLkTimHCBNCcc3suXv4kJ4+MXUSf5Tw2r876A7tqtoL@mail.gmail.com>
	<AANLkTinzqwsEFoG+Z0S0ep7JN3p4jHugkHhN-J19Y3cn@mail.gmail.com>
	<1290607959.2793.11.camel@localhost>
Message-ID: <AANLkTinTpe=niqS87JRR4h53TJ803ohs3e2MwiVFstgR@mail.gmail.com>

On Wed, Nov 24, 2010 at 3:12 PM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
>
> So it dies very soon. You should easily find the line of code where this
> happens with gdb. Just compile nanddump with -g -O0

It's just that I have limited tools on my device where this happens.
But I've finally pinned it!

There's a couple of issues, I guess. Firstly, calling mtd_read_oob()
with an oob_size of 0 segfaults, which I guess it shouldn't. I haven't
looked into that. The problem here was that the oob_size was set to 0,
and that happens because the legacy code forgot to set it. This patch
fixes it for me:

diff --git a/lib/libmtd_legacy.c b/lib/libmtd_legacy.c
index 7488275..d6c3938 100644
--- a/lib/libmtd_legacy.c
+++ b/lib/libmtd_legacy.c
@@ -261,6 +261,7 @@ int legacy_get_dev_info(const char *node, struct
mtd_dev_info *mtd)
        mtd->size = ui.size;
        mtd->eb_size = ui.erasesize;
        mtd->min_io_size = ui.writesize;
+       mtd->oob_size = ui.oobsize;

        if (mtd->min_io_size <= 0) {
                errmsg("mtd%d (%s) has insane min. I/O unit size %d",


Cheers, Ketil


From vapier.adi at gmail.com  Wed Nov 24 16:36:04 2010
From: vapier.adi at gmail.com (Mike Frysinger)
Date: Wed, 24 Nov 2010 16:36:04 -0500
Subject: Suggested patch: reset errno after isatty()
In-Reply-To: <AANLkTinTpe=niqS87JRR4h53TJ803ohs3e2MwiVFstgR@mail.gmail.com>
References: <AANLkTimwumfui-_T1ScDYwMLKbNh1ia-SDMUg56wTfN5@mail.gmail.com>
	<4CD11C03.3090207@parrot.com>
	<AANLkTimfxjrtV4eks5tK68h6TQ20soib+6gaTC+QyB4a@mail.gmail.com>
	<AANLkTinSj2vAJJjeSxF-rvq08OVsnw3YcpRSpuOfv9pQ@mail.gmail.com>
	<AANLkTikQtNwsPkJSkmpmC=kMZpmdqHDW0HROeUBNDOEi@mail.gmail.com>
	<1289646433.2218.22.camel@localhost>
	<1289649338.2218.42.camel@localhost>
	<AANLkTink+0WvCmQWwd4+Vf8TETjR5-6BsGU=a071Rk0+@mail.gmail.com>
	<AANLkTim7TT8ydMiSX8B2ehJP2kQ6jtGSnEZU98AZjWUf@mail.gmail.com>
	<AANLkTimHCBNCcc3suXv4kJ4+MXUSf5Tw2r876A7tqtoL@mail.gmail.com>
	<AANLkTinzqwsEFoG+Z0S0ep7JN3p4jHugkHhN-J19Y3cn@mail.gmail.com>
	<1290607959.2793.11.camel@localhost>
	<AANLkTinTpe=niqS87JRR4h53TJ803ohs3e2MwiVFstgR@mail.gmail.com>
Message-ID: <AANLkTi=sKOzXnr-CZLvu_XP4gm5y15pL0HxS+=-=2ij7@mail.gmail.com>

On Wed, Nov 24, 2010 at 09:30, Ketil Froyn wrote:
> On Wed, Nov 24, 2010 at 3:12 PM, Artem Bityutskiy wrote:
>>
>> So it dies very soon. You should easily find the line of code where this
>> happens with gdb. Just compile nanddump with -g -O0
>
> It's just that I have limited tools on my device where this happens.
> But I've finally pinned it!
>
> There's a couple of issues, I guess. Firstly, calling mtd_read_oob()
> with an oob_size of 0 segfaults, which I guess it shouldn't. I haven't
> looked into that. The problem here was that the oob_size was set to 0,
> and that happens because the legacy code forgot to set it. This patch
> fixes it for me:

awesome.  can you post your signed-off-by tag and/or a proper git patch please ?
-mike


From ketil at froyn.name  Thu Nov 25 03:58:01 2010
From: ketil at froyn.name (Ketil Froyn)
Date: Thu, 25 Nov 2010 09:58:01 +0100
Subject: Suggested patch: reset errno after isatty()
In-Reply-To: <AANLkTi=sKOzXnr-CZLvu_XP4gm5y15pL0HxS+=-=2ij7@mail.gmail.com>
References: <AANLkTimwumfui-_T1ScDYwMLKbNh1ia-SDMUg56wTfN5@mail.gmail.com>
	<4CD11C03.3090207@parrot.com>
	<AANLkTimfxjrtV4eks5tK68h6TQ20soib+6gaTC+QyB4a@mail.gmail.com>
	<AANLkTinSj2vAJJjeSxF-rvq08OVsnw3YcpRSpuOfv9pQ@mail.gmail.com>
	<AANLkTikQtNwsPkJSkmpmC=kMZpmdqHDW0HROeUBNDOEi@mail.gmail.com>
	<1289646433.2218.22.camel@localhost>
	<1289649338.2218.42.camel@localhost>
	<AANLkTink+0WvCmQWwd4+Vf8TETjR5-6BsGU=a071Rk0+@mail.gmail.com>
	<AANLkTim7TT8ydMiSX8B2ehJP2kQ6jtGSnEZU98AZjWUf@mail.gmail.com>
	<AANLkTimHCBNCcc3suXv4kJ4+MXUSf5Tw2r876A7tqtoL@mail.gmail.com>
	<AANLkTinzqwsEFoG+Z0S0ep7JN3p4jHugkHhN-J19Y3cn@mail.gmail.com>
	<1290607959.2793.11.camel@localhost>
	<AANLkTinTpe=niqS87JRR4h53TJ803ohs3e2MwiVFstgR@mail.gmail.com>
	<AANLkTi=sKOzXnr-CZLvu_XP4gm5y15pL0HxS+=-=2ij7@mail.gmail.com>
Message-ID: <AANLkTikSEH4SOTYv9oqniP6-pPtRc0Y=M2+8hvdAirRg@mail.gmail.com>

On Wed, Nov 24, 2010 at 10:36 PM, Mike Frysinger <vapier.adi at gmail.com> wrote:
>
> awesome. ?can you post your signed-off-by tag and/or a proper git patch please ?
> -mike

I'm pretty new to git. Hope this is right.

Cheers, Ketil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-mtd-utils-libmtd-legacy-code-OOB.patch
Type: text/x-diff
Size: 826 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20101125/31585789/attachment.bin>

From mmarek at suse.cz  Thu Nov 25 11:14:40 2010
From: mmarek at suse.cz (Michal Marek)
Date: Thu, 25 Nov 2010 17:14:40 +0100
Subject: Unused config options in drivers/mtd (Re: running my kernel scanning
	scripts on your favourite part of the tree)
In-Reply-To: <alpine.DEB.2.00.1011090711410.5783@localhost6.localdomain6>
References: <alpine.DEB.2.00.1011090711410.5783@localhost6.localdomain6>
Message-ID: <4CEE8B70.4070500@suse.cz>

CC the mtd maintainer and mailinglist and adjusted subject. Robert, you
should report such bugs to the maintainer / author of the code in
question, otherwise your mail might end up unnoticed on LKML.

Michal

On 9.11.2010 13:16, Robert P. J. Day wrote:
> 
>   not sure when i'll get the time to do another pass over the kernel
> source tree with my kernel cleanup scripts but anyone who's
> interested is welcome to download the scripts from here:
> 
>   http://www.crashcourse.ca/wiki/index.php/Kernel_cleanup_scripts
> 
> to check out whatever part of the tree they want.
> 
>   as a simple example, i can run the script to find "badref" config
> variables on, say, the drivers/mtd part of the tree:
> 
> $ ../s/find_badref_configs.sh drivers/mtd
>>>>>> MTD_SUPERH_RESERVE
> drivers/mtd/maps/solutionengine.c:38:#ifdef CONFIG_MTD_SUPERH_RESERVE
> drivers/mtd/maps/solutionengine.c:44:		.size = CONFIG_MTD_SUPERH_RESERVE,
> drivers/mtd/maps/solutionengine.c:54:#endif /* CONFIG_MTD_SUPERH_RESERVE */
> drivers/mtd/maps/solutionengine.c:97:#ifdef CONFIG_MTD_SUPERH_RESERVE
> drivers/mtd/maps/solutionengine.c:100:		       CONFIG_MTD_SUPERH_RESERVE);
> drivers/mtd/maps/solutionengine.c:104:#endif /* CONFIG_MTD_SUPERH_RESERVE */
> $
> 
>   that tells me that, under drivers/mtd, there's some file that
> insists on testing CONFIG_MTD_SUPERH_RESERVE even though no Kconfig
> file defines such a variable.
> 
>   the other common check is to look for the exact opposite --
> variables defined in a Kconfig file that are never tested anywhere.
> once again, let's pick on drivers/mtd:
> 
> $ ../s/find_unused_configs.sh drivers/mtd
> ===== MTD_NAND_ATMEL_ECC_SOFT
> drivers/mtd/nand/Kconfig:375:config MTD_NAND_ATMEL_ECC_SOFT
> $
> 
>   that should be self-explanatory.  anyway, have at it if it interests
> you.
> 
> rday
> 
> 



From barnes.leo at gmail.com  Fri Nov 26 08:39:50 2010
From: barnes.leo at gmail.com (Leo Barnes)
Date: Fri, 26 Nov 2010 22:39:50 +0900
Subject: Flashing UBIFS over fastboot
Message-ID: <AANLkTinzy-qTsYfbZhkhoFN6Tz9G47+JUWsa97KCUAke@mail.gmail.com>

Hello!

I am trying to get UBIFS to work on a fastboot-based Android device.
So far, I have managed to create a working UBIFS partition on a
running device using ubiformat/nandwrite, but whenever I try to flash
images with fastboot, the flashing process fails. I assume that this
is because fastboot expects YAFFS2 images (which contain OOB-data)
while what I am trying to flash is UBIFS images (which do not). So my
question:

Has anyone either got fastboot to work directly with UBIFS images, or
is it possible to somehow create UBIFS images that "look like" YAFFS2
images (by creating dummy OOB-data for instance)? As it is, fastboot
obviously misinterprets the images. Or does anyone have any data on
exactly how the UBIFS and YAFFS2 image formats look like? In that case
I might be able to figure out some way of doing it.

Best regards,
//Leo


From wolfgang at leila.ping.de  Fri Nov 26 08:50:05 2010
From: wolfgang at leila.ping.de (Wolfgang Wegner)
Date: Fri, 26 Nov 2010 14:50:05 +0100
Subject: UBIFS oops after remount ro
Message-ID: <20101126135005.GV23237@leila.ping.de>

Hi list,

I already tried to ask on linux-arm-kernel, so in case you seem to
have read this before: maybe this is true...

I have a very similar (same?) problem as described here:
http://lkml.org/lkml/2010/5/7/193

- kernel is 2.6.32 on a Marvell Kirkwood system
- several UBIFS partitions (/,/etc/localconfig,
  /etc/localconfigdefault)
- normally all file systems are mounted read-only
- some "run-once" scripts to adjust things on first startup
- all seemingly work fine except for one working on the root fs:
if [ ! -f /lib/modules/`uname -r`/modules.dep ] ; then
#       ps
       mount -n -o remount,rw /
       echo "adjusting modules"
       mkdir -p /lib/modules/`uname -r`
       depmod -a
       sync
       sync
       mount -n -o remount,ro /
#       ps
fi

When running this in a shell or as a script in the shell after system
startup is completed, everything is fine. When running this from within
/etc/init.d/rcS (busybox), the script and startup works, but after
around 25 seconds I get this oops:

Unable to handle kernel NULL pointer dereference at virtual address 000000ac
sh-3.2# pgd = c0004000
[000000ac] *pgd=00000000
Internal error: Oops: 817 [#1] PREEMPT
last sysfs file: /sys/devices/pci0000:00/0000:00:01.0/0000:01:08.0/reg_val
Modules linked in: dd_anetfb_k dd_fpgaloader_k dd_hw_config_k
CPU: 0    Not tainted  (2.6.32-svn21303 #1)
PC is at mutex_lock+0x4/0x14
LR is at make_reservation+0x74/0x364
pc : [<c0371e40>]    lr : [<c015cfc4>]    psr: 60000013
sp : dfb61e00  ip : df82e150  fp : dfb60000
r10: 00000001  r9 : 00000000  r8 : 00000000
r7 : 000000ac  r6 : 00000088  r5 : df82e000  r4 : 00000000
r3 : 00000000  r2 : 00000001  r1 : 00000088  r0 : 000000ac
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 0005397f  Table: 1fb58000  DAC: 00000017
Process flush-ubifs_0_1 (pid: 549, stack limit = 0xdfb60270)
Stack: (0xdfb61e00 to 0xdfb62000)
1e00: 00000001 c008ba44 dfb61e4c df4f8b54 dfb61f18 00000000 df82e14c 000000a0
1e20: 00000088 00000001 000000a0 00000050 dfb61e4c df82e000 df4f8ab8 000000a0
1e40: 00000000 00000000 00000000 dfa16c00 df82e090 c015d79c 00000001 dfb60000
1e60: 00000002 df9792c0 dfb61e94 c003737c df4f8ab8 00000001 df4f8c00 df82e000
1e80: df4f8b54 00000000 00000001 c0163c14 df4f8ab8 00000000 dfb61e4c df4f8ab8
1ea0: 00000000 dfb61f18 00000000 c00cfbec 20000013 df82e068 dfb61f18 dfb60000
1ec0: df4f8ab8 df82e088 00000000 c00d08a8 c049f250 dfa8ca40 00000000 ffff97bc
1ee0: 00000000 df4f8c48 df4f8ac0 dfa8ca00 c049f250 dfb60000 dfb61f78 df82e068
1f00: 00000000 df82e090 00000000 df82e008 00000000 c00d0ad4 df82e008 00000000
1f20: 00000000 00000000 00000400 00000000 00000000 00000000 ffffffff 7fffffff
1f40: 00000000 00000000 dfb61f74 c054be80 c054be80 c00468ac dfb18e80 df82e068
1f60: dfb60000 00000000 df82e0a8 00000000 00000000 c00d0cb8 00000001 00000000
1f80: 00000000 00000000 000001f4 ffff8cfc df82e068 df82e068 00000000 00000000
1fa0: 00000000 c00d0e38 dfb60000 df82e008 df82e068 c0099020 00000000 df8bbf40
1fc0: dfb61fd4 c0098f94 df82e068 c00543bc 00000000 00000000 dfb61fd8 dfb61fd8
1fe0: 00000000 00000000 00000000 00000000 00000000 c002744c 00000000 00000000
[<c0371e40>] (mutex_lock+0x4/0x14) from [<c015cfc4>] (make_reservation+0x74/0x364)
[<c015cfc4>] (make_reservation+0x74/0x364) from [<c015d79c>] (ubifs_jnl_write_inode+0x80/0x1e4)
[<c015d79c>] (ubifs_jnl_write_inode+0x80/0x1e4) from [<c0163c14>] (ubifs_write_inode+0x5c/0xbc)
[<c0163c14>] (ubifs_write_inode+0x5c/0xbc) from [<c00cfbec>] (writeback_single_inode+0x120/0x238)
[<c00cfbec>] (writeback_single_inode+0x120/0x238) from [<c00d08a8>] (writeback_inodes_wb+0x3d4/0x4a8)
[<c00d08a8>] (writeback_inodes_wb+0x3d4/0x4a8) from [<c00d0ad4>] (wb_writeback+0x158/0x1ec)
[<c00d0ad4>] (wb_writeback+0x158/0x1ec) from [<c00d0cb8>] (wb_do_writeback+0x6c/0x1cc)
[<c00d0cb8>] (wb_do_writeback+0x6c/0x1cc) from [<c00d0e38>] (bdi_writeback_task+0x20/0x98)
[<c00d0e38>] (bdi_writeback_task+0x20/0x98) from [<c0099020>] (bdi_start_fn+0x8c/0x100)
[<c0099020>] (bdi_start_fn+0x8c/0x100) from [<c00543bc>] (kthread+0x7c/0x84)
[<c00543bc>] (kthread+0x7c/0x84) from [<c002744c>] (kernel_thread_exit+0x0/0x8)
Code: ebfffd21 e28dd014 e8bd80f0 e3a03000 (e1001093)
---[ end trace 162376f104dd0abc ]---

Commenting in the "ps" in the above script snippet, I can see that
the flush-ubifs_0_1 process is the one being started during the
script execution.

Here's my /proc/mounts:

rootfs / rootfs rw 0 0
ubi0:rootfs_live / ubifs ro,relatime 0 0
proc /proc proc rw,relatime 0 0
none /tmp tmpfs rw,relatime 0 0
none /var/run tmpfs rw,relatime,size=8192k 0 0
none /proc/bus/usb usbfs rw,relatime 0 0
ubi0:configfiles /etc/localconfig ubifs ro,noatime 0 0
ubi0:configfilesdefault /etc/localconfigdefault ubifs ro,noatime 0 0
ubi0:userdata /mnt/userdata ubifs ro,noatime 0 0
sysfs /sys sysfs rw,relatime 0 0
tmpfs /dev tmpfs rw,relatime,size=10240k,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620 0 0

I am a bit puzzled about this all.
- is the flush-ubifs_0_1 process expected to run after the filesystem
  has been mounted read-only?
- could the "duplicate" rootfs entry cause these problems? (I have to
  admit I do not see where it comes from and if/what I could do to
  get rid of it)
- is this a known problem that should be gone when upgrading the
  kernel? (Which I refrained from up to now because I do not know
  where to get a useful kernel for this Kirkwood device.)
- I also got this with another script, so it seems not to have
  anything to do with depmod as such, but somehow the timing of
  the write access(es) seems to be crucial.
- What can I do to further debug this?

Regards,
Wolfgang



From dedekind1 at gmail.com  Fri Nov 26 08:58:03 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Fri, 26 Nov 2010 15:58:03 +0200
Subject: Flashing UBIFS over fastboot
In-Reply-To: <AANLkTinzy-qTsYfbZhkhoFN6Tz9G47+JUWsa97KCUAke@mail.gmail.com>
References: <AANLkTinzy-qTsYfbZhkhoFN6Tz9G47+JUWsa97KCUAke@mail.gmail.com>
Message-ID: <1290779883.2552.4.camel@localhost>

Hi,

On Fri, 2010-11-26 at 22:39 +0900, Leo Barnes wrote:
> I am trying to get UBIFS to work on a fastboot-based Android device.
> So far, I have managed to create a working UBIFS partition on a
> running device using ubiformat/nandwrite, but whenever I try to flash
> images with fastboot, the flashing process fails. I assume that this
> is because fastboot expects YAFFS2 images (which contain OOB-data)
> while what I am trying to flash is UBIFS images (which do not). So my
> question:
> 
> Has anyone either got fastboot to work directly with UBIFS images, or
> is it possible to somehow create UBIFS images that "look like" YAFFS2
> images (by creating dummy OOB-data for instance)? As it is, fastboot
> obviously misinterprets the images. Or does anyone have any data on
> exactly how the UBIFS and YAFFS2 image formats look like? In that case
> I might be able to figure out some way of doing it.

I think you can hack ubinize and teach it to add OOB bytes.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From barnes.leo at gmail.com  Fri Nov 26 09:07:41 2010
From: barnes.leo at gmail.com (Leo Barnes)
Date: Fri, 26 Nov 2010 23:07:41 +0900
Subject: Flashing UBIFS over fastboot
In-Reply-To: <1290779883.2552.4.camel@localhost>
References: <AANLkTinzy-qTsYfbZhkhoFN6Tz9G47+JUWsa97KCUAke@mail.gmail.com>
	<1290779883.2552.4.camel@localhost>
Message-ID: <AANLkTimD45TxMY7ZL0QPqJg+MXnSUCR8saPetyY1B14u@mail.gmail.com>

Thanks for the extremely quick reply, will take a look at it.

//Leo

On Fri, Nov 26, 2010 at 10:58 PM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> Hi,
>
> On Fri, 2010-11-26 at 22:39 +0900, Leo Barnes wrote:
>> I am trying to get UBIFS to work on a fastboot-based Android device.
>> So far, I have managed to create a working UBIFS partition on a
>> running device using ubiformat/nandwrite, but whenever I try to flash
>> images with fastboot, the flashing process fails. I assume that this
>> is because fastboot expects YAFFS2 images (which contain OOB-data)
>> while what I am trying to flash is UBIFS images (which do not). So my
>> question:
>>
>> Has anyone either got fastboot to work directly with UBIFS images, or
>> is it possible to somehow create UBIFS images that "look like" YAFFS2
>> images (by creating dummy OOB-data for instance)? As it is, fastboot
>> obviously misinterprets the images. Or does anyone have any data on
>> exactly how the UBIFS and YAFFS2 image formats look like? In that case
>> I might be able to figure out some way of doing it.
>
> I think you can hack ubinize and teach it to add OOB bytes.
>
> --
> Best Regards,
> Artem Bityutskiy (????? ????????)
>
>


From dedekind1 at gmail.com  Fri Nov 26 10:24:17 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Fri, 26 Nov 2010 17:24:17 +0200
Subject: UBIFS oops after remount ro
In-Reply-To: <20101126135005.GV23237@leila.ping.de>
References: <20101126135005.GV23237@leila.ping.de>
Message-ID: <1290785057.2552.14.camel@localhost>

On Fri, 2010-11-26 at 14:50 +0100, Wolfgang Wegner wrote:
> [<c0371e40>] (mutex_lock+0x4/0x14) from [<c015cfc4>] (make_reservation+0x74/0x364)
> [<c015cfc4>] (make_reservation+0x74/0x364) from [<c015d79c>] (ubifs_jnl_write_inode+0x80/0x1e4)
> [<c015d79c>] (ubifs_jnl_write_inode+0x80/0x1e4) from [<c0163c14>] (ubifs_write_inode+0x5c/0xbc)
> [<c0163c14>] (ubifs_write_inode+0x5c/0xbc) from [<c00cfbec>] (writeback_single_inode+0x120/0x238)
> [<c00cfbec>] (writeback_single_inode+0x120/0x238) from [<c00d08a8>] (writeback_inodes_wb+0x3d4/0x4a8)
> [<c00d08a8>] (writeback_inodes_wb+0x3d4/0x4a8) from [<c00d0ad4>] (wb_writeback+0x158/0x1ec)
> [<c00d0ad4>] (wb_writeback+0x158/0x1ec) from [<c00d0cb8>] (wb_do_writeback+0x6c/0x1cc)
> [<c00d0cb8>] (wb_do_writeback+0x6c/0x1cc) from [<c00d0e38>] (bdi_writeback_task+0x20/0x98)
> [<c00d0e38>] (bdi_writeback_task+0x20/0x98) from [<c0099020>] (bdi_start_fn+0x8c/0x100)
> [<c0099020>] (bdi_start_fn+0x8c/0x100) from [<c00543bc>] (kthread+0x7c/0x84)
> [<c00543bc>] (kthread+0x7c/0x84) from [<c002744c>] (kernel_thread_exit+0x0/0x8)
> Code: ebfffd21 e28dd014 e8bd80f0 e3a03000 (e1001093)
> ---[ end trace 162376f104dd0abc ]---

Well, for some reason the write-back code thinks UBIFS still has dirty
inodes, but UBIFS was re-mounted R/O and it should not have dirty
inodes. I do not know where the bug is.

> I am a bit puzzled about this all.
> - is the flush-ubifs_0_1 process expected to run after the filesystem
>   has been mounted read-only?

Yes, in .32 it wakes up every 5 seconds. But it should find that there
is nothing to do and go sleep. In newer kernels it does not wake up
unless there is something to do.

> - What can I do to further debug this?

Difficult to say.

Firs of all, try to enable UBIFS debugging - just CONFIG_UBIFS_FS_DEBUG,
not messages. Is the problem still reproducible?

Also, it is interesting where exactly wb_writeback() is called - there
are 2 places.

And it is interesting which inode number is being written by write-back
code. And is it the same every time you oops or not?

Try to reproduce with the following patch:


diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 9d5360c..44ebcdf 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -908,6 +908,7 @@ long wb_do_writeback(struct bdi_writeback *wb, int force_wait)
 		if (args.sync_mode == WB_SYNC_NONE)
 			wb_clear_pending(wb, work);
 
+		printk(KERN_DEBUG "qqq: wb work for %s\n", bdi->name);
 		wrote += wb_writeback(wb, &args);
 
 		/*
@@ -921,6 +922,7 @@ long wb_do_writeback(struct bdi_writeback *wb, int force_wait)
 	/*
 	 * Check for periodic writeback, kupdated() style
 	 */
+	printk(KERN_DEBUG "qqq: kupdated for %s\n", bdi->name);
 	wrote += wb_check_old_data_flush(wb);
 
 	return wrote;
diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c
index 914f1bd..6b0e41c 100644
--- a/fs/ubifs/journal.c
+++ b/fs/ubifs/journal.c
@@ -124,6 +124,7 @@ static int reserve_space(struct ubifs_info *c, int jhead, int len)
 	 */
 	ubifs_assert(!c->ro_media && !c->ro_mount);
 	squeeze = (jhead == BASEHD);
+
 again:
 	mutex_lock_nested(&wbuf->io_mutex, wbuf->jhead);
 
@@ -779,6 +780,11 @@ int ubifs_jnl_write_inode(struct ubifs_info *c, const struct inode *inode)
 	if (!ino)
 		return -ENOMEM;
 
+	if (!c->jheads) {
+		/* We are about to oops, so here we can print useful info */
+		printk(KERN_DEBUG "qqq: writing inode %lu\n", inode->i_ino);
+	}
+
 	/* Make reservation before allocating sequence numbers */
 	err = make_reservation(c, BASEHD, len);
 	if (err)
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 52f5627..752f4e4 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -1533,6 +1533,9 @@ static int ubifs_remount_rw(struct ubifs_info *c)
 		return -EROFS;
 	}
 
+	printk(KERN_DEBUG "qqq: %s\n", __func__);
+	dump_stack();
+
 	mutex_lock(&c->umount_mutex);
 	dbg_save_space_info(c);
 	c->remounting_rw = 1;
@@ -1678,6 +1681,8 @@ static void ubifs_remount_ro(struct ubifs_info *c)
 
 	ubifs_assert(!c->need_recovery);
 	ubifs_assert(!c->ro_mount);
+	printk(KERN_DEBUG "qqq: %s\n", __func__);
+	dump_stack();
 
 	mutex_lock(&c->umount_mutex);
 	if (c->bgt) {

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From s-ghorai at ti.com  Fri Nov 26 10:34:31 2010
From: s-ghorai at ti.com (Sukumar Ghorai)
Date: Fri, 26 Nov 2010 21:04:31 +0530
Subject: [PATCH 1/7] omap3630: nand: fix device size to work in polled mode
In-Reply-To: <1290785677-16005-1-git-send-email-s-ghorai@ti.com>
References: <1290785677-16005-1-git-send-email-s-ghorai@ti.com>
Message-ID: <1290785677-16005-2-git-send-email-s-ghorai@ti.com>

zoom3 and 3630-sdp having the x16 nand device.
This patch configure gpmc as x16 and select the currect function in driver
for polled mode (without prefetch enable) transfer.

Signed-off-by: Sukumar Ghorai <s-ghorai at ti.com>
---
 arch/arm/mach-omap2/board-flash.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c
index fd38c05..001c605 100644
--- a/arch/arm/mach-omap2/board-flash.c
+++ b/arch/arm/mach-omap2/board-flash.c
@@ -145,6 +145,9 @@ __init board_nand_init(struct mtd_partition *nand_parts, u8 nr_parts, u8 cs)
 	board_nand_data.parts		= nand_parts;
 	board_nand_data.nr_parts		= nr_parts;
 
+	if (cpu_is_omap3630())
+		board_nand_data.devsize = 1;
+
 	gpmc_nand_init(&board_nand_data);
 }
 #else
-- 
1.7.0.4



From s-ghorai at ti.com  Fri Nov 26 10:34:32 2010
From: s-ghorai at ti.com (Sukumar Ghorai)
Date: Fri, 26 Nov 2010 21:04:32 +0530
Subject: [PATCH 2/7] omap3: nand: configurable transfer type per board
In-Reply-To: <1290785677-16005-1-git-send-email-s-ghorai@ti.com>
References: <1290785677-16005-1-git-send-email-s-ghorai@ti.com>
Message-ID: <1290785677-16005-3-git-send-email-s-ghorai@ti.com>

nand transfer type (sDMA, Polled, prefetch) can be select from board file,
enabling all transfer type in driver, by default.

this helps in multi-omap build and to select different transfer type for
different board.

Signed-off-by: Sukumar Ghorai <s-ghorai at ti.com>
---
 arch/arm/plat-omap/include/plat/nand.h |    7 +++
 drivers/mtd/nand/Kconfig               |   17 ------
 drivers/mtd/nand/omap2.c               |   92 +++++++++++--------------------
 3 files changed, 40 insertions(+), 76 deletions(-)

diff --git a/arch/arm/plat-omap/include/plat/nand.h b/arch/arm/plat-omap/include/plat/nand.h
index 6562cd0..78c0bdb 100644
--- a/arch/arm/plat-omap/include/plat/nand.h
+++ b/arch/arm/plat-omap/include/plat/nand.h
@@ -10,6 +10,12 @@
 
 #include <linux/mtd/partitions.h>
 
+enum nand_io {
+	NAND_OMAP_PREFETCH_POLLED = 0,	/* prefetch polled mode, default */
+	NAND_OMAP_POLLED,		/* polled mode, without prefetch */
+	NAND_OMAP_PREFETCH_DMA		/* prefetch enabled sDMA mode */
+};
+
 struct omap_nand_platform_data {
 	unsigned int		options;
 	int			cs;
@@ -20,6 +26,7 @@ struct omap_nand_platform_data {
 	int			(*nand_setup)(void);
 	int			(*dev_ready)(struct omap_nand_platform_data *);
 	int			dma_channel;
+	enum nand_io		xfer_type;
 	unsigned long		phys_base;
 	int			devsize;
 };
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 8229802..89bb297 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -105,23 +105,6 @@ config MTD_NAND_OMAP2
 	help
           Support for NAND flash on Texas Instruments OMAP2 and OMAP3 platforms.
 
-config MTD_NAND_OMAP_PREFETCH
-	bool "GPMC prefetch support for NAND Flash device"
-	depends on MTD_NAND_OMAP2
-	default y
-	help
-	 The NAND device can be accessed for Read/Write using GPMC PREFETCH engine
-	 to improve the performance.
-
-config MTD_NAND_OMAP_PREFETCH_DMA
-	depends on MTD_NAND_OMAP_PREFETCH
-	bool "DMA mode"
-	default n
-	help
-	 The GPMC PREFETCH engine can be configured eigther in MPU interrupt mode
-	 or in DMA interrupt mode.
-	 Say y for DMA mode or MPU mode will be used
-
 config MTD_NAND_IDS
 	tristate
 
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 15682ec..6011e90 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -96,27 +96,6 @@
 static const char *part_probes[] = { "cmdlinepart", NULL };
 #endif
 
-#ifdef CONFIG_MTD_NAND_OMAP_PREFETCH
-static int use_prefetch = 1;
-
-/* "modprobe ... use_prefetch=0" etc */
-module_param(use_prefetch, bool, 0);
-MODULE_PARM_DESC(use_prefetch, "enable/disable use of PREFETCH");
-
-#ifdef CONFIG_MTD_NAND_OMAP_PREFETCH_DMA
-static int use_dma = 1;
-
-/* "modprobe ... use_dma=0" etc */
-module_param(use_dma, bool, 0);
-MODULE_PARM_DESC(use_dma, "enable/disable use of DMA");
-#else
-static const int use_dma;
-#endif
-#else
-const int use_prefetch;
-static const int use_dma;
-#endif
-
 struct omap_nand_info {
 	struct nand_hw_control		controller;
 	struct omap_nand_platform_data	*pdata;
@@ -324,7 +303,6 @@ static void omap_write_buf_pref(struct mtd_info *mtd,
 	}
 }
 
-#ifdef CONFIG_MTD_NAND_OMAP_PREFETCH_DMA
 /*
  * omap_nand_dma_cb: callback on the completion of dma transfer
  * @lch: logical channel
@@ -426,14 +404,6 @@ out_copy:
 			: omap_write_buf8(mtd, (u_char *) addr, len);
 	return 0;
 }
-#else
-static void omap_nand_dma_cb(int lch, u16 ch_status, void *data) {}
-static inline int omap_nand_dma_transfer(struct mtd_info *mtd, void *addr,
-					unsigned int len, int is_write)
-{
-	return 0;
-}
-#endif
 
 /**
  * omap_read_buf_dma_pref - read data from NAND controller into buffer
@@ -842,28 +812,13 @@ static int __devinit omap_nand_probe(struct platform_device *pdev)
 		info->nand.chip_delay = 50;
 	}
 
-	if (use_prefetch) {
-
+	switch (pdata->xfer_type) {
+	case NAND_OMAP_PREFETCH_POLLED:
 		info->nand.read_buf   = omap_read_buf_pref;
 		info->nand.write_buf  = omap_write_buf_pref;
-		if (use_dma) {
-			err = omap_request_dma(OMAP24XX_DMA_GPMC, "NAND",
-				omap_nand_dma_cb, &info->comp, &info->dma_ch);
-			if (err < 0) {
-				info->dma_ch = -1;
-				printk(KERN_WARNING "DMA request failed."
-					" Non-dma data transfer mode\n");
-			} else {
-				omap_set_dma_dest_burst_mode(info->dma_ch,
-						OMAP_DMA_DATA_BURST_16);
-				omap_set_dma_src_burst_mode(info->dma_ch,
-						OMAP_DMA_DATA_BURST_16);
-
-				info->nand.read_buf   = omap_read_buf_dma_pref;
-				info->nand.write_buf  = omap_write_buf_dma_pref;
-			}
-		}
-	} else {
+		break;
+
+	case NAND_OMAP_POLLED:
 		if (info->nand.options & NAND_BUSWIDTH_16) {
 			info->nand.read_buf   = omap_read_buf16;
 			info->nand.write_buf  = omap_write_buf16;
@@ -871,7 +826,33 @@ static int __devinit omap_nand_probe(struct platform_device *pdev)
 			info->nand.read_buf   = omap_read_buf8;
 			info->nand.write_buf  = omap_write_buf8;
 		}
+		break;
+
+	case NAND_OMAP_PREFETCH_DMA:
+		err = omap_request_dma(OMAP24XX_DMA_GPMC, "NAND",
+				omap_nand_dma_cb, &info->comp, &info->dma_ch);
+		if (err < 0) {
+			info->dma_ch = -1;
+			dev_err(&pdev->dev, "DMA request failed!\n");
+			goto out_release_mem_region;
+		} else {
+			omap_set_dma_dest_burst_mode(info->dma_ch,
+					OMAP_DMA_DATA_BURST_16);
+			omap_set_dma_src_burst_mode(info->dma_ch,
+					OMAP_DMA_DATA_BURST_16);
+
+			info->nand.read_buf   = omap_read_buf_dma_pref;
+			info->nand.write_buf  = omap_write_buf_dma_pref;
+		}
+		break;
+
+	default:
+		dev_err(&pdev->dev,
+			"xfer_type(%d) not supported!\n", pdata->xfer_type);
+		err = -EINVAL;
+		goto out_release_mem_region;
 	}
+
 	info->nand.verify_buf = omap_verify_buf;
 
 #ifdef CONFIG_MTD_NAND_OMAP_HWECC
@@ -897,6 +878,7 @@ static int __devinit omap_nand_probe(struct platform_device *pdev)
 		}
 	}
 
+
 #ifdef CONFIG_MTD_PARTITIONS
 	err = parse_mtd_partitions(&info->mtd, part_probes, &info->parts, 0);
 	if (err > 0)
@@ -926,7 +908,7 @@ static int omap_nand_remove(struct platform_device *pdev)
 							mtd);
 
 	platform_set_drvdata(pdev, NULL);
-	if (use_dma)
+	if (info->dma_ch != -1)
 		omap_free_dma(info->dma_ch);
 
 	/* Release NAND device, its internal structures and partitions */
@@ -949,14 +931,6 @@ static int __init omap_nand_init(void)
 {
 	printk(KERN_INFO "%s driver initializing\n", DRIVER_NAME);
 
-	/* This check is required if driver is being
-	 * loaded run time as a module
-	 */
-	if ((1 == use_dma) && (0 == use_prefetch)) {
-		printk(KERN_INFO"Wrong parameters: 'use_dma' can not be 1 "
-				"without use_prefetch'. Prefetch will not be"
-				" used in either mode (mpu or dma)\n");
-	}
 	return platform_driver_register(&omap_nand_driver);
 }
 
-- 
1.7.0.4



From s-ghorai at ti.com  Fri Nov 26 10:34:30 2010
From: s-ghorai at ti.com (Sukumar Ghorai)
Date: Fri, 26 Nov 2010 21:04:30 +0530
Subject: [PATCH v6 0/7] nand prefetch-irq support and ecc layout chanage
Message-ID: <1290785677-16005-1-git-send-email-s-ghorai@ti.com>

The following set of patches applies on linux-2.6.

The main motivations behind this patch series are -
        1. support NAND I/O in irq mode.
        2. support of different ECC schema.
        3. also to make ecc layout as like in romcode ecc layout


v6: configurable transfer type from board file; 
    #define irq number used for nand-irq

v5: http://www.mail-archive.com/linux-omap at vger.kernel.org/msg35860.html
This address the input as to support the irq_chained in GPMC.
And resend of
http://www.mail-archive.com/linux-omap at vger.kernel.org/msg35848.html

v4: http://www.mail-archive.com/linux-omap at vger.kernel.org/msg34882.html
and resend of
http://www.mail-archive.com/linux-omap at vger.kernel.org/msg32689.html

v3: http://www.mail-archive.com/linux-omap at vger.kernel.org/msg32071.html
Rebase on latest codebase and previous patch(posted).
http://www.mail-archive.com/linux-omap at vger.kernel.org/msg31963.html

v2: Rebase on latest codebase and previous patch(posted).
http://www.mail-archive.com/linux-omap at vger.kernel.org/msg31471.html

v1: http://www.mail-archive.com/linux-omap at vger.kernel.org/msg26666.html

Sukumar Ghorai (7):
  omap3630: nand: fix device size to work in polled mode
  omap3: nand: configurable transfer type per board
  omap: gpmc: enable irq mode in gpmc
  omap3: nand: prefetch in irq mode support
  omap3: nand: configurable fifo threshold to gain the throughput
  omap: nand: ecc layout select from board file
  omap: nand: making ecc layout as compatible with romcode ecc

 arch/arm/mach-omap2/board-2430sdp.c        |    1 +
 arch/arm/mach-omap2/board-3430sdp.c        |    1 +
 arch/arm/mach-omap2/board-3630sdp.c        |    1 +
 arch/arm/mach-omap2/board-4430sdp.c        |    2 +
 arch/arm/mach-omap2/board-am3517evm.c      |    2 +
 arch/arm/mach-omap2/board-apollon.c        |    1 +
 arch/arm/mach-omap2/board-cm-t35.c         |    1 +
 arch/arm/mach-omap2/board-devkit8000.c     |    1 +
 arch/arm/mach-omap2/board-flash.c          |    7 +
 arch/arm/mach-omap2/board-generic.c        |    2 +
 arch/arm/mach-omap2/board-h4.c             |    1 +
 arch/arm/mach-omap2/board-igep0020.c       |    1 +
 arch/arm/mach-omap2/board-ldp.c            |    1 +
 arch/arm/mach-omap2/board-n8x0.c           |    2 +
 arch/arm/mach-omap2/board-omap3beagle.c    |    1 +
 arch/arm/mach-omap2/board-omap3evm.c       |    2 +
 arch/arm/mach-omap2/board-omap3pandora.c   |    2 +
 arch/arm/mach-omap2/board-omap3stalker.c   |    1 +
 arch/arm/mach-omap2/board-omap3touchbook.c |    1 +
 arch/arm/mach-omap2/board-omap4panda.c     |    2 +
 arch/arm/mach-omap2/board-overo.c          |    1 +
 arch/arm/mach-omap2/board-rx51.c           |    1 +
 arch/arm/mach-omap2/board-zoom2.c          |    2 +
 arch/arm/mach-omap2/board-zoom3.c          |    2 +
 arch/arm/mach-omap2/gpmc.c                 |   50 ++++-
 arch/arm/mach-omap2/io.c                   |    2 -
 arch/arm/plat-omap/include/plat/gpmc.h     |   16 ++-
 arch/arm/plat-omap/include/plat/irqs.h     |    9 +-
 arch/arm/plat-omap/include/plat/nand.h     |   11 +
 drivers/mtd/nand/Kconfig                   |   17 --
 drivers/mtd/nand/omap2.c                   |  314 ++++++++++++++++++++++------
 31 files changed, 364 insertions(+), 94 deletions(-)



From s-ghorai at ti.com  Fri Nov 26 10:34:36 2010
From: s-ghorai at ti.com (Sukumar Ghorai)
Date: Fri, 26 Nov 2010 21:04:36 +0530
Subject: [PATCH v6 6/7] omap: nand: ecc layout select from board file
In-Reply-To: <1290785677-16005-1-git-send-email-s-ghorai@ti.com>
References: <1290785677-16005-1-git-send-email-s-ghorai@ti.com>
Message-ID: <1290785677-16005-7-git-send-email-s-ghorai@ti.com>

This patch makes it possible to select sw or hw (different layout options)
ecc scheme supported by omap nand driver.  And hw ecc layout selected for
sdp and zoom boards, by default.

Signed-off-by: Vimal Singh <vimalsingh at ti.com>
Signed-off-by: Sukumar Ghorai <s-ghorai at ti.com>
---
 arch/arm/mach-omap2/board-flash.c      |    1 +
 arch/arm/plat-omap/include/plat/gpmc.h |    7 +++++++
 arch/arm/plat-omap/include/plat/nand.h |    2 ++
 drivers/mtd/nand/omap2.c               |    5 +----
 4 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c
index 78abcd9..3340427 100644
--- a/arch/arm/mach-omap2/board-flash.c
+++ b/arch/arm/mach-omap2/board-flash.c
@@ -150,6 +150,7 @@ __init board_nand_init(struct mtd_partition *nand_parts, u8 nr_parts, u8 cs)
 	if (cpu_is_omap3630())
 		board_nand_data.devsize = 1;
 
+	board_nand_data.ecc_opt = OMAP_ECC_HAMMING_CODE_DIFF_LAYOUT;
 	board_nand_data.gpmc_irq = OMAP_GPMC_IRQ_BASE + cs;
 	gpmc_nand_init(&board_nand_data);
 }
diff --git a/arch/arm/plat-omap/include/plat/gpmc.h b/arch/arm/plat-omap/include/plat/gpmc.h
index fb82335..ca6e8db 100644
--- a/arch/arm/plat-omap/include/plat/gpmc.h
+++ b/arch/arm/plat-omap/include/plat/gpmc.h
@@ -86,6 +86,13 @@
 #define PREFETCH_FIFOTHRESHOLD_MAX	0x40
 #define PREFETCH_FIFOTHRESHOLD(val)	(val << 8)
 
+enum omap_ecc {
+	OMAP_ECC_HAMMING_CODE_DIFF_LAYOUT = 0,
+		/* 1-bit s/w ecc and layout different from romcode */
+	OMAP_ECC_HAMMING_CODE_HW,/* 1-bit ecc, romcode layout */
+	OMAP_ECC_HAMMING_CODE_SW,/* 1-bit ecc, romcode layout */
+};
+
 /*
  * Note that all values in this struct are in nanoseconds, while
  * the register values are in gpmc_fck cycles.
diff --git a/arch/arm/plat-omap/include/plat/nand.h b/arch/arm/plat-omap/include/plat/nand.h
index ae5e053..d86d1ec 100644
--- a/arch/arm/plat-omap/include/plat/nand.h
+++ b/arch/arm/plat-omap/include/plat/nand.h
@@ -8,6 +8,7 @@
  * published by the Free Software Foundation.
  */
 
+#include <plat/gpmc.h>
 #include <linux/mtd/partitions.h>
 
 enum nand_io {
@@ -31,6 +32,7 @@ struct omap_nand_platform_data {
 	enum nand_io		xfer_type;
 	unsigned long		phys_base;
 	int			devsize;
+	enum omap_ecc           ecc_opt;
 };
 
 /* minimum size for IO mapping */
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index fea9f59..0937001 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -7,6 +7,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#define CONFIG_MTD_NAND_OMAP_HWECC
 
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
@@ -618,8 +619,6 @@ static int omap_verify_buf(struct mtd_info *mtd, const u_char * buf, int len)
 	return 0;
 }
 
-#ifdef CONFIG_MTD_NAND_OMAP_HWECC
-
 /**
  * gen_true_ecc - This function will generate true ECC value
  * @ecc_buf: buffer to store ecc code
@@ -839,8 +838,6 @@ static void omap_enable_hwecc(struct mtd_info *mtd, int mode)
 	gpmc_enable_hwecc(info->gpmc_cs, mode, dev_width, info->nand.ecc.size);
 }
 
-#endif
-
 /**
  * omap_wait - wait until the command is done
  * @mtd: MTD device structure
-- 
1.7.0.4



From s-ghorai at ti.com  Fri Nov 26 10:34:37 2010
From: s-ghorai at ti.com (Sukumar Ghorai)
Date: Fri, 26 Nov 2010 21:04:37 +0530
Subject: [PATCH v6 7/7] omap: nand: making ecc layout as compatible with
	romcode ecc
In-Reply-To: <1290785677-16005-1-git-send-email-s-ghorai@ti.com>
References: <1290785677-16005-1-git-send-email-s-ghorai@ti.com>
Message-ID: <1290785677-16005-8-git-send-email-s-ghorai@ti.com>

This patch overrides nand ecc layout and bad block descriptor (for 8-bit
device) to support hw ecc in romcode layout. So as to have in sync with ecc
layout throughout; i.e. x-loader, u-boot and kernel.

This patch also enables to use romcode ecc for spd and zoom, by default.

This enables to flash x-loader, u-boot, kernel, FS images from kernel itself
and compatiable with other tools.

Signed-off-by: Vimal Singh <vimalsingh at ti.com>
Signed-off-by: Sukumar Ghorai <s-ghorai at ti.com>
---
 drivers/mtd/nand/omap2.c |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 0937001..d4c508a 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -98,6 +98,20 @@
 static const char *part_probes[] = { "cmdlinepart", NULL };
 #endif
 
+/* oob info generated runtime depending on ecc algorithm and layout selected */
+static struct nand_ecclayout omap_oobinfo;
+/* Define some generic bad / good block scan pattern which are used
+ * while scanning a device for factory marked good / bad blocks
+ */
+static uint8_t scan_ff_pattern[] = { 0xff };
+static struct nand_bbt_descr bb_descrip_flashbased = {
+	.options = NAND_BBT_SCANEMPTY | NAND_BBT_SCANALLPAGES,
+	.offs = 0,
+	.len = 1,
+	.pattern = scan_ff_pattern,
+};
+
+
 struct omap_nand_info {
 	struct nand_hw_control		controller;
 	struct omap_nand_platform_data	*pdata;
@@ -907,6 +921,7 @@ static int __devinit omap_nand_probe(struct platform_device *pdev)
 	struct omap_nand_info		*info;
 	struct omap_nand_platform_data	*pdata;
 	int				err;
+	int				i, offset;
 
 	pdata = pdev->dev.platform_data;
 	if (pdata == NULL) {
@@ -1051,6 +1066,25 @@ static int __devinit omap_nand_probe(struct platform_device *pdev)
 	}
 
 
+	/* rom code layout */
+	if (pdata->ecc_opt != OMAP_ECC_HAMMING_CODE_DIFF_LAYOUT) {
+		offset = (info->nand.options & NAND_BUSWIDTH_16) ? 2 : 1;
+		if (info->mtd.oobsize == 16) {
+			info->nand.badblock_pattern = &bb_descrip_flashbased;
+			omap_oobinfo.eccbytes = 3;
+		} else
+			omap_oobinfo.eccbytes  = 3 * 4;
+
+		for (i = 0; i < omap_oobinfo.eccbytes; i++)
+			omap_oobinfo.eccpos[i] = i+offset;
+
+		omap_oobinfo.oobfree->offset = offset + omap_oobinfo.eccbytes;
+		omap_oobinfo.oobfree->length = info->mtd.oobsize -
+					(offset + omap_oobinfo.eccbytes);
+
+		info->nand.ecc.layout = &omap_oobinfo;
+	}
+
 #ifdef CONFIG_MTD_PARTITIONS
 	err = parse_mtd_partitions(&info->mtd, part_probes, &info->parts, 0);
 	if (err > 0)
-- 
1.7.0.4



From s-ghorai at ti.com  Fri Nov 26 10:34:35 2010
From: s-ghorai at ti.com (Sukumar Ghorai)
Date: Fri, 26 Nov 2010 21:04:35 +0530
Subject: [PATCH v6 5/7] omap3: nand: configurable fifo threshold to gain the
	throughput
In-Reply-To: <1290785677-16005-1-git-send-email-s-ghorai@ti.com>
References: <1290785677-16005-1-git-send-email-s-ghorai@ti.com>
Message-ID: <1290785677-16005-6-git-send-email-s-ghorai@ti.com>

Configure the FIFO THREASHOLD value different for read and write to keep busy
both filling and to drain out of FIFO at reading and writing.

Signed-off-by: Vimal Singh <vimalsingh at ti.com>
Signed-off-by: Sukumar Ghorai <s-ghorai at ti.com>
---
 arch/arm/mach-omap2/gpmc.c             |   11 +++++++----
 arch/arm/plat-omap/include/plat/gpmc.h |    5 ++++-
 drivers/mtd/nand/omap2.c               |   24 +++++++++++++++---------
 3 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index cfaf357..b26b1a5 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -59,7 +59,6 @@
 #define GPMC_CHUNK_SHIFT	24		/* 16 MB */
 #define GPMC_SECTION_SHIFT	28		/* 128 MB */
 
-#define PREFETCH_FIFOTHRESHOLD	(0x40 << 8)
 #define CS_NUM_SHIFT		24
 #define ENABLE_PREFETCH		(0x1 << 7)
 #define DMA_MPU_MODE		2
@@ -595,15 +594,19 @@ EXPORT_SYMBOL(gpmc_nand_write);
 /**
  * gpmc_prefetch_enable - configures and starts prefetch transfer
  * @cs: cs (chip select) number
+ * @fifo_th: fifo threshold to be used for read/ write
  * @dma_mode: dma mode enable (1) or disable (0)
  * @u32_count: number of bytes to be transferred
  * @is_write: prefetch read(0) or write post(1) mode
  */
-int gpmc_prefetch_enable(int cs, int dma_mode,
+int gpmc_prefetch_enable(int cs, int fifo_th, int dma_mode,
 				unsigned int u32_count, int is_write)
 {
 
-	if (!(gpmc_read_reg(GPMC_PREFETCH_CONTROL))) {
+	if (fifo_th > PREFETCH_FIFOTHRESHOLD_MAX) {
+		printk(KERN_ERR "PREFETCH Fifo Threshold is not supported\n");
+		return -1;
+	} else if (!(gpmc_read_reg(GPMC_PREFETCH_CONTROL))) {
 		/* Set the amount of bytes to be prefetched */
 		gpmc_write_reg(GPMC_PREFETCH_CONFIG2, u32_count);
 
@@ -611,7 +614,7 @@ int gpmc_prefetch_enable(int cs, int dma_mode,
 		 * enable the engine. Set which cs is has requested for.
 		 */
 		gpmc_write_reg(GPMC_PREFETCH_CONFIG1, ((cs << CS_NUM_SHIFT) |
-					PREFETCH_FIFOTHRESHOLD |
+					PREFETCH_FIFOTHRESHOLD(fifo_th) |
 					ENABLE_PREFETCH |
 					(dma_mode << DMA_MPU_MODE) |
 					(0x1 & is_write)));
diff --git a/arch/arm/plat-omap/include/plat/gpmc.h b/arch/arm/plat-omap/include/plat/gpmc.h
index 054e704..fb82335 100644
--- a/arch/arm/plat-omap/include/plat/gpmc.h
+++ b/arch/arm/plat-omap/include/plat/gpmc.h
@@ -83,6 +83,9 @@
 #define GPMC_IRQ_FIFOEVENTENABLE	0x01
 #define GPMC_IRQ_COUNT_EVENT		0x02
 
+#define PREFETCH_FIFOTHRESHOLD_MAX	0x40
+#define PREFETCH_FIFOTHRESHOLD(val)	(val << 8)
+
 /*
  * Note that all values in this struct are in nanoseconds, while
  * the register values are in gpmc_fck cycles.
@@ -133,7 +136,7 @@ extern int gpmc_cs_request(int cs, unsigned long size, unsigned long *base);
 extern void gpmc_cs_free(int cs);
 extern int gpmc_cs_set_reserved(int cs, int reserved);
 extern int gpmc_cs_reserved(int cs);
-extern int gpmc_prefetch_enable(int cs, int dma_mode,
+extern int gpmc_prefetch_enable(int cs, int fifo_th, int dma_mode,
 					unsigned int u32_count, int is_write);
 extern int gpmc_prefetch_reset(int cs);
 extern void omap3_gpmc_save_context(void);
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index c4bbbd0..fea9f59 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -243,7 +243,8 @@ static void omap_read_buf_pref(struct mtd_info *mtd, u_char *buf, int len)
 	}
 
 	/* configure and start prefetch transfer */
-	ret = gpmc_prefetch_enable(info->gpmc_cs, 0x0, len, 0x0);
+	ret = gpmc_prefetch_enable(info->gpmc_cs,
+			PREFETCH_FIFOTHRESHOLD_MAX, 0x0, len, 0x0);
 	if (ret) {
 		/* PFPW engine is busy, use cpu copy method */
 		if (info->nand.options & NAND_BUSWIDTH_16)
@@ -287,7 +288,8 @@ static void omap_write_buf_pref(struct mtd_info *mtd,
 	}
 
 	/*  configure and start prefetch transfer */
-	ret = gpmc_prefetch_enable(info->gpmc_cs, 0x0, len, 0x1);
+	ret = gpmc_prefetch_enable(info->gpmc_cs,
+			PREFETCH_FIFOTHRESHOLD_MAX, 0x0, len, 0x1);
 	if (ret) {
 		/* PFPW engine is busy, use cpu copy method */
 		if (info->nand.options & NAND_BUSWIDTH_16)
@@ -340,10 +342,11 @@ static inline int omap_nand_dma_transfer(struct mtd_info *mtd, void *addr,
 	dma_addr_t dma_addr;
 	int ret;
 
-	/* The fifo depth is 64 bytes. We have a sync at each frame and frame
-	 * length is 64 bytes.
+	/* The fifo depth is 64 bytes max.
+	 * But configure the FIFO-threahold to 32 to get a sync at each frame
+	 * and frame length is 32 bytes.
 	 */
-	int buf_len = len >> 6;
+	int buf_len = len >> 5;
 
 	if (addr >= high_memory) {
 		struct page *p1;
@@ -382,7 +385,8 @@ static inline int omap_nand_dma_transfer(struct mtd_info *mtd, void *addr,
 					OMAP24XX_DMA_GPMC, OMAP_DMA_SRC_SYNC);
 	}
 	/*  configure and start prefetch transfer */
-	ret = gpmc_prefetch_enable(info->gpmc_cs, 0x1, len, is_write);
+	ret = gpmc_prefetch_enable(info->gpmc_cs,
+			PREFETCH_FIFOTHRESHOLD_MAX/2, 0x1, len, is_write);
 	if (ret)
 		/* PFPW engine is busy, use cpu copy methode */
 		goto out_copy;
@@ -518,7 +522,8 @@ static void omap_read_buf_irq_pref(struct mtd_info *mtd, u_char *buf, int len)
 	init_completion(&info->comp);
 
 	/*  configure and start prefetch transfer */
-	ret = gpmc_prefetch_enable(info->gpmc_cs, 0x0, len, 0x0);
+	ret = gpmc_prefetch_enable(info->gpmc_cs,
+			PREFETCH_FIFOTHRESHOLD_MAX/2, 0x0, len, 0x0);
 	if (ret)
 		/* PFPW engine is busy, use cpu copy methode */
 		goto out_copy;
@@ -563,8 +568,9 @@ static void omap_write_buf_irq_pref(struct mtd_info *mtd,
 	info->buf = (u_char *) buf;
 	init_completion(&info->comp);
 
-	/*  configure and start prefetch transfer */
-	ret = gpmc_prefetch_enable(info->gpmc_cs, 0x0, len, 0x1);
+	/* configure and start prefetch transfer : size=24 */
+	ret = gpmc_prefetch_enable(info->gpmc_cs,
+			(PREFETCH_FIFOTHRESHOLD_MAX*3)/8, 0x0, len, 0x1);
 	if (ret)
 		/* PFPW engine is busy, use cpu copy methode */
 		goto out_copy;
-- 
1.7.0.4



From s-ghorai at ti.com  Fri Nov 26 10:34:34 2010
From: s-ghorai at ti.com (Sukumar Ghorai)
Date: Fri, 26 Nov 2010 21:04:34 +0530
Subject: [PATCH v6 4/7] omap3: nand: prefetch in irq mode support
In-Reply-To: <1290785677-16005-1-git-send-email-s-ghorai@ti.com>
References: <1290785677-16005-1-git-send-email-s-ghorai@ti.com>
Message-ID: <1290785677-16005-5-git-send-email-s-ghorai@ti.com>

This patch enable prefetch-irq mode for nand transfer(read, write)

Signed-off-by: Vimal Singh <vimalsingh at ti.com>
Signed-off-by: Sukumar Ghorai <s-ghorai at ti.com>
---
 arch/arm/mach-omap2/board-flash.c      |    3 +
 arch/arm/plat-omap/include/plat/nand.h |    4 +-
 drivers/mtd/nand/omap2.c               |  169 ++++++++++++++++++++++++++++++++
 3 files changed, 175 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c
index 001c605..78abcd9 100644
--- a/arch/arm/mach-omap2/board-flash.c
+++ b/arch/arm/mach-omap2/board-flash.c
@@ -16,7 +16,9 @@
 #include <linux/platform_device.h>
 #include <linux/mtd/physmap.h>
 #include <linux/io.h>
+#include <plat/irqs.h>
 
+#include <plat/irqs.h>
 #include <plat/gpmc.h>
 #include <plat/nand.h>
 #include <plat/onenand.h>
@@ -148,6 +150,7 @@ __init board_nand_init(struct mtd_partition *nand_parts, u8 nr_parts, u8 cs)
 	if (cpu_is_omap3630())
 		board_nand_data.devsize = 1;
 
+	board_nand_data.gpmc_irq = OMAP_GPMC_IRQ_BASE + cs;
 	gpmc_nand_init(&board_nand_data);
 }
 #else
diff --git a/arch/arm/plat-omap/include/plat/nand.h b/arch/arm/plat-omap/include/plat/nand.h
index 78c0bdb..ae5e053 100644
--- a/arch/arm/plat-omap/include/plat/nand.h
+++ b/arch/arm/plat-omap/include/plat/nand.h
@@ -13,7 +13,8 @@
 enum nand_io {
 	NAND_OMAP_PREFETCH_POLLED = 0,	/* prefetch polled mode, default */
 	NAND_OMAP_POLLED,		/* polled mode, without prefetch */
-	NAND_OMAP_PREFETCH_DMA		/* prefetch enabled sDMA mode */
+	NAND_OMAP_PREFETCH_DMA,		/* prefetch enabled sDMA mode */
+	NAND_OMAP_PREFETCH_IRQ		/* prefetch enabled irq mode */
 };
 
 struct omap_nand_platform_data {
@@ -26,6 +27,7 @@ struct omap_nand_platform_data {
 	int			(*nand_setup)(void);
 	int			(*dev_ready)(struct omap_nand_platform_data *);
 	int			dma_channel;
+	int			gpmc_irq;
 	enum nand_io		xfer_type;
 	unsigned long		phys_base;
 	int			devsize;
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 6011e90..c4bbbd0 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -11,6 +11,7 @@
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
 #include <linux/delay.h>
+#include <linux/interrupt.h>
 #include <linux/jiffies.h>
 #include <linux/sched.h>
 #include <linux/mtd/mtd.h>
@@ -108,6 +109,13 @@ struct omap_nand_info {
 	unsigned long			phys_base;
 	struct completion		comp;
 	int				dma_ch;
+	int				gpmc_irq;
+	enum {
+		OMAP_NAND_IO_READ = 0,	/* read */
+		OMAP_NAND_IO_WRITE,	/* write */
+	} iomode;
+	u_char				*buf;
+	int					buf_len;
 };
 
 /**
@@ -436,6 +444,153 @@ static void omap_write_buf_dma_pref(struct mtd_info *mtd,
 		omap_nand_dma_transfer(mtd, (u_char *) buf, len, 0x1);
 }
 
+/*
+ * omap_nand_irq - GMPC irq handler
+ * @this_irq: gpmc irq number
+ * @dev: omap_nand_info structure pointer is passed here
+ */
+static irqreturn_t omap_nand_irq(int this_irq, void *dev)
+{
+	struct omap_nand_info *info = (struct omap_nand_info *) dev;
+	u32 bytes;
+	u32 irq_stat;
+
+	irq_stat = gpmc_read_status(GPMC_GET_IRQ_STATUS);
+	bytes = gpmc_read_status(GPMC_PREFETCH_FIFO_CNT);
+	bytes = bytes  & 0xFFFC; /* io in multiple of 4 bytes */
+	if (info->iomode == OMAP_NAND_IO_WRITE) { /* checks for write io */
+		if (irq_stat & 0x2)
+			goto done;
+
+		if (info->buf_len & (info->buf_len < bytes))
+			bytes = info->buf_len;
+		else if (!info->buf_len)
+			bytes = 0;
+		iowrite32_rep(info->nand.IO_ADDR_W,
+						(u32 *)info->buf, bytes >> 2);
+		info->buf = info->buf + bytes;
+		info->buf_len -= bytes;
+
+	} else {
+		ioread32_rep(info->nand.IO_ADDR_R,
+						(u32 *)info->buf, bytes >> 2);
+		info->buf = info->buf + bytes;
+
+		if (irq_stat & 0x2)
+			goto done;
+	}
+	gpmc_cs_configure(info->gpmc_cs, GPMC_SET_IRQ_STATUS, irq_stat);
+	irq_stat = gpmc_read_status(GPMC_GET_IRQ_STATUS);
+
+	return IRQ_HANDLED;
+
+done:
+	complete(&info->comp);
+	/* disable irq */
+	gpmc_cs_configure(info->gpmc_cs, GPMC_ENABLE_IRQ, 0);
+
+	/* clear status */
+	gpmc_cs_configure(info->gpmc_cs, GPMC_SET_IRQ_STATUS, irq_stat);
+	irq_stat = gpmc_read_status(GPMC_GET_IRQ_STATUS);
+
+	return IRQ_HANDLED;
+}
+
+/*
+ * omap_read_buf_irq_pref - read data from NAND controller into buffer
+ * @mtd: MTD device structure
+ * @buf: buffer to store date
+ * @len: number of bytes to read
+ */
+static void omap_read_buf_irq_pref(struct mtd_info *mtd, u_char *buf, int len)
+{
+	struct omap_nand_info *info = container_of(mtd,
+						struct omap_nand_info, mtd);
+	int ret = 0;
+
+	if (len <= mtd->oobsize) {
+		omap_read_buf_pref(mtd, buf, len);
+		return;
+	}
+
+	info->iomode = OMAP_NAND_IO_READ;
+	info->buf = buf;
+	init_completion(&info->comp);
+
+	/*  configure and start prefetch transfer */
+	ret = gpmc_prefetch_enable(info->gpmc_cs, 0x0, len, 0x0);
+	if (ret)
+		/* PFPW engine is busy, use cpu copy methode */
+		goto out_copy;
+
+	info->buf_len = len;
+	/* enable irq */
+	gpmc_cs_configure(info->gpmc_cs, GPMC_ENABLE_IRQ,
+		(GPMC_IRQ_FIFOEVENTENABLE | GPMC_IRQ_COUNT_EVENT));
+
+	/* waiting for read to complete */
+	wait_for_completion(&info->comp);
+
+	/* disable and stop the PFPW engine */
+	gpmc_prefetch_reset(info->gpmc_cs);
+	return;
+
+out_copy:
+	if (info->nand.options & NAND_BUSWIDTH_16)
+		omap_read_buf16(mtd, buf, len);
+	else
+		omap_read_buf8(mtd, buf, len);
+}
+
+/*
+ * omap_write_buf_irq_pref - write buffer to NAND controller
+ * @mtd: MTD device structure
+ * @buf: data buffer
+ * @len: number of bytes to write
+ */
+static void omap_write_buf_irq_pref(struct mtd_info *mtd,
+					const u_char *buf, int len)
+{
+	struct omap_nand_info *info = container_of(mtd,
+						struct omap_nand_info, mtd);
+	int ret = 0;
+	if (len <= mtd->oobsize) {
+		omap_write_buf_pref(mtd, buf, len);
+		return;
+	}
+
+	info->iomode = OMAP_NAND_IO_WRITE;
+	info->buf = (u_char *) buf;
+	init_completion(&info->comp);
+
+	/*  configure and start prefetch transfer */
+	ret = gpmc_prefetch_enable(info->gpmc_cs, 0x0, len, 0x1);
+	if (ret)
+		/* PFPW engine is busy, use cpu copy methode */
+		goto out_copy;
+
+	info->buf_len = len;
+	/* enable irq */
+	gpmc_cs_configure(info->gpmc_cs, GPMC_ENABLE_IRQ,
+			(GPMC_IRQ_FIFOEVENTENABLE | GPMC_IRQ_COUNT_EVENT));
+
+	/* waiting for write to complete */
+	wait_for_completion(&info->comp);
+	/* wait for data to flushed-out before reset the prefetch */
+	do {
+		ret = gpmc_read_status(GPMC_PREFETCH_COUNT);
+	} while (ret);
+	/* disable and stop the PFPW engine */
+	gpmc_prefetch_reset(info->gpmc_cs);
+	return;
+
+out_copy:
+	if (info->nand.options & NAND_BUSWIDTH_16)
+		omap_write_buf16(mtd, buf, len);
+	else
+		omap_write_buf8(mtd, buf, len);
+}
+
 /**
  * omap_verify_buf - Verify chip data against buffer
  * @mtd: MTD device structure
@@ -769,6 +924,7 @@ static int __devinit omap_nand_probe(struct platform_device *pdev)
 
 	info->gpmc_cs		= pdata->cs;
 	info->phys_base		= pdata->phys_base;
+	info->gpmc_irq		= pdata->gpmc_irq;
 
 	info->mtd.priv		= &info->nand;
 	info->mtd.name		= dev_name(&pdev->dev);
@@ -846,6 +1002,19 @@ static int __devinit omap_nand_probe(struct platform_device *pdev)
 		}
 		break;
 
+	case NAND_OMAP_PREFETCH_IRQ:
+		err = request_irq(info->gpmc_irq,
+				omap_nand_irq, IRQF_SHARED, "gpmc-nand", info);
+		if (err) {
+			dev_err(&pdev->dev, "requesting irq(%d) error:%d",
+							info->gpmc_irq, err);
+			goto out_release_mem_region;
+		} else {
+			info->nand.read_buf   = omap_read_buf_irq_pref;
+			info->nand.write_buf  = omap_write_buf_irq_pref;
+		}
+		break;
+
 	default:
 		dev_err(&pdev->dev,
 			"xfer_type(%d) not supported!\n", pdata->xfer_type);
-- 
1.7.0.4



From s-ghorai at ti.com  Fri Nov 26 10:34:33 2010
From: s-ghorai at ti.com (Sukumar Ghorai)
Date: Fri, 26 Nov 2010 21:04:33 +0530
Subject: [PATCH v6 3/7] omap: gpmc: enable irq mode in gpmc
In-Reply-To: <1290785677-16005-1-git-send-email-s-ghorai@ti.com>
References: <1290785677-16005-1-git-send-email-s-ghorai@ti.com>
Message-ID: <1290785677-16005-4-git-send-email-s-ghorai@ti.com>

add support the irq mode in GPMC.
gpmc_init() function move after omap_init_irq() as it has dependecy on irq.

Signed-off-by: Sukumar Ghorai <s-ghorai at ti.com>
---
 arch/arm/mach-omap2/board-2430sdp.c        |    1 +
 arch/arm/mach-omap2/board-3430sdp.c        |    1 +
 arch/arm/mach-omap2/board-3630sdp.c        |    1 +
 arch/arm/mach-omap2/board-4430sdp.c        |    2 +
 arch/arm/mach-omap2/board-am3517evm.c      |    2 +
 arch/arm/mach-omap2/board-apollon.c        |    1 +
 arch/arm/mach-omap2/board-cm-t35.c         |    1 +
 arch/arm/mach-omap2/board-devkit8000.c     |    1 +
 arch/arm/mach-omap2/board-generic.c        |    2 +
 arch/arm/mach-omap2/board-h4.c             |    1 +
 arch/arm/mach-omap2/board-igep0020.c       |    1 +
 arch/arm/mach-omap2/board-ldp.c            |    1 +
 arch/arm/mach-omap2/board-n8x0.c           |    2 +
 arch/arm/mach-omap2/board-omap3beagle.c    |    1 +
 arch/arm/mach-omap2/board-omap3evm.c       |    2 +
 arch/arm/mach-omap2/board-omap3pandora.c   |    2 +
 arch/arm/mach-omap2/board-omap3stalker.c   |    1 +
 arch/arm/mach-omap2/board-omap3touchbook.c |    1 +
 arch/arm/mach-omap2/board-omap4panda.c     |    2 +
 arch/arm/mach-omap2/board-overo.c          |    1 +
 arch/arm/mach-omap2/board-rx51.c           |    1 +
 arch/arm/mach-omap2/board-zoom2.c          |    2 +
 arch/arm/mach-omap2/board-zoom3.c          |    2 +
 arch/arm/mach-omap2/gpmc.c                 |   39 ++++++++++++++++++++++++++-
 arch/arm/mach-omap2/io.c                   |    2 -
 arch/arm/plat-omap/include/plat/gpmc.h     |    4 +++
 arch/arm/plat-omap/include/plat/irqs.h     |    9 +++++-
 27 files changed, 81 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index b527f8d..11c89dc 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -145,6 +145,7 @@ static void __init omap_2430sdp_init_irq(void)
 	omap_board_config_size = ARRAY_SIZE(sdp2430_config);
 	omap2_init_common_hw(NULL, NULL);
 	omap_init_irq();
+	gpmc_init();
 	omap_gpio_init();
 }
 
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 4e3742c..a040165 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -328,6 +328,7 @@ static void __init omap_3430sdp_init_irq(void)
 	omap3_pm_init_cpuidle(omap3_cpuidle_params_table);
 	omap2_init_common_hw(hyb18m512160af6_sdrc_params, NULL);
 	omap_init_irq();
+	gpmc_init();
 	omap_gpio_init();
 }
 
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
index bbcf580..17983ed 100644
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -76,6 +76,7 @@ static void __init omap_sdp_init_irq(void)
 	omap2_init_common_hw(h8mbx00u0mer0em_sdrc_params,
 			h8mbx00u0mer0em_sdrc_params);
 	omap_init_irq();
+	gpmc_init();
 	omap_gpio_init();
 }
 
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index df5a425..8d15604 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -34,6 +34,7 @@
 #include <plat/common.h>
 #include <plat/usb.h>
 #include <plat/mmc.h>
+#include <plat/gpmc.h>
 
 #include "hsmmc.h"
 #include "timer-gp.h"
@@ -222,6 +223,7 @@ static void __init omap_4430sdp_init_irq(void)
 	omap2_gp_clockevent_set_gptimer(1);
 #endif
 	gic_init_irq();
+	gpmc_init();
 	omap_gpio_init();
 }
 
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 0739950..460e3d1 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -35,6 +35,7 @@
 #include <plat/common.h>
 #include <plat/usb.h>
 #include <plat/display.h>
+#include <plat/gpmc.h>
 
 #include "mux.h"
 #include "control.h"
@@ -392,6 +393,7 @@ static void __init am3517_evm_init_irq(void)
 
 	omap2_init_common_hw(NULL, NULL);
 	omap_init_irq();
+	gpmc_init();
 	omap_gpio_init();
 }
 
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index 2c6db1a..8264e7a 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -280,6 +280,7 @@ static void __init omap_apollon_init_irq(void)
 	omap_board_config_size = ARRAY_SIZE(apollon_config);
 	omap2_init_common_hw(NULL, NULL);
 	omap_init_irq();
+	gpmc_init();
 	omap_gpio_init();
 	apollon_init_smc91x();
 }
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 63f764e..7c9a834 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -686,6 +686,7 @@ static void __init cm_t35_init_irq(void)
 	omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
 			     mt46h32m32lf6_sdrc_params);
 	omap_init_irq();
+	gpmc_init();
 	omap_gpio_init();
 }
 
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 53ac762..f82d3b7 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -447,6 +447,7 @@ static void __init devkit8000_init_irq(void)
 	omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
 			     mt46h32m32lf6_sdrc_params);
 	omap_init_irq();
+	gpmc_init();
 #ifdef CONFIG_OMAP_32K_TIMER
 	omap2_gp_clockevent_set_gptimer(12);
 #endif
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index b1c2c9a..0b0d2cb 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -29,6 +29,7 @@
 #include <plat/usb.h>
 #include <plat/board.h>
 #include <plat/common.h>
+#include <plat/gpmc.h>
 
 static struct omap_board_config_kernel generic_config[] = {
 };
@@ -39,6 +40,7 @@ static void __init omap_generic_init_irq(void)
 	omap_board_config_size = ARRAY_SIZE(generic_config);
 	omap2_init_common_hw(NULL, NULL);
 	omap_init_irq();
+	gpmc_init();
 }
 
 static void __init omap_generic_init(void)
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 929993b..41b04c4 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -293,6 +293,7 @@ static void __init omap_h4_init_irq(void)
 	omap_board_config_size = ARRAY_SIZE(h4_config);
 	omap2_init_common_hw(NULL, NULL);
 	omap_init_irq();
+	gpmc_init();
 	omap_gpio_init();
 	h4_init_flash();
 }
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 5e035a5..c4de273 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -497,6 +497,7 @@ static void __init igep2_init_irq(void)
 	omap_board_config_size = ARRAY_SIZE(igep2_config);
 	omap2_init_common_hw(m65kxxxxam_sdrc_params, m65kxxxxam_sdrc_params);
 	omap_init_irq();
+	gpmc_init();
 	omap_gpio_init();
 }
 
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 001fd97..0f66645 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -294,6 +294,7 @@ static void __init omap_ldp_init_irq(void)
 	omap_board_config_size = ARRAY_SIZE(ldp_config);
 	omap2_init_common_hw(NULL, NULL);
 	omap_init_irq();
+	gpmc_init();
 	omap_gpio_init();
 	ldp_init_smsc911x();
 }
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index e823c70..4f7c714 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -33,6 +33,7 @@
 #include <plat/onenand.h>
 #include <plat/mmc.h>
 #include <plat/serial.h>
+#include <plat/gpmc.h>
 
 #include "mux.h"
 
@@ -641,6 +642,7 @@ static void __init n8x0_init_irq(void)
 {
 	omap2_init_common_hw(NULL, NULL);
 	omap_init_irq();
+	gpmc_init();
 	omap_gpio_init();
 }
 
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 14f4224..a83c3f3 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -487,6 +487,7 @@ static void __init omap3_beagle_init_irq(void)
 	omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
 			     mt46h32m32lf6_sdrc_params);
 	omap_init_irq();
+	gpmc_init();
 #ifdef CONFIG_OMAP_32K_TIMER
 	omap2_gp_clockevent_set_gptimer(12);
 #endif
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index b04365c..21cc9e5 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -43,6 +43,7 @@
 #include <plat/common.h>
 #include <plat/mcspi.h>
 #include <plat/display.h>
+#include <plat/gpmc.h>
 
 #include "mux.h"
 #include "sdram-micron-mt46h32m32lf-6.h"
@@ -625,6 +626,7 @@ static void __init omap3_evm_init_irq(void)
 	omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
 	omap2_init_common_hw(mt46h32m32lf6_sdrc_params, NULL);
 	omap_init_irq();
+	gpmc_init();
 	omap_gpio_init();
 }
 
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index 89ed1be..e095f1d 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -47,6 +47,7 @@
 #include <plat/mcspi.h>
 #include <plat/usb.h>
 #include <plat/display.h>
+#include <plat/gpmc.h>
 #include <plat/nand.h>
 
 #include "mux.h"
@@ -639,6 +640,7 @@ static void __init omap3pandora_init_irq(void)
 	omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
 			     mt46h32m32lf6_sdrc_params);
 	omap_init_irq();
+	gpmc_init();
 	omap_gpio_init();
 }
 
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index f252721..c07ba77 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -586,6 +586,7 @@ static void __init omap3_stalker_init_irq(void)
 	omap_board_config_size = ARRAY_SIZE(omap3_stalker_config);
 	omap2_init_common_hw(mt46h32m32lf6_sdrc_params, NULL);
 	omap_init_irq();
+	gpmc_init();
 #ifdef CONFIG_OMAP_32K_TIMER
 	omap2_gp_clockevent_set_gptimer(12);
 #endif
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index 41104bb..d549763 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -425,6 +425,7 @@ static void __init omap3_touchbook_init_irq(void)
 	omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
 			     mt46h32m32lf6_sdrc_params);
 	omap_init_irq();
+	gpmc_init();
 #ifdef CONFIG_OMAP_32K_TIMER
 	omap2_gp_clockevent_set_gptimer(12);
 #endif
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 1ecd0a6..a03a021 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -36,6 +36,7 @@
 #include <plat/common.h>
 #include <plat/usb.h>
 #include <plat/mmc.h>
+#include <plat/gpmc.h>
 #include "timer-gp.h"
 
 #include "hsmmc.h"
@@ -78,6 +79,7 @@ static void __init omap4_panda_init_irq(void)
 {
 	omap2_init_common_hw(NULL, NULL);
 	gic_init_irq();
+	gpmc_init();
 	omap_gpio_init();
 }
 
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 7053bc0..c5fe2b0 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -416,6 +416,7 @@ static void __init overo_init_irq(void)
 	omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
 			     mt46h32m32lf6_sdrc_params);
 	omap_init_irq();
+	gpmc_init();
 	omap_gpio_init();
 }
 
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 36f2cf4..3be8729 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -107,6 +107,7 @@ static void __init rx51_init_irq(void)
 	omap3_pm_init_cpuidle(rx51_cpuidle_params);
 	sdrc_params = rx51_get_sdram_timings();
 	omap2_init_common_hw(sdrc_params, sdrc_params);
+	gpmc_init();
 	omap_init_irq();
 	omap_gpio_init();
 }
diff --git a/arch/arm/mach-omap2/board-zoom2.c b/arch/arm/mach-omap2/board-zoom2.c
index 2992a9f..ab0a05d 100644
--- a/arch/arm/mach-omap2/board-zoom2.c
+++ b/arch/arm/mach-omap2/board-zoom2.c
@@ -21,6 +21,7 @@
 
 #include <plat/common.h>
 #include <plat/board.h>
+#include <plat/gpmc.h>
 
 #include <mach/board-zoom.h>
 
@@ -33,6 +34,7 @@ static void __init omap_zoom2_init_irq(void)
 	omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
 				 mt46h32m32lf6_sdrc_params);
 	omap_init_irq();
+	gpmc_init();
 	omap_gpio_init();
 }
 
diff --git a/arch/arm/mach-omap2/board-zoom3.c b/arch/arm/mach-omap2/board-zoom3.c
index 5adde12..d637d98 100644
--- a/arch/arm/mach-omap2/board-zoom3.c
+++ b/arch/arm/mach-omap2/board-zoom3.c
@@ -21,6 +21,7 @@
 #include <plat/common.h>
 #include <plat/board.h>
 #include <plat/usb.h>
+#include <plat/gpmc.h>
 
 #include "board-flash.h"
 #include "mux.h"
@@ -77,6 +78,7 @@ static void __init omap_zoom_init_irq(void)
 	omap2_init_common_hw(h8mbx00u0mer0em_sdrc_params,
 			h8mbx00u0mer0em_sdrc_params);
 	omap_init_irq();
+	gpmc_init();
 	omap_gpio_init();
 }
 
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index f46933b..cfaf357 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -14,6 +14,7 @@
  */
 #undef DEBUG
 
+#include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/err.h>
@@ -22,12 +23,12 @@
 #include <linux/spinlock.h>
 #include <linux/io.h>
 #include <linux/module.h>
+#include <linux/interrupt.h>
 
 #include <asm/mach-types.h>
 #include <plat/gpmc.h>
 
 #include <plat/sdrc.h>
-
 /* GPMC register offsets */
 #define GPMC_REVISION		0x00
 #define GPMC_SYSCONFIG		0x10
@@ -100,6 +101,8 @@ static void __iomem *gpmc_base;
 
 static struct clk *gpmc_l3_clk;
 
+static irqreturn_t gpmc_handle_irq(int irq, void *dev);
+
 static void gpmc_write_reg(int idx, u32 val)
 {
 	__raw_writel(val, gpmc_base + idx);
@@ -487,6 +490,10 @@ int gpmc_cs_configure(int cs, int cmd, int wval)
 	u32 regval = 0;
 
 	switch (cmd) {
+	case GPMC_ENABLE_IRQ:
+		gpmc_write_reg(GPMC_IRQENABLE, wval);
+		break;
+
 	case GPMC_SET_IRQ_STATUS:
 		gpmc_write_reg(GPMC_IRQSTATUS, wval);
 		break;
@@ -670,7 +677,8 @@ static void __init gpmc_mem_init(void)
 
 void __init gpmc_init(void)
 {
-	u32 l;
+	u32 l, irq;
+	int cs;
 	char *ck = NULL;
 
 	if (cpu_is_omap24xx()) {
@@ -713,6 +721,33 @@ void __init gpmc_init(void)
 	l |= (0x02 << 3) | (1 << 0);
 	gpmc_write_reg(GPMC_SYSCONFIG, l);
 	gpmc_mem_init();
+
+	/* initalize the irq_chained */
+	irq = OMAP_GPMC_IRQ_BASE;
+	for (cs = 0; cs < GPMC_CS_NUM; cs++) {
+		set_irq_handler(irq, handle_simple_irq);
+		set_irq_flags(irq, IRQF_VALID);
+		irq++;
+	}
+
+	if (request_irq(INT_34XX_GPMC_IRQ,
+			gpmc_handle_irq, IRQF_SHARED, "gpmc", gpmc_base))
+		printk(KERN_ERR "gpmc: irq-%d could not claim: err %d\n",
+						INT_34XX_GPMC_IRQ, irq);
+}
+
+static irqreturn_t gpmc_handle_irq(int irq, void *dev)
+{
+	u8 cs;
+
+	if (irq != INT_34XX_GPMC_IRQ)
+		return IRQ_HANDLED;
+	/* check cs to invoke the irq */
+	cs = ((gpmc_read_reg(GPMC_PREFETCH_CONFIG1)) >> CS_NUM_SHIFT) & 0x7;
+	if (OMAP_GPMC_IRQ_BASE+cs <= OMAP_GPMC_IRQ_END)
+		generic_handle_irq(OMAP_GPMC_IRQ_BASE+cs);
+
+	return IRQ_HANDLED;
 }
 
 #ifdef CONFIG_ARCH_OMAP3
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 40562dd..4d11621 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -30,7 +30,6 @@
 
 #include <plat/sram.h>
 #include <plat/sdrc.h>
-#include <plat/gpmc.h>
 #include <plat/serial.h>
 
 #include "clock2xxx.h"
@@ -351,5 +350,4 @@ void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0,
 		omap2_sdrc_init(sdrc_cs0, sdrc_cs1);
 		_omap2_init_reprogram_sdrc();
 	}
-	gpmc_init();
 }
diff --git a/arch/arm/plat-omap/include/plat/gpmc.h b/arch/arm/plat-omap/include/plat/gpmc.h
index 9fd99b9..054e704 100644
--- a/arch/arm/plat-omap/include/plat/gpmc.h
+++ b/arch/arm/plat-omap/include/plat/gpmc.h
@@ -41,6 +41,8 @@
 #define GPMC_NAND_ADDRESS	0x0000000b
 #define GPMC_NAND_DATA		0x0000000c
 
+#define GPMC_ENABLE_IRQ		0x0000000d
+
 /* ECC commands */
 #define GPMC_ECC_READ		0 /* Reset Hardware ECC for read */
 #define GPMC_ECC_WRITE		1 /* Reset Hardware ECC for write */
@@ -78,6 +80,8 @@
 #define WR_RD_PIN_MONITORING		0x00600000
 #define GPMC_PREFETCH_STATUS_FIFO_CNT(val)	((val >> 24) & 0x7F)
 #define GPMC_PREFETCH_STATUS_COUNT(val)	(val & 0x00003fff)
+#define GPMC_IRQ_FIFOEVENTENABLE	0x01
+#define GPMC_IRQ_COUNT_EVENT		0x02
 
 /*
  * Note that all values in this struct are in nanoseconds, while
diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h
index 65e20a6..b90b9ef 100644
--- a/arch/arm/plat-omap/include/plat/irqs.h
+++ b/arch/arm/plat-omap/include/plat/irqs.h
@@ -318,6 +318,7 @@
 #define INT_34XX_PRCM_MPU_IRQ	11
 #define INT_34XX_MCBSP1_IRQ	16
 #define INT_34XX_MCBSP2_IRQ	17
+#define INT_34XX_GPMC_IRQ	20
 #define INT_34XX_MCBSP3_IRQ	22
 #define INT_34XX_MCBSP4_IRQ	23
 #define INT_34XX_CAM_IRQ	24
@@ -411,7 +412,13 @@
 #define TWL_IRQ_END		TWL6030_IRQ_END
 #endif
 
-#define NR_IRQS			TWL_IRQ_END
+/* GPMC related */
+#define OMAP_GPMC_IRQ_BASE	(TWL_IRQ_END)
+#define OMAP_GPMC_NR_IRQS	7
+#define OMAP_GPMC_IRQ_END	(OMAP_GPMC_IRQ_BASE + OMAP_GPMC_NR_IRQS)
+
+
+#define NR_IRQS			OMAP_GPMC_IRQ_END
 
 #define OMAP_IRQ_BIT(irq)	(1 << ((irq) % 32))
 
-- 
1.7.0.4



From dedekind1 at gmail.com  Fri Nov 26 10:37:28 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Fri, 26 Nov 2010 17:37:28 +0200
Subject: [PATCH] mtd/fsmc.h: including linux/io.h for definition of readl
In-Reply-To: <ae7281ab5364fe0c2b1a7375d5d53ddfc12172d6.1289194908.git.viresh.kumar@st.com>
References: <ae7281ab5364fe0c2b1a7375d5d53ddfc12172d6.1289194908.git.viresh.kumar@st.com>
Message-ID: <1290785848.2552.17.camel@localhost>

On Mon, 2010-11-08 at 11:17 +0530, Viresh Kumar wrote:
> Signed-off-by: Viresh Kumar <viresh.kumar at st.com>
> ---
>  include/linux/mtd/fsmc.h |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)

Pushed to l2-mtd-2.6.git, thanks.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Fri Nov 26 10:37:30 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Fri, 26 Nov 2010 17:37:30 +0200
Subject: [PATCH] mtd: mtdchar: fix information leak to userland
In-Reply-To: <1289054485-18190-1-git-send-email-segooon@gmail.com>
References: <1289054485-18190-1-git-send-email-segooon@gmail.com>
Message-ID: <1290785850.2552.18.camel@localhost>

On Sat, 2010-11-06 at 17:41 +0300, Vasiliy Kulikov wrote:
> Structure mtd_info_user is copied to userland with padding byted
> between "type" and "flags" fields uninitialized.  It leads to leaking
> of contents of kernel stack memory.
> 
> Signed-off-by: Vasiliy Kulikov <segooon at gmail.com>

Pushed to l2-mtd-2.6.git, thanks.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Fri Nov 26 10:40:28 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Fri, 26 Nov 2010 17:40:28 +0200
Subject: [PATCH 06/17][trivial] mtd: Remove unnecessary casts of void
	ptr returning alloc function return values
In-Reply-To: <alpine.LNX.2.00.1011082327290.23697@swampdragon.chaosbits.net>
References: <alpine.LNX.2.00.1011082327290.23697@swampdragon.chaosbits.net>
Message-ID: <1290786028.2552.20.camel@localhost>

On Tue, 2010-11-09 at 00:09 +0100, Jesper Juhl wrote:
> Hi,
> 
> The [vk][cmz]alloc(_node) family of functions return void pointers which
> it's completely unnecessary/pointless to cast to other pointer types since
> that happens implicitly.
> 
> This patch removes such casts from drivers/mtd/

Pushed to l2-mtd-2.6.git, thanks.


-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Fri Nov 26 10:43:04 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Fri, 26 Nov 2010 17:43:04 +0200
Subject: [PATCH 1/1] [MTD]:CORE Fix wrong check register_blkdev return
	value
In-Reply-To: <1289386349-29033-1-git-send-email-Frank.Li@freescale.com>
References: <1289386349-29033-1-git-send-email-Frank.Li@freescale.com>
Message-ID: <1290786184.2552.21.camel@localhost>

On Wed, 2010-11-10 at 18:52 +0800, Frank Li wrote:
> register_blkdev return 1..255 when major = 0.
> 
> if (ret ) {
> 	printk(KERN_WARNING "Unable to register %s block device on major %d: %d\n",
> 		tr->name, tr->major, ret);
> 	      mutex_unlock(&mtd_table_mutex);
> 	return ret;
> }
> 
> Above code will return fail when register_blkdev return allocated major number.
> 
> Signed-off-by: Frank Li <Frank.Li at freescale.com>

This patch is already in upstream.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From Artem.Bityutskiy at nokia.com  Fri Nov 26 10:45:30 2010
From: Artem.Bityutskiy at nokia.com (Artem Bityutskiy)
Date: Fri, 26 Nov 2010 17:45:30 +0200
Subject: [PATCH] MTD: NAND: jz4740: Make 'struct platform_driver
	jz_nand_driver' static
In-Reply-To: <1289498568-12191-1-git-send-email-lars@metafoo.de>
References: <1289498568-12191-1-git-send-email-lars@metafoo.de>
Message-ID: <1290786330.2552.22.camel@localhost>

On Thu, 2010-11-11 at 19:02 +0100, Lars-Peter Clausen wrote:
> Signed-off-by: Lars-Peter Clausen <lars at metafoo.de>
> ---
>  drivers/mtd/nand/jz4740_nand.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 

Pushed both patches to l2-mtd-2.6.git, thanks.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Fri Nov 26 10:55:33 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Fri, 26 Nov 2010 17:55:33 +0200
Subject: [PATCH] mtd: Fix section mismatch on sst25l
In-Reply-To: <843351.91050.qm@web51004.mail.re2.yahoo.com>
References: <843351.91050.qm@web51004.mail.re2.yahoo.com>
Message-ID: <1290786933.2552.23.camel@localhost>

On Fri, 2010-11-12 at 08:03 -0800, Fabio Estevam wrote:
> Building the kernel with 'make CONFIG_DEBUG_SECTION_MISMATCH=y?
> 
> resulted in:
> 
> WARNING: vmlinux.o(.data+0x15938): Section mismatch in reference from
> the variable sst25l_driver to the function .init.text:sst25l_probe()
> The variable sst25l_driver references
> the function __init sst25l_probe()
> If the reference is valid then annotate the
> variable with __init* or __refdata (see linux/init.h) or name the variable:
> *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
> 
> Fix the section mismatch.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
> ---
>  drivers/mtd/devices/sst25l.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
> index 684247a..925b1a9 100644
> --- a/drivers/mtd/devices/sst25l.c
> +++ b/drivers/mtd/devices/sst25l.c
> @@ -375,7 +375,7 @@ static struct flash_info *__init sst25l_match_device(struct spi_device *spi)
>  	return flash_info;
>  }
>  
> -static int __init sst25l_probe(struct spi_device *spi)
> +static int __devinit sst25l_probe(struct spi_device *spi)
>  {
>  	struct flash_info *flash_info;
>  	struct sst25l_flash *flash;

Should then sst25l_match_device be __devinit as well?

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Fri Nov 26 10:56:32 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Fri, 26 Nov 2010 17:56:32 +0200
Subject: change in how ubiformat works
In-Reply-To: <AANLkTi=rE+u0OiGXj=HxGYRB9F4p228GpHzGadJm+982@mail.gmail.com>
References: <AANLkTi=rE+u0OiGXj=HxGYRB9F4p228GpHzGadJm+982@mail.gmail.com>
Message-ID: <1290786992.2552.24.camel@localhost>

On Fri, 2010-11-12 at 13:47 -0500, twebb wrote:
> I use a sequence as follows: " flash_erase - ubiformat - nanddump -
> verify " to confirm that a UBI image was properly stored in NAND
> flash.  I realize that flash_erase is not recommended because it
> destroys erase counters, but this is only done on virgin flash so
> should not be an issue.
> 
> However, I recently upgraded the mtd-utils, and particularly ubiformat
> from 1.4 to 1.5, and now I see that what I read back (via nanddump)
> does not match the original UBI image.  Can anyone confirm whether
> ubiformat.c changes sometime between 1.4 and 1.5 would result in this
> behavior?  I have looked at ubiformat.c changes and am wondering if it
> has to do with image sequence number support.

Try to bisect it and find the commit id which changed the behavior.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Fri Nov 26 10:59:14 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Fri, 26 Nov 2010 17:59:14 +0200
Subject: [PATCH 07/14] drivers/mtd/maps: Use printf extension %pR for
	struct resource
In-Reply-To: <5f4704a88f6e5bf55f19b4e6d8c7abce6ea20f71.1289597644.git.joe@perches.com>
References: <cover.1289597644.git.joe@perches.com>
	<5f4704a88f6e5bf55f19b4e6d8c7abce6ea20f71.1289597644.git.joe@perches.com>
Message-ID: <1290787154.2552.25.camel@localhost>

On Fri, 2010-11-12 at 13:37 -0800, Joe Perches wrote:
> Using %pR standardizes the struct resource output.
> 
> Signed-off-by: Joe Perches <joe at perches.com>
> ---
>  drivers/mtd/maps/amd76xrom.c       |    7 ++-----
>  drivers/mtd/maps/ck804xrom.c       |    7 ++-----
>  drivers/mtd/maps/esb2rom.c         |    9 +++------
>  drivers/mtd/maps/ichxrom.c         |    9 +++------
>  drivers/mtd/maps/physmap_of.c      |    4 +---
>  drivers/mtd/maps/scx200_docflash.c |    5 ++---
>  6 files changed, 13 insertions(+), 28 deletions(-)

Pushed this patch and patch N8 to l2-mtd-2.6.git, thanks.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Fri Nov 26 11:03:28 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Fri, 26 Nov 2010 18:03:28 +0200
Subject: change in how ubiformat works
In-Reply-To: <AANLkTi=rE+u0OiGXj=HxGYRB9F4p228GpHzGadJm+982@mail.gmail.com>
References: <AANLkTi=rE+u0OiGXj=HxGYRB9F4p228GpHzGadJm+982@mail.gmail.com>
Message-ID: <1290787408.2552.28.camel@localhost>

On Fri, 2010-11-12 at 13:47 -0500, twebb wrote:
> I use a sequence as follows: " flash_erase - ubiformat - nanddump -
> verify " to confirm that a UBI image was properly stored in NAND
> flash.  I realize that flash_erase is not recommended because it
> destroys erase counters, but this is only done on virgin flash so
> should not be an issue.
> 
> However, I recently upgraded the mtd-utils, and particularly ubiformat
> from 1.4 to 1.5, and now I see that what I read back (via nanddump)
> does not match the original UBI image.  Can anyone confirm whether
> ubiformat.c changes sometime between 1.4 and 1.5 would result in this
> behavior?  I have looked at ubiformat.c changes and am wondering if it
> has to do with image sequence number support.


Ok, just define your own sequence number. Use, say, --image-seq=100 both
with ubinize and ubiformat.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Fri Nov 26 11:05:59 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Fri, 26 Nov 2010 18:05:59 +0200
Subject: [PATCH] fs: jffs2: fix error value sign
In-Reply-To: <1289765320-6071-1-git-send-email-segoon@openwall.com>
References: <1289765320-6071-1-git-send-email-segoon@openwall.com>
Message-ID: <1290787559.2552.29.camel@localhost>

On Sun, 2010-11-14 at 23:08 +0300, Vasiliy Kulikov wrote:
> do_verify_xattr_datum(), do_load_xattr_datum(), load_xattr_datum()
> and verify_xattr_ref() should return negative value on error.
> Sometimes they return EIO that is positive.  Change this to -EIO.
> 
> Signed-off-by: Vasiliy Kulikov <segoon at openwall.com>

Pushed to l2-mtd-2.6.git, thanks.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From Artem.Bityutskiy at nokia.com  Fri Nov 26 11:09:15 2010
From: Artem.Bityutskiy at nokia.com (Artem Bityutskiy)
Date: Fri, 26 Nov 2010 18:09:15 +0200
Subject: [PATCH] mtd: cfi_fixup: remove unused 'param' parameter
In-Reply-To: <20101117113550.15860.31152.stgit@dev.siriade.com>
References: <20101117113550.15860.31152.stgit@dev.siriade.com>
Message-ID: <1290787755.2552.31.camel@localhost>

On Wed, 2010-11-17 at 12:35 +0100, Guillaume LECERF wrote:
> The 'param' parameter has never been used since its introduction, so
> simply remove it.
> 
> Signed-off-by: Guillaume LECERF <glecerf at gmail.com>

Pushed to l2-mtd-2.6.git, thanks!

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Fri Nov 26 11:18:39 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Fri, 26 Nov 2010 18:18:39 +0200
Subject: [PATCH] mtd: fix nand kernel-doc warnings
In-Reply-To: <20101118150221.2f38e9b0.randy.dunlap@oracle.com>
References: <20101118150221.2f38e9b0.randy.dunlap@oracle.com>
Message-ID: <1290788319.2552.32.camel@localhost>

On Thu, 2010-11-18 at 15:02 -0800, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap at oracle.com>
> 
> Warning(include/linux/mtd/nand.h:543): No description found for parameter 'badblockbits'
> Warning(drivers/mtd/nand/nand_bbt.c:1101): No description found for parameter 'mtd'
> 
> Signed-off-by: Randy Dunlap <randy.dunlap at oracle.com>
> Cc:	David Woodhouse <dwmw2 at infradead.org>
> Cc:	linux-mtd at lists.infradead.org
> ---
>  drivers/mtd/nand/nand_bbt.c |    3 ++-
>  include/linux/mtd/nand.h    |    2 ++
>  2 files changed, 4 insertions(+), 1 deletion(-)

Pushed to l2-mtd-2.6.git, thanks!

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Fri Nov 26 11:21:53 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Fri, 26 Nov 2010 18:21:53 +0200
Subject: [PATCH 1/1] mtd: nand: add check for out of page read
In-Reply-To: <1290156045-11719-1-git-send-email-r64343@freescale.com>
References: <1290156045-11719-1-git-send-email-r64343@freescale.com>
Message-ID: <1290788513.2552.33.camel@localhost>

On Fri, 2010-11-19 at 16:40 +0800, Jason Liu wrote:
> When run mtd_oobtest case, there will be one error for step(4),
> which turned out it need add one check for out of page read in
> nand_do_read_oob just like mtd_do_write_oob did it already.
> This commit also fix one typo error for comments in mtd_do_write_oob
> 
> Signed-off-by: Jason Liu <r64343 at freescale.com>
> ---
>  drivers/mtd/nand/nand_base.c |    9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)

Pushed to l2-mtd-2.6.git, thanks!

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Fri Nov 26 11:24:55 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Fri, 26 Nov 2010 18:24:55 +0200
Subject: [PATCH 2/4] mtd: FSMC NAND replace all use of uintNN_t with uN
In-Reply-To: <1290201121-15263-1-git-send-email-linus.walleij@stericsson.com>
References: <1290201121-15263-1-git-send-email-linus.walleij@stericsson.com>
Message-ID: <1290788695.2552.35.camel@localhost>

On Fri, 2010-11-19 at 22:12 +0100, Linus Walleij wrote:
> The short kernel versions of the basic types makes the world more
> readable.
> 
> Signed-off-by: Linus Walleij <linus.walleij at stericsson.com>

I do not think dwmw2 will merge this one because he often claimed that
u32 cannot be better than uint32_t, because the latter is C99 standard,
but the former is not. So I'd not do this, at least not at the area he
looks after.

:-)

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From dedekind1 at gmail.com  Fri Nov 26 11:26:08 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Fri, 26 Nov 2010 18:26:08 +0200
Subject: [patch] jffs2: typo in comment
In-Reply-To: <20101115182005.GA3941@bicker>
References: <20101115182005.GA3941@bicker>
Message-ID: <1290788768.2552.36.camel@localhost>

On Mon, 2010-11-15 at 21:20 +0300, Dan Carpenter wrote:
> It says FB instead of FS (file system).
> 
> Signed-off-by: Dan Carpenter <error27 at gmail.com>

Pushed to l2-mtd-2.6.git, thanks!

-- 
Best Regards,
Artem Bityutskiy (????? ????????)



From fabio.estevam at freescale.com  Fri Nov 26 11:31:44 2010
From: fabio.estevam at freescale.com (Fabio Estevam)
Date: Fri, 26 Nov 2010 14:31:44 -0200
Subject: [PATCH v2] mtd: Fix section mismatch on sst25l
Message-ID: <1290789104-1097-1-git-send-email-fabio.estevam@freescale.com>

Building the kernel with 'make CONFIG_DEBUG_SECTION_MISMATCH=y??

resulted in:

WARNING: vmlinux.o(.data+0x15938): Section mismatch in reference from
the variable sst25l_driver to the function .init.text:sst25l_probe()
The variable sst25l_driver references
the function __init sst25l_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

Fix the section mismatch.

Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
---
Changes since v1:
- also mark sst25l_match_device as __devinit

 drivers/mtd/devices/sst25l.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
index 684247a..c163e61 100644
--- a/drivers/mtd/devices/sst25l.c
+++ b/drivers/mtd/devices/sst25l.c
@@ -335,7 +335,7 @@ out:
 	return ret;
 }
 
-static struct flash_info *__init sst25l_match_device(struct spi_device *spi)
+static struct flash_info *__devinit sst25l_match_device(struct spi_device *spi)
 {
 	struct flash_info *flash_info = NULL;
 	struct spi_message m;
@@ -375,7 +375,7 @@ static struct flash_info *__init sst25l_match_device(struct spi_device *spi)
 	return flash_info;
 }
 
-static int __init sst25l_probe(struct spi_device *spi)
+static int __devinit sst25l_probe(struct spi_device *spi)
 {
 	struct flash_info *flash_info;
 	struct sst25l_flash *flash;
-- 
1.6.0.4




From rpjday at crashcourse.ca  Fri Nov 26 11:29:29 2010
From: rpjday at crashcourse.ca (Robert P. J. Day)
Date: Fri, 26 Nov 2010 11:29:29 -0500 (EST)
Subject: Unused config options in drivers/mtd (Re: running my kernel
	scanning scripts on your favourite part of the tree)
In-Reply-To: <4CEE8B70.4070500@suse.cz>
References: <alpine.DEB.2.00.1011090711410.5783@localhost6.localdomain6>
	<4CEE8B70.4070500@suse.cz>
Message-ID: <alpine.DEB.2.00.1011261122140.13435@localhost6.localdomain6>

On Thu, 25 Nov 2010, Michal Marek wrote:

> CC the mtd maintainer and mailinglist and adjusted subject. Robert, you
> should report such bugs to the maintainer / author of the code in
> question, otherwise your mail might end up unnoticed on LKML.
>
> Michal

 {sigh}.  the point of my earlier post was not specifically to point
out unused kernel config vars in the MTD code; rather, it was to
suggest that anyone who's interested can run my scanning scripts to
locate such things for themselves in their favourite subsystem(s) -- i
simply used the MTD code as a working example.

  and, BTW, there are still dead config variables in the code that go
back *several* major versions, even though i've documented them just
as many times here:

  http://www.crashcourse.ca/wiki/index.php/Kernel_cleanup

so if you're curious, the scripts are here:

  http://www.crashcourse.ca/wiki/index.php/Kernel_cleanup_scripts

rday

--

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================


From mmarek at suse.cz  Fri Nov 26 11:42:24 2010
From: mmarek at suse.cz (Michal Marek)
Date: Fri, 26 Nov 2010 17:42:24 +0100
Subject: Unused config options in drivers/mtd (Re: running my kernel
	scanning scripts on your favourite part of the tree)
In-Reply-To: <alpine.DEB.2.00.1011261122140.13435@localhost6.localdomain6>
References: <alpine.DEB.2.00.1011090711410.5783@localhost6.localdomain6>
	<4CEE8B70.4070500@suse.cz>
	<alpine.DEB.2.00.1011261122140.13435@localhost6.localdomain6>
Message-ID: <4CEFE370.9030505@suse.cz>

On 26.11.2010 17:29, Robert P. J. Day wrote:
>   and, BTW, there are still dead config variables in the code that go
> back *several* major versions, even though i've documented them just
> as many times here:
> 
>   http://www.crashcourse.ca/wiki/index.php/Kernel_cleanup

That might be the problem - that you are document the bugs in your wiki,
instead of sending reports to the maintainers directly :).

Michal


From rpjday at crashcourse.ca  Fri Nov 26 11:52:18 2010
From: rpjday at crashcourse.ca (Robert P. J. Day)
Date: Fri, 26 Nov 2010 11:52:18 -0500 (EST)
Subject: Unused config options in drivers/mtd (Re: running my kernel
	scanning scripts on your favourite part of the tree)
In-Reply-To: <4CEFE370.9030505@suse.cz>
References: <alpine.DEB.2.00.1011090711410.5783@localhost6.localdomain6>
	<4CEE8B70.4070500@suse.cz>
	<alpine.DEB.2.00.1011261122140.13435@localhost6.localdomain6>
	<4CEFE370.9030505@suse.cz>
Message-ID: <alpine.DEB.2.00.1011261151410.13688@localhost6.localdomain6>

On Fri, 26 Nov 2010, Michal Marek wrote:

> On 26.11.2010 17:29, Robert P. J. Day wrote:
> >   and, BTW, there are still dead config variables in the code that go
> > back *several* major versions, even though i've documented them just
> > as many times here:
> >
> >   http://www.crashcourse.ca/wiki/index.php/Kernel_cleanup
>
> That might be the problem - that you are document the bugs in your
> wiki, instead of sending reports to the maintainers directly :).

  yes, the obvious problem here is that i clearly haven't been putting
enough effort into this.  i'll keep that in mind.

rday

-- 

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================


From wolfgang at leila.ping.de  Fri Nov 26 12:29:12 2010
From: wolfgang at leila.ping.de (Wolfgang Wegner)
Date: Fri, 26 Nov 2010 18:29:12 +0100
Subject: UBIFS oops after remount ro
In-Reply-To: <1290785057.2552.14.camel@localhost>
References: <20101126135005.GV23237@leila.ping.de>
	<1290785057.2552.14.camel@localhost>
Message-ID: <20101126172912.GX23237@leila.ping.de>

Hi,

thank you for the hints!

I am currently trying to reproduce the error even without modified
kernel - it seems I changed enough of my init procedure to somehow
avoid the trigger condition. :-(

As soon as I can reproduce the error, I will try what you suggested.

Best regards,
Wolfgang



From justinmattock at gmail.com  Sat Nov 27 01:21:10 2010
From: justinmattock at gmail.com (Justin P. Mattock)
Date: Fri, 26 Nov 2010 22:21:10 -0800
Subject: [RFC 0/9] Change the copyright info. 
Message-ID: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>








Below you will find a set of patches, that update the copyright info from
Sun Microsystems to Oracle.

Please let me know if I missed anything and/or should make changes..


 drivers/ata/pata_hpt366.c                      |    2 +-
 drivers/ata/pata_hpt37x.c                      |    2 +-
 drivers/ata/pata_hpt3x2n.c                     |    2 +-
 drivers/ata/pata_serverworks.c                 |    2 +-
 drivers/char/nvram.c                           |    2 +-
 drivers/ide/hpt366.c                           |    2 +-
 drivers/ide/serverworks.c                      |    2 +-
 drivers/infiniband/core/agent.c                |    2 +-
 drivers/infiniband/core/cache.c                |    2 +-
 drivers/infiniband/core/cm.c                   |    2 +-
 drivers/infiniband/core/device.c               |    2 +-
 drivers/infiniband/core/fmr_pool.c             |    2 +-
 drivers/infiniband/core/iwcm.c                 |    2 +-
 drivers/infiniband/core/mad_priv.h             |    2 +-
 drivers/infiniband/core/packer.c               |    2 +-
 drivers/infiniband/core/smi.c                  |    2 +-
 drivers/infiniband/core/sysfs.c                |    2 +-
 drivers/infiniband/core/ud_header.c            |    2 +-
 drivers/infiniband/core/user_mad.c             |    2 +-
 drivers/infiniband/core/verbs.c                |    2 +-
 drivers/infiniband/hw/amso1100/c2_cq.c         |    2 +-
 drivers/infiniband/hw/mthca/mthca_av.c         |    2 +-
 drivers/infiniband/hw/mthca/mthca_cq.c         |    2 +-
 drivers/infiniband/hw/mthca/mthca_dev.h        |    2 +-
 drivers/infiniband/hw/mthca/mthca_doorbell.h   |    2 +-
 drivers/infiniband/hw/mthca/mthca_main.c       |    2 +-
 drivers/infiniband/hw/mthca/mthca_provider.c   |    2 +-
 drivers/infiniband/ulp/ipoib/ipoib.h           |    2 +-
 drivers/infiniband/ulp/ipoib/ipoib_ib.c        |    2 +-
 drivers/infiniband/ulp/ipoib/ipoib_main.c      |    2 +-
 drivers/infiniband/ulp/ipoib/ipoib_multicast.c |    2 +-
 drivers/mtd/maps/scb2_flash.c                  |    2 +-
 drivers/net/cassini.c                          |    2 +-
 drivers/net/cassini.h                          |    4 ++--
 drivers/net/mlx4/cq.c                          |    2 +-
 drivers/net/mlx4/main.c                        |    2 +-
 drivers/net/mlx4/mlx4.h                        |    2 +-
 drivers/net/natsemi.c                          |    2 +-
 drivers/net/tg3.c                              |    2 +-
 drivers/net/tg3.h                              |    2 +-
 include/linux/ethtool.h                        |    4 ++--
 include/linux/mlx4/doorbell.h                  |    2 +-
 include/rdma/ib_cache.h                        |    2 +-
 include/rdma/ib_cm.h                           |    2 +-
 include/rdma/ib_fmr_pool.h                     |    2 +-
 include/rdma/ib_verbs.h                        |    2 +-
 46 files changed, 48 insertions(+), 48 deletions(-)


Justin P. Mattock


From dedekind1 at gmail.com  Sat Nov 27 02:41:42 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 27 Nov 2010 09:41:42 +0200
Subject: [RFC 0/9] Change the copyright info.
In-Reply-To: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
References: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
Message-ID: <1290843702.2379.1.camel@koala>

On Fri, 2010-11-26 at 22:21 -0800, Justin P. Mattock wrote:
> 

> Below you will find a set of patches, that update the copyright info from
> Sun Microsystems to Oracle.

Shouldn't @oracle.com e-mail used for such patches?

-- 
Best Regards,
Artem Bityutskiy (???????? ?????)



From justinmattock at gmail.com  Sat Nov 27 02:47:13 2010
From: justinmattock at gmail.com (Justin P. Mattock)
Date: Fri, 26 Nov 2010 23:47:13 -0800
Subject: [RFC 0/9] Change the copyright info.
In-Reply-To: <1290843702.2379.1.camel@koala>
References: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
	<1290843702.2379.1.camel@koala>
Message-ID: <4CF0B781.2080209@gmail.com>

On 11/26/2010 11:41 PM, Artem Bityutskiy wrote:
> On Fri, 2010-11-26 at 22:21 -0800, Justin P. Mattock wrote:
>>
>
>> Below you will find a set of patches, that update the copyright info from
>> Sun Microsystems to Oracle.
>
> Shouldn't @oracle.com e-mail used for such patches?
>

yeah was looking at all the @oracle addresses, but thought to just focus 
on this part, then later send out something for the addresses

Justin P. Mattock


From dedekind1 at gmail.com  Sat Nov 27 04:48:43 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sat, 27 Nov 2010 11:48:43 +0200
Subject: [RFC 0/9] Change the copyright info.
In-Reply-To: <4CF0B781.2080209@gmail.com>
References: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
	<1290843702.2379.1.camel@koala>  <4CF0B781.2080209@gmail.com>
Message-ID: <1290851323.2379.3.camel@koala>

On Fri, 2010-11-26 at 23:47 -0800, Justin P. Mattock wrote:
> On 11/26/2010 11:41 PM, Artem Bityutskiy wrote:
> > On Fri, 2010-11-26 at 22:21 -0800, Justin P. Mattock wrote:
> >>
> >
> >> Below you will find a set of patches, that update the copyright info from
> >> Sun Microsystems to Oracle.
> >
> > Shouldn't @oracle.com e-mail used for such patches?
> >
> 
> yeah was looking at all the @oracle addresses, but thought to just focus 
> on this part, then later send out something for the addresses

Err, I actually meant that you (the submitter) should use @oracle.com
e-mail, because it looks a bit confusing why @gmail.com guy changes
copyrights :-)

-- 
Best Regards,
Artem Bityutskiy (???????? ?????)



From jkosina at suse.cz  Sat Nov 27 05:53:43 2010
From: jkosina at suse.cz (Jiri Kosina)
Date: Sat, 27 Nov 2010 11:53:43 +0100 (CET)
Subject: [RFC 0/9] Change the copyright info. 
In-Reply-To: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
References: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
Message-ID: <alpine.LNX.2.00.1011271152350.981@pobox.suse.cz>

On Fri, 26 Nov 2010, Justin P. Mattock wrote:

> Below you will find a set of patches, that update the copyright info from
> Sun Microsystems to Oracle.
> 
> Please let me know if I missed anything and/or should make changes..

Most importantly -- are you actually Oracle employee? Do you know what 
exactly happened to the copyrights after the acquisition?

-- 
Jiri Kosina
SUSE Labs, Novell Inc.


From alan at lxorguk.ukuu.org.uk  Sat Nov 27 08:50:47 2010
From: alan at lxorguk.ukuu.org.uk (Alan Cox)
Date: Sat, 27 Nov 2010 13:50:47 +0000
Subject: [RFC 0/9] Change the copyright info.
In-Reply-To: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
References: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
Message-ID: <20101127135047.6645bbfb@pyx>

> Below you will find a set of patches, that update the copyright info from
> Sun Microsystems to Oracle.

This should come from an official oracle address. It's not trivial stuff
at all - its rather important it's done right.


From justinmattock at gmail.com  Sat Nov 27 09:28:31 2010
From: justinmattock at gmail.com (Justin P. Mattock)
Date: Sat, 27 Nov 2010 06:28:31 -0800
Subject: [RFC 0/9] Change the copyright info.
In-Reply-To: <20101127135047.6645bbfb@pyx>
References: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
	<20101127135047.6645bbfb@pyx>
Message-ID: <4CF1158F.9070501@gmail.com>

On 11/27/2010 05:50 AM, Alan Cox wrote:
>> Below you will find a set of patches, that update the copyright info from
>> Sun Microsystems to Oracle.
>
> This should come from an official oracle address. It's not trivial stuff
> at all - its rather important it's done right.
>


o.k. any oracle employees want to take this? also the email addresses 
need fixing as well(grep -Re "sun.com" *) shows some people with sun 
still there as well

Justin P. Mattock






From jkosina at suse.cz  Sat Nov 27 11:04:47 2010
From: jkosina at suse.cz (Jiri Kosina)
Date: Sat, 27 Nov 2010 17:04:47 +0100 (CET)
Subject: [RFC 0/9] Change the copyright info.
In-Reply-To: <20101127135047.6645bbfb@pyx>
References: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
	<20101127135047.6645bbfb@pyx>
Message-ID: <alpine.LNX.2.00.1011271704120.981@pobox.suse.cz>

On Sat, 27 Nov 2010, Alan Cox wrote:

> > Below you will find a set of patches, that update the copyright info from
> > Sun Microsystems to Oracle.
> 
> This should come from an official oracle address. It's not trivial stuff
> at all - its rather important it's done right.

Absolutely. I am not taking those of course.

-- 
Jiri Kosina
SUSE Labs, Novell Inc.


From rdreier at cisco.com  Sat Nov 27 16:17:30 2010
From: rdreier at cisco.com (Roland Dreier)
Date: Sat, 27 Nov 2010 13:17:30 -0800
Subject: [RFC 0/9] Change the copyright info.
In-Reply-To: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
	(Justin P. Mattock's message of "Fri, 26 Nov 2010 22:21:10 -0800")
References: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
Message-ID: <adaoc9afout.fsf@cisco.com>

 > Below you will find a set of patches, that update the copyright info from
 > Sun Microsystems to Oracle.

Are you working for Oracle?  If so I would like to see these patches
with an @oracle.com signed-off-by address.  If not let's let the
companies involved sort out the copyrights.

 - R.


From justinmattock at gmail.com  Sat Nov 27 17:38:11 2010
From: justinmattock at gmail.com (Justin P. Mattock)
Date: Sat, 27 Nov 2010 14:38:11 -0800
Subject: [RFC 0/9] Change the copyright info.
In-Reply-To: <adaoc9afout.fsf@cisco.com>
References: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
	<adaoc9afout.fsf@cisco.com>
Message-ID: <4CF18853.1000402@gmail.com>

On 11/27/2010 01:17 PM, Roland Dreier wrote:
>   >  Below you will find a set of patches, that update the copyright info from
>   >  Sun Microsystems to Oracle.
>
> Are you working for Oracle?  If so I would like to see these patches
> with an @oracle.com signed-off-by address.  If not let's let the
> companies involved sort out the copyrights.
>
>   - R.
>

it's true what they say "you learn something new everyday".. in this 
case I needed to be from the company in order too submit patches like 
this.(no worries over here, let the companies sort out the 
copyrights(like what you said))

cheers,

Justin P. Mattock


From miguel.ojeda.sandonis at gmail.com  Sat Nov 27 18:07:48 2010
From: miguel.ojeda.sandonis at gmail.com (Miguel Ojeda)
Date: Sun, 28 Nov 2010 00:07:48 +0100
Subject: [RFC 0/9] Change the copyright info.
In-Reply-To: <4CF18853.1000402@gmail.com>
References: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
	<adaoc9afout.fsf@cisco.com> <4CF18853.1000402@gmail.com>
Message-ID: <AANLkTi=BxGFjLV6fO7GbyedX1b3xnXKW4Ss=qNDOLDjy@mail.gmail.com>

On Sat, Nov 27, 2010 at 11:38 PM, Justin P. Mattock
<justinmattock at gmail.com> wrote:
> On 11/27/2010 01:17 PM, Roland Dreier wrote:
>>
>> ?> ?Below you will find a set of patches, that update the copyright info
>> from
>> ?> ?Sun Microsystems to Oracle.
>>
>> Are you working for Oracle? ?If so I would like to see these patches
>> with an @oracle.com signed-off-by address. ?If not let's let the
>> companies involved sort out the copyrights.
>>
>> ?- R.
>>
>
> it's true what they say "you learn something new everyday".. in this case I
> needed to be from the company in order too submit patches like this.(no
> worries over here, let the companies sort out the copyrights(like what you
> said))

You can't change others' copyright, be it a company or not. AFAIK,
what you can do is adding/changing/improving/copying/... the code (and
add your own copyright for the changes if they are important enough);
but you have to maintain the original copyright if you keep the code
as is.

>
> cheers,
>
> Justin P. Mattock
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at ?http://www.tux.org/lkml/
>


From stanley.miao at windriver.com  Sun Nov 28 01:27:28 2010
From: stanley.miao at windriver.com (stanley.miao)
Date: Sun, 28 Nov 2010 14:27:28 +0800
Subject: [PATCH V2 28/69] ST SPEAr: Adding machine support for nand
In-Reply-To: <1076320a0194c19ef0b4beefdf3c43a44e200439.1285933331.git.viresh.kumar@st.com>
References: <cover.1285933331.git.viresh.kumar@st.com>
	<1076320a0194c19ef0b4beefdf3c43a44e200439.1285933331.git.viresh.kumar@st.com>
Message-ID: <4CF1F650.8080505@windriver.com>

Hi, Viresh,

It looked you missed the file include/mtd/fsmc.h in this patch.

Stanley.

Viresh KUMAR wrote:
> From: Vipin Kumar <vipin.kumar at st.com>
>
> Signed-off-by: Vipin Kumar <vipin.kumar at st.com>
> Signed-off-by: Rajeev Kumar <rajeev-dlh.kumar at st.com>
> Signed-off-by: Shiraz Hashim <shiraz.hashim at st.com>
> Signed-off-by: Viresh Kumar <viresh.kumar at st.com>
> ---
>  arch/arm/mach-spear13xx/include/mach/generic.h   |    2 +
>  arch/arm/mach-spear13xx/include/mach/misc_regs.h |   10 ++
>  arch/arm/mach-spear13xx/spear1300_evb.c          |    9 ++
>  arch/arm/mach-spear13xx/spear13xx.c              |   58 +++++++++++++
>  arch/arm/mach-spear3xx/include/mach/generic.h    |   15 ++--
>  arch/arm/mach-spear3xx/include/mach/spear320.h   |    3 +
>  arch/arm/mach-spear3xx/spear300.c                |   98 ++++++++++++++++++++++
>  arch/arm/mach-spear3xx/spear300_evb.c            |    8 ++
>  arch/arm/mach-spear3xx/spear310.c                |   26 ++++++
>  arch/arm/mach-spear3xx/spear310_evb.c            |    8 ++
>  arch/arm/mach-spear3xx/spear320.c                |   26 ++++++
>  arch/arm/mach-spear3xx/spear320_evb.c            |    8 ++
>  arch/arm/mach-spear6xx/include/mach/generic.h    |    1 +
>  arch/arm/mach-spear6xx/spear600_evb.c            |    8 ++
>  arch/arm/mach-spear6xx/spear6xx.c                |   26 ++++++
>  arch/arm/plat-spear/include/plat/fsmc.h          |   36 ++++++++
>  16 files changed, 336 insertions(+), 6 deletions(-)
>  create mode 100644 arch/arm/plat-spear/include/plat/fsmc.h
>
> diff --git a/arch/arm/mach-spear13xx/include/mach/generic.h b/arch/arm/mach-spear13xx/include/mach/generic.h
> index 960ff06..745dd99 100644
> --- a/arch/arm/mach-spear13xx/include/mach/generic.h
> +++ b/arch/arm/mach-spear13xx/include/mach/generic.h
> @@ -35,6 +35,7 @@ extern struct platform_device spear13xx_ehci0_device;
>  extern struct platform_device spear13xx_ehci1_device;
>  extern struct platform_device spear13xx_i2c_device;
>  extern struct platform_device spear13xx_kbd_device;
> +extern struct platform_device spear13xx_nand_device;
>  extern struct platform_device spear13xx_ohci0_device;
>  extern struct platform_device spear13xx_ohci1_device;
>  extern struct platform_device spear13xx_rtc_device;
> @@ -51,6 +52,7 @@ void __init spear1300_init(void);
>  void __init spear13xx_map_io(void);
>  void __init spear13xx_init_irq(void);
>  void __init spear13xx_init(void);
> +void __init nand_mach_init(u32 busw);
>  void spear13xx_secondary_startup(void);
>  
>  #endif /* __MACH_GENERIC_H */
> diff --git a/arch/arm/mach-spear13xx/include/mach/misc_regs.h b/arch/arm/mach-spear13xx/include/mach/misc_regs.h
> index a8a1119..e6823db 100644
> --- a/arch/arm/mach-spear13xx/include/mach/misc_regs.h
> +++ b/arch/arm/mach-spear13xx/include/mach/misc_regs.h
> @@ -210,6 +210,16 @@
>  	#define CF_MMC_ACTIVE	0x2
>  	#define XD_MMC_ACTIVE	0x3
>  #define FSMC_CFG		((unsigned int *)(MISC_BASE + 0x330))
> +	/* FSMC_CFG register masks */
> +	#define FSMC_MEMSEL_MASK	0x3
> +	#define FSMC_MEMSEL_SHIFT	0
> +	#define FSMC_MEM_NOR		0
> +	#define FSMC_MEM_NAND		1
> +	#define FSMC_MEM_SRAM		2
> +	#define NAND_BANK_MASK		0x3
> +	#define NAND_BANK_SHIFT		2
> +	#define NAND_DEV_WIDTH16	4
> +
>  #define MPMC_CTR_STS		((unsigned int *)(MISC_BASE + 0x334))
>  
>  /* Inter-Processor Communication Registers */
> diff --git a/arch/arm/mach-spear13xx/spear1300_evb.c b/arch/arm/mach-spear13xx/spear1300_evb.c
> index 1e637fa..56a4294 100644
> --- a/arch/arm/mach-spear13xx/spear1300_evb.c
> +++ b/arch/arm/mach-spear13xx/spear1300_evb.c
> @@ -12,11 +12,14 @@
>   */
>  
>  #include <linux/types.h>
> +#include <linux/mtd/nand.h>
> +#include <mtd/fsmc.h>
>  #include <asm/mach/arch.h>
>  #include <asm/mach-types.h>
>  #include <mach/generic.h>
>  #include <mach/spear.h>
>  #include <plat/keyboard.h>
> +#include <plat/fsmc.h>
>  #include <plat/smi.h>
>  
>  static struct amba_device *amba_devs[] __initdata = {
> @@ -30,6 +33,7 @@ static struct platform_device *plat_devs[] __initdata = {
>  	&spear13xx_ehci1_device,
>  	&spear13xx_i2c_device,
>  	&spear13xx_kbd_device,
> +	&spear13xx_nand_device,
>  	&spear13xx_ohci0_device,
>  	&spear13xx_ohci1_device,
>  	&spear13xx_rtc_device,
> @@ -52,6 +56,11 @@ static void __init spear1300_evb_init(void)
>  	/* set keyboard plat data */
>  	kbd_set_plat_data(&spear13xx_kbd_device, &kbd_data);
>  
> +	/* set nand device's plat data */
> +	fsmc_nand_set_plat_data(&spear13xx_nand_device, NULL, 0,
> +			NAND_SKIP_BBTSCAN, FSMC_NAND_BW8);
> +	nand_mach_init(FSMC_NAND_BW8);
> +
>  	/* call spear1300 machine init function */
>  	spear1300_init();
>  
> diff --git a/arch/arm/mach-spear13xx/spear13xx.c b/arch/arm/mach-spear13xx/spear13xx.c
> index f7d30a9..55d654f 100644
> --- a/arch/arm/mach-spear13xx/spear13xx.c
> +++ b/arch/arm/mach-spear13xx/spear13xx.c
> @@ -15,6 +15,7 @@
>  #include <linux/amba/pl061.h>
>  #include <linux/ptrace.h>
>  #include <linux/io.h>
> +#include <mtd/fsmc.h>
>  #include <asm/hardware/gic.h>
>  #include <asm/irq.h>
>  #include <asm/localtimer.h>
> @@ -23,6 +24,7 @@
>  #include <mach/irqs.h>
>  #include <mach/generic.h>
>  #include <mach/hardware.h>
> +#include <mach/misc_regs.h>
>  
>  /* Add spear13xx machines common devices here */
>  /* gpio device registeration */
> @@ -97,6 +99,62 @@ struct platform_device spear13xx_i2c_device = {
>  	.resource = i2c_resources,
>  };
>  
> +/* nand device registeration */
> +void __init nand_mach_init(u32 busw)
> +{
> +	u32 fsmc_cfg = readl(FSMC_CFG);
> +	fsmc_cfg &= ~(FSMC_MEMSEL_MASK << FSMC_MEMSEL_SHIFT);
> +	fsmc_cfg |= (FSMC_MEM_NAND << FSMC_MEMSEL_SHIFT);
> +
> +	if (busw == FSMC_NAND_BW16)
> +		fsmc_cfg |= 1 << NAND_DEV_WIDTH16;
> +	else
> +		fsmc_cfg &= ~(1 << NAND_DEV_WIDTH16);
> +
> +	writel(fsmc_cfg, FSMC_CFG);
> +}
> +
> +static void nand_select_bank(u32 bank, u32 busw)
> +{
> +	u32 fsmc_cfg = readl(FSMC_CFG);
> +
> +	fsmc_cfg &= ~(NAND_BANK_MASK << NAND_BANK_SHIFT);
> +	fsmc_cfg |= (bank << NAND_BANK_SHIFT);
> +
> +	if (busw)
> +		fsmc_cfg |= 1 << NAND_DEV_WIDTH16;
> +	else
> +		fsmc_cfg &= ~(1 << NAND_DEV_WIDTH16);
> +
> +	writel(fsmc_cfg, FSMC_CFG);
> +}
> +
> +static struct fsmc_nand_platform_data nand_platform_data = {
> +	.select_bank = nand_select_bank,
> +};
> +
> +static struct resource nand_resources[] = {
> +	{
> +		.name = "nand_data",
> +		.start = SPEAR13XX_FSMC_MEM_BASE,
> +		.end = SPEAR13XX_FSMC_MEM_BASE + SZ_16 - 1,
> +		.flags = IORESOURCE_MEM,
> +	}, {
> +		.name = "fsmc_regs",
> +		.start = SPEAR13XX_FSMC_BASE,
> +		.end = SPEAR13XX_FSMC_BASE + SZ_4K - 1,
> +		.flags = IORESOURCE_MEM,
> +	},
> +};
> +
> +struct platform_device spear13xx_nand_device = {
> +	.name = "nand",
> +	.id = -1,
> +	.resource = nand_resources,
> +	.num_resources = ARRAY_SIZE(nand_resources),
> +	.dev.platform_data = &nand_platform_data,
> +};
> +
>  /* usb host device registeration */
>  static struct resource ehci0_resources[] = {
>  	[0] = {
> diff --git a/arch/arm/mach-spear3xx/include/mach/generic.h b/arch/arm/mach-spear3xx/include/mach/generic.h
> index 91c0c09..6aac229 100644
> --- a/arch/arm/mach-spear3xx/include/mach/generic.h
> +++ b/arch/arm/mach-spear3xx/include/mach/generic.h
> @@ -111,6 +111,10 @@ extern struct pmx_driver pmx_driver;
>  extern struct amba_device clcd_device;
>  extern struct amba_device gpio1_device;
>  extern struct platform_device kbd_device;
> +extern struct platform_device nand0_device;
> +extern struct platform_device nand1_device;
> +extern struct platform_device nand2_device;
> +extern struct platform_device nand3_device;
>  
>  /* pad mux modes */
>  extern struct pmx_mode nand_mode;
> @@ -148,12 +152,12 @@ void __init spear300_init(void);
>  
>  /* Add misc structure declarations here */
>  extern struct clcd_board clcd_plat_data;
> -#endif /* CONFIG_MACH_SPEAR300 */
>  
>  /* spear310 declarations */
> -#ifdef CONFIG_MACH_SPEAR310
> +#elif defined(CONFIG_MACH_SPEAR310)
>  /* Add spear310 machine device structure declarations here */
>  extern struct platform_device plgpio_device;
> +extern struct platform_device nand_device;
>  
>  /* pad mux devices */
>  extern struct pmx_dev pmx_emi_cs_0_1_4_5;
> @@ -168,13 +172,12 @@ extern struct pmx_dev pmx_tdm0;
>  /* Add spear310 machine function declarations here */
>  void __init spear310_init(void);
>  
> -#endif /* CONFIG_MACH_SPEAR310 */
> -
>  /* spear320 declarations */
> -#ifdef CONFIG_MACH_SPEAR320
> +#elif defined(CONFIG_MACH_SPEAR320)
>  /* Add spear320 machine device structure declarations here */
>  extern struct amba_device clcd_device;
>  extern struct platform_device i2c1_device;
> +extern struct platform_device nand_device;
>  extern struct platform_device plgpio_device;
>  extern struct platform_device pwm_device;
>  
> @@ -213,6 +216,6 @@ void __init spear320_init(void);
>  
>  /* Add misc structure declarations here */
>  extern struct clcd_board clcd_plat_data;
> -#endif /* CONFIG_MACH_SPEAR320 */
> +#endif
>  
>  #endif /* __MACH_GENERIC_H */
> diff --git a/arch/arm/mach-spear3xx/include/mach/spear320.h b/arch/arm/mach-spear3xx/include/mach/spear320.h
> index 53677e4..aa6727c 100644
> --- a/arch/arm/mach-spear3xx/include/mach/spear320.h
> +++ b/arch/arm/mach-spear3xx/include/mach/spear320.h
> @@ -22,6 +22,9 @@
>  #define SPEAR320_FSMC_BASE		0x4C000000
>  #define SPEAR320_FSMC_SIZE		0x01000000
>  
> +#define SPEAR320_NAND_BASE		0x50000000
> +#define SPEAR320_NAND_SIZE		0x04000000
> +
>  #define SPEAR320_I2S_BASE		0x60000000
>  #define SPEAR320_I2S_SIZE		0x10000000
>  
> diff --git a/arch/arm/mach-spear3xx/spear300.c b/arch/arm/mach-spear3xx/spear300.c
> index c80d4e1..c213614 100644
> --- a/arch/arm/mach-spear3xx/spear300.c
> +++ b/arch/arm/mach-spear3xx/spear300.c
> @@ -14,6 +14,7 @@
>  #include <linux/types.h>
>  #include <linux/amba/pl061.h>
>  #include <linux/ptrace.h>
> +#include <mtd/fsmc.h>
>  #include <asm/irq.h>
>  #include <mach/generic.h>
>  #include <mach/spear.h>
> @@ -426,6 +427,103 @@ struct platform_device kbd_device = {
>  	.resource = kbd_resources,
>  };
>  
> +/* nand device registeration */
> +static struct fsmc_nand_platform_data nand0_platform_data;
> +
> +static struct resource nand0_resources[] = {
> +	{
> +		.name = "nand_data",
> +		.start = SPEAR300_NAND_0_BASE,
> +		.end = SPEAR300_NAND_0_BASE + SZ_16 - 1,
> +		.flags = IORESOURCE_MEM,
> +	}, {
> +		.name = "fsmc_regs",
> +		.start = SPEAR300_FSMC_BASE,
> +		.end = SPEAR300_FSMC_BASE + SZ_4K - 1,
> +		.flags = IORESOURCE_MEM,
> +	},
> +};
> +
> +struct platform_device nand0_device = {
> +	.name = "nand",
> +	.id = 0,
> +	.resource = nand0_resources,
> +	.num_resources = ARRAY_SIZE(nand0_resources),
> +	.dev.platform_data = &nand0_platform_data,
> +};
> +
> +static struct fsmc_nand_platform_data nand1_platform_data;
> +
> +static struct resource nand1_resources[] = {
> +	{
> +		.name = "nand_data",
> +		.start = SPEAR300_NAND_1_BASE,
> +		.end = SPEAR300_NAND_1_BASE + SZ_16 - 1,
> +		.flags = IORESOURCE_MEM,
> +	}, {
> +		.name = "fsmc_regs",
> +		.start = SPEAR300_FSMC_BASE,
> +		.end = SPEAR300_FSMC_BASE + SZ_4K - 1,
> +		.flags = IORESOURCE_MEM,
> +	},
> +};
> +
> +struct platform_device nand1_device = {
> +	.name = "nand",
> +	.id = 1,
> +	.resource = nand1_resources,
> +	.num_resources = ARRAY_SIZE(nand1_resources),
> +	.dev.platform_data = &nand1_platform_data,
> +};
> +
> +static struct fsmc_nand_platform_data nand2_platform_data;
> +
> +static struct resource nand2_resources[] = {
> +	{
> +		.name = "nand_data",
> +		.start = SPEAR300_NAND_2_BASE,
> +		.end = SPEAR300_NAND_2_BASE + SZ_16 - 1,
> +		.flags = IORESOURCE_MEM,
> +	}, {
> +		.name = "fsmc_regs",
> +		.start = SPEAR300_FSMC_BASE,
> +		.end = SPEAR300_FSMC_BASE + SZ_4K - 1,
> +		.flags = IORESOURCE_MEM,
> +	},
> +};
> +
> +struct platform_device nand2_device = {
> +	.name = "nand",
> +	.id = 2,
> +	.resource = nand2_resources,
> +	.num_resources = ARRAY_SIZE(nand2_resources),
> +	.dev.platform_data = &nand2_platform_data,
> +};
> +
> +static struct fsmc_nand_platform_data nand3_platform_data;
> +
> +static struct resource nand3_resources[] = {
> +	{
> +		.name = "nand_data",
> +		.start = SPEAR300_NAND_3_BASE,
> +		.end = SPEAR300_NAND_3_BASE + SZ_16 - 1,
> +		.flags = IORESOURCE_MEM,
> +	}, {
> +		.name = "fsmc_regs",
> +		.start = SPEAR300_FSMC_BASE,
> +		.end = SPEAR300_FSMC_BASE + SZ_4K - 1,
> +		.flags = IORESOURCE_MEM,
> +	},
> +};
> +
> +struct platform_device nand3_device = {
> +	.name = "nand",
> +	.id = 3,
> +	.resource = nand3_resources,
> +	.num_resources = ARRAY_SIZE(nand3_resources),
> +	.dev.platform_data = &nand3_platform_data,
> +};
> +
>  /* spear3xx shared irq */
>  struct shirq_dev_config shirq_ras1_config[] = {
>  	{
> diff --git a/arch/arm/mach-spear3xx/spear300_evb.c b/arch/arm/mach-spear3xx/spear300_evb.c
> index 7bd8963..41ad013 100644
> --- a/arch/arm/mach-spear3xx/spear300_evb.c
> +++ b/arch/arm/mach-spear3xx/spear300_evb.c
> @@ -11,10 +11,13 @@
>   * warranty of any kind, whether express or implied.
>   */
>  
> +#include <linux/mtd/nand.h>
> +#include <mtd/fsmc.h>
>  #include <asm/mach/arch.h>
>  #include <asm/mach-types.h>
>  #include <mach/generic.h>
>  #include <mach/spear.h>
> +#include <plat/fsmc.h>
>  #include <plat/keyboard.h>
>  #include <plat/smi.h>
>  
> @@ -49,6 +52,7 @@ static struct platform_device *plat_devs[] __initdata = {
>  	/* spear3xx specific devices */
>  	&ehci_device,
>  	&i2c_device,
> +	&nand0_device,
>  	&ohci0_device,
>  	&ohci1_device,
>  	&rtc_device,
> @@ -79,6 +83,10 @@ static void __init spear300_evb_init(void)
>  	/* set keyboard plat data */
>  	kbd_set_plat_data(&kbd_device, &kbd_data);
>  
> +	/* set nand0 device's plat data */
> +	fsmc_nand_set_plat_data(&nand0_device, NULL, 0, NAND_SKIP_BBTSCAN,
> +			FSMC_NAND_BW8);
> +
>  	/* call spear300 machine init function */
>  	spear300_init();
>  
> diff --git a/arch/arm/mach-spear3xx/spear310.c b/arch/arm/mach-spear3xx/spear310.c
> index 88b55b5..1c84303 100644
> --- a/arch/arm/mach-spear3xx/spear310.c
> +++ b/arch/arm/mach-spear3xx/spear310.c
> @@ -12,6 +12,7 @@
>   */
>  
>  #include <linux/ptrace.h>
> +#include <mtd/fsmc.h>
>  #include <asm/irq.h>
>  #include <mach/generic.h>
>  #include <mach/spear.h>
> @@ -177,6 +178,31 @@ int spear300_o2p(int offset)
>  		return offset + 2;
>  }
>  
> +/* nand device registeration */
> +static struct fsmc_nand_platform_data nand_platform_data;
> +
> +static struct resource nand_resources[] = {
> +	{
> +		.name = "nand_data",
> +		.start = SPEAR310_NAND_BASE,
> +		.end = SPEAR310_NAND_BASE + SZ_16 - 1,
> +		.flags = IORESOURCE_MEM,
> +	}, {
> +		.name = "fsmc_regs",
> +		.start = SPEAR310_FSMC_BASE,
> +		.end = SPEAR310_FSMC_BASE + SZ_4K - 1,
> +		.flags = IORESOURCE_MEM,
> +	},
> +};
> +
> +struct platform_device nand_device = {
> +	.name = "nand",
> +	.id = -1,
> +	.resource = nand_resources,
> +	.num_resources = ARRAY_SIZE(nand_resources),
> +	.dev.platform_data = &nand_platform_data,
> +};
> +
>  static struct plgpio_platform_data plgpio_plat_data = {
>  	.gpio_base = 8,
>  	.irq_base = SPEAR_PLGPIO_INT_BASE,
> diff --git a/arch/arm/mach-spear3xx/spear310_evb.c b/arch/arm/mach-spear3xx/spear310_evb.c
> index cd076c9..857afae 100644
> --- a/arch/arm/mach-spear3xx/spear310_evb.c
> +++ b/arch/arm/mach-spear3xx/spear310_evb.c
> @@ -11,10 +11,13 @@
>   * warranty of any kind, whether express or implied.
>   */
>  
> +#include <linux/mtd/nand.h>
> +#include <mtd/fsmc.h>
>  #include <asm/mach/arch.h>
>  #include <asm/mach-types.h>
>  #include <mach/generic.h>
>  #include <mach/spear.h>
> +#include <plat/fsmc.h>
>  #include <plat/smi.h>
>  
>  /* padmux devices to enable */
> @@ -54,6 +57,7 @@ static struct platform_device *plat_devs[] __initdata = {
>  	/* spear3xx specific devices */
>  	&ehci_device,
>  	&i2c_device,
> +	&nand_device,
>  	&ohci0_device,
>  	&ohci1_device,
>  	&rtc_device,
> @@ -72,6 +76,10 @@ static void __init spear310_evb_init(void)
>  	pmx_driver.devs = pmx_devs;
>  	pmx_driver.devs_count = ARRAY_SIZE(pmx_devs);
>  
> +	/* set nand device's plat data */
> +	fsmc_nand_set_plat_data(&nand_device, NULL, 0, NAND_SKIP_BBTSCAN,
> +			FSMC_NAND_BW8);
> +
>  	/* call spear310 machine init function */
>  	spear310_init();
>  
> diff --git a/arch/arm/mach-spear3xx/spear320.c b/arch/arm/mach-spear3xx/spear320.c
> index 75e7890..3def755 100644
> --- a/arch/arm/mach-spear3xx/spear320.c
> +++ b/arch/arm/mach-spear3xx/spear320.c
> @@ -12,6 +12,7 @@
>   */
>  
>  #include <linux/ptrace.h>
> +#include <mtd/fsmc.h>
>  #include <asm/irq.h>
>  #include <mach/generic.h>
>  #include <mach/spear.h>
> @@ -431,6 +432,31 @@ struct platform_device i2c1_device = {
>  	.resource = i2c1_resources,
>  };
>  
> +/* nand device registeration */
> +static struct fsmc_nand_platform_data nand_platform_data;
> +
> +static struct resource nand_resources[] = {
> +	{
> +		.name = "nand_data",
> +		.start = SPEAR320_NAND_BASE,
> +		.end = SPEAR320_NAND_BASE + SZ_16 - 1,
> +		.flags = IORESOURCE_MEM,
> +	}, {
> +		.name = "fsmc_regs",
> +		.start = SPEAR320_FSMC_BASE,
> +		.end = SPEAR320_FSMC_BASE + SZ_4K - 1,
> +		.flags = IORESOURCE_MEM,
> +	},
> +};
> +
> +struct platform_device nand_device = {
> +	.name = "nand",
> +	.id = -1,
> +	.resource = nand_resources,
> +	.num_resources = ARRAY_SIZE(nand_resources),
> +	.dev.platform_data = &nand_platform_data,
> +};
> +
>  static struct resource plgpio_resources[] = {
>  	{
>  		.start = SPEAR320_SOC_CONFIG_BASE,
> diff --git a/arch/arm/mach-spear3xx/spear320_evb.c b/arch/arm/mach-spear3xx/spear320_evb.c
> index 7f7b5dd..3a066bb 100644
> --- a/arch/arm/mach-spear3xx/spear320_evb.c
> +++ b/arch/arm/mach-spear3xx/spear320_evb.c
> @@ -11,10 +11,13 @@
>   * warranty of any kind, whether express or implied.
>   */
>  
> +#include <linux/mtd/nand.h>
> +#include <mtd/fsmc.h>
>  #include <asm/mach/arch.h>
>  #include <asm/mach-types.h>
>  #include <mach/generic.h>
>  #include <mach/spear.h>
> +#include <plat/fsmc.h>
>  #include <plat/smi.h>
>  
>  /* padmux devices to enable */
> @@ -52,6 +55,7 @@ static struct platform_device *plat_devs[] __initdata = {
>  	/* spear3xx specific devices */
>  	&ehci_device,
>  	&i2c_device,
> +	&nand_device,
>  	&ohci0_device,
>  	&ohci1_device,
>  	&rtc_device,
> @@ -72,6 +76,10 @@ static void __init spear320_evb_init(void)
>  	pmx_driver.devs = pmx_devs;
>  	pmx_driver.devs_count = ARRAY_SIZE(pmx_devs);
>  
> +	/* set nand device's plat data */
> +	fsmc_nand_set_plat_data(&nand_device, NULL, 0, NAND_SKIP_BBTSCAN,
> +			FSMC_NAND_BW8);
> +
>  	/* call spear320 machine init function */
>  	spear320_init();
>  
> diff --git a/arch/arm/mach-spear6xx/include/mach/generic.h b/arch/arm/mach-spear6xx/include/mach/generic.h
> index f885898..ff90419 100644
> --- a/arch/arm/mach-spear6xx/include/mach/generic.h
> +++ b/arch/arm/mach-spear6xx/include/mach/generic.h
> @@ -36,6 +36,7 @@ extern struct amba_device wdt_device;
>  extern struct platform_device ehci0_device;
>  extern struct platform_device ehci1_device;
>  extern struct platform_device i2c_device;
> +extern struct platform_device nand_device;
>  extern struct platform_device ohci0_device;
>  extern struct platform_device ohci1_device;
>  extern struct platform_device rtc_device;
> diff --git a/arch/arm/mach-spear6xx/spear600_evb.c b/arch/arm/mach-spear6xx/spear600_evb.c
> index 0eb5f50..f3b1fb4 100644
> --- a/arch/arm/mach-spear6xx/spear600_evb.c
> +++ b/arch/arm/mach-spear6xx/spear600_evb.c
> @@ -11,10 +11,13 @@
>   * warranty of any kind, whether express or implied.
>   */
>  
> +#include <linux/mtd/nand.h>
> +#include <mtd/fsmc.h>
>  #include <asm/mach/arch.h>
>  #include <asm/mach-types.h>
>  #include <mach/generic.h>
>  #include <mach/spear.h>
> +#include <plat/fsmc.h>
>  #include <plat/smi.h>
>  
>  static struct amba_device *amba_devs[] __initdata = {
> @@ -33,6 +36,7 @@ static struct platform_device *plat_devs[] __initdata = {
>  	&i2c_device,
>  	&ohci0_device,
>  	&ohci1_device,
> +	&nand_device,
>  	&rtc_device,
>  	&smi_device,
>  };
> @@ -41,6 +45,10 @@ static void __init spear600_evb_init(void)
>  {
>  	unsigned int i;
>  
> +	/* set nand device's plat data */
> +	fsmc_nand_set_plat_data(&nand_device, NULL, 0, NAND_SKIP_BBTSCAN,
> +			FSMC_NAND_BW8);
> +
>  	/* call spear600 machine init function */
>  	spear600_init();
>  
> diff --git a/arch/arm/mach-spear6xx/spear6xx.c b/arch/arm/mach-spear6xx/spear6xx.c
> index 2eec8ac..cc4fd39 100644
> --- a/arch/arm/mach-spear6xx/spear6xx.c
> +++ b/arch/arm/mach-spear6xx/spear6xx.c
> @@ -15,6 +15,7 @@
>  #include <linux/amba/pl061.h>
>  #include <linux/ptrace.h>
>  #include <linux/io.h>
> +#include <mtd/fsmc.h>
>  #include <asm/hardware/vic.h>
>  #include <asm/irq.h>
>  #include <asm/mach/arch.h>
> @@ -152,6 +153,31 @@ struct platform_device i2c_device = {
>  	.resource = i2c_resources,
>  };
>  
> +/* nand device registeration */
> +static struct fsmc_nand_platform_data nand_platform_data;
> +
> +static struct resource nand_resources[] = {
> +	{
> +		.name = "nand_data",
> +		.start = SPEAR6XX_ICM1_NAND_BASE,
> +		.end = SPEAR6XX_ICM1_NAND_BASE + SZ_16 - 1,
> +		.flags = IORESOURCE_MEM,
> +	}, {
> +		.name = "fsmc_regs",
> +		.start = SPEAR6XX_ICM1_FSMC_BASE,
> +		.end = SPEAR6XX_ICM1_FSMC_BASE + SZ_4K - 1,
> +		.flags = IORESOURCE_MEM,
> +	},
> +};
> +
> +struct platform_device nand_device = {
> +	.name = "nand",
> +	.id = -1,
> +	.resource = nand_resources,
> +	.num_resources = ARRAY_SIZE(nand_resources),
> +	.dev.platform_data = &nand_platform_data,
> +};
> +
>  /* usb host device registeration */
>  static struct resource ehci0_resources[] = {
>  	[0] = {
> diff --git a/arch/arm/plat-spear/include/plat/fsmc.h b/arch/arm/plat-spear/include/plat/fsmc.h
> new file mode 100644
> index 0000000..bb161fb
> --- /dev/null
> +++ b/arch/arm/plat-spear/include/plat/fsmc.h
> @@ -0,0 +1,36 @@
> +/*
> + * arch/arm/plat-spear/include/plat/fsmc.h
> + *
> + * FSMC definitions for SPEAr platform
> + *
> + * Copyright (C) 2010 ST Microelectronics
> + * Vipin Kumar <vipin.kumar at st.com>
> + *
> + * This file is licensed under the terms of the GNU General Public
> + * License version 2. This program is licensed "as is" without any
> + * warranty of any kind, whether express or implied.
> + */
> +
> +#ifndef __PLAT_FSMC_H
> +#define __PLAT_FSMC_H
> +
> +#include <mtd/fsmc.h>
> +
> +/* This function is used to set platform data field of pdev->dev */
> +static inline void fsmc_nand_set_plat_data(struct platform_device *pdev,
> +		struct mtd_partition *partitions, unsigned int nr_partitions,
> +		unsigned int options, unsigned int width)
> +{
> +	struct fsmc_nand_platform_data *plat_data;
> +	plat_data = dev_get_platdata(&pdev->dev);
> +
> +	if (partitions) {
> +		plat_data->partitions = partitions;
> +		plat_data->nr_partitions = nr_partitions;
> +	}
> +
> +	plat_data->options = options;
> +	plat_data->width = width;
> +}
> +
> +#endif /* __PLAT_FSMC_H */
>   



From ogerlitz at Voltaire.com  Sun Nov 28 02:42:25 2010
From: ogerlitz at Voltaire.com (Or Gerlitz)
Date: Sun, 28 Nov 2010 09:42:25 +0200
Subject: [RFC 0/9] Change the copyright info.
In-Reply-To: <AANLkTi=BxGFjLV6fO7GbyedX1b3xnXKW4Ss=qNDOLDjy@mail.gmail.com>
References: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>	<adaoc9afout.fsf@cisco.com>
	<4CF18853.1000402@gmail.com>
	<AANLkTi=BxGFjLV6fO7GbyedX1b3xnXKW4Ss=qNDOLDjy@mail.gmail.com>
Message-ID: <4CF207E1.8070404@Voltaire.com>

Miguel Ojeda wrote:
> [...] you have to maintain the original copyright 

Yes, this copyright change, e.g five years after merging the relevant patches is like asking a school 
to change the family name posted on a graduate diploma just b/c few years later she got married and decided to adopt the family name of her spouse.

Or.


From barnes.leo at gmail.com  Sun Nov 28 03:46:32 2010
From: barnes.leo at gmail.com (Leo Barnes)
Date: Sun, 28 Nov 2010 17:46:32 +0900
Subject: Flashing UBIFS over fastboot
In-Reply-To: <1290779883.2552.4.camel@localhost>
References: <AANLkTinzy-qTsYfbZhkhoFN6Tz9G47+JUWsa97KCUAke@mail.gmail.com>
	<1290779883.2552.4.camel@localhost>
Message-ID: <AANLkTinxyagZ+_5_fv2ei0bF=N3Ww0KJhjSNKqNmQHpr@mail.gmail.com>

Hello again,

New problem:

On Fri, Nov 26, 2010 at 10:58 PM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
>
> I think you can hack ubinize and teach it to add OOB bytes.
>

I have now managed to transform a UBIFS image so that it is flashable
by fastboot. The system then boots once without any trouble (at least
any immediate trouble), but when I reboot, it refuses to start. I have
narrowed the problem down to the fact that fastboot does not strip
trailing 0xFF pages from the blocks and instead writes them as usual.
As explained in the FAQ this has some nasty consequences. I have no
way (currently at least) of modifying how fastboot works on the
device. Is it somehow possible to fill these pages with dummy data and
tell UBI/UBIFS that it is ok to discard this data when the block is
erased sometime in the future? Or is there any other way of doing it?
If UBI/UBIFS clones/remaps a block, does it strip empty trailing
pages?

Best regards,
//Leo


From vladimir at broadlight.com  Sun Nov 28 04:27:04 2010
From: vladimir at broadlight.com (Vladimir Khmelnitsky)
Date: Sun, 28 Nov 2010 11:27:04 +0200
Subject: simple ubi reader
Message-ID: <AFC5977FF9FA3E449BB7803E9BA754EF01D8AE25@mailsrv.broadlight.com>

Hi,

I need to write bootloader which should read its second stage binary
from ubi volume.
I wonder if there is some simple open source code I can use to implement
ubi volume reader?

Thanks in advance,
Vladimir


From linus.walleij at stericsson.com  Sun Nov 28 05:20:08 2010
From: linus.walleij at stericsson.com (Linus Walleij)
Date: Sun, 28 Nov 2010 11:20:08 +0100
Subject: [PATCH 2/4] mtd: FSMC NAND replace all use of uintNN_t with uN
In-Reply-To: <1290788695.2552.35.camel@localhost>
References: <1290201121-15263-1-git-send-email-linus.walleij@stericsson.com>
	<1290788695.2552.35.camel@localhost>
Message-ID: <AANLkTi=ks+ekjgJnb2pv0LaDzPZike+M+QLeOZKkb3iW@mail.gmail.com>

2010/11/26 Artem Bityutskiy <dedekind1 at gmail.com>:

> On Fri, 2010-11-19 at 22:12 +0100, Linus Walleij wrote:
>> The short kernel versions of the basic types makes the world more
>> readable.
>>
>> Signed-off-by: Linus Walleij <linus.walleij at stericsson.com>
>
> I do not think dwmw2 will merge this one because he often claimed that
> u32 cannot be better than uint32_t, because the latter is C99 standard,
> but the former is not. So I'd not do this, at least not at the area he
> looks after.

Oh man. Whatever, David shall I respin the patch series without
this one? The latter patches will surely clash so an early indication
is appreciated.

Yours,
Linus Walleij


From mareksk7 at gmail.com  Sun Nov 28 05:29:08 2010
From: mareksk7 at gmail.com (Marek Skuczynski)
Date: Sun, 28 Nov 2010 11:29:08 +0100
Subject: simple ubi reader
In-Reply-To: <AFC5977FF9FA3E449BB7803E9BA754EF01D8AE25@mailsrv.broadlight.com>
References: <AFC5977FF9FA3E449BB7803E9BA754EF01D8AE25@mailsrv.broadlight.com>
Message-ID: <4CF22EF4.7010501@gmail.com>

Hi Vladimir,
> I need to write bootloader which should read its second stage binary
> from ubi volume.
> I wonder if there is some simple open source code I can use to implement
> ubi volume reader?
I can take a look at these places:
- U-boot <http://git.denx.de/?p=u-boot.git>
- Barebox aka U-boot2 <http://git.pengutronix.de/?p=barebox.git>

Regards,
 Marek



From vladimir at broadlight.com  Sun Nov 28 07:37:43 2010
From: vladimir at broadlight.com (Vladimir Khmelnitsky)
Date: Sun, 28 Nov 2010 14:37:43 +0200
Subject: simple ubi reader
In-Reply-To: <4CF22EF4.7010501@gmail.com>
Message-ID: <AFC5977FF9FA3E449BB7803E9BA754EF01D8AF55@mailsrv.broadlight.com>

Hi Marek,

Thanks for your reply.
But may be you know some simpler code performing ubi read. It looks to
me rather complicated to cut out from u-boot, and even from barebox -
code responsible only for ubi read dropping mtd staff.

Regards,
Vladimir

-----Original Message-----
From: Marek Skuczynski [mailto:mareksk7 at gmail.com] 
Sent: Sunday, November 28, 2010 12:29 PM
To: Vladimir Khmelnitsky
Cc: linux-mtd at lists.infradead.org
Subject: Re: simple ubi reader

Hi Vladimir,
> I need to write bootloader which should read its second stage binary
> from ubi volume.
> I wonder if there is some simple open source code I can use to
implement
> ubi volume reader?
I can take a look at these places:
- U-boot <http://git.denx.de/?p=u-boot.git>
- Barebox aka U-boot2 <http://git.pengutronix.de/?p=barebox.git>

Regards,
 Marek



From mareksk7 at gmail.com  Sun Nov 28 08:33:48 2010
From: mareksk7 at gmail.com (Marek Skuczynski)
Date: Sun, 28 Nov 2010 14:33:48 +0100
Subject: simple ubi reader
In-Reply-To: <AFC5977FF9FA3E449BB7803E9BA754EF01D8AF55@mailsrv.broadlight.com>
References: <AFC5977FF9FA3E449BB7803E9BA754EF01D8AF55@mailsrv.broadlight.com>
Message-ID: <4CF25A3C.2080307@gmail.com>

Vladimir,
> But may be you know some simpler code performing ubi read. It looks to
> me rather complicated to cut out from u-boot, and even from barebox -
> code responsible only for ubi read dropping mtd staff.

Unfortunately, I don't know any simpler implementation of UBI driver.
However, I know that reading of an UBI volume content is not so
difficult to implement.
This should take about 2 days, which may be faster than adapting any
existing implementation.

Good luck,
  Marek

> Regards,
> Vladimir
>
> -----Original Message-----
> From: Marek Skuczynski [mailto:mareksk7 at gmail.com] 
> Sent: Sunday, November 28, 2010 12:29 PM
> To: Vladimir Khmelnitsky
> Cc: linux-mtd at lists.infradead.org
> Subject: Re: simple ubi reader
>
> Hi Vladimir,
>> I need to write bootloader which should read its second stage binary
>> from ubi volume.
>> I wonder if there is some simple open source code I can use to
> implement
>> ubi volume reader?
> I can take a look at these places:
> - U-boot <http://git.denx.de/?p=u-boot.git>
> - Barebox aka U-boot2 <http://git.pengutronix.de/?p=barebox.git>
>
> Regards,
>  Marek
>
>



From dedekind1 at gmail.com  Sun Nov 28 09:55:52 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sun, 28 Nov 2010 16:55:52 +0200
Subject: Flashing UBIFS over fastboot
In-Reply-To: <AANLkTinxyagZ+_5_fv2ei0bF=N3Ww0KJhjSNKqNmQHpr@mail.gmail.com>
References: <AANLkTinzy-qTsYfbZhkhoFN6Tz9G47+JUWsa97KCUAke@mail.gmail.com>
	<1290779883.2552.4.camel@localhost>
	<AANLkTinxyagZ+_5_fv2ei0bF=N3Ww0KJhjSNKqNmQHpr@mail.gmail.com>
Message-ID: <1290956152.2032.15.camel@koala>

On Sun, 2010-11-28 at 17:46 +0900, Leo Barnes wrote:
> Hello again,
> 
> New problem:
> 
> On Fri, Nov 26, 2010 at 10:58 PM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> >
> > I think you can hack ubinize and teach it to add OOB bytes.
> >
> 
> I have now managed to transform a UBIFS image so that it is flashable
> by fastboot. The system then boots once without any trouble (at least
> any immediate trouble), but when I reboot, it refuses to start. I have
> narrowed the problem down to the fact that fastboot does not strip
> trailing 0xFF pages from the blocks and instead writes them as usual.
> As explained in the FAQ this has some nasty consequences. I have no
> way (currently at least) of modifying how fastboot works on the
> device. Is it somehow possible to fill these pages with dummy data and
> tell UBI/UBIFS that it is ok to discard this data when the block is
> erased sometime in the future? Or is there any other way of doing it?

I guess for data and indexing eraseblocks you can just pad the left
space with UBIFS padding nodes (struct ubifs_pad_node).

But then there are special UBIFS areas which go before the data area.
Things might me trickier there. I am not sure the padding node trick
will work there, but it might. If this does not work for some areas,
they can be tricked a different way.

The other ugly option would be to make UBI do ubi_leb_change() for each
eraseblock after scanning. Or only for those which have 0xFFs at the
end.

But I do not have ready solution for this.

> If UBI/UBIFS clones/remaps a block, does it strip empty trailing
> pages?

Yes, it does, this is why ubi_leb_change() will work.

-- 
Best Regards,
Artem Bityutskiy (???????? ?????)



From dedekind1 at gmail.com  Sun Nov 28 12:55:17 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sun, 28 Nov 2010 19:55:17 +0200
Subject: [PATCH 2/4] mtd: FSMC NAND replace all use of uintNN_t with uN
In-Reply-To: <AANLkTi=ks+ekjgJnb2pv0LaDzPZike+M+QLeOZKkb3iW@mail.gmail.com>
References: <1290201121-15263-1-git-send-email-linus.walleij@stericsson.com>
	<1290788695.2552.35.camel@localhost>
	<AANLkTi=ks+ekjgJnb2pv0LaDzPZike+M+QLeOZKkb3iW@mail.gmail.com>
Message-ID: <1290966917.2032.17.camel@koala>

On Sun, 2010-11-28 at 11:20 +0100, Linus Walleij wrote:
> 2010/11/26 Artem Bityutskiy <dedekind1 at gmail.com>:
> 
> > On Fri, 2010-11-19 at 22:12 +0100, Linus Walleij wrote:
> >> The short kernel versions of the basic types makes the world more
> >> readable.
> >>
> >> Signed-off-by: Linus Walleij <linus.walleij at stericsson.com>
> >
> > I do not think dwmw2 will merge this one because he often claimed that
> > u32 cannot be better than uint32_t, because the latter is C99 standard,
> > but the former is not. So I'd not do this, at least not at the area he
> > looks after.
> 
> Oh man. Whatever, David shall I respin the patch series without
> this one? The latter patches will surely clash so an early indication
> is appreciated.

I do not know if David will respond, but I recommend to respin without
that path, then I'll take the series to my l2-mtd-2.6 tree, and will
take care of them.

-- 
Best Regards,
Artem Bityutskiy (???????? ?????)



From dedekind1 at gmail.com  Sun Nov 28 13:13:39 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Sun, 28 Nov 2010 20:13:39 +0200
Subject: simple ubi reader
In-Reply-To: <AFC5977FF9FA3E449BB7803E9BA754EF01D8AE25@mailsrv.broadlight.com>
References: <AFC5977FF9FA3E449BB7803E9BA754EF01D8AE25@mailsrv.broadlight.com>
Message-ID: <1290968019.2032.25.camel@koala>

On Sun, 2010-11-28 at 11:27 +0200, Vladimir Khmelnitsky wrote:
> Hi,
> 
> I need to write bootloader which should read its second stage binary
> from ubi volume.
> I wonder if there is some simple open source code I can use to implement
> ubi volume reader?

I know people doing small bootloader code (closed source) with 4KiB
constraint for whole code, and it supported UBI R/O. That was clever
code made by clever people though. But here are some points:

1. You do not have to read EC headers when scanning
2. You do not really need to read the volume table
3. If you can assume you need only one volume, say, with vol ID 0, this
simplifies things further.

Also, AFAIR, some people found that placing VID header at the very end
of the NAND page made ECC calculations easier and faster. This is
actually why UBI has 'vid_hdr_offs' option which is not widely used,
though.

Anyway, this is the original old design document, which may contain some
hints, but I'm not sure:

http://linux-mtd.infradead.org/doc/ubidesign/ubidesign.pdf

The doc is not up-to-date, but all the design principles are valid.

-- 
Best Regards,
Artem Bityutskiy (???????? ?????)



From viresh.kumar at st.com  Sun Nov 28 23:21:54 2010
From: viresh.kumar at st.com (viresh kumar)
Date: Mon, 29 Nov 2010 09:51:54 +0530
Subject: [PATCH V2 28/69] ST SPEAr: Adding machine support for nand
In-Reply-To: <4CF1F650.8080505@windriver.com>
References: <cover.1285933331.git.viresh.kumar@st.com>
	<1076320a0194c19ef0b4beefdf3c43a44e200439.1285933331.git.viresh.kumar@st.com>
	<4CF1F650.8080505@windriver.com>
Message-ID: <4CF32A62.4030205@st.com>

On 11/28/2010 11:57 AM, stanley.miao wrote:
> Hi, Viresh,
> 
> It looked you missed the file include/mtd/fsmc.h in this patch.
> 
> Stanley.

Hi Stanley,

I sent this patchset after linus walleij has submitted patchset for fsmc.
In that patchset fsmc.h was at include/mtd/fsmc.h, but later it was placed
at include/linux/mtd/fsmc.h.

I am waiting for few of our drivers to be pushed in mainline, then i will
send final V3 version for this patchset.

-- 
viresh


From computersforpeace at gmail.com  Mon Nov 29 03:02:01 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Mon, 29 Nov 2010 00:02:01 -0800
Subject: [PATCH 7/8] nandwrite: add check for negative blockalign
In-Reply-To: <1291017722-23985-1-git-send-email-computersforpeace@gmail.com>
References: <1291017722-23985-1-git-send-email-computersforpeace@gmail.com>
Message-ID: <1291017722-23985-7-git-send-email-computersforpeace@gmail.com>

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 nandwrite.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/nandwrite.c b/nandwrite.c
index 5373a89..c409878 100644
--- a/nandwrite.c
+++ b/nandwrite.c
@@ -218,6 +218,10 @@ static void process_options(int argc, char * const argv[])
 		exit(EXIT_FAILURE);
 	}
 
+	if (blockalign < 0)
+		errmsg_die("Can't specify a negative blockalign '%d'",
+				blockalign);
+
 	argc -= optind;
 	argv += optind;
 
-- 
1.7.0.4




From computersforpeace at gmail.com  Mon Nov 29 03:02:00 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Mon, 29 Nov 2010 00:02:00 -0800
Subject: [PATCH 6/8] nanddump: choose correct "printf" format-specifier
In-Reply-To: <1291017722-23985-1-git-send-email-computersforpeace@gmail.com>
References: <1291017722-23985-1-git-send-email-computersforpeace@gmail.com>
Message-ID: <1291017722-23985-6-git-send-email-computersforpeace@gmail.com>

The mtd-descriptor attributes contain signed data, not unsigned.

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 nanddump.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/nanddump.c b/nanddump.c
index 96b46d4..0e393cc 100644
--- a/nanddump.c
+++ b/nanddump.c
@@ -381,7 +381,7 @@ int main(int argc, char * const argv[])
 
 	/* Print informative message */
 	if (!quiet) {
-		fprintf(stderr, "Block size %u, page size %u, OOB size %u\n",
+		fprintf(stderr, "Block size %d, page size %d, OOB size %d\n",
 				mtd.eb_size, mtd.min_io_size, mtd.oob_size);
 		fprintf(stderr,
 				"Dumping data starting at 0x%08llx and ending at 0x%08llx...\n",
-- 
1.7.0.4




From computersforpeace at gmail.com  Mon Nov 29 03:02:02 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Mon, 29 Nov 2010 00:02:02 -0800
Subject: [PATCH 8/8] nandwrite: use common.h "errmsg_die"
In-Reply-To: <1291017722-23985-1-git-send-email-computersforpeace@gmail.com>
References: <1291017722-23985-1-git-send-email-computersforpeace@gmail.com>
Message-ID: <1291017722-23985-8-git-send-email-computersforpeace@gmail.com>

errmsg_die() should be nearly the equivalent of the error message used
here. This saves a few lines.

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 nandwrite.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/nandwrite.c b/nandwrite.c
index c409878..c51efd7 100644
--- a/nandwrite.c
+++ b/nandwrite.c
@@ -212,11 +212,9 @@ static void process_options(int argc, char * const argv[])
 		}
 	}
 
-	if (mtdoffset < 0) {
-		fprintf(stderr, "Can't specify a negative device offset `%lld'\n",
+	if (mtdoffset < 0)
+		errmsg_die("Can't specify a negative device offset '%lld'",
 				mtdoffset);
-		exit(EXIT_FAILURE);
-	}
 
 	if (blockalign < 0)
 		errmsg_die("Can't specify a negative blockalign '%d'",
-- 
1.7.0.4




From computersforpeace at gmail.com  Mon Nov 29 03:01:58 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Mon, 29 Nov 2010 00:01:58 -0800
Subject: [PATCH 4/8] nanddump: change "unsigned" to "signed"
In-Reply-To: <1291017722-23985-1-git-send-email-computersforpeace@gmail.com>
References: <1291017722-23985-1-git-send-email-computersforpeace@gmail.com>
Message-ID: <1291017722-23985-4-git-send-email-computersforpeace@gmail.com>

For consistency between nanddump and nandwrite and in order to provide
better means for checking for negative inputs, the "offset" and "length"
types in nanddump should be changed to signed integer types. This also
solves a signed/unsigned comparison warning.

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 nanddump.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/nanddump.c b/nanddump.c
index 14a8816..b0dd7dc 100644
--- a/nanddump.c
+++ b/nanddump.c
@@ -82,8 +82,8 @@ static bool			pretty_print = false;	// print nice
 static bool			noecc = false;		// don't error correct
 static bool			noskipbad = false;	// don't skip bad blocks
 static bool			omitoob = false;	// omit oob data
-static unsigned long long	start_addr;		// start address
-static unsigned long long	length;			// dump length
+static long long		start_addr;		// start address
+static long long		length;			// dump length
 static const char		*mtddev;		// mtd device name
 static const char		*dumpfile;		// dump file name
 static bool			omitbad = false;
@@ -136,7 +136,7 @@ static void process_options(int argc, char * const argv[])
 				omitbad = true;
 				break;
 			case 's':
-				start_addr = simple_strtoull(optarg, &error);
+				start_addr = simple_strtoll(optarg, &error);
 				break;
 			case 'f':
 				if (!(dumpfile = strdup(optarg))) {
@@ -145,7 +145,7 @@ static void process_options(int argc, char * const argv[])
 				}
 				break;
 			case 'l':
-				length = simple_strtoull(optarg, &error);
+				length = simple_strtoll(optarg, &error);
 				break;
 			case 'o':
 				omitoob = true;
@@ -273,8 +273,8 @@ nil:
  */
 int main(int argc, char * const argv[])
 {
-	unsigned long long ofs, end_addr = 0;
-	unsigned long long blockstart = 1;
+	long long ofs, end_addr = 0;
+	long long blockstart = 1;
 	int ret, i, fd, ofd = 0, bs, badblock = 0;
 	struct mtd_dev_info mtd;
 	char pretty_buf[PRETTY_BUF_LEN];
-- 
1.7.0.4




From computersforpeace at gmail.com  Mon Nov 29 03:01:59 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Mon, 29 Nov 2010 00:01:59 -0800
Subject: [PATCH 5/8] nanddump: check for negative inputs
In-Reply-To: <1291017722-23985-1-git-send-email-computersforpeace@gmail.com>
References: <1291017722-23985-1-git-send-email-computersforpeace@gmail.com>
Message-ID: <1291017722-23985-5-git-send-email-computersforpeace@gmail.com>

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 nanddump.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/nanddump.c b/nanddump.c
index b0dd7dc..96b46d4 100644
--- a/nanddump.c
+++ b/nanddump.c
@@ -173,6 +173,13 @@ static void process_options(int argc, char * const argv[])
 		}
 	}
 
+	if (start_addr < 0)
+		errmsg_die("Can't specify a negative device offset '%lld'",
+				start_addr);
+
+	if (length < 0)
+		errmsg_die("Can't specify a negative length '%lld'", length);
+
 	if (quiet && pretty_print) {
 		fprintf(stderr, "The quiet and pretty print options are mutually-\n"
 				"exclusive. Choose one or the other.\n");
-- 
1.7.0.4




From computersforpeace at gmail.com  Mon Nov 29 03:01:55 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Mon, 29 Nov 2010 00:01:55 -0800
Subject: [PATCH 1/8] nanddump/nandwrite: use "simple_" str functions
Message-ID: <1291017722-23985-1-git-send-email-computersforpeace@gmail.com>

Per Mike Frysinger's suggestion, we check for strtoll() and strtoull()
errors by using the "common.h" helper functions simple_strtoll() and
simple_strtoull().

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 nanddump.c  |    4 ++--
 nandwrite.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/nanddump.c b/nanddump.c
index fe29596..bf95e81 100644
--- a/nanddump.c
+++ b/nanddump.c
@@ -136,7 +136,7 @@ static void process_options(int argc, char * const argv[])
 				omitbad = true;
 				break;
 			case 's':
-				start_addr = strtoull(optarg, NULL, 0);
+				start_addr = simple_strtoull(optarg, &error);
 				break;
 			case 'f':
 				if (!(dumpfile = strdup(optarg))) {
@@ -145,7 +145,7 @@ static void process_options(int argc, char * const argv[])
 				}
 				break;
 			case 'l':
-				length = strtoull(optarg, NULL, 0);
+				length = simple_strtoull(optarg, &error);
 				break;
 			case 'o':
 				omitoob = true;
diff --git a/nandwrite.c b/nandwrite.c
index bbe69b0..5373a89 100644
--- a/nandwrite.c
+++ b/nandwrite.c
@@ -201,7 +201,7 @@ static void process_options(int argc, char * const argv[])
 				writeoob = true;
 				break;
 			case 's':
-				mtdoffset = strtoll(optarg, NULL, 0);
+				mtdoffset = simple_strtoll(optarg, &error);
 				break;
 			case 'b':
 				blockalign = atoi(optarg);
-- 
1.7.0.4




From computersforpeace at gmail.com  Mon Nov 29 03:01:56 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Mon, 29 Nov 2010 00:01:56 -0800
Subject: [PATCH 2/8] mtd-utils: common.h: Add MAX() macro, fix MIN()
In-Reply-To: <1291017722-23985-1-git-send-email-computersforpeace@gmail.com>
References: <1291017722-23985-1-git-send-email-computersforpeace@gmail.com>
Message-ID: <1291017722-23985-2-git-send-email-computersforpeace@gmail.com>

Add MAX() macro to common.h, to be used in future patches.

Also a style change in comma location on MIN().

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 include/common.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/include/common.h b/include/common.h
index 25abc0c..eb8d5fc 100644
--- a/include/common.h
+++ b/include/common.h
@@ -34,7 +34,10 @@ extern "C" {
 #endif
 
 #ifndef MIN	/* some C lib headers define this for us */
-#define MIN(a ,b) ((a) < (b) ? (a) : (b))
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#endif
+#ifndef MAX
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
 #endif
 #define min(a, b) MIN(a, b) /* glue for linux kernel source */
 #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
-- 
1.7.0.4




From computersforpeace at gmail.com  Mon Nov 29 03:01:57 2010
From: computersforpeace at gmail.com (Brian Norris)
Date: Mon, 29 Nov 2010 00:01:57 -0800
Subject: [PATCH 3/8] nanddump: Refactor pretty print code into an
 sprintf()
In-Reply-To: <1291017722-23985-1-git-send-email-computersforpeace@gmail.com>
References: <1291017722-23985-1-git-send-email-computersforpeace@gmail.com>
Message-ID: <1291017722-23985-3-git-send-email-computersforpeace@gmail.com>

A do-while loop in pretty_dump_to_buffer() can be refactored into a
single sprintf() statement. MAX() and MIN() are used to ensure that:
(1) We have at least a single space between hex and ASCII output
(2) We don't overflow the line buffer

This patch was suggested by Mike Frysinger.

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 nanddump.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/nanddump.c b/nanddump.c
index bf95e81..14a8816 100644
--- a/nanddump.c
+++ b/nanddump.c
@@ -252,9 +252,10 @@ static void pretty_dump_to_buffer(const unsigned char *buf, size_t len,
 	if (!ascii)
 		goto nil;
 
-	do {
-		linebuf[lx++] = ' ';
-	} while (lx < (linebuflen - 1) && lx < (ascii_column - 1));
+	/* Spacing between hex and ASCII - ensure at least one space */
+	lx += sprintf(linebuf + lx, "%*s",
+			MAX((int)MIN(linebuflen, ascii_column) - 1 - lx, 1),
+			" ");
 
 	linebuf[lx++] = '|';
 	for (j = 0; (j < len) && (lx + 2) < linebuflen; j++)
-- 
1.7.0.4




From vapier.adi at gmail.com  Mon Nov 29 03:05:59 2010
From: vapier.adi at gmail.com (Mike Frysinger)
Date: Mon, 29 Nov 2010 03:05:59 -0500
Subject: [PATCH 7/8] nandwrite: add check for negative blockalign
In-Reply-To: <1291017722-23985-7-git-send-email-computersforpeace@gmail.com>
References: <1291017722-23985-1-git-send-email-computersforpeace@gmail.com>
	<1291017722-23985-7-git-send-email-computersforpeace@gmail.com>
Message-ID: <AANLkTi==NGjgX38mUKfziKQAknmOJyZmB4Db3WPEh5MJ@mail.gmail.com>

On Mon, Nov 29, 2010 at 03:02, Brian Norris wrote:
> + ? ? ? ? ? ? ? errmsg_die("Can't specify a negative blockalign '%d'",
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? blockalign);

personally, i'd avoid quotes on non-string types.  maybe also mention
the command line option that is "blockalign" ?

otherwise, these changes all look fine to me
-mike


From jacmet at sunsite.dk  Mon Nov 29 04:54:04 2010
From: jacmet at sunsite.dk (Peter Korsgaard)
Date: Mon, 29 Nov 2010 10:54:04 +0100
Subject: simple ubi reader
In-Reply-To: <AFC5977FF9FA3E449BB7803E9BA754EF01D8AE25@mailsrv.broadlight.com>
	(Vladimir Khmelnitsky's message of "Sun, 28 Nov 2010 11:27:04 +0200")
References: <AFC5977FF9FA3E449BB7803E9BA754EF01D8AE25@mailsrv.broadlight.com>
Message-ID: <874ob0zc8z.fsf@macbook.be.48ers.dk>

>>>>> "Vladimir" == Vladimir Khmelnitsky <vladimir at broadlight.com> writes:

 Vladimir> Hi,

 Vladimir> I need to write bootloader which should read its second stage
 Vladimir> binary from ubi volume.  I wonder if there is some simple
 Vladimir> open source code I can use to implement ubi volume reader?

John Ogness from Linuxtronic did a short presentation about a small
bootloader doing this at ELCE:

http://www.elinux.org/images/4/45/Ipl_and_ubi.pdf

I don't know if his code is available online, but you could try mailing
him.

-- 
Bye, Peter Korsgaard


From linus.walleij at stericsson.com  Mon Nov 29 07:52:06 2010
From: linus.walleij at stericsson.com (Linus Walleij)
Date: Mon, 29 Nov 2010 13:52:06 +0100
Subject: [PATCH 1/3] mtd: FSMC NAND remove PARTITION macro and fix compile
	noise
Message-ID: <1291035126-17770-1-git-send-email-linus.walleij@stericsson.com>

This removes the PARTITION macro that David didn't like and also
removes a local variable that was dangling unused in some #ifdefs
by being a bit more clever.

Signed-off-by: Linus Walleij <linus.walleij at stericsson.com>
---
 drivers/mtd/nand/fsmc_nand.c |   66 ++++++++++++++++++++++++++++++-----------
 1 files changed, 48 insertions(+), 18 deletions(-)

diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index 02edfba..5af4b3c 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -119,21 +119,36 @@ static struct fsmc_eccplace fsmc_ecc4_sp_place = {
 	}
 };
 
-/*
- * Default partition tables to be used if the partition information not
- * provided through platform data
- */
-#define PARTITION(n, off, sz)	{.name = n, .offset = off, .size = sz}
 
+#ifdef CONFIG_MTD_PARTITIONS
 /*
+ * Default partition tables to be used if the partition information not
+ * provided through platform data.
+ *
  * Default partition layout for small page(= 512 bytes) devices
  * Size for "Root file system" is updated in driver based on actual device size
  */
 static struct mtd_partition partition_info_16KB_blk[] = {
-	PARTITION("X-loader", 0, 4 * 0x4000),
-	PARTITION("U-Boot", 0x10000, 20 * 0x4000),
-	PARTITION("Kernel", 0x60000, 256 * 0x4000),
-	PARTITION("Root File System", 0x460000, 0),
+	{
+		.name = "X-loader",
+		.offset = 0,
+		.size = 4*0x4000,
+	},
+	{
+		.name = "U-Boot",
+		.offset = 0x10000,
+		.size = 20*0x4000,
+	},
+	{
+		.name = "Kernel",
+		.offset = 0x60000,
+		.size = 256*0x4000,
+	},
+	{
+		.name = "Root File System",
+		.offset = 0x460000,
+		.size = 0,
+	},
 };
 
 /*
@@ -141,15 +156,32 @@ static struct mtd_partition partition_info_16KB_blk[] = {
  * Size for "Root file system" is updated in driver based on actual device size
  */
 static struct mtd_partition partition_info_128KB_blk[] = {
-	PARTITION("X-loader", 0, 4 * 0x20000),
-	PARTITION("U-Boot", 0x80000, 12 * 0x20000),
-	PARTITION("Kernel", 0x200000, 48 * 0x20000),
-	PARTITION("Root File System", 0x800000, 0),
+	{
+		.name = "X-loader",
+		.offset = 0,
+		.size = 4*0x20000,
+	},
+	{
+		.name = "U-Boot",
+		.offset = 0x80000,
+		.size = 12*0x20000,
+	},
+	{
+		.name = "Kernel",
+		.offset = 0x200000,
+		.size = 48*0x20000,
+	},
+	{
+		.name = "Root File System",
+		.offset = 0x800000,
+		.size = 0,
+	},
 };
 
 #ifdef CONFIG_MTD_CMDLINE_PARTS
 const char *part_probes[] = { "cmdlinepart", NULL };
 #endif
+#endif
 
 /**
  * struct fsmc_nand_data - atructure for FSMC NAND device state
@@ -508,7 +540,7 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
 	struct nand_chip *nand;
 	struct fsmc_regs *regs;
 	struct resource *res;
-	int nr_parts, ret = 0;
+	int ret = 0;
 
 	if (!pdata) {
 		dev_err(&pdev->dev, "platform data is NULL\n");
@@ -676,11 +708,9 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
 	 * Check if partition info passed via command line
 	 */
 	host->mtd.name = "nand";
-	nr_parts = parse_mtd_partitions(&host->mtd, part_probes,
+	host->nr_partitions = parse_mtd_partitions(&host->mtd, part_probes,
 			&host->partitions, 0);
-	if (nr_parts > 0) {
-		host->nr_partitions = nr_parts;
-	} else {
+	if (host->nr_partitions <= 0) {
 #endif
 		/*
 		 * Check if partition info passed via command line
-- 
1.7.3.2



From linus.walleij at stericsson.com  Mon Nov 29 07:52:27 2010
From: linus.walleij at stericsson.com (Linus Walleij)
Date: Mon, 29 Nov 2010 13:52:27 +0100
Subject: [PATCH 3/3] mtd: FSMC NAND fix obvious speling errors
Message-ID: <1291035147-17840-1-git-send-email-linus.walleij@stericsson.com>

Fix spelling in the interface file.

Signed-off-by: Linus Walleij <linus.walleij at stericsson.com>
---
 include/linux/mtd/fsmc.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/mtd/fsmc.h b/include/linux/mtd/fsmc.h
index f589f29..8a2b75e 100644
--- a/include/linux/mtd/fsmc.h
+++ b/include/linux/mtd/fsmc.h
@@ -27,7 +27,7 @@
 
 /*
  * The placement of the Command Latch Enable (CLE) and
- * Address Latch Enable (ALE) is twised around in the
+ * Address Latch Enable (ALE) is twisted around in the
  * SPEAR310 implementation.
  */
 #if defined(CONFIG_MACH_SPEAR310)
@@ -62,7 +62,7 @@ struct fsmc_nor_bank_regs {
 
 /* ctrl_tim register definitions */
 
-struct fsms_nand_bank_regs {
+struct fsmc_nand_bank_regs {
 	uint32_t pc;
 	uint32_t sts;
 	uint32_t comm;
@@ -78,7 +78,7 @@ struct fsms_nand_bank_regs {
 struct fsmc_regs {
 	struct fsmc_nor_bank_regs nor_bank_regs[FSMC_MAX_NOR_BANKS];
 	uint8_t reserved_1[0x40 - 0x20];
-	struct fsms_nand_bank_regs bank_regs[FSMC_MAX_NAND_BANKS];
+	struct fsmc_nand_bank_regs bank_regs[FSMC_MAX_NAND_BANKS];
 	uint8_t reserved_2[0xfe0 - 0xc0];
 	uint32_t peripid0;			/* 0xfe0 */
 	uint32_t peripid1;			/* 0xfe4 */
-- 
1.7.3.2



From linus.walleij at stericsson.com  Mon Nov 29 07:52:19 2010
From: linus.walleij at stericsson.com (Linus Walleij)
Date: Mon, 29 Nov 2010 13:52:19 +0100
Subject: [PATCH 2/3] mtd: FSMC NAND use the PrimeCell identifier macros
Message-ID: <1291035139-17805-1-git-send-email-linus.walleij@stericsson.com>

The FSMC actually has a standard ARM PrimeCell ID register, and
the "revision" part of that register contains the thing that
the code is looking at. Reuse the infrastructure from the AMBA
bus abstraction and rid local defines.

Signed-off-by: Linus Walleij <linus.walleij at stericsson.com>
---
 drivers/mtd/nand/fsmc_nand.c |   23 ++++++++++++++++++++---
 include/linux/mtd/fsmc.h     |   19 -------------------
 2 files changed, 20 insertions(+), 22 deletions(-)

diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index 5af4b3c..205b10b 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -31,6 +31,7 @@
 #include <linux/io.h>
 #include <linux/slab.h>
 #include <linux/mtd/fsmc.h>
+#include <linux/amba/bus.h>
 #include <mtd/mtd-abi.h>
 
 static struct nand_ecclayout fsmc_ecc1_layout = {
@@ -184,8 +185,9 @@ const char *part_probes[] = { "cmdlinepart", NULL };
 #endif
 
 /**
- * struct fsmc_nand_data - atructure for FSMC NAND device state
+ * struct fsmc_nand_data - structure for FSMC NAND device state
  *
+ * @pid:		Part ID on the AMBA PrimeCell format
  * @mtd:		MTD info for a NAND flash.
  * @nand:		Chip related info for a NAND flash.
  * @partitions:		Partition info for a NAND Flash.
@@ -201,6 +203,7 @@ const char *part_probes[] = { "cmdlinepart", NULL };
  * @regs_va:		FSMC regs base address.
  */
 struct fsmc_nand_data {
+	u32			pid;
 	struct mtd_info		mtd;
 	struct nand_chip	nand;
 	struct mtd_partition	*partitions;
@@ -541,6 +544,8 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
 	struct fsmc_regs *regs;
 	struct resource *res;
 	int ret = 0;
+	u32 pid;
+	int i;
 
 	if (!pdata) {
 		dev_err(&pdev->dev, "platform data is NULL\n");
@@ -630,6 +635,18 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_probe1;
 
+	/*
+	 * This device ID is actually a common AMBA ID as used on the
+	 * AMBA PrimeCell bus. However it is not a PrimeCell.
+	 */
+	for (pid = 0, i = 0; i < 4; i++)
+		pid |= (readl(host->regs_va + resource_size(res) - 0x20 + 4 * i) & 255) << (i * 8);
+	host->pid = pid;
+	dev_info(&pdev->dev, "FSMC device partno %03x, manufacturer %02x, "
+		 "revision %02x, config %02x\n",
+		 AMBA_PART_BITS(pid), AMBA_MANF_BITS(pid),
+		 AMBA_REV_BITS(pid), AMBA_CONFIG_BITS(pid));
+
 	host->bank = pdata->bank;
 	host->select_chip = pdata->select_bank;
 	regs = host->regs_va;
@@ -657,7 +674,7 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
 
 	fsmc_nand_setup(regs, host->bank, nand->options & NAND_BUSWIDTH_16);
 
-	if (get_fsmc_version(host->regs_va) == FSMC_VER8) {
+	if (AMBA_REV_BITS(host->pid) >= 8) {
 		nand->ecc.read_page = fsmc_read_page_hwecc;
 		nand->ecc.calculate = fsmc_read_hwecc_ecc4;
 		nand->ecc.correct = fsmc_correct_data;
@@ -677,7 +694,7 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
 		goto err_probe;
 	}
 
-	if (get_fsmc_version(host->regs_va) == FSMC_VER8) {
+	if (AMBA_REV_BITS(host->pid) >= 8) {
 		if (host->mtd.writesize == 512) {
 			nand->ecc.layout = &fsmc_ecc4_sp_layout;
 			host->ecc_place = &fsmc_ecc4_sp_place;
diff --git a/include/linux/mtd/fsmc.h b/include/linux/mtd/fsmc.h
index 5d25567..f589f29 100644
--- a/include/linux/mtd/fsmc.h
+++ b/include/linux/mtd/fsmc.h
@@ -114,25 +114,6 @@ struct fsmc_regs {
 #define FSMC_THOLD_4		(4 << 16)
 #define FSMC_THIZ_1		(1 << 24)
 
-/* peripid2 register definitions */
-#define FSMC_REVISION_MSK	(0xf)
-#define FSMC_REVISION_SHFT	(0x4)
-
-#define FSMC_VER1		1
-#define FSMC_VER2		2
-#define FSMC_VER3		3
-#define FSMC_VER4		4
-#define FSMC_VER5		5
-#define FSMC_VER6		6
-#define FSMC_VER7		7
-#define FSMC_VER8		8
-
-static inline uint32_t get_fsmc_version(struct fsmc_regs *regs)
-{
-	return (readl(&regs->peripid2) >> FSMC_REVISION_SHFT) &
-				FSMC_REVISION_MSK;
-}
-
 /*
  * There are 13 bytes of ecc for every 512 byte block in FSMC version 8
  * and it has to be read consecutively and immediately after the 512
-- 
1.7.3.2



From matthieu.castet at parrot.com  Mon Nov 29 07:53:18 2010
From: matthieu.castet at parrot.com (Matthieu CASTET)
Date: Mon, 29 Nov 2010 13:53:18 +0100
Subject: simple ubi reader
In-Reply-To: <1290968019.2032.25.camel@koala>
References: <AFC5977FF9FA3E449BB7803E9BA754EF01D8AE25@mailsrv.broadlight.com>
	<1290968019.2032.25.camel@koala>
Message-ID: <4CF3A23E.5090704@parrot.com>

Hi,

Artem Bityutskiy a ?crit :
> On Sun, 2010-11-28 at 11:27 +0200, Vladimir Khmelnitsky wrote:
>> Hi,
>>
>> I need to write bootloader which should read its second stage binary
>> from ubi volume.
>> I wonder if there is some simple open source code I can use to implement
>> ubi volume reader?
> 
> I know people doing small bootloader code (closed source) with 4KiB
> constraint for whole code, and it supported UBI R/O. That was clever
> code made by clever people though. But here are some points:
> 
> 1. You do not have to read EC headers when scanning
> 2. You do not really need to read the volume table
> 3. If you can assume you need only one volume, say, with vol ID 0, this
> simplifies things further.
> 
> Also, AFAIR, some people found that placing VID header at the very end
> of the NAND page made ECC calculations easier and faster. This is
> actually why UBI has 'vid_hdr_offs' option which is not widely used,
> though.
> 
> Anyway, this is the original old design document, which may contain some
> hints, but I'm not sure:
> 
> http://linux-mtd.infradead.org/doc/ubidesign/ubidesign.pdf
> 
> The doc is not up-to-date, but all the design principles are valid.
> 
We also develop one ubi reader (only static volumes), but it is not open 
source at the moment.
We mainly used drivers/mtd/ubi/ubi-media.h as documentation.

It is quite easy to write one, but there are tricky stuff to handle like 
selecting the correct peb for a logical block (copy flags, sqnum, ...).

EC header can be useful to parse if the size of the ubi partition can 
change (use of image_seq to determine the end of boot partition).

Matthieu


From u.kleine-koenig at pengutronix.de  Mon Nov 29 08:20:34 2010
From: u.kleine-koenig at pengutronix.de (Uwe =?iso-8859-1?Q?Kleine-K=F6nig?=)
Date: Mon, 29 Nov 2010 14:20:34 +0100
Subject: [PATCH 3/3] mtd: FSMC NAND fix obvious speling errors
In-Reply-To: <1291035147-17840-1-git-send-email-linus.walleij@stericsson.com>
References: <1291035147-17840-1-git-send-email-linus.walleij@stericsson.com>
Message-ID: <20101129132033.GE20449@pengutronix.de>

Hi Linus,

$SUBJECT ~= s/speling/spelling/ :-)

Uwe

On Mon, Nov 29, 2010 at 01:52:27PM +0100, Linus Walleij wrote:
> Fix spelling in the interface file.
> 
> Signed-off-by: Linus Walleij <linus.walleij at stericsson.com>
> ---
>  include/linux/mtd/fsmc.h |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/mtd/fsmc.h b/include/linux/mtd/fsmc.h
> index f589f29..8a2b75e 100644
> --- a/include/linux/mtd/fsmc.h
> +++ b/include/linux/mtd/fsmc.h
> @@ -27,7 +27,7 @@
>  
>  /*
>   * The placement of the Command Latch Enable (CLE) and
> - * Address Latch Enable (ALE) is twised around in the
> + * Address Latch Enable (ALE) is twisted around in the
>   * SPEAR310 implementation.
>   */
>  #if defined(CONFIG_MACH_SPEAR310)
> @@ -62,7 +62,7 @@ struct fsmc_nor_bank_regs {
>  
>  /* ctrl_tim register definitions */
>  
> -struct fsms_nand_bank_regs {
> +struct fsmc_nand_bank_regs {
>  	uint32_t pc;
>  	uint32_t sts;
>  	uint32_t comm;
> @@ -78,7 +78,7 @@ struct fsms_nand_bank_regs {
>  struct fsmc_regs {
>  	struct fsmc_nor_bank_regs nor_bank_regs[FSMC_MAX_NOR_BANKS];
>  	uint8_t reserved_1[0x40 - 0x20];
> -	struct fsms_nand_bank_regs bank_regs[FSMC_MAX_NAND_BANKS];
> +	struct fsmc_nand_bank_regs bank_regs[FSMC_MAX_NAND_BANKS];
>  	uint8_t reserved_2[0xfe0 - 0xc0];
>  	uint32_t peripid0;			/* 0xfe0 */
>  	uint32_t peripid1;			/* 0xfe4 */
> -- 
> 1.7.3.2
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |


From wolfgang at leila.ping.de  Mon Nov 29 08:18:07 2010
From: wolfgang at leila.ping.de (Wolfgang Wegner)
Date: Mon, 29 Nov 2010 14:18:07 +0100
Subject: UBIFS oops after remount ro
In-Reply-To: <1290785057.2552.14.camel@localhost>
References: <20101126135005.GV23237@leila.ping.de>
	<1290785057.2552.14.camel@localhost>
Message-ID: <20101129131807.GB23237@leila.ping.de>

Hi Artem,

I can now reproduce the Oops with CONFIG_UBIFS_FS_DEBUG and your
patch. However, I had to manually apply the hunks because my tree
seems to differ enough for patch to not apply it automatically...

My observations so far:
- I have to re-flash the whole UBI image, simply removing the
  directory that is created with the script is not sufficient
  to trigger the Oops on subsequent re-start.
  My guess is that not only the single remount r/w->r/o  cycle
  from the first script is needed but the complete sequence of
  2 r/w->modify->r/o "cycles" currently in my startup scripts.
  Hopefully it's not really depending on filesystem internal state...
- I have to power cycle the board after flashing.
  (I flash from an NFS-root system) Simply issuing a reboot from
  the NFS-root system does result in a clean restart. When stopping
  the boot progress in the U-Boot prompt and issuing 'reset' from
  there sometimes also triggers the Oops on the following re-start
  with the newly flashed image, but doing a power cycle gave a 100%
  chance to get the oops in my tests.

The inode in question is always the same, but I guess this is not
a surprise as I always start with the same UBI Image?

I have to think about this a bit, still having no clue what is
going on and not too much a clue about what I am looking for either,
so sorry for just posting this weird information...

Regards,
Wolfgang

Here's the oops in the current state with all debugging output:

qqq: kupdated for ubifs
qqq: writing inode 3298
Unable to handle kernel NULL pointer dereference at virtual address 000000ac
pgd = c0004000
[000000ac] *pgd=00000000
Internal error: Oops: 817 [#1] PREEMPT
last sysfs file: /sys/devices/virtual/net/lo/flags
Modules linked in:
CPU: 0    Not tainted  (2.6.32-svn21303 #3)
PC is at mutex_lock+0x4/0x14
LR is at make_reservation+0x74/0x6b0
pc : [<c038cd20>]    lr : [<c015d23c>]    psr: 60000013
sp : df061d28  ip : df82e150  fp : 000000ac
r10: 00000000  r9 : 00000000  r8 : 00000001
r7 : 00000088  r6 : df82e000  r5 : df4f8310  r4 : df060000
r3 : 00000000  r2 : 00000000  r1 : df061d28  r0 : 000000ac
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 0005397f  Table: 1f090000  DAC: 00000017
Process flush-ubifs_0_1 (pid: 552, stack limit = 0xdf060270)
Stack: (0xdf061d28 to 0xdf062000)
1d20:                   00000001 c002d058 00000000 dfb4a07c 00000080 00000000
1d40: df82e14c 000000a0 00000088 00000001 00000000 dfa1c600 00000000 df82e000
1d60: df4f8310 000000a0 00000000 00000000 00000000 dfa1c600 00000000 c015de84
1d80: c05b2798 00000002 c05b2840 00000000 df922680 00000021 df4f8310 00000001
1da0: df82e000 df4f8458 00000010 00000000 00000000 c0166dd0 df4f8310 00000001
1dc0: 00000b2d c099eb40 00000010 df4f8310 df060000 c0162310 c099eb40 df061f10
1de0: df4f83ac df4f83ac 00000000 c099eb40 df82e008 ffffffff 00000400 df061e3c
1e00: 00000000 c00899f4 df061f10 c008a3a4 0000000e df979900 df4f83ac 00000000
1e20: 00000001 00000001 00000001 c00899e0 df4f83ac 00000000 00000009 00000001
1e40: 00000000 c099eb40 df978030 c04d1290 8f468953 c04d177c 0000000a c05b2798
1e60: 0000000a 00000018 00000017 c0206b44 0000000a c0503cfe c05b2798 00000001
1e80: 0000000a df4f8310 df061f10 df061f10 00000000 df4f83ac 00000000 00000007
1ea0: df82e090 c00cfb64 20000013 df82e068 df061f10 df060000 df4f8310 df82e088
1ec0: 00000000 c00d0868 00000000 dfa8a840 00000000 ffff9cc8 00000007 df4f84a0
1ee0: df4f8318 dfa8a800 df978000 df060000 df061f70 df82e068 00000000 df82e090
1f00: 00000014 df82e008 00000000 c00d0a94 df82e008 00000000 00000000 df061f4c
1f20: 00000400 00000000 00000000 00000000 00000000 00000000 00000014 00000000
1f40: 00000000 df82e0a8 00000000 ffff9110 00000000 df82e068 df061f70 0000092e
1f60: 00000000 00000000 df82e0a8 c00d0dd0 0000092e 00000000 00000000 00000003
1f80: c0048bd4 000001f4 ffff8c14 df82e068 df82e068 00000000 00000000 00000000
1fa0: 00000000 c00d0e1c df060000 df82e008 df82e068 c0098fe0 00000000 df8d9f40
1fc0: df061fd4 c0098f54 df82e068 c00543bc 00000000 00000000 df061fd8 df061fd8
1fe0: 00000000 00000000 00000000 00000000 00000000 c002744c 00000000 00000000
[<c038cd20>] (mutex_lock+0x4/0x14) from [<c015d23c>] (make_reservation+0x74/0x6b0)
[<c015d23c>] (make_reservation+0x74/0x6b0) from [<c015de84>] (ubifs_jnl_write_inode+0xfc/0x270)
[<c015de84>] (ubifs_jnl_write_inode+0xfc/0x270) from [<c0166dd0>] (ubifs_write_inode+0x110/0x19c)
[<c0166dd0>] (ubifs_write_inode+0x110/0x19c) from [<c0162310>] (ubifs_writepage+0x234/0x284)
[<c0162310>] (ubifs_writepage+0x234/0x284) from [<c00899f4>] (__writepage+0x14/0x64)
[<c00899f4>] (__writepage+0x14/0x64) from [<c008a3a4>] (write_cache_pages+0x234/0x384)
[<c008a3a4>] (write_cache_pages+0x234/0x384) from [<c00cfb64>] (writeback_single_inode+0xd8/0x238)
[<c00cfb64>] (writeback_single_inode+0xd8/0x238) from [<c00d0868>] (writeback_inodes_wb+0x3d4/0x4a8)
[<c00d0868>] (writeback_inodes_wb+0x3d4/0x4a8) from [<c00d0a94>] (wb_writeback+0x158/0x1ec)
[<c00d0a94>] (wb_writeback+0x158/0x1ec) from [<c00d0dd0>] (wb_do_writeback+0x1c4/0x1f0)
[<c00d0dd0>] (wb_do_writeback+0x1c4/0x1f0) from [<c00d0e1c>] (bdi_writeback_task+0x20/0x98)
[<c00d0e1c>] (bdi_writeback_task+0x20/0x98) from [<c0098fe0>] (bdi_start_fn+0x8c/0x100)
[<c0098fe0>] (bdi_start_fn+0x8c/0x100) from [<c00543bc>] (kthread+0x7c/0x84)
[<c00543bc>] (kthread+0x7c/0x84) from [<c002744c>] (kernel_thread_exit+0x0/0x8)
Code: ebfffd21 e28dd014 e8bd80f0 e3a03000 (e1001093) 
---[ end trace 60c4657087d3ea99 ]---

And here is the complete console log in case I missed some
important information:

UBIFS: mounted UBI device 0, volume 1, name "rootfs_live"
UBIFS: mounted read-only
UBIFS: file system size:   65802240 bytes (64260 KiB, 62 MiB, 510 LEBs)
UBIFS: journal size:       9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: zlib
UBIFS: reserved for root:  0 bytes (0 KiB)
VFS: Mounted root (ubifs filesystem) readonly on device 0:13.
Freeing init memory: 120K
UBIFS: mounted UBI device 0, volume 2, name "configfiles"
UBIFS: mounted read-only
UBIFS: file system size:   9160704 bytes (8946 KiB, 8 MiB, 71 LEBs)
UBIFS: journal size:       9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: zlib
UBIFS: reserved for root:  0 bytes (0 KiB)
UBIFS: mounted UBI device 0, volume 3, name "configfilesdefault"
UBIFS: mounted read-only
UBIFS: file system size:   9160704 bytes (8946 KiB, 8 MiB, 71 LEBs)
UBIFS: journal size:       9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: zlib
UBIFS: reserved for root:  0 bytes (0 KiB)
UBIFS: mounted UBI device 0, volume 4, name "userdata"
UBIFS: mounted read-only
UBIFS: file system size:   9160704 bytes (8946 KiB, 8 MiB, 71 LEBs)
UBIFS: journal size:       9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: zlib
UBIFS: reserved for root:  0 bytes (0 KiB)
  PID USER       VSZ STAT COMMAND
    1 root      3284 S    init       
    2 root         0 SW   [kthreadd]
    3 root         0 SW   [ksoftirqqqq: ubifs_remount_rw
d/0]
    4 root[<c002b91c>] (unwind_backtrace+0x0/0xd0) from [<c0165e40>] (ubifs_remount_fs+0x138/0x89c)
         0 SW   [<c0165e40>] (ubifs_remount_fs+0x138/0x89c) from [<c00b449c>] (do_remount_sb+0xa4/0xe0)
[watchdog/0]
  [<c00b449c>] (do_remount_sb+0xa4/0xe0) from [<c00cbde8>] (do_mount+0x20c/0x74c)
  5 root        [<c00cbde8>] (do_mount+0x20c/0x74c) from [<c00cc3ac>] (sys_mount+0x84/0xc4)
 0 SW   [events/[<c00cc3ac>] (sys_mount+0x84/0xc4) from [<c0026a00>] (ret_fast_syscall+0x0/0x28)
0]
    6 root         0 SW   [khelper]
    9 root         0 SW   [async/mgr]
  139 root         0 SW   [sync_supers]
  141 root         0 SWUBIFS DBG (pid 547): ubifs_bg_thread: background thread "ubifs_bgt0_1" started, PID 547
   [bdi-default]
  143 root         0 SW   [kblockd/0]
  150 root         0 SW   [ata/0]
  151 root         0 SW   [ata_aux]
  159 root         0 SW   [khubd]
  162 root         0 SW   [kseriod]
  165 root         0 SW   [kmmcd]
  185 root         0 SW   [rpciod/0]
  193 root         0 SW   [khungtaskd]
  194 root         0 SW   [kswapd0]
  243 root         0 SW   [aio/0]
  251 root         0 SW   [nfsiod]
  257 rootqqq: wb work for ubifs
         0 SW   qqq: wb work for ubifs
[crypto/0]
  39qqq: kupdated for ubifs
7 root         0 SW   [scsi_eh_0]
  400 root         0 SW   [scsi_eh_1]
  407 root         0 SW   [mtdblockd]
  432 root         0 SW   [ubi_bgt0d]
  433 root         0 SW   [spi_gpio.0]
  490 root         0 SW   [mv_crypto]
  527 root         0 SW   [usbhid_resumerqqq: wb work for ubifs
]
  537 root   qqq: kupdated for ubifs
   2344 S    /biqqq: wb work for ubifs
n/sh /etc/init.dqqq: kupdated for ubifs
/rcS 
  545 root      3288 R    ps 
adjusting modules
qqq: wb work for ubifs
qqq: kupdated for ubifs
qqq: wb work for ubifs
qqq: kupdated for ubifs
UBIFS DBG (pid 547): ubifs_bg_thread: background thread "ubifs_bgt0_1" stops
  PID USER       VSZ STAT COMMAND
    1 root      3284 S    init       
    2 root         0 SW   [kthreadd]
    3 root         0 SW   [ksoftirqd/0]
    4 root         0 SW   [watchdog/0]
    5 root         0 SW   [events/0]
    6 root         0 SW   [khelper]
    9 root         0 SW   [async/mgr]
  139 root         0 SW   [sync_supers]
  141 root         0 SW   [bdi-default]
  143 root         0 SW   [kblockd/0]
  150 root         0 SW   [ata/0]
  151 root         0 SW   [ata_aux]
  159 root         0 SW   [khubd]
  162 root         0 SW   [kseriod]
  165 root         0 SW   [kmmcd]
  185 root         0 SW   [rpciod/0]
  193 root         0 SW   [khungtaskd]
  194 root         0 SW   [kswapd0]
  243 root         0 SW   [aio/0]
  251 root         0 SW   [nfsiod]
  257 rqqq: ubifs_remount_rw
oot         0 SW[<c002b91c>] (unwind_backtrace+0x0/0xd0) from [<c0165e40>] (ubifs_remount_fs+0x138/0x89c)
   [crypto/0]
 [<c0165e40>] (ubifs_remount_fs+0x138/0x89c) from [<c00b449c>] (do_remount_sb+0xa4/0xe0)
 397 root       [<c00b449c>] (do_remount_sb+0xa4/0xe0) from [<c00cbde8>] (do_mount+0x20c/0x74c)
  0 SW   [scsi_e[<c00cbde8>] (do_mount+0x20c/0x74c) from [<c00cc3ac>] (sys_mount+0x84/0xc4)
h_0]
  400 root[<c00cc3ac>] (sys_mount+0x84/0xc4) from [<c0026a00>] (ret_fast_syscall+0x0/0x28)
         0 SW   [scsi_eh_1]
  407 root         0 SW   [mtdblockd]
  432 root         0 SW   [ubi_bgt0d]
  433 root         0 SW   [spi_gpio.0UBIFS DBG (pid 563): ubifs_bg_thread: background thread "ubifs_bgt0_2" started, PI3
]
  490 root         0 SW   [mv_crypto]
  527 qqq: ubifs_remount_rw
root         0 SW   [usbhid_resu[<c002b91c>] (unwind_backtrace+0x0/0xd0) from [<c0165e40>] (ubifs_remount_fs+0x138/0x89)
mer]
  537 root[<c0165e40>] (ubifs_remount_fs+0x138/0x89c) from [<c00b449c>] (do_remount_sb+0xa4/0xe0)
      2344 S    [<c00b449c>] (do_remount_sb+0xa4/0xe0) from [<c00cbde8>] (do_mount+0x20c/0x74c)
/bin/sh /etc/ini[<c00cbde8>] (do_mount+0x20c/0x74c) from [<c00cc3ac>] (sys_mount+0x84/0xc4)
t.d/rcS 
  552 [<c00cc3ac>] (sys_mount+0x84/0xc4) from [<c0026a00>] (ret_fast_syscall+0x0/0x28)
root         0 SW   [flush-ubifs_0_1]
  555 root      3288 R    ps 
/etc/localconfig/deviceid exists: 454d32e8-397e-4c33-9356-5595c550b07b
/etc/localconfig/dUBIFS DBG (pid 565): ubifs_bg_thread: background thread "ubifs_bgt0_3" started, PID 565
isplayid exists: 454d32e8-397e-4c33-9356-5595c550b07b
Warning! remounting /etc/localconfig rw!
Warning! remounting /etc/localconfigdefault rw!
new /etc/localconfig/hostname:Artista_0A:D6:13
Warning! remounting /etc/localconfigdefault ro!
qqq: kupdated for ubifs
qqq: wb work for ubifs
qqq: wb work for ubifs
qqq: kupdated for ubifs
UBIFS DBG (pid 565): ubifs_bg_thread: background thread "ubifs_bgt0_3" stops
Warning! remounting /etc/localconfig ro!
qqq: wb work for ubifs
qqq: kupdated for ubifs
qqq: wb work for ubifs
qqq: kupdated for ubifs
UBIFS DBG (pid 563): ubifs_bg_thread: background thread "ubifs_bgt0_2" stops
Setting up network interfaces...
##################### Setting up network #####################
Setting up loopback device...done
Setting hostname to Artista_0A:D6:13...Setting up network interface eth0...
given parameter is:  static
cat: can't open '/etc/localconfig//nameserver': No such file or directory
cat: can't open '/etc/localconfig//domain': No such file or directory
Using static configuration for eth0
        IP Address:     192.168.2.16
        Netmask:        255.255.255.0
        Nameserver:
        Hostname:       Artista_0A:D6:13
        Domain:
        Gateway:        192.168.2.10
deleting routes...
route: SIOCDELRT: No such process
adding routes
qqq: ubifs_remount_rw
[<c002b91c>] (unwind_backtrace+0x0/0xd0) from [<c0165e40>] (ubifs_remount_fs+0x138/0x89c)
[<c0165e40>] (ubifs_remount_fs+0x138/0x89c) from [<c00b449c>] (do_remount_sb+0xa4/0xe0)
[<c00b449c>] (do_remount_sb+0xa4/0xe0) from [<c00cbde8>] (do_mount+0x20c/0x74c)
[<c00cbde8>] (do_mount+0x20c/0x74c) from [<c00cc3ac>] (sys_mount+0x84/0xc4)
[<c00cc3ac>] (sys_mount+0x84/0xc4) from [<c0026a00>] (ret_fast_syscall+0x0/0x28)
UBIFS DBG (pid 597): ubifs_bg_thread: background thread "ubifs_bgt0_2" started, PID 597
qqq: wb work for ubifs
qqq: kupdated for ubifs
eth0: link up, 1000 Mb/s, full duplex, flow control disabled
qqq: kupdated for ubifs
qqq: kupdated for ubifs
qqq: wb work for ubifs
qqq: kupdated for ubifs
UBIFS DBG (pid 597): ubifs_bg_thread: background thread "ubifs_bgt0_2" stops
set value gateway to 
192.168.2.10
cat: can't open '/etc/localconfig//domain': No such file or directory
cat: can't open '/etc/localconfig//resolv.conf': No such file or directory
cat: can't open '/etc/localconfig//host.conf': No such file or dqqq: ubifs_remount_rw
irectory
[<c002b91c>] (unwind_backtrace+0x0/0xd0) from [<c0165e40>] (ubifs_remount_fs+0x138/0x89c)
[<c0165e40>] (ubifs_remount_fs+0x138/0x89c) from [<c00b449c>] (do_remount_sb+0xa4/0xe0)
[<c00b449c>] (do_remount_sb+0xa4/0xe0) from [<c00cbde8>] (do_mount+0x20c/0x74c)
[<c00cbde8>] (do_mount+0x20c/0x74c) from [<c00cc3ac>] (sys_mount+0x84/0xc4)
[<c00cc3ac>] (sys_mount+0x84/0xc4) from [<c0026a00>] (ret_fast_syscall+0x0/0x28)
UBIFS DBG (pid 606): ubifs_bg_thread: background thread "ubifs_bgt0_2" started, PID 606
qqq: wb work for ubifs
qqq: kupdated for ubifs
qqq: wb work for ubifs
qqq: kupdated for ubifs
UBIFS DBG (pid 606): ubifs_bg_thread: background thread "ubifs_bgt0_2" stops
set value host.conf to multi on
cat: can't open '/etc/localconfig//hosts': No such file or direcqqq: ubifs_remount_rw
tory
[<c002b91c>] (unwind_backtrace+0x0/0xd0) from [<c0165e40>] (ubifs_remount_fs+0x138/0x89c)
[<c0165e40>] (ubifs_remount_fs+0x138/0x89c) from [<c00b449c>] (do_remount_sb+0xa4/0xe0)
[<c00b449c>] (do_remount_sb+0xa4/0xe0) from [<c00cbde8>] (do_mount+0x20c/0x74c)
[<c00cbde8>] (do_mount+0x20c/0x74c) from [<c00cc3ac>] (sys_mount+0x84/0xc4)
[<c00cc3ac>] (sys_mount+0x84/0xc4) from [<c0026a00>] (ret_fast_syscall+0x0/0x28)
UBIFS DBG (pid 612): ubifs_bg_thread: background thread "ubifs_bgt0_2" started, PID 612
qqq: wb work for ubifs
qqq: kupdated for ubifs
qqq: wb work for ubifs
qqq: kupdated for ubifs
UBIFS DBG (pid 612): ubifs_bg_thread: background thread "ubifs_bgt0_2" stops
set value hosts to #/etc/hosts
127.0.0.1 localhost
127.0.1.1 Artista_0A:D6:13
Interface eth0 is set up
##################### Network is set up #####################
done
Starting udev/mdev...
done
Starting dbus...
done
Starting hal...
done
Starting webserver...
 mini_httpd started
done
Starting ftp server...
chmod: /opt/persistent/shows/push: Read-only file system
link /var/www/.htpasswd exists
Warning! remounting / rw!
qqq: ubifs_remount_rw
[<c002b91c>] (unwind_backtrace+0x0/0xd0) from [<c0165e40>] (ubifs_remount_fs+0x138/0x89c)
[<c0165e40>] (ubifs_remount_fs+0x138/0x89c) from [<c00b449c>] (do_remount_sb+0xa4/0xe0)
[<c00b449c>] (do_remount_sb+0xa4/0xe0) from [<c00cbde8>] (do_mount+0x20c/0x74c)
[<c00cbde8>] (do_mount+0x20c/0x74c) from [<c00cc3ac>] (sys_mount+0x84/0xc4)
[<c00cc3ac>] (sys_mount+0x84/0xc4) from [<c0026a00>] (ret_fast_syscall+0x0/0x28)
warning: `proftpd' uses 32-bit capabilities (legacy support in use)
UBIFS DBG (pid 702): ubifs_bg_thread: background thread "ubifs_bgt0_1" started, PID 702
link /var/www/cgi-bin/.htpasswd was created
Warning! remountingqqq: wb work for ubifs
 / ro!
qqq: kupdated for ubifs
qqq: wb work for ubifs
qqq: kupdated for ubifs
done
WARNING: starting telnetd! (only for lab usage!)
UBIFS DBG (pid 702): ubifs_bg_thread: background thread "ubifs_bgt0_1" stops
done
starting netclient
done
socket: Address family not supported by protocol
/sbin/mini_httpd: started as root without requesting chroot(), warning only
sh-3.2# qqq: kupdated for ubifs
qqq: kupdated for ubifs
qqq: kupdated for ubifs
qqq: kupdated for ubifs
qqq: kupdated for ubifs
qqq: kupdated for ubifs
qqq: kupdated for ubifs
qqq: kupdated for ubifs
qqq: kupdated for ubifs
qqq: kupdated for ubifs
qqq: kupdated for ubifs
qqq: kupdated for ubifs
qqq: kupdated for ubifs
qqq: kupdated for ubifs
qqq: kupdated for ubifs
qqq: kupdated for ubifs
qqq: kupdated for ubifs
qqq: kupdated for ubifs
qqq: kupdated for ubifs
qqq: kupdated for ubifs
qqq: kupdated for ubifs
qqq: writing inode 3298
Unable to handle kernel NULL pointer dereference at virtual address 000000ac
pgd = c0004000
[000000ac] *pgd=00000000
Internal error: Oops: 817 [#1] PREEMPT
last sysfs file: /sys/devices/virtual/net/lo/flags
Modules linked in:
CPU: 0    Not tainted  (2.6.32-svn21303 #3)
PC is at mutex_lock+0x4/0x14
LR is at make_reservation+0x74/0x6b0
pc : [<c038cd20>]    lr : [<c015d23c>]    psr: 60000013
sp : df061d28  ip : df82e150  fp : 000000ac
r10: 00000000  r9 : 00000000  r8 : 00000001
r7 : 00000088  r6 : df82e000  r5 : df4f8310  r4 : df060000
r3 : 00000000  r2 : 00000000  r1 : df061d28  r0 : 000000ac
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 0005397f  Table: 1f090000  DAC: 00000017
Process flush-ubifs_0_1 (pid: 552, stack limit = 0xdf060270)
Stack: (0xdf061d28 to 0xdf062000)
1d20:                   00000001 c002d058 00000000 dfb4a07c 00000080 00000000
1d40: df82e14c 000000a0 00000088 00000001 00000000 dfa1c600 00000000 df82e000
1d60: df4f8310 000000a0 00000000 00000000 00000000 dfa1c600 00000000 c015de84
1d80: c05b2798 00000002 c05b2840 00000000 df922680 00000021 df4f8310 00000001
1da0: df82e000 df4f8458 00000010 00000000 00000000 c0166dd0 df4f8310 00000001
1dc0: 00000b2d c099eb40 00000010 df4f8310 df060000 c0162310 c099eb40 df061f10
1de0: df4f83ac df4f83ac 00000000 c099eb40 df82e008 ffffffff 00000400 df061e3c
1e00: 00000000 c00899f4 df061f10 c008a3a4 0000000e df979900 df4f83ac 00000000
1e20: 00000001 00000001 00000001 c00899e0 df4f83ac 00000000 00000009 00000001
1e40: 00000000 c099eb40 df978030 c04d1290 8f468953 c04d177c 0000000a c05b2798
1e60: 0000000a 00000018 00000017 c0206b44 0000000a c0503cfe c05b2798 00000001
1e80: 0000000a df4f8310 df061f10 df061f10 00000000 df4f83ac 00000000 00000007
1ea0: df82e090 c00cfb64 20000013 df82e068 df061f10 df060000 df4f8310 df82e088
1ec0: 00000000 c00d0868 00000000 dfa8a840 00000000 ffff9cc8 00000007 df4f84a0
1ee0: df4f8318 dfa8a800 df978000 df060000 df061f70 df82e068 00000000 df82e090
1f00: 00000014 df82e008 00000000 c00d0a94 df82e008 00000000 00000000 df061f4c
1f20: 00000400 00000000 00000000 00000000 00000000 00000000 00000014 00000000
1f40: 00000000 df82e0a8 00000000 ffff9110 00000000 df82e068 df061f70 0000092e
1f60: 00000000 00000000 df82e0a8 c00d0dd0 0000092e 00000000 00000000 00000003
1f80: c0048bd4 000001f4 ffff8c14 df82e068 df82e068 00000000 00000000 00000000
1fa0: 00000000 c00d0e1c df060000 df82e008 df82e068 c0098fe0 00000000 df8d9f40
1fc0: df061fd4 c0098f54 df82e068 c00543bc 00000000 00000000 df061fd8 df061fd8
1fe0: 00000000 00000000 00000000 00000000 00000000 c002744c 00000000 00000000
[<c038cd20>] (mutex_lock+0x4/0x14) from [<c015d23c>] (make_reservation+0x74/0x6b0)
[<c015d23c>] (make_reservation+0x74/0x6b0) from [<c015de84>] (ubifs_jnl_write_inode+0xfc/0x270)
[<c015de84>] (ubifs_jnl_write_inode+0xfc/0x270) from [<c0166dd0>] (ubifs_write_inode+0x110/0x19c)
[<c0166dd0>] (ubifs_write_inode+0x110/0x19c) from [<c0162310>] (ubifs_writepage+0x234/0x284)
[<c0162310>] (ubifs_writepage+0x234/0x284) from [<c00899f4>] (__writepage+0x14/0x64)
[<c00899f4>] (__writepage+0x14/0x64) from [<c008a3a4>] (write_cache_pages+0x234/0x384)
[<c008a3a4>] (write_cache_pages+0x234/0x384) from [<c00cfb64>] (writeback_single_inode+0xd8/0x238)
[<c00cfb64>] (writeback_single_inode+0xd8/0x238) from [<c00d0868>] (writeback_inodes_wb+0x3d4/0x4a8)
[<c00d0868>] (writeback_inodes_wb+0x3d4/0x4a8) from [<c00d0a94>] (wb_writeback+0x158/0x1ec)
[<c00d0a94>] (wb_writeback+0x158/0x1ec) from [<c00d0dd0>] (wb_do_writeback+0x1c4/0x1f0)
[<c00d0dd0>] (wb_do_writeback+0x1c4/0x1f0) from [<c00d0e1c>] (bdi_writeback_task+0x20/0x98)
[<c00d0e1c>] (bdi_writeback_task+0x20/0x98) from [<c0098fe0>] (bdi_start_fn+0x8c/0x100)
[<c0098fe0>] (bdi_start_fn+0x8c/0x100) from [<c00543bc>] (kthread+0x7c/0x84)
[<c00543bc>] (kthread+0x7c/0x84) from [<c002744c>] (kernel_thread_exit+0x0/0x8)
Code: ebfffd21 e28dd014 e8bd80f0 e3a03000 (e1001093) 
---[ end trace 60c4657087d3ea99 ]---
qqq: kupdated for ubifs
qqq: kupdated for ubifs



From dedekind1 at gmail.com  Mon Nov 29 09:21:09 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Mon, 29 Nov 2010 16:21:09 +0200
Subject: UBIFS oops after remount ro
In-Reply-To: <20101129131807.GB23237@leila.ping.de>
References: <20101126135005.GV23237@leila.ping.de>
	<1290785057.2552.14.camel@localhost>
	<20101129131807.GB23237@leila.ping.de>
Message-ID: <1291040469.2141.10.camel@koala>

On Mon, 2010-11-29 at 14:18 +0100, Wolfgang Wegner wrote:
> Hi Artem,
> 
> I can now reproduce the Oops with CONFIG_UBIFS_FS_DEBUG and your
> patch.

OK, I thought one of ubi_asserts() would trigger. They do not.

>  However, I had to manually apply the hunks because my tree
> seems to differ enough for patch to not apply it automatically...

I sent the patch against the ubifs-v2.6.32 tree, which has all the UBIFS
patches back-ported, and which I recommend to use:

http://linux-mtd.infradead.org/doc/ubifs.html#L_source

(hmm, need to update that page, now there are more back-port trees)

> And here is the complete console log in case I missed some
> important information:

Well, because of the ps output, it is difficult to read kernel prints.
Also, the situation becomes more difficult because you have several
UBIFS file-systems, so many messages are irrelevant. Would be nice to
print them only for the instance which oopses.

> qqq: kupdated for ubifs
> qqq: kupdated for ubifs
> qqq: kupdated for ubifs
> qqq: kupdated for ubifs
> qqq: kupdated for ubifs
> qqq: kupdated for ubifs
> qqq: kupdated for ubifs
> qqq: kupdated for ubifs
> qqq: kupdated for ubifs
> qqq: kupdated for ubifs
> qqq: kupdated for ubifs
> qqq: kupdated for ubifs
> qqq: kupdated for ubifs
> qqq: kupdated for ubifs
> qqq: kupdated for ubifs
> qqq: kupdated for ubifs
> qqq: kupdated for ubifs
> qqq: kupdated for ubifs
> qqq: kupdated for ubifs
> qqq: kupdated for ubifs

So, not 100% sure, but probably this is kuptdated writeback. For some
reason mm thinks ubifs has dirty data, although it should not have,
because re-mounting path has full sync.

> qqq: writing inode 3298

Does this always happen for inode 3298? Or the inode number changes?

-- 
Best Regards,
Artem Bityutskiy (???????? ?????)



From dedekind1 at gmail.com  Mon Nov 29 09:51:27 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Mon, 29 Nov 2010 16:51:27 +0200
Subject: [PATCH] mtd: mxc_nand: Fix warning on nr_parts unused variable
In-Reply-To: <1290538933-12607-1-git-send-email-fabio.estevam@freescale.com>
References: <1290538933-12607-1-git-send-email-fabio.estevam@freescale.com>
Message-ID: <1291042287.2141.12.camel@koala>

On Tue, 2010-11-23 at 17:02 -0200, Fabio Estevam wrote:
> If CONFIG_MTD_PARTITIONS is not selected, then the following warning is generated:
> 
>   CC      drivers/mtd/nand/mxc_nand.o
> drivers/mtd/nand/mxc_nand.c: In function 'mxcnd_probe':
> drivers/mtd/nand/mxc_nand.c:1014: warning: unused variable 'nr_parts'
> 
> Fix it by marking nr_parts as __maybe_unused.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>

I'm curious, do you really use MTD without CONFIG_MTD_PARTITIONS ? Or
you found just random warning? I'm asking because I believed this config
option has to be killed, because it causes more harm in form of mess,
than good.

Anyway, putting this to my l2-mtd-2.6.git, thanks.

-- 
Best Regards,
Artem Bityutskiy (???????? ?????)



From dedekind1 at gmail.com  Mon Nov 29 09:53:01 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Mon, 29 Nov 2010 16:53:01 +0200
Subject: [PATCH] mtd: mtdchar/mtdpart: fix master device identification
	for mtd repartition
In-Reply-To: <1290514637-15869-1-git-send-email-roman.tereshonkov@nokia.com>
References: <1290514637-15869-1-git-send-email-roman.tereshonkov@nokia.com>
Message-ID: <1291042381.2141.13.camel@koala>

On Tue, 2010-11-23 at 14:17 +0200, Roman Tereshonkov wrote:
> Function mtd_has_master renamed as mtd_is_partition to follow the function logic.
> The patch fixes the problem of checking the right mtd device for partition creation.
> To delete partition checking is not needed here so as it is done in mtd_del_partition.
> By master we consider the mtd device which does not belong to any partition.
> 
> Signed-off-by: Roman Tereshonkov <roman.tereshonkov at nokia.com>

Pushed to l2-mtd-2.6.git, thanks.

-- 
Best Regards,
Artem Bityutskiy (???????? ?????)



From dedekind1 at gmail.com  Mon Nov 29 09:53:26 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Mon, 29 Nov 2010 16:53:26 +0200
Subject: [PATCH][v2] Fixing the garbage collector problem after
	NAND-flash image record in u-boot
In-Reply-To: <4206182445660643B9AEB8D4E55BBD0A106A0AA93A@HERMES2>
References: <4206182445660643B9AEB8D4E55BBD0A106A0AA93A@HERMES2>
Message-ID: <1291042406.2141.14.camel@koala>

On Tue, 2010-11-23 at 18:38 +0100, Sergej.Stepanov at ids.de wrote:
> This patch should fix the following problem:
>  1. the  jffs2-image update in the u-boot was ok
>  2. first restart and first mount of the NAND-flash-partition was also ok
>  3. before the restart of controller there are no any activity on NAND-flash except of the jffs2_gcd_mtdX-process ...
>  4. BUT after the second restart the NAND-flash-partition could not be really used after the second mount,
>     dmesg filled with messages:
> ...
> jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x03ce0000: 0xc0ff instead
> jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x03d00000: 0xc0ff instead
> ....
> Just for for info:
> the behaviour observed on mpc8313-based board with the large-page NAND.
> The only activity on NAND-flash was the garbage collector process, that looks for CLEANMARKER-nodes
> 
> As Scott said it was broken by commit 3ab8f2a2e7011c5e83363b42950757e46ef06824
> 
> Signed-off-by: Sergej Stepanov <Sergej.Stepanov at ids.de>
> Cc: Rolf Riehle <Rolf.Riehle at ids.de>
> Cc: Scott Wood <scottwood at freescale.com>
> Cc: David Woodhouse <dwmw2 at infradead.org>

Pusehd to l2-mtd-2.6.git, thanks.

-- 
Best Regards,
Artem Bityutskiy (???????? ?????)



From dedekind1 at gmail.com  Mon Nov 29 10:07:03 2010
From: dedekind1 at gmail.com (Artem Bityutskiy)
Date: Mon, 29 Nov 2010 17:07:03 +0200
Subject: Suggested patch: reset errno after isatty()
In-Reply-To: <AANLkTikSEH4SOTYv9oqniP6-pPtRc0Y=M2+8hvdAirRg@mail.gmail.com>
References: <AANLkTimwumfui-_T1ScDYwMLKbNh1ia-SDMUg56wTfN5@mail.gmail.com>
	<4CD11C03.3090207@parrot.com>
	<AANLkTimfxjrtV4eks5tK68h6TQ20soib+6gaTC+QyB4a@mail.gmail.com>
	<AANLkTinSj2vAJJjeSxF-rvq08OVsnw3YcpRSpuOfv9pQ@mail.gmail.com>
	<AANLkTikQtNwsPkJSkmpmC=kMZpmdqHDW0HROeUBNDOEi@mail.gmail.com>
	<1289646433.2218.22.camel@localhost>
	<1289649338.2218.42.camel@localhost>
	<AANLkTink+0WvCmQWwd4+Vf8TETjR5-6BsGU=a071Rk0+@mail.gmail.com>
	<AANLkTim7TT8ydMiSX8B2ehJP2kQ6jtGSnEZU98AZjWUf@mail.gmail.com>
	<AANLkTimHCBNCcc3suXv4kJ4+MXUSf5Tw2r876A7tqtoL@mail.gmail.com>
	<AANLkTinzqwsEFoG+Z0S0ep7JN3p4jHugkHhN-J19Y3cn@mail.gmail.com>
	<1290607959.2793.11.camel@localhost>
	<AANLkTinTpe=niqS87JRR4h53TJ803ohs3e2MwiVFstgR@mail.gmail.com>
	<AANLkTi=sKOzXnr-CZLvu_XP4gm5y15pL0HxS+=-=2ij7@mail.gmail.com>
	<AANLkTikSEH4SOTYv9oqniP6-pPtRc0Y=M2+8hvdAirRg@mail.gmail.com>
Message-ID: <1291043223.2141.15.camel@koala>

On Thu, 2010-11-25 at 09:58 +0100, Ketil Froyn wrote:
> On Wed, Nov 24, 2010 at 10:36 PM, Mike Frysinger <vapier.adi at gmail.com> wrote:
> >
> > awesome.  can you post your signed-off-by tag and/or a proper git patch please ?
> > -mike
> 
> I'm pretty new to git. Hope this is right.

Pushed this patch to the mtd-utils tree, thanks!

-- 
Best Regards,
Artem Bityutskiy (???????? ?????)



From fabio.estevam at freescale.com  Mon Nov 29 10:10:06 2010
From: fabio.estevam at freescale.com (Fabio Estevam)
Date: Mon, 29 Nov 2010 13:10:06 -0200
Subject: [PATCH] mtd: mxc_nand: Fix warning on nr_parts unused variable
In-Reply-To: <1291042287.2141.12.camel@koala>
References: <1290538933-12607-1-git-send-email-fabio.estevam@freescale.com>
	<1291042287.2141.12.camel@koala>
Message-ID: <4CF3C24E.2060801@freescale.com>

On 11/29/2010 12:51 PM, Artem Bityutskiy wrote:
> On Tue, 2010-11-23 at 17:02 -0200, Fabio Estevam wrote:
>  > If CONFIG_MTD_PARTITIONS is not selected, then the following warning
> is generated:
>  >
>  > CC drivers/mtd/nand/mxc_nand.o
>  > drivers/mtd/nand/mxc_nand.c: In function 'mxcnd_probe':
>  > drivers/mtd/nand/mxc_nand.c:1014: warning: unused variable 'nr_parts'
>  >
>  > Fix it by marking nr_parts as __maybe_unused.
>  >
>  > Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
>
> I'm curious, do you really use MTD without CONFIG_MTD_PARTITIONS ? Or
> you found just random warning? I'm asking because I believed this config
> option has to be killed, because it causes more harm in form of mess,
> than good.

I was using it without CONFIG_MTD_PARTITIONS because first I was trying 
to get the NAND to be detected only.

> Anyway, putting this to my l2-mtd-2.6.git, thanks.

Thanks,

Fabio Estevam




From wolfgang at leila.ping.de  Mon Nov 29 12:02:23 2010
From: wolfgang at leila.ping.de (Wolfgang Wegner)
Date: Mon, 29 Nov 2010 18:02:23 +0100
Subject: UBIFS oops after remount ro
In-Reply-To: <1291049157.2141.17.camel@koala>
References: <20101126135005.GV23237@leila.ping.de>
	<1290785057.2552.14.camel@localhost>
	<20101129131807.GB23237@leila.ping.de>
	<1291040469.2141.10.camel@koala>
	<20101129151729.GE23237@leila.ping.de>
	<1291049157.2141.17.camel@koala>
Message-ID: <20101129170223.GF23237@leila.ping.de>

Hi Artem,

On Mon, Nov 29, 2010 at 06:45:57PM +0200, Artem Bityutskiy wrote:
> 
> I cannot judge for sure, but this looks like non-UBIFS issue in 2.6.32,
> so merging the stable 2.6.32.X tree can help. I make sense in general to
> merge stable tree as well.

the problem is I still have some "marvell" tree
(from git.marvell.com/orion.git) and am not sure if there is anything
special in it.

Would the "stock" 2.6.35.x from
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
be an option in your opinion, too? I seem to remember the marvell tree
was completely merged in between (right now digging through the commits
to make it clear), so I could get an all shiny, new kernel when having
to do any kind of merge at all...

Regards,
Wolfgang



From wolfgang at leila.ping.de  Mon Nov 29 12:23:20 2010
From: wolfgang at leila.ping.de (Wolfgang Wegner)
Date: Mon, 29 Nov 2010 18:23:20 +0100
Subject: UBIFS oops after remount ro
In-Reply-To: <20101129170223.GF23237@leila.ping.de>
References: <20101126135005.GV23237@leila.ping.de>
	<1290785057.2552.14.camel@localhost>
	<20101129131807.GB23237@leila.ping.de>
	<1291040469.2141.10.camel@koala>
	<20101129151729.GE23237@leila.ping.de>
	<1291049157.2141.17.camel@koala>
	<20101129170223.GF23237@leila.ping.de>
Message-ID: <20101129172320.GG23237@leila.ping.de>

On Mon, Nov 29, 2010 at 06:02:23PM +0100, Wolfgang Wegner wrote:
> 
> Would the "stock" 2.6.35.x from
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

oops... s/2.6.35/2.6.36/g
thanks

Wolfgang



From agust at denx.de  Mon Nov 29 13:50:14 2010
From: agust at denx.de (Anatolij Gustschin)
Date: Mon, 29 Nov 2010 19:50:14 +0100
Subject: UBIFS partition on NOR flash not mountable after power cut test
Message-ID: <20101129195014.19224240@wker>

Hello,

using kernel 2.6.34.7 with applied UBI/UBIFS back-port patches from
2.6.34 UBIFS back-port tree and an UBIFS filesystem in a partition
on Spansion NOR Flash S29GL512P (2 x16 chips in a 32-bit bank) we are
not able to mount the filesystem after around 30 power cut test
cycles. Has anyone seen similar issues before?

The power failure test is simulated by triggering an external reset
of the board while a simple program is writing data into a file on
the UBIFS partition. Each test cycle consists of the following steps:

 - booting the kernel
 - attaching the MTD device
 - mounting the UBIFS partition
 - starting a program for writing the test data into a file on the
   mounted UBIFS partition (only if mounting of this partition
   succeeded)
 - triggering a reset after about 15 sec.

After a number of test cycles we end up with corrupted partition
which cannot be recovered any more and mounting the partition
does not succeed. Two kernel logs with enabled UBIFS debug output
are included below.

Previous to the above tests we also validated the flash access by
running some MTD tests (mtd_readtest/mtd_stresstest) and these MTD
tests didn't show any errors or warnings.

The problem can also be reproduced when running with UBIFS extra
self checks enabled, but here it seems that we need to run more
test cycles until the issue pops up.

Used UBI/UBIFS configuration:
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_MTD_UBI_BEB_RESERVE=1

CONFIG_UBIFS_FS=y
# CONFIG_UBIFS_FS_XATTR is not set
# CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
CONFIG_UBIFS_FS_LZO=y
CONFIG_UBIFS_FS_ZLIB=y
CONFIG_UBIFS_FS_DEBUG=y
CONFIG_UBIFS_FS_DEBUG_MSG_LVL=1
CONFIG_UBIFS_FS_DEBUG_CHKS=y

Our flash device is a Spansion S29GL512P NOR flash,
2 x16 in a 32-bit bank.

# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 02ac0000 00040000 "rootfs"
mtd1: 00040000 00040000 "env-0"
mtd2: 00040000 00040000 "env-1"
mtd3: 00040000 00040000 "splash-image"
mtd4: 00500000 00040000 "linux"
mtd5: 03400000 00040000 "homefs"
mtd6: 00002000 00001000 "50040000.mram0"
mtd7: 00008000 00001000 "50042000.mram1"

The UBIFS partition is on mtd5.

The kernel version is 2.6.34.7 with updated UBI/UBIFS pulled from
2.6.34 back-port tree.

Kernel log:

UBI: attaching mtd5 to ubi0
UBI: physical eraseblock size:   262144 bytes (256 KiB)
UBI: logical eraseblock size:    262016 bytes
UBI: smallest flash I/O unit:    1
UBI: VID header offset:          64 (aligned 64)
UBI: data offset:                128
UBI: max. sequence number:       2348
UBI: attached mtd5 to ubi0
UBI: MTD device name:            "homefs"
UBI: MTD device size:            52 MiB
UBI: number of good PEBs:        208
UBI: number of bad PEBs:         0
UBI: number of corrupted PEBs:   0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 208
UBI: number of PEBs reserved for bad PEB handling: 0
UBI: max/mean erase counter: 24/16
UBI: image sequence number:  1966556915
UBI: background thread "ubi_bgt0d" started, PID 1287
UBIFS DBG (pid 1288): ubifs_start_scan: scan LEB 1:0
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:0 (262016 bytes left)
UBIFS DBG (pid 1290): ubifs_bg_thread: background thread "ubifs_bgt0_0" started, PID 1290
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:512 (261504 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:1024 (260992 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:1536 (260480 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:2048 (259968 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:2560 (259456 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:3072 (258944 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:3584 (258432 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:4096 (257920 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:4608 (257408 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:5120 (256896 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:5632 (256384 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:6144 (255872 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:6656 (255360 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:7168 (254848 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:7680 (254336 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:8192 (253824 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:8704 (253312 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:9216 (252800 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:9728 (252288 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:10240 (251776 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:10752 (251264 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:11264 (250752 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:11776 (250240 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:12288 (249728 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:12800 (249216 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:13312 (248704 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:13824 (248192 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:14336 (247680 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:14848 (247168 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:15360 (246656 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:15872 (246144 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:16384 (245632 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:16896 (245120 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:17408 (244608 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:17920 (244096 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:18432 (243584 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:18944 (243072 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:19456 (242560 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:19968 (242048 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:20480 (241536 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:20992 (241024 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:21504 (240512 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:22016 (240000 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:22528 (239488 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:23040 (238976 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:23552 (238464 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:24064 (237952 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:24576 (237440 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:25088 (236928 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:25600 (236416 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:26112 (235904 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:26624 (235392 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:27136 (234880 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:27648 (234368 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:28160 (233856 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:28672 (233344 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:29184 (232832 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:29696 (232320 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:30208 (231808 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:30720 (231296 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:31232 (230784 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:31744 (230272 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:32256 (229760 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:32768 (229248 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:33280 (228736 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:33792 (228224 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:34304 (227712 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:34816 (227200 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:35328 (226688 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:35840 (226176 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:36352 (225664 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:36864 (225152 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:37376 (224640 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:37888 (224128 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:38400 (223616 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:38912 (223104 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:39424 (222592 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:39936 (222080 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:40448 (221568 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:40960 (221056 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:41472 (220544 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:41984 (220032 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:42496 (219520 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:43008 (219008 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:43520 (218496 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:44032 (217984 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:44544 (217472 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:45056 (216960 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:45568 (216448 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:46080 (215936 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:46592 (215424 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:47104 (214912 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:47616 (214400 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:48128 (213888 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:48640 (213376 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:49152 (212864 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:49664 (212352 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:50176 (211840 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:50688 (211328 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:51200 (210816 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:51712 (210304 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:52224 (209792 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:52736 (209280 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:53248 (208768 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:53760 (208256 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:54272 (207744 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:54784 (207232 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:55296 (206720 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:55808 (206208 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:56320 (205696 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:56832 (205184 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:57344 (204672 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:57856 (204160 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:58368 (203648 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:58880 (203136 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:59392 (202624 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:59904 (202112 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:60416 (201600 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:60928 (201088 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:61440 (200576 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:61952 (200064 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:62464 (199552 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:62976 (199040 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:63488 (198528 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:64000 (198016 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:64512 (197504 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:65024 (196992 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:65536 (196480 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:66048 (195968 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:66560 (195456 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:67072 (194944 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:67584 (194432 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:68096 (193920 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:68608 (193408 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:69120 (192896 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:69632 (192384 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:70144 (191872 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:70656 (191360 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:71168 (190848 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:71680 (190336 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:72192 (189824 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:72704 (189312 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:73216 (188800 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:73728 (188288 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: hit empty space
UBIFS DBG (pid 1288): ubifs_end_scan: stop scanning LEB 1 at offset 73728
UBIFS DBG (pid 1288): ubifs_start_scan: scan LEB 2:0
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:0 (262016 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:512 (261504 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:1024 (260992 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:1536 (260480 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:2048 (259968 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:2560 (259456 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:3072 (258944 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:3584 (258432 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:4096 (257920 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:4608 (257408 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:5120 (256896 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:5632 (256384 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:6144 (255872 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:6656 (255360 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:7168 (254848 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:7680 (254336 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:8192 (253824 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:8704 (253312 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:9216 (252800 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:9728 (252288 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:10240 (251776 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:10752 (251264 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:11264 (250752 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:11776 (250240 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:12288 (249728 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:12800 (249216 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:13312 (248704 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:13824 (248192 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:14336 (247680 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:14848 (247168 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:15360 (246656 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:15872 (246144 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:16384 (245632 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:16896 (245120 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:17408 (244608 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:17920 (244096 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:18432 (243584 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:18944 (243072 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:19456 (242560 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:19968 (242048 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:20480 (241536 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:20992 (241024 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:21504 (240512 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:22016 (240000 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:22528 (239488 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:23040 (238976 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:23552 (238464 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:24064 (237952 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:24576 (237440 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:25088 (236928 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:25600 (236416 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:26112 (235904 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:26624 (235392 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:27136 (234880 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:27648 (234368 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:28160 (233856 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:28672 (233344 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:29184 (232832 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:29696 (232320 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:30208 (231808 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:30720 (231296 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:31232 (230784 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:31744 (230272 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:32256 (229760 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:32768 (229248 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:33280 (228736 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:33792 (228224 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:34304 (227712 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:34816 (227200 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:35328 (226688 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:35840 (226176 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:36352 (225664 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:36864 (225152 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:37376 (224640 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:37888 (224128 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:38400 (223616 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:38912 (223104 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:39424 (222592 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:39936 (222080 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:40448 (221568 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:40960 (221056 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:41472 (220544 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:41984 (220032 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:42496 (219520 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:43008 (219008 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:43520 (218496 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:44032 (217984 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:44544 (217472 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:45056 (216960 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:45568 (216448 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:46080 (215936 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:46592 (215424 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:47104 (214912 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:47616 (214400 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:48128 (213888 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:48640 (213376 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:49152 (212864 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:49664 (212352 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:50176 (211840 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:50688 (211328 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:51200 (210816 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:51712 (210304 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:52224 (209792 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:52736 (209280 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:53248 (208768 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:53760 (208256 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:54272 (207744 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:54784 (207232 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:55296 (206720 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:55808 (206208 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:56320 (205696 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:56832 (205184 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:57344 (204672 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:57856 (204160 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:58368 (203648 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:58880 (203136 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:59392 (202624 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:59904 (202112 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:60416 (201600 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:60928 (201088 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:61440 (200576 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:61952 (200064 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:62464 (199552 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:62976 (199040 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:63488 (198528 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:64000 (198016 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:64512 (197504 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:65024 (196992 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:65536 (196480 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:66048 (195968 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:66560 (195456 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:67072 (194944 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:67584 (194432 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:68096 (193920 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:68608 (193408 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:69120 (192896 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:69632 (192384 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:70144 (191872 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:70656 (191360 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:71168 (190848 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:71680 (190336 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:72192 (189824 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:72704 (189312 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:73216 (188800 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:73728 (188288 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: hit empty space
UBIFS DBG (pid 1288): ubifs_end_scan: stop scanning LEB 2 at offset 73728
UBIFS: recovery needed
UBIFS DBG (pid 1288): ubifs_recover_inl_heads: checking index head at 173:204000
UBIFS DBG (pid 1288): ubifs_recover_inl_heads: checking LPT head at 7:45864
UBIFS DBG (pid 1288): ubifs_start_scan: scan LEB 6:0
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 6:0 (262016 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning commit start node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 6:32 (261984 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 6:96 (261920 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 6:160 (261856 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: hit empty space
UBIFS DBG (pid 1288): ubifs_end_scan: stop scanning LEB 6 at offset 160
UBIFS DBG (pid 1288): ubifs_start_scan: scan LEB 3:0
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 3:0 (262016 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning commit start node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 3:32 (261984 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 3:96 (261920 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1288): ubifs_scan: look at LEB 3:160 (261856 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: hit empty space
UBIFS DBG (pid 1288): ubifs_end_scan: stop scanning LEB 3 at offset 160
UBIFS DBG (pid 1288): ubifs_recover_leb: 162:210456
UBIFS DBG (pid 1288): ubifs_start_scan: scan LEB 162:210456
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:210456 (51560 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:210616 (51400 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:210776 (51240 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:210936 (51080 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:211096 (50920 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:211256 (50760 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:211416 (50600 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:211576 (50440 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:211736 (50280 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:211896 (50120 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:212056 (49960 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:212216 (49800 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:212376 (49640 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:212536 (49480 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:212696 (49320 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:212856 (49160 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:213016 (49000 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:213176 (48840 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:213336 (48680 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:213496 (48520 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:213656 (48360 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:213816 (48200 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:213976 (48040 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:214136 (47880 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning unknown node
UBIFS DBG (pid 1288): no_more_nodes: unexpected bad common header at 162:214136
UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:214136 (47880 bytes left)
UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning unknown node
UBIFS error (pid 1288): ubifs_check_node: bad node type 255
UBIFS error (pid 1288): ubifs_check_node: bad node at LEB 162:214136
	magic          0x6101831
	crc            0xc06989c8
	node_type      255 (unknown node)
	group_type     255 (unknown)
	sqnum          18446744073709551615
	len            4294967295
node type 255 was not recognized
Call Trace:
[c602db80] [c0007ecc] show_stack+0x4c/0x16c (unreliable)
[c602dbc0] [c013e980] ubifs_check_node+0x17c/0x308
[c602dbe0] [c0147dec] ubifs_scan_a_node+0x15c/0x2d8
[c602dc10] [c015d1c0] ubifs_recover_leb+0x3f0/0x940
[c602dc80] [c01486fc] replay_buds+0xb4/0xb4c
[c602dd20] [c0149894] ubifs_replay_journal+0x700/0xf48
[c602dda0] [c013b060] ubifs_fill_super+0xda0/0x1600
[c602de00] [c013cbb4] ubifs_get_sb+0x10c/0x344
[c602de80] [c007b9a4] vfs_kern_mount+0x60/0x150
[c602dea0] [c007bae4] do_kern_mount+0x40/0x100
[c602dec0] [c00926c0] do_mount+0x40c/0x718
[c602df10] [c0092a5c] sys_mount+0x90/0xd8
[c602df40] [c0010b44] ret_from_syscall+0x0/0x38
--- Exception: c01 at 0xfe93d18
    LR = 0x1000347c
UBIFS DBG (pid 1288): no_more_nodes: unexpected bad common header at 162:214136
UBIFS error (pid 1288): ubifs_recover_leb: bad node
UBIFS error (pid 1288): ubifs_scanned_corruption: corruption at LEB 162:214136
UBIFS error (pid 1288): ubifs_scanned_corruption: first 8192 bytes from LEB 162:214136
00000000: 31181006 c88969c0 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  1.....i.........................
00000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000040: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000060: ffffffff ffffffff a4810000 00000000 00000000 00000000 00000000 00000000  ................................
00000080: 00000000 00000000 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000000a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000000c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000000e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000100: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000120: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000140: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000160: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000180: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000001a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000001c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000001e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000200: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000220: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000240: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000260: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000280: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000002a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000002c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000002e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000300: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000320: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000340: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000360: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000380: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000003a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000003c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000003e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000400: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000420: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000440: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000460: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000480: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000004a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000004c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000004e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000500: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000520: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000540: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000560: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000580: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000005a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000005c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000005e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000600: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000620: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000640: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000660: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000680: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000006a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000006c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000006e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000700: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000720: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000740: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000760: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000780: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000007a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000007c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000007e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000800: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000820: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000840: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000860: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000880: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000008a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000008c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000008e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000900: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000920: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000940: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000960: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000980: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000009a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000009c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000009e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000a00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000a20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000a40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000a60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000a80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000aa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ac0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ae0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000b00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000b20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000b40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000b60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000b80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ba0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000bc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000be0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000c00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000c20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000c40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000c60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000c80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ca0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000cc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ce0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000d00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000d20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000d40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000d60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000d80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000da0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000dc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000de0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000e00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000e20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000e40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000e60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000e80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ea0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ec0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ee0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000f00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000f20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000f40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000f60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000f80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000fa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000fc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000fe0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001000: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001040: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001060: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001080: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000010a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000010c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000010e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001100: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001120: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001140: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001160: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001180: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000011a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000011c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000011e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001200: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001220: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001240: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001260: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001280: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000012a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000012c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000012e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001300: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001320: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001340: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001360: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001380: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000013a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000013c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000013e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001400: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001420: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001440: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001460: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001480: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000014a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000014c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000014e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001500: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001520: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001540: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001560: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001580: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000015a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000015c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000015e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001600: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001620: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001640: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001660: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001680: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000016a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000016c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000016e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001700: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001720: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001740: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001760: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001780: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000017a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000017c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000017e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001800: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001820: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001840: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001860: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001880: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000018a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000018c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000018e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001900: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001920: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001940: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001960: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001980: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000019a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000019c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000019e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001a00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001a20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001a40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001a60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001a80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001aa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ac0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ae0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001b00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001b20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001b40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001b60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001b80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ba0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001bc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001be0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001c00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001c20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001c40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001c60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001c80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ca0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001cc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ce0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001d00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001d20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001d40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001d60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001d80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001da0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001dc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001de0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001e00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001e20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001e40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001e60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001e80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ea0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ec0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ee0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001f00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001f20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001f40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001f60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001f80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001fa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001fc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001fe0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
UBIFS error (pid 1288): ubifs_recover_leb: LEB 162 scanning failed
UBIFS DBG (pid 1290): ubifs_bg_thread: background thread "ubifs_bgt0_0" stops


Kernel log after trying to mount corrupted partition from another
test run. I'm including it here since it has different pattern
in corrupted node. Here the debug level is increased to 3:

UBI: attaching mtd5 to ubi0
UBI DBG (pid 1346): io_init: min_io_size      1
UBI DBG (pid 1346): io_init: hdrs_min_io_size 1
UBI DBG (pid 1346): io_init: ec_hdr_alsize    64
UBI DBG (pid 1346): io_init: vid_hdr_alsize   64
UBI DBG (pid 1346): io_init: vid_hdr_offset   64
UBI DBG (pid 1346): io_init: vid_hdr_aloffset 64
UBI DBG (pid 1346): io_init: vid_hdr_shift    0
UBI DBG (pid 1346): io_init: leb_start        128
UBI DBG (pid 1346): io_init: max_erroneous    20
UBI: physical eraseblock size:   262144 bytes (256 KiB)
UBI: logical eraseblock size:    262016 bytes
UBI: smallest flash I/O unit:    1
UBI: VID header offset:          64 (aligned 64)
UBI: data offset:                128
UBI DBG (pid 1346): ubi_scan: process PEB 0
UBI DBG (pid 1346): ubi_scan: process PEB 1
UBI DBG (pid 1346): ubi_scan: process PEB 2
UBI DBG (pid 1346): ubi_scan: process PEB 3
UBI DBG (pid 1346): ubi_scan: process PEB 4
UBI DBG (pid 1346): ubi_scan: process PEB 5
UBI DBG (pid 1346): ubi_scan: process PEB 6
UBI DBG (pid 1346): ubi_scan: process PEB 7
UBI DBG (pid 1346): ubi_scan: process PEB 8
UBI DBG (pid 1346): ubi_scan: process PEB 9
UBI DBG (pid 1346): ubi_scan: process PEB 10
UBI DBG (pid 1346): ubi_scan: process PEB 11
UBI DBG (pid 1346): ubi_scan: process PEB 12
UBI DBG (pid 1346): ubi_scan: process PEB 13
UBI DBG (pid 1346): ubi_scan: process PEB 14
UBI DBG (pid 1346): ubi_scan: process PEB 15
UBI DBG (pid 1346): ubi_scan: process PEB 16
UBI DBG (pid 1346): ubi_scan: process PEB 17
UBI DBG (pid 1346): ubi_scan: process PEB 18
UBI DBG (pid 1346): ubi_scan: process PEB 19
UBI DBG (pid 1346): ubi_scan: process PEB 20
UBI DBG (pid 1346): ubi_scan: process PEB 21
UBI DBG (pid 1346): ubi_scan: process PEB 22
UBI DBG (pid 1346): ubi_scan: process PEB 23
UBI DBG (pid 1346): ubi_scan: process PEB 24
UBI DBG (pid 1346): ubi_scan: process PEB 25
UBI DBG (pid 1346): ubi_scan: process PEB 26
UBI DBG (pid 1346): ubi_scan: process PEB 27
UBI DBG (pid 1346): ubi_scan: process PEB 28
UBI DBG (pid 1346): ubi_scan: process PEB 29
UBI DBG (pid 1346): ubi_scan: process PEB 30
UBI DBG (pid 1346): ubi_scan: process PEB 31
UBI DBG (pid 1346): ubi_scan: process PEB 32
UBI DBG (pid 1346): ubi_scan: process PEB 33
UBI DBG (pid 1346): ubi_scan: process PEB 34
UBI DBG (pid 1346): ubi_scan: process PEB 35
UBI DBG (pid 1346): ubi_scan: process PEB 36
UBI DBG (pid 1346): ubi_scan: process PEB 37
UBI DBG (pid 1346): ubi_scan: process PEB 38
UBI DBG (pid 1346): ubi_scan: process PEB 39
UBI DBG (pid 1346): ubi_scan: process PEB 40
UBI DBG (pid 1346): ubi_scan: process PEB 41
UBI DBG (pid 1346): ubi_scan: process PEB 42
UBI DBG (pid 1346): ubi_scan: process PEB 43
UBI DBG (pid 1346): ubi_scan: process PEB 44
UBI DBG (pid 1346): ubi_scan: process PEB 45
UBI DBG (pid 1346): ubi_scan: process PEB 46
UBI DBG (pid 1346): ubi_scan: process PEB 47
UBI DBG (pid 1346): ubi_scan: process PEB 48
UBI DBG (pid 1346): ubi_scan: process PEB 49
UBI DBG (pid 1346): ubi_scan: process PEB 50
UBI DBG (pid 1346): ubi_scan: process PEB 51
UBI DBG (pid 1346): ubi_scan: process PEB 52
UBI DBG (pid 1346): ubi_scan: process PEB 53
UBI DBG (pid 1346): ubi_scan: process PEB 54
UBI DBG (pid 1346): ubi_scan: process PEB 55
UBI DBG (pid 1346): ubi_scan: process PEB 56
UBI DBG (pid 1346): ubi_scan: process PEB 57
UBI DBG (pid 1346): ubi_scan: process PEB 58
UBI DBG (pid 1346): ubi_scan: process PEB 59
UBI DBG (pid 1346): ubi_scan: process PEB 60
UBI DBG (pid 1346): ubi_scan: process PEB 61
UBI DBG (pid 1346): ubi_scan: process PEB 62
UBI DBG (pid 1346): ubi_scan: process PEB 63
UBI DBG (pid 1346): ubi_scan: process PEB 64
UBI DBG (pid 1346): ubi_scan: process PEB 65
UBI DBG (pid 1346): ubi_scan: process PEB 66
UBI DBG (pid 1346): ubi_scan: process PEB 67
UBI DBG (pid 1346): ubi_scan: process PEB 68
UBI DBG (pid 1346): ubi_scan: process PEB 69
UBI DBG (pid 1346): ubi_scan: process PEB 70
UBI DBG (pid 1346): ubi_scan: process PEB 71
UBI DBG (pid 1346): ubi_scan: process PEB 72
UBI DBG (pid 1346): ubi_scan: process PEB 73
UBI DBG (pid 1346): ubi_scan: process PEB 74
UBI DBG (pid 1346): ubi_scan: process PEB 75
UBI DBG (pid 1346): ubi_scan: process PEB 76
UBI DBG (pid 1346): ubi_scan: process PEB 77
UBI DBG (pid 1346): ubi_scan: process PEB 78
UBI DBG (pid 1346): ubi_scan: process PEB 79
UBI DBG (pid 1346): ubi_scan: process PEB 80
UBI DBG (pid 1346): ubi_scan: process PEB 81
UBI DBG (pid 1346): ubi_scan: process PEB 82
UBI DBG (pid 1346): ubi_scan: process PEB 83
UBI DBG (pid 1346): ubi_scan: process PEB 84
UBI DBG (pid 1346): ubi_scan: process PEB 85
UBI DBG (pid 1346): ubi_scan: process PEB 86
UBI DBG (pid 1346): ubi_scan: process PEB 87
UBI DBG (pid 1346): ubi_scan: process PEB 88
UBI DBG (pid 1346): ubi_scan: process PEB 89
UBI DBG (pid 1346): ubi_scan: process PEB 90
UBI DBG (pid 1346): ubi_scan: process PEB 91
UBI DBG (pid 1346): ubi_scan: process PEB 92
UBI DBG (pid 1346): ubi_scan: process PEB 93
UBI DBG (pid 1346): ubi_scan: process PEB 94
UBI DBG (pid 1346): ubi_scan: process PEB 95
UBI DBG (pid 1346): ubi_scan: process PEB 96
UBI DBG (pid 1346): ubi_scan: process PEB 97
UBI DBG (pid 1346): ubi_scan: process PEB 98
UBI DBG (pid 1346): ubi_scan: process PEB 99
UBI DBG (pid 1346): ubi_scan: process PEB 100
UBI DBG (pid 1346): ubi_scan: process PEB 101
UBI DBG (pid 1346): ubi_scan: process PEB 102
UBI DBG (pid 1346): ubi_scan: process PEB 103
UBI DBG (pid 1346): ubi_scan: process PEB 104
UBI DBG (pid 1346): ubi_scan: process PEB 105
UBI DBG (pid 1346): ubi_scan: process PEB 106
UBI DBG (pid 1346): ubi_scan: process PEB 107
UBI DBG (pid 1346): ubi_scan: process PEB 108
UBI DBG (pid 1346): ubi_scan: process PEB 109
UBI DBG (pid 1346): ubi_scan: process PEB 110
UBI DBG (pid 1346): ubi_scan: process PEB 111
UBI DBG (pid 1346): ubi_scan: process PEB 112
UBI DBG (pid 1346): ubi_scan: process PEB 113
UBI DBG (pid 1346): ubi_scan: process PEB 114
UBI DBG (pid 1346): ubi_scan: process PEB 115
UBI DBG (pid 1346): ubi_scan: process PEB 116
UBI DBG (pid 1346): ubi_scan: process PEB 117
UBI DBG (pid 1346): ubi_scan: process PEB 118
UBI DBG (pid 1346): ubi_scan: process PEB 119
UBI DBG (pid 1346): ubi_scan: process PEB 120
UBI DBG (pid 1346): ubi_scan: process PEB 121
UBI DBG (pid 1346): ubi_scan: process PEB 122
UBI DBG (pid 1346): ubi_scan: process PEB 123
UBI DBG (pid 1346): ubi_scan: process PEB 124
UBI DBG (pid 1346): ubi_scan: process PEB 125
UBI DBG (pid 1346): ubi_scan: process PEB 126
UBI DBG (pid 1346): ubi_scan: process PEB 127
UBI DBG (pid 1346): ubi_scan: process PEB 128
UBI DBG (pid 1346): ubi_scan: process PEB 129
UBI DBG (pid 1346): ubi_scan: process PEB 130
UBI DBG (pid 1346): ubi_scan: process PEB 131
UBI DBG (pid 1346): ubi_scan: process PEB 132
UBI DBG (pid 1346): ubi_scan: process PEB 133
UBI DBG (pid 1346): ubi_scan: process PEB 134
UBI DBG (pid 1346): ubi_scan: process PEB 135
UBI DBG (pid 1346): ubi_scan: process PEB 136
UBI DBG (pid 1346): ubi_scan: process PEB 137
UBI DBG (pid 1346): ubi_scan: process PEB 138
UBI DBG (pid 1346): ubi_scan: process PEB 139
UBI DBG (pid 1346): ubi_scan: process PEB 140
UBI DBG (pid 1346): ubi_scan: process PEB 141
UBI DBG (pid 1346): ubi_scan: process PEB 142
UBI DBG (pid 1346): ubi_scan: process PEB 143
UBI DBG (pid 1346): ubi_scan: process PEB 144
UBI DBG (pid 1346): ubi_scan: process PEB 145
UBI DBG (pid 1346): ubi_scan: process PEB 146
UBI DBG (pid 1346): ubi_scan: process PEB 147
UBI DBG (pid 1346): ubi_scan: process PEB 148
UBI DBG (pid 1346): ubi_scan: process PEB 149
UBI DBG (pid 1346): ubi_scan: process PEB 150
UBI DBG (pid 1346): ubi_scan: process PEB 151
UBI DBG (pid 1346): ubi_scan: process PEB 152
UBI DBG (pid 1346): ubi_scan: process PEB 153
UBI DBG (pid 1346): ubi_scan: process PEB 154
UBI DBG (pid 1346): ubi_scan: process PEB 155
UBI DBG (pid 1346): ubi_scan: process PEB 156
UBI DBG (pid 1346): ubi_scan: process PEB 157
UBI DBG (pid 1346): ubi_scan: process PEB 158
UBI DBG (pid 1346): ubi_scan: process PEB 159
UBI DBG (pid 1346): ubi_scan: process PEB 160
UBI DBG (pid 1346): ubi_scan: process PEB 161
UBI DBG (pid 1346): ubi_scan: process PEB 162
UBI DBG (pid 1346): ubi_scan: process PEB 163
UBI DBG (pid 1346): ubi_scan: process PEB 164
UBI DBG (pid 1346): ubi_scan: process PEB 165
UBI DBG (pid 1346): ubi_scan: process PEB 166
UBI DBG (pid 1346): ubi_scan: process PEB 167
UBI DBG (pid 1346): ubi_scan: process PEB 168
UBI DBG (pid 1346): ubi_scan: process PEB 169
UBI DBG (pid 1346): ubi_scan: process PEB 170
UBI DBG (pid 1346): ubi_scan: process PEB 171
UBI DBG (pid 1346): ubi_scan: process PEB 172
UBI DBG (pid 1346): ubi_scan: process PEB 173
UBI DBG (pid 1346): ubi_scan: process PEB 174
UBI DBG (pid 1346): ubi_scan: process PEB 175
UBI DBG (pid 1346): ubi_scan: process PEB 176
UBI DBG (pid 1346): ubi_scan: process PEB 177
UBI DBG (pid 1346): ubi_scan: process PEB 178
UBI DBG (pid 1346): ubi_scan: process PEB 179
UBI DBG (pid 1346): ubi_scan: process PEB 180
UBI DBG (pid 1346): ubi_scan: process PEB 181
UBI DBG (pid 1346): ubi_scan: process PEB 182
UBI DBG (pid 1346): ubi_scan: process PEB 183
UBI DBG (pid 1346): ubi_scan: process PEB 184
UBI DBG (pid 1346): ubi_scan: process PEB 185
UBI DBG (pid 1346): ubi_scan: process PEB 186
UBI DBG (pid 1346): ubi_scan: process PEB 187
UBI DBG (pid 1346): ubi_scan: process PEB 188
UBI DBG (pid 1346): ubi_scan: process PEB 189
UBI DBG (pid 1346): ubi_scan: process PEB 190
UBI DBG (pid 1346): ubi_scan: process PEB 191
UBI DBG (pid 1346): ubi_scan: process PEB 192
UBI DBG (pid 1346): ubi_scan: process PEB 193
UBI DBG (pid 1346): ubi_scan: process PEB 194
UBI DBG (pid 1346): ubi_scan: process PEB 195
UBI DBG (pid 1346): ubi_scan: process PEB 196
UBI DBG (pid 1346): ubi_scan: process PEB 197
UBI DBG (pid 1346): ubi_scan: process PEB 198
UBI DBG (pid 1346): ubi_scan: process PEB 199
UBI DBG (pid 1346): ubi_scan: process PEB 200
UBI DBG (pid 1346): ubi_scan: process PEB 201
UBI DBG (pid 1346): ubi_scan: process PEB 202
UBI DBG (pid 1346): ubi_scan: process PEB 203
UBI DBG (pid 1346): ubi_scan: process PEB 204
UBI DBG (pid 1346): ubi_scan: process PEB 205
UBI DBG (pid 1346): ubi_scan: process PEB 206
UBI DBG (pid 1346): ubi_scan: process PEB 207
UBI DBG (pid 1346): ubi_scan: scanning is finished
UBI: max. sequence number:       145
UBI DBG (pid 1346): process_lvol: check layout volume
UBI DBG (pid 1346): uif_init: ubi0 major is 253
UBI DBG (pid 1346): ubi_add_volume: add volume 0
UBI: attached mtd5 to ubi0
UBI: MTD device name:            "homefs"
UBI: MTD device size:            52 MiB
UBI: number of good PEBs:        208
UBI: number of bad PEBs:         0
UBI: number of corrupted PEBs:   0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 208
UBI: number of PEBs reserved for bad PEB handling: 0
UBI: max/mean erase counter: 3/1
UBI: image sequence number:  1966556915
UBI: background thread "ubi_bgt0d" started, PID 1349
UBI DBG (pid 1350): ubi_open_volume_path: open volume /dev/ubi0_0, mode 1
UBI DBG (pid 1350): ubi_open_volume: open device 0, volume 0, mode 1
UBI DBG (pid 1350): ubi_open_volume: open device 0, volume 0, mode 2
UBI DBG (pid 1350): ubi_is_mapped: test LEB 0:0
UBI DBG (pid 1350): ubi_leb_read: read 4096 bytes from LEB 0:0:0
UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 1:0
UBI DBG (pid 1350): ubi_leb_read: read 262016 bytes from LEB 0:1:0
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:0 (262016 bytes left)
UBIFS DBG (pid 1352): ubifs_bg_thread: background thread "ubifs_bgt0_0" started, PID 1352
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:512 (261504 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:1024 (260992 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:1536 (260480 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:2048 (259968 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:2560 (259456 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:3072 (258944 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:3584 (258432 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:4096 (257920 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:4608 (257408 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:5120 (256896 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:5632 (256384 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:6144 (255872 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: hit empty space
UBIFS DBG (pid 1350): ubifs_end_scan: stop scanning LEB 1 at offset 6144
UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 2:0
UBI DBG (pid 1350): ubi_leb_read: read 262016 bytes from LEB 0:2:0
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:0 (262016 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:512 (261504 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:1024 (260992 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:1536 (260480 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:2048 (259968 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:2560 (259456 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:3072 (258944 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:3584 (258432 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:4096 (257920 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:4608 (257408 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:5120 (256896 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:5632 (256384 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:6144 (255872 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: hit empty space
UBIFS DBG (pid 1350): ubifs_end_scan: stop scanning LEB 2 at offset 6144
UBI DBG (pid 1350): ubi_leb_read: read 88 bytes from LEB 0:12:221424
UBIFS: recovery needed
UBIFS DBG (pid 1350): ubifs_recover_inl_heads: checking index head at 12:221512
UBI DBG (pid 1350): ubi_leb_read: read 8 bytes from LEB 0:12:221512
UBIFS DBG (pid 1350): ubifs_recover_inl_heads: checking LPT head at 7:2296
UBI DBG (pid 1350): ubi_leb_read: read 8 bytes from LEB 0:7:2296
UBI DBG (pid 1350): ubi_leb_read: read 12 bytes from LEB 0:7:1960
UBI DBG (pid 1350): ubi_leb_unmap: unmap LEB 0:8
UBI DBG (pid 1350): ubi_leb_read: read 13 bytes from LEB 0:7:2279
UBI DBG (pid 1350): ubi_leb_read: read 13 bytes from LEB 0:7:2168
UBI DBG (pid 1350): ubi_leb_read: read 13 bytes from LEB 0:7:1990
UBI DBG (pid 1350): ubi_leb_read: read 18 bytes from LEB 0:7:1972
UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 5:0
UBI DBG (pid 1350): ubi_leb_read: read 262016 bytes from LEB 0:5:0
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 5:0 (262016 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning commit start node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 5:32 (261984 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 5:96 (261920 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 5:160 (261856 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 5:224 (261792 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 5:288 (261728 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: hit empty space
UBIFS DBG (pid 1350): ubifs_end_scan: stop scanning LEB 5 at offset 288
UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 6:0
UBI DBG (pid 1350): ubi_leb_read: read 262016 bytes from LEB 0:6:0
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:0 (262016 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning commit start node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:32 (261984 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:96 (261920 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:160 (261856 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:224 (261792 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:288 (261728 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:352 (261664 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:416 (261600 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:480 (261536 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:544 (261472 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:608 (261408 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:672 (261344 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:736 (261280 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:800 (261216 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:864 (261152 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:928 (261088 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:992 (261024 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:1056 (260960 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:1120 (260896 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:1184 (260832 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:1248 (260768 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:1312 (260704 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:1376 (260640 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:1440 (260576 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: hit empty space
UBIFS DBG (pid 1350): ubifs_end_scan: stop scanning LEB 6 at offset 1440
UBIFS DBG (pid 1350): ubifs_recover_leb: 86:1920
UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 86:1920
UBI DBG (pid 1350): ubi_leb_read: read 260096 bytes from LEB 0:86:1920
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:1920 (260096 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:2080 (259936 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:2240 (259776 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:2400 (259616 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:2560 (259456 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:2720 (259296 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:2880 (259136 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:3040 (258976 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:3200 (258816 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:3360 (258656 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:3520 (258496 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:3680 (258336 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:3840 (258176 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: ing inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:18080 (243936 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:18240 (243776 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:18400 (243616 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:18560 (243456 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:18720 (243296 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:18880 (243136 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:19040 (242976 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:19200 (242816 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:19360 (242656 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:19520 (242496 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:19680 (242336 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:19840 (242176 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:20000 (242016 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:20160 (241856 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:20320 (241696 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:20480 (241536 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:20640 (241376 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:20800 (241216 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:20960 (241056 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:21120 (240896 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:21280 (240736 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:21440 (240576 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:21600 (240416 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:21760 (240256 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:21920 (240096 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:22080 (239936 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:22240 (239776 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:22400 (239616 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:22560 (239456 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:22720 (239296 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:22880 (239136 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:23040 (238976 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:23200 (238816 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:23360 (238656 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:23520 (238496 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:23680 (238336 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:23840 (238176 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:24000 (238016 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:24160 (237856 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:24320 (237696 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:24480 (237536 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:24640 (237376 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:24800 (237216 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:24960 (237056 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:25120 (236896 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:25280 (236736 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:25440 (236576 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:25600 (236416 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:25760 (236256 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:25920 (236096 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:26080 (235936 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:26240 (235776 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:26400 (235616 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:26560 (235456 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:26720 (235296 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:26880 (235136 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:27040 (234976 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:27200 (234816 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: hit empty space
UBIFS DBG (pid 1350): ubifs_end_scan: stop scanning LEB 86 at offset 27200
UBIFS DBG (pid 1350): ubifs_recover_leb: 89:4144
UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 89:4144
UBI DBG (pid 1350): ubi_leb_read: read 257872 bytes from LEB 0:89:4144
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:4144 (257872 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:8288 (253728 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:12432 (249584 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:16576 (245440 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:20720 (241296 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:24864 (237152 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:29008 (233008 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:33152 (228864 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:37296 (224720 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:41440 (220576 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:45584 (216432 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:49728 (212288 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:53872 (208144 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:58016 (204000 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:62160 (199856 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:66304 (195712 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:70448 (191568 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:74592 (187424 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:78736 (183280 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:82880 (179136 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:87024 (174992 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:91168 (170848 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:95312 (166704 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:99456 (162560 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:103600 (158416 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:107744 (154272 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:111888 (150128 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:116032 (145984 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:120176 (141840 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:124320 (137696 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:128464 (133552 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:132608 (129408 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:136752 (125264 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:140896 (121120 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:145040 (116976 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:149184 (112832 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:153328 (108688 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:157472 (104544 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:161616 (100400 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:165760 (96256 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:169904 (92112 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:174048 (87968 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:178192 (83824 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:182336 (79680 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:186480 (75536 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:190624 (71392 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:194768 (67248 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:198912 (63104 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:203056 (58960 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:207200 (54816 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:211344 (50672 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:215488 (46528 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:219632 (42384 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:223776 (38240 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:227920 (34096 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:232064 (29952 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:236208 (25808 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:240352 (21664 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:244496 (17520 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:248640 (13376 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:252784 (9232 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:256928 (5088 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:261072 (944 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: hit empty space
UBIFS DBG (pid 1350): ubifs_end_scan: stop scanning LEB 89 at offset 261072
UBIFS DBG (pid 1350): ubifs_recover_leb: 57:0
UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 57:0
UBI DBG (pid 1350): ubi_leb_read: read 262016 bytes from LEB 0:57:0
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:0 (262016 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:4144 (257872 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:8288 (253728 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:12432 (249584 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:16576 (245440 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:20720 (241296 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:24864 (237152 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:29008 (233008 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:33152 (228864 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:37296 (224720 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:41440 (220576 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:45584 (216432 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:49728 (212288 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:53872 (208144 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:58016 (204000 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:62160 (199856 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:66304 (195712 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:70448 (191568 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:74592 (187424 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:78736 (183280 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:82880 (179136 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:87024 (174992 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:91168 (170848 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:95312 (166704 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:99456 (162560 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:103600 (158416 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:107744 (154272 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:111888 (150128 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:116032 (145984 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:120176 (141840 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:124320 (137696 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:128464 (133552 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:132608 (129408 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:136752 (125264 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:140896 (121120 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:145040 (116976 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:149184 (112832 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:153328 (108688 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:157472 (104544 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:161616 (100400 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:165760 (96256 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:169904 (92112 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:174048 (87968 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:178192 (83824 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:182336 (79680 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:186480 (75536 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:190624 (71392 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:194768 (67248 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:198912 (63104 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:203056 (58960 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:207200 (54816 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:211344 (50672 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:215488 (46528 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:219632 (42384 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:223776 (38240 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:227920 (34096 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:232064 (29952 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:236208 (25808 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:240352 (21664 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:244496 (17520 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:248640 (13376 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:252784 (9232 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:256928 (5088 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:261072 (944 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: hit empty space
UBIFS DBG (pid 1350): ubifs_end_scan: stop scanning LEB 57 at offset 261072
UBIFS DBG (pid 1350): ubifs_recover_leb: 11:0
UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 11:0
UBI DBG (pid 1350): ubi_leb_read: read 262016 bytes from LEB 0:11:0
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:0 (262016 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:4144 (257872 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:8288 (253728 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:12432 (249584 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:16576 (245440 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:20720 (241296 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:24864 (237152 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:29008 (233008 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:33152 (228864 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:37296 (224720 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:41440 (220576 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:45584 (216432 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:49728 (212288 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:53872 (208144 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:58016 (204000 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:62160 (199856 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:66304 (195712 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:70448 (191568 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:74592 (187424 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:78736 (183280 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:82880 (179136 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:87024 (174992 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:91168 (170848 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:95312 (166704 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:99456 (162560 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:103600 (158416 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:107744 (154272 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:111888 (150128 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:116032 (145984 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:120176 (141840 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:124320 (137696 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:128464 (133552 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:132608 (129408 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning unknown node
UBIFS DBG (pid 1350): no_more_nodes: unexpected bad common header at 11:132608
UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:132608 (129408 bytes left)
UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning unknown node
UBIFS error (pid 1350): ubifs_check_node: bad node type 255
UBIFS error (pid 1350): ubifs_check_node: bad node at LEB 11:132608
	magic          0x6101831
	crc            0x495c96f5
	node_type      255 (unknown node)
	group_type     255 (unknown)
	sqnum          281470681808895
	len            65535
node type 255 was not recognized
Call Trace:
[c6037b80] [c0007ecc] show_stack+0x4c/0x16c (unreliable)
[c6037bc0] [c013e980] ubifs_check_node+0x17c/0x308
[c6037be0] [c0147dec] ubifs_scan_a_node+0x15c/0x2d8
[c6037c10] [c015d1c0] ubifs_recover_leb+0x3f0/0x940
[c6037c80] [c01486fc] replay_buds+0xb4/0xb4c
[c6037d20] [c0149894] ubifs_replay_journal+0x700/0xf48
[c6037da0] [c013b060] ubifs_fill_super+0xda0/0x1600
[c6037e00] [c013cbb4] ubifs_get_sb+0x10c/0x344
[c6037e80] [c007b9a4] vfs_kern_mount+0x60/0x150
[c6037ea0] [c007bae4] do_kern_mount+0x40/0x100
[c6037ec0] [c00926c0] do_mount+0x40c/0x718
[c6037f10] [c0092a5c] sys_mount+0x90/0xd8
[c6037f40] [c0010b44] ret_from_syscall+0x0/0x38
--- Exception: c01 at 0xfe93d18
    LR = 0x1000347c
UBIFS DBG (pid 1350): no_more_nodes: unexpected bad common header at 11:132608
UBIFS error (pid 1350): ubifs_recover_leb: bad node
UBIFS error (pid 1350): ubifs_scanned_corruption: corruption at LEB 11:132608
UBIFS error (pid 1350): ubifs_scanned_corruption: first 8192 bytes from LEB 11:132608
00000000: 31181006 f5965c49 ffff0000 ffff0000 ffff0000 ffff0000 ffff0000 ffff0020  1.....\I....................... 
00000020: 00000000 00000000 00100000 00000000 f747be92 df3f8fc0 f1e9a37c 01b63b8c  .................G...?.....|..;.
00000040: b8b202a5 e569195d 38bdb7e7 b57d99ac c4583ea3 97cd6388 b60604b8 bc3f4474  .....i.]8....}...X>...c......?Dt
00000060: f24619d7 b03235e8 efeccfa4 6969512d c18fd058 5d33e013 39e4cbf5 23106915  .F...25.....iiQ-...X]3..9...#.i.
00000080: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000000a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000000c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000000e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000100: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000120: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000140: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000160: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000180: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000001a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000001c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000001e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000200: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000220: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000240: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000260: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000280: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000002a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000002c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000002e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000300: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000320: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000340: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000360: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000380: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000003a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000003c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000003e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000400: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000420: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000440: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000460: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000480: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000004a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000004c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000004e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000500: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000520: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000540: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000560: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000580: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000005a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000005c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000005e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000600: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000620: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000640: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000660: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000680: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000006a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000006c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000006e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000700: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000720: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000740: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000760: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000780: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000007a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000007c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000007e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000800: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000820: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000840: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000860: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000880: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000008a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000008c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000008e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000900: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000920: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000940: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000960: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000980: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000009a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000009c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000009e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000a00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000a20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000a40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000a60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000a80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000aa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ac0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ae0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000b00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000b20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000b40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000b60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000b80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ba0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000bc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000be0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000c00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000c20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000c40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000c60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000c80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ca0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000cc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ce0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000d00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000d20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000d40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000d60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000d80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000da0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000dc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000de0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000e00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000e20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000e40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000e60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000e80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ea0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ec0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000ee0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000f00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000f20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000f40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000f60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000f80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000fa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000fc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00000fe0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001000: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001040: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001060: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001080: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000010a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000010c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000010e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001100: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001120: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001140: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001160: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001180: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000011a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000011c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000011e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001200: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001220: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001240: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001260: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001280: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000012a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000012c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000012e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001300: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001320: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001340: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001360: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001380: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000013a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000013c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000013e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001400: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001420: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001440: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001460: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001480: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000014a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000014c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000014e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001500: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001520: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001540: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001560: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001580: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000015a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000015c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000015e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001600: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001620: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001640: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001660: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001680: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000016a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000016c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000016e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001700: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001720: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001740: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001760: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001780: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000017a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000017c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000017e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001800: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001820: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001840: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001860: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001880: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000018a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000018c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000018e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001900: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001920: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001940: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001960: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001980: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000019a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000019c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
000019e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001a00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001a20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001a40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001a60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001a80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001aa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ac0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ae0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001b00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001b20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001b40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001b60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001b80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ba0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001bc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001be0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001c00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001c20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001c40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001c60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001c80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ca0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001cc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ce0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001d00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001d20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001d40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001d60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001d80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001da0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001dc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001de0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001e00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001e20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001e40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001e60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001e80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ea0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ec0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001ee0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001f00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001f20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001f40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001f60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001f80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001fa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001fc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
00001fe0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
UBIFS error (pid 1350): ubifs_recover_leb: LEB 11 scanning failed
UBIFS DBG (pid 1352): ubifs_bg_thread: background thread "ubifs_bgt0_0" stops

Thanks,
Anatolij

--
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de


From mason at postdiluvian.org  Mon Nov 29 15:33:06 2010
From: mason at postdiluvian.org (Mark Mason)
Date: Mon, 29 Nov 2010 15:33:06 -0500
Subject: UBIFS partition on NOR flash not mountable after power cut test
In-Reply-To: <20101129195014.19224240@wker>
References: <20101129195014.19224240@wker>
Message-ID: <20101129203306.GA22692@postdiluvian.org>

I have seen something similar in the last few months with Samsung
K9WAG08U1B-PIB0 chips on a PowerPC 8260.  Sadly I can't be much help
since I no longer have access to the hardware and don't have detailed
notes anymore, but I did experience UBI/UBIFS corruption that
prevented mounting after power cycle tests.  The frequency was
approximately what you quote, and there was a high volume of writes to
NAND.

Reformatting the NAND was not a big problem for us, so we went with a
workaround and never had a chance to track down the actual problem
before the product shipped.

Wish I could be more help.

Anatolij Gustschin <agust at denx.de> wrote:

> Hello,
> 
> using kernel 2.6.34.7 with applied UBI/UBIFS back-port patches from
> 2.6.34 UBIFS back-port tree and an UBIFS filesystem in a partition
> on Spansion NOR Flash S29GL512P (2 x16 chips in a 32-bit bank) we are
> not able to mount the filesystem after around 30 power cut test
> cycles. Has anyone seen similar issues before?
> 
> The power failure test is simulated by triggering an external reset
> of the board while a simple program is writing data into a file on
> the UBIFS partition. Each test cycle consists of the following steps:
> 
>  - booting the kernel
>  - attaching the MTD device
>  - mounting the UBIFS partition
>  - starting a program for writing the test data into a file on the
>    mounted UBIFS partition (only if mounting of this partition
>    succeeded)
>  - triggering a reset after about 15 sec.
> 
> After a number of test cycles we end up with corrupted partition
> which cannot be recovered any more and mounting the partition
> does not succeed. Two kernel logs with enabled UBIFS debug output
> are included below.
> 
> Previous to the above tests we also validated the flash access by
> running some MTD tests (mtd_readtest/mtd_stresstest) and these MTD
> tests didn't show any errors or warnings.
> 
> The problem can also be reproduced when running with UBIFS extra
> self checks enabled, but here it seems that we need to run more
> test cycles until the issue pops up.
> 
> Used UBI/UBIFS configuration:
> CONFIG_MTD_UBI=y
> CONFIG_MTD_UBI_WL_THRESHOLD=4096
> CONFIG_MTD_UBI_BEB_RESERVE=1
> 
> CONFIG_UBIFS_FS=y
> # CONFIG_UBIFS_FS_XATTR is not set
> # CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
> CONFIG_UBIFS_FS_LZO=y
> CONFIG_UBIFS_FS_ZLIB=y
> CONFIG_UBIFS_FS_DEBUG=y
> CONFIG_UBIFS_FS_DEBUG_MSG_LVL=1
> CONFIG_UBIFS_FS_DEBUG_CHKS=y
> 
> Our flash device is a Spansion S29GL512P NOR flash,
> 2 x16 in a 32-bit bank.
> 
> # cat /proc/mtd 
> dev:    size   erasesize  name
> mtd0: 02ac0000 00040000 "rootfs"
> mtd1: 00040000 00040000 "env-0"
> mtd2: 00040000 00040000 "env-1"
> mtd3: 00040000 00040000 "splash-image"
> mtd4: 00500000 00040000 "linux"
> mtd5: 03400000 00040000 "homefs"
> mtd6: 00002000 00001000 "50040000.mram0"
> mtd7: 00008000 00001000 "50042000.mram1"
> 
> The UBIFS partition is on mtd5.
> 
> The kernel version is 2.6.34.7 with updated UBI/UBIFS pulled from
> 2.6.34 back-port tree.
> 
> Kernel log:
> 
> UBI: attaching mtd5 to ubi0
> UBI: physical eraseblock size:   262144 bytes (256 KiB)
> UBI: logical eraseblock size:    262016 bytes
> UBI: smallest flash I/O unit:    1
> UBI: VID header offset:          64 (aligned 64)
> UBI: data offset:                128
> UBI: max. sequence number:       2348
> UBI: attached mtd5 to ubi0
> UBI: MTD device name:            "homefs"
> UBI: MTD device size:            52 MiB
> UBI: number of good PEBs:        208
> UBI: number of bad PEBs:         0
> UBI: number of corrupted PEBs:   0
> UBI: max. allowed volumes:       128
> UBI: wear-leveling threshold:    4096
> UBI: number of internal volumes: 1
> UBI: number of user volumes:     1
> UBI: available PEBs:             0
> UBI: total number of reserved PEBs: 208
> UBI: number of PEBs reserved for bad PEB handling: 0
> UBI: max/mean erase counter: 24/16
> UBI: image sequence number:  1966556915
> UBI: background thread "ubi_bgt0d" started, PID 1287
> UBIFS DBG (pid 1288): ubifs_start_scan: scan LEB 1:0
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:0 (262016 bytes left)
> UBIFS DBG (pid 1290): ubifs_bg_thread: background thread "ubifs_bgt0_0" started, PID 1290
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:512 (261504 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:1024 (260992 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:1536 (260480 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:2048 (259968 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:2560 (259456 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:3072 (258944 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:3584 (258432 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:4096 (257920 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:4608 (257408 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:5120 (256896 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:5632 (256384 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:6144 (255872 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:6656 (255360 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:7168 (254848 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:7680 (254336 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:8192 (253824 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:8704 (253312 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:9216 (252800 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:9728 (252288 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:10240 (251776 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:10752 (251264 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:11264 (250752 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:11776 (250240 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:12288 (249728 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:12800 (249216 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:13312 (248704 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:13824 (248192 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:14336 (247680 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:14848 (247168 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:15360 (246656 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:15872 (246144 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:16384 (245632 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:16896 (245120 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:17408 (244608 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:17920 (244096 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:18432 (243584 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:18944 (243072 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:19456 (242560 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:19968 (242048 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:20480 (241536 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:20992 (241024 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:21504 (240512 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:22016 (240000 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:22528 (239488 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:23040 (238976 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:23552 (238464 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:24064 (237952 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:24576 (237440 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:25088 (236928 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:25600 (236416 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:26112 (235904 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:26624 (235392 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:27136 (234880 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:27648 (234368 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:28160 (233856 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:28672 (233344 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:29184 (232832 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:29696 (232320 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:30208 (231808 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:30720 (231296 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:31232 (230784 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:31744 (230272 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:32256 (229760 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:32768 (229248 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:33280 (228736 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:33792 (228224 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:34304 (227712 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:34816 (227200 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:35328 (226688 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:35840 (226176 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:36352 (225664 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:36864 (225152 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:37376 (224640 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:37888 (224128 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:38400 (223616 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:38912 (223104 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:39424 (222592 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:39936 (222080 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:40448 (221568 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:40960 (221056 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:41472 (220544 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:41984 (220032 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:42496 (219520 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:43008 (219008 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:43520 (218496 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:44032 (217984 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:44544 (217472 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:45056 (216960 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:45568 (216448 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:46080 (215936 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:46592 (215424 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:47104 (214912 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:47616 (214400 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:48128 (213888 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:48640 (213376 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:49152 (212864 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:49664 (212352 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:50176 (211840 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:50688 (211328 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:51200 (210816 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:51712 (210304 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:52224 (209792 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:52736 (209280 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:53248 (208768 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:53760 (208256 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:54272 (207744 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:54784 (207232 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:55296 (206720 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:55808 (206208 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:56320 (205696 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:56832 (205184 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:57344 (204672 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:57856 (204160 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:58368 (203648 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:58880 (203136 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:59392 (202624 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:59904 (202112 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:60416 (201600 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:60928 (201088 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:61440 (200576 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:61952 (200064 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:62464 (199552 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:62976 (199040 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:63488 (198528 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:64000 (198016 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:64512 (197504 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:65024 (196992 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:65536 (196480 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:66048 (195968 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:66560 (195456 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:67072 (194944 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:67584 (194432 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:68096 (193920 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:68608 (193408 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:69120 (192896 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:69632 (192384 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:70144 (191872 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:70656 (191360 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:71168 (190848 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:71680 (190336 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:72192 (189824 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:72704 (189312 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:73216 (188800 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:73728 (188288 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: hit empty space
> UBIFS DBG (pid 1288): ubifs_end_scan: stop scanning LEB 1 at offset 73728
> UBIFS DBG (pid 1288): ubifs_start_scan: scan LEB 2:0
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:0 (262016 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:512 (261504 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:1024 (260992 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:1536 (260480 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:2048 (259968 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:2560 (259456 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:3072 (258944 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:3584 (258432 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:4096 (257920 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:4608 (257408 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:5120 (256896 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:5632 (256384 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:6144 (255872 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:6656 (255360 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:7168 (254848 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:7680 (254336 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:8192 (253824 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:8704 (253312 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:9216 (252800 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:9728 (252288 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:10240 (251776 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:10752 (251264 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:11264 (250752 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:11776 (250240 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:12288 (249728 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:12800 (249216 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:13312 (248704 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:13824 (248192 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:14336 (247680 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:14848 (247168 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:15360 (246656 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:15872 (246144 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:16384 (245632 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:16896 (245120 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:17408 (244608 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:17920 (244096 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:18432 (243584 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:18944 (243072 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:19456 (242560 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:19968 (242048 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:20480 (241536 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:20992 (241024 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:21504 (240512 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:22016 (240000 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:22528 (239488 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:23040 (238976 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:23552 (238464 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:24064 (237952 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:24576 (237440 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:25088 (236928 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:25600 (236416 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:26112 (235904 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:26624 (235392 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:27136 (234880 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:27648 (234368 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:28160 (233856 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:28672 (233344 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:29184 (232832 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:29696 (232320 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:30208 (231808 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:30720 (231296 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:31232 (230784 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:31744 (230272 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:32256 (229760 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:32768 (229248 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:33280 (228736 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:33792 (228224 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:34304 (227712 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:34816 (227200 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:35328 (226688 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:35840 (226176 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:36352 (225664 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:36864 (225152 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:37376 (224640 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:37888 (224128 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:38400 (223616 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:38912 (223104 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:39424 (222592 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:39936 (222080 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:40448 (221568 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:40960 (221056 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:41472 (220544 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:41984 (220032 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:42496 (219520 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:43008 (219008 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:43520 (218496 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:44032 (217984 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:44544 (217472 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:45056 (216960 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:45568 (216448 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:46080 (215936 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:46592 (215424 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:47104 (214912 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:47616 (214400 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:48128 (213888 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:48640 (213376 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:49152 (212864 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:49664 (212352 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:50176 (211840 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:50688 (211328 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:51200 (210816 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:51712 (210304 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:52224 (209792 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:52736 (209280 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:53248 (208768 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:53760 (208256 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:54272 (207744 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:54784 (207232 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:55296 (206720 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:55808 (206208 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:56320 (205696 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:56832 (205184 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:57344 (204672 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:57856 (204160 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:58368 (203648 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:58880 (203136 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:59392 (202624 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:59904 (202112 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:60416 (201600 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:60928 (201088 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:61440 (200576 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:61952 (200064 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:62464 (199552 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:62976 (199040 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:63488 (198528 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:64000 (198016 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:64512 (197504 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:65024 (196992 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:65536 (196480 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:66048 (195968 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:66560 (195456 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:67072 (194944 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:67584 (194432 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:68096 (193920 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:68608 (193408 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:69120 (192896 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:69632 (192384 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:70144 (191872 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:70656 (191360 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:71168 (190848 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:71680 (190336 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:72192 (189824 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:72704 (189312 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:73216 (188800 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:73728 (188288 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: hit empty space
> UBIFS DBG (pid 1288): ubifs_end_scan: stop scanning LEB 2 at offset 73728
> UBIFS: recovery needed
> UBIFS DBG (pid 1288): ubifs_recover_inl_heads: checking index head at 173:204000
> UBIFS DBG (pid 1288): ubifs_recover_inl_heads: checking LPT head at 7:45864
> UBIFS DBG (pid 1288): ubifs_start_scan: scan LEB 6:0
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 6:0 (262016 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning commit start node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 6:32 (261984 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 6:96 (261920 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 6:160 (261856 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: hit empty space
> UBIFS DBG (pid 1288): ubifs_end_scan: stop scanning LEB 6 at offset 160
> UBIFS DBG (pid 1288): ubifs_start_scan: scan LEB 3:0
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 3:0 (262016 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning commit start node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 3:32 (261984 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 3:96 (261920 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 3:160 (261856 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: hit empty space
> UBIFS DBG (pid 1288): ubifs_end_scan: stop scanning LEB 3 at offset 160
> UBIFS DBG (pid 1288): ubifs_recover_leb: 162:210456
> UBIFS DBG (pid 1288): ubifs_start_scan: scan LEB 162:210456
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:210456 (51560 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:210616 (51400 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:210776 (51240 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:210936 (51080 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:211096 (50920 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:211256 (50760 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:211416 (50600 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:211576 (50440 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:211736 (50280 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:211896 (50120 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:212056 (49960 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:212216 (49800 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:212376 (49640 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:212536 (49480 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:212696 (49320 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:212856 (49160 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:213016 (49000 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:213176 (48840 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:213336 (48680 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:213496 (48520 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:213656 (48360 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:213816 (48200 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:213976 (48040 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:214136 (47880 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning unknown node
> UBIFS DBG (pid 1288): no_more_nodes: unexpected bad common header at 162:214136
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:214136 (47880 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning unknown node
> UBIFS error (pid 1288): ubifs_check_node: bad node type 255
> UBIFS error (pid 1288): ubifs_check_node: bad node at LEB 162:214136
> 	magic          0x6101831
> 	crc            0xc06989c8
> 	node_type      255 (unknown node)
> 	group_type     255 (unknown)
> 	sqnum          18446744073709551615
> 	len            4294967295
> node type 255 was not recognized
> Call Trace:
> [c602db80] [c0007ecc] show_stack+0x4c/0x16c (unreliable)
> [c602dbc0] [c013e980] ubifs_check_node+0x17c/0x308
> [c602dbe0] [c0147dec] ubifs_scan_a_node+0x15c/0x2d8
> [c602dc10] [c015d1c0] ubifs_recover_leb+0x3f0/0x940
> [c602dc80] [c01486fc] replay_buds+0xb4/0xb4c
> [c602dd20] [c0149894] ubifs_replay_journal+0x700/0xf48
> [c602dda0] [c013b060] ubifs_fill_super+0xda0/0x1600
> [c602de00] [c013cbb4] ubifs_get_sb+0x10c/0x344
> [c602de80] [c007b9a4] vfs_kern_mount+0x60/0x150
> [c602dea0] [c007bae4] do_kern_mount+0x40/0x100
> [c602dec0] [c00926c0] do_mount+0x40c/0x718
> [c602df10] [c0092a5c] sys_mount+0x90/0xd8
> [c602df40] [c0010b44] ret_from_syscall+0x0/0x38
> --- Exception: c01 at 0xfe93d18
>     LR = 0x1000347c
> UBIFS DBG (pid 1288): no_more_nodes: unexpected bad common header at 162:214136
> UBIFS error (pid 1288): ubifs_recover_leb: bad node
> UBIFS error (pid 1288): ubifs_scanned_corruption: corruption at LEB 162:214136
> UBIFS error (pid 1288): ubifs_scanned_corruption: first 8192 bytes from LEB 162:214136
> 00000000: 31181006 c88969c0 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  1.....i.........................
> 00000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000040: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000060: ffffffff ffffffff a4810000 00000000 00000000 00000000 00000000 00000000  ................................
> 00000080: 00000000 00000000 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000000a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000000c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000000e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000100: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000120: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000140: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000160: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000180: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000001a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000001c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000001e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000200: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000220: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000240: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000260: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000280: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000002a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000002c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000002e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000300: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000320: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000340: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000360: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000380: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000003a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000003c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000003e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000400: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000420: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000440: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000460: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000480: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000004a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000004c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000004e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000500: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000520: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000540: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000560: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000580: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000005a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000005c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000005e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000600: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000620: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000640: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000660: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000680: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000006a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000006c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000006e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000700: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000720: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000740: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000760: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000780: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000007a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000007c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000007e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000800: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000820: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000840: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000860: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000880: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000008a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000008c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000008e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000900: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000920: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000940: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000960: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000980: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000009a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000009c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000009e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000a00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000a20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000a40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000a60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000a80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000aa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ac0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ae0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000b00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000b20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000b40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000b60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000b80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ba0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000bc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000be0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000c00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000c20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000c40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000c60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000c80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ca0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000cc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ce0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000d00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000d20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000d40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000d60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000d80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000da0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000dc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000de0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000e00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000e20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000e40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000e60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000e80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ea0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ec0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ee0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000f00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000f20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000f40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000f60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000f80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000fa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000fc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000fe0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001000: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001040: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001060: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001080: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000010a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000010c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000010e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001100: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001120: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001140: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001160: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001180: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000011a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000011c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000011e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001200: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001220: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001240: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001260: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001280: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000012a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000012c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000012e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001300: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001320: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001340: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001360: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001380: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000013a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000013c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000013e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001400: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001420: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001440: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001460: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001480: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000014a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000014c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000014e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001500: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001520: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001540: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001560: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001580: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000015a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000015c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000015e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001600: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001620: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001640: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001660: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001680: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000016a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000016c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000016e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001700: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001720: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001740: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001760: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001780: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000017a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000017c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000017e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001800: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001820: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001840: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001860: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001880: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000018a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000018c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000018e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001900: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001920: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001940: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001960: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001980: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000019a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000019c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000019e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001a00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001a20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001a40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001a60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001a80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001aa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ac0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ae0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001b00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001b20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001b40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001b60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001b80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ba0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001bc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001be0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001c00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001c20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001c40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001c60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001c80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ca0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001cc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ce0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001d00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001d20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001d40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001d60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001d80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001da0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001dc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001de0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001e00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001e20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001e40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001e60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001e80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ea0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ec0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ee0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001f00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001f20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001f40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001f60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001f80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001fa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001fc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001fe0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> UBIFS error (pid 1288): ubifs_recover_leb: LEB 162 scanning failed
> UBIFS DBG (pid 1290): ubifs_bg_thread: background thread "ubifs_bgt0_0" stops
> 
> 
> Kernel log after trying to mount corrupted partition from another
> test run. I'm including it here since it has different pattern
> in corrupted node. Here the debug level is increased to 3:
> 
> UBI: attaching mtd5 to ubi0
> UBI DBG (pid 1346): io_init: min_io_size      1
> UBI DBG (pid 1346): io_init: hdrs_min_io_size 1
> UBI DBG (pid 1346): io_init: ec_hdr_alsize    64
> UBI DBG (pid 1346): io_init: vid_hdr_alsize   64
> UBI DBG (pid 1346): io_init: vid_hdr_offset   64
> UBI DBG (pid 1346): io_init: vid_hdr_aloffset 64
> UBI DBG (pid 1346): io_init: vid_hdr_shift    0
> UBI DBG (pid 1346): io_init: leb_start        128
> UBI DBG (pid 1346): io_init: max_erroneous    20
> UBI: physical eraseblock size:   262144 bytes (256 KiB)
> UBI: logical eraseblock size:    262016 bytes
> UBI: smallest flash I/O unit:    1
> UBI: VID header offset:          64 (aligned 64)
> UBI: data offset:                128
> UBI DBG (pid 1346): ubi_scan: process PEB 0
> UBI DBG (pid 1346): ubi_scan: process PEB 1
> UBI DBG (pid 1346): ubi_scan: process PEB 2
> UBI DBG (pid 1346): ubi_scan: process PEB 3
> UBI DBG (pid 1346): ubi_scan: process PEB 4
> UBI DBG (pid 1346): ubi_scan: process PEB 5
> UBI DBG (pid 1346): ubi_scan: process PEB 6
> UBI DBG (pid 1346): ubi_scan: process PEB 7
> UBI DBG (pid 1346): ubi_scan: process PEB 8
> UBI DBG (pid 1346): ubi_scan: process PEB 9
> UBI DBG (pid 1346): ubi_scan: process PEB 10
> UBI DBG (pid 1346): ubi_scan: process PEB 11
> UBI DBG (pid 1346): ubi_scan: process PEB 12
> UBI DBG (pid 1346): ubi_scan: process PEB 13
> UBI DBG (pid 1346): ubi_scan: process PEB 14
> UBI DBG (pid 1346): ubi_scan: process PEB 15
> UBI DBG (pid 1346): ubi_scan: process PEB 16
> UBI DBG (pid 1346): ubi_scan: process PEB 17
> UBI DBG (pid 1346): ubi_scan: process PEB 18
> UBI DBG (pid 1346): ubi_scan: process PEB 19
> UBI DBG (pid 1346): ubi_scan: process PEB 20
> UBI DBG (pid 1346): ubi_scan: process PEB 21
> UBI DBG (pid 1346): ubi_scan: process PEB 22
> UBI DBG (pid 1346): ubi_scan: process PEB 23
> UBI DBG (pid 1346): ubi_scan: process PEB 24
> UBI DBG (pid 1346): ubi_scan: process PEB 25
> UBI DBG (pid 1346): ubi_scan: process PEB 26
> UBI DBG (pid 1346): ubi_scan: process PEB 27
> UBI DBG (pid 1346): ubi_scan: process PEB 28
> UBI DBG (pid 1346): ubi_scan: process PEB 29
> UBI DBG (pid 1346): ubi_scan: process PEB 30
> UBI DBG (pid 1346): ubi_scan: process PEB 31
> UBI DBG (pid 1346): ubi_scan: process PEB 32
> UBI DBG (pid 1346): ubi_scan: process PEB 33
> UBI DBG (pid 1346): ubi_scan: process PEB 34
> UBI DBG (pid 1346): ubi_scan: process PEB 35
> UBI DBG (pid 1346): ubi_scan: process PEB 36
> UBI DBG (pid 1346): ubi_scan: process PEB 37
> UBI DBG (pid 1346): ubi_scan: process PEB 38
> UBI DBG (pid 1346): ubi_scan: process PEB 39
> UBI DBG (pid 1346): ubi_scan: process PEB 40
> UBI DBG (pid 1346): ubi_scan: process PEB 41
> UBI DBG (pid 1346): ubi_scan: process PEB 42
> UBI DBG (pid 1346): ubi_scan: process PEB 43
> UBI DBG (pid 1346): ubi_scan: process PEB 44
> UBI DBG (pid 1346): ubi_scan: process PEB 45
> UBI DBG (pid 1346): ubi_scan: process PEB 46
> UBI DBG (pid 1346): ubi_scan: process PEB 47
> UBI DBG (pid 1346): ubi_scan: process PEB 48
> UBI DBG (pid 1346): ubi_scan: process PEB 49
> UBI DBG (pid 1346): ubi_scan: process PEB 50
> UBI DBG (pid 1346): ubi_scan: process PEB 51
> UBI DBG (pid 1346): ubi_scan: process PEB 52
> UBI DBG (pid 1346): ubi_scan: process PEB 53
> UBI DBG (pid 1346): ubi_scan: process PEB 54
> UBI DBG (pid 1346): ubi_scan: process PEB 55
> UBI DBG (pid 1346): ubi_scan: process PEB 56
> UBI DBG (pid 1346): ubi_scan: process PEB 57
> UBI DBG (pid 1346): ubi_scan: process PEB 58
> UBI DBG (pid 1346): ubi_scan: process PEB 59
> UBI DBG (pid 1346): ubi_scan: process PEB 60
> UBI DBG (pid 1346): ubi_scan: process PEB 61
> UBI DBG (pid 1346): ubi_scan: process PEB 62
> UBI DBG (pid 1346): ubi_scan: process PEB 63
> UBI DBG (pid 1346): ubi_scan: process PEB 64
> UBI DBG (pid 1346): ubi_scan: process PEB 65
> UBI DBG (pid 1346): ubi_scan: process PEB 66
> UBI DBG (pid 1346): ubi_scan: process PEB 67
> UBI DBG (pid 1346): ubi_scan: process PEB 68
> UBI DBG (pid 1346): ubi_scan: process PEB 69
> UBI DBG (pid 1346): ubi_scan: process PEB 70
> UBI DBG (pid 1346): ubi_scan: process PEB 71
> UBI DBG (pid 1346): ubi_scan: process PEB 72
> UBI DBG (pid 1346): ubi_scan: process PEB 73
> UBI DBG (pid 1346): ubi_scan: process PEB 74
> UBI DBG (pid 1346): ubi_scan: process PEB 75
> UBI DBG (pid 1346): ubi_scan: process PEB 76
> UBI DBG (pid 1346): ubi_scan: process PEB 77
> UBI DBG (pid 1346): ubi_scan: process PEB 78
> UBI DBG (pid 1346): ubi_scan: process PEB 79
> UBI DBG (pid 1346): ubi_scan: process PEB 80
> UBI DBG (pid 1346): ubi_scan: process PEB 81
> UBI DBG (pid 1346): ubi_scan: process PEB 82
> UBI DBG (pid 1346): ubi_scan: process PEB 83
> UBI DBG (pid 1346): ubi_scan: process PEB 84
> UBI DBG (pid 1346): ubi_scan: process PEB 85
> UBI DBG (pid 1346): ubi_scan: process PEB 86
> UBI DBG (pid 1346): ubi_scan: process PEB 87
> UBI DBG (pid 1346): ubi_scan: process PEB 88
> UBI DBG (pid 1346): ubi_scan: process PEB 89
> UBI DBG (pid 1346): ubi_scan: process PEB 90
> UBI DBG (pid 1346): ubi_scan: process PEB 91
> UBI DBG (pid 1346): ubi_scan: process PEB 92
> UBI DBG (pid 1346): ubi_scan: process PEB 93
> UBI DBG (pid 1346): ubi_scan: process PEB 94
> UBI DBG (pid 1346): ubi_scan: process PEB 95
> UBI DBG (pid 1346): ubi_scan: process PEB 96
> UBI DBG (pid 1346): ubi_scan: process PEB 97
> UBI DBG (pid 1346): ubi_scan: process PEB 98
> UBI DBG (pid 1346): ubi_scan: process PEB 99
> UBI DBG (pid 1346): ubi_scan: process PEB 100
> UBI DBG (pid 1346): ubi_scan: process PEB 101
> UBI DBG (pid 1346): ubi_scan: process PEB 102
> UBI DBG (pid 1346): ubi_scan: process PEB 103
> UBI DBG (pid 1346): ubi_scan: process PEB 104
> UBI DBG (pid 1346): ubi_scan: process PEB 105
> UBI DBG (pid 1346): ubi_scan: process PEB 106
> UBI DBG (pid 1346): ubi_scan: process PEB 107
> UBI DBG (pid 1346): ubi_scan: process PEB 108
> UBI DBG (pid 1346): ubi_scan: process PEB 109
> UBI DBG (pid 1346): ubi_scan: process PEB 110
> UBI DBG (pid 1346): ubi_scan: process PEB 111
> UBI DBG (pid 1346): ubi_scan: process PEB 112
> UBI DBG (pid 1346): ubi_scan: process PEB 113
> UBI DBG (pid 1346): ubi_scan: process PEB 114
> UBI DBG (pid 1346): ubi_scan: process PEB 115
> UBI DBG (pid 1346): ubi_scan: process PEB 116
> UBI DBG (pid 1346): ubi_scan: process PEB 117
> UBI DBG (pid 1346): ubi_scan: process PEB 118
> UBI DBG (pid 1346): ubi_scan: process PEB 119
> UBI DBG (pid 1346): ubi_scan: process PEB 120
> UBI DBG (pid 1346): ubi_scan: process PEB 121
> UBI DBG (pid 1346): ubi_scan: process PEB 122
> UBI DBG (pid 1346): ubi_scan: process PEB 123
> UBI DBG (pid 1346): ubi_scan: process PEB 124
> UBI DBG (pid 1346): ubi_scan: process PEB 125
> UBI DBG (pid 1346): ubi_scan: process PEB 126
> UBI DBG (pid 1346): ubi_scan: process PEB 127
> UBI DBG (pid 1346): ubi_scan: process PEB 128
> UBI DBG (pid 1346): ubi_scan: process PEB 129
> UBI DBG (pid 1346): ubi_scan: process PEB 130
> UBI DBG (pid 1346): ubi_scan: process PEB 131
> UBI DBG (pid 1346): ubi_scan: process PEB 132
> UBI DBG (pid 1346): ubi_scan: process PEB 133
> UBI DBG (pid 1346): ubi_scan: process PEB 134
> UBI DBG (pid 1346): ubi_scan: process PEB 135
> UBI DBG (pid 1346): ubi_scan: process PEB 136
> UBI DBG (pid 1346): ubi_scan: process PEB 137
> UBI DBG (pid 1346): ubi_scan: process PEB 138
> UBI DBG (pid 1346): ubi_scan: process PEB 139
> UBI DBG (pid 1346): ubi_scan: process PEB 140
> UBI DBG (pid 1346): ubi_scan: process PEB 141
> UBI DBG (pid 1346): ubi_scan: process PEB 142
> UBI DBG (pid 1346): ubi_scan: process PEB 143
> UBI DBG (pid 1346): ubi_scan: process PEB 144
> UBI DBG (pid 1346): ubi_scan: process PEB 145
> UBI DBG (pid 1346): ubi_scan: process PEB 146
> UBI DBG (pid 1346): ubi_scan: process PEB 147
> UBI DBG (pid 1346): ubi_scan: process PEB 148
> UBI DBG (pid 1346): ubi_scan: process PEB 149
> UBI DBG (pid 1346): ubi_scan: process PEB 150
> UBI DBG (pid 1346): ubi_scan: process PEB 151
> UBI DBG (pid 1346): ubi_scan: process PEB 152
> UBI DBG (pid 1346): ubi_scan: process PEB 153
> UBI DBG (pid 1346): ubi_scan: process PEB 154
> UBI DBG (pid 1346): ubi_scan: process PEB 155
> UBI DBG (pid 1346): ubi_scan: process PEB 156
> UBI DBG (pid 1346): ubi_scan: process PEB 157
> UBI DBG (pid 1346): ubi_scan: process PEB 158
> UBI DBG (pid 1346): ubi_scan: process PEB 159
> UBI DBG (pid 1346): ubi_scan: process PEB 160
> UBI DBG (pid 1346): ubi_scan: process PEB 161
> UBI DBG (pid 1346): ubi_scan: process PEB 162
> UBI DBG (pid 1346): ubi_scan: process PEB 163
> UBI DBG (pid 1346): ubi_scan: process PEB 164
> UBI DBG (pid 1346): ubi_scan: process PEB 165
> UBI DBG (pid 1346): ubi_scan: process PEB 166
> UBI DBG (pid 1346): ubi_scan: process PEB 167
> UBI DBG (pid 1346): ubi_scan: process PEB 168
> UBI DBG (pid 1346): ubi_scan: process PEB 169
> UBI DBG (pid 1346): ubi_scan: process PEB 170
> UBI DBG (pid 1346): ubi_scan: process PEB 171
> UBI DBG (pid 1346): ubi_scan: process PEB 172
> UBI DBG (pid 1346): ubi_scan: process PEB 173
> UBI DBG (pid 1346): ubi_scan: process PEB 174
> UBI DBG (pid 1346): ubi_scan: process PEB 175
> UBI DBG (pid 1346): ubi_scan: process PEB 176
> UBI DBG (pid 1346): ubi_scan: process PEB 177
> UBI DBG (pid 1346): ubi_scan: process PEB 178
> UBI DBG (pid 1346): ubi_scan: process PEB 179
> UBI DBG (pid 1346): ubi_scan: process PEB 180
> UBI DBG (pid 1346): ubi_scan: process PEB 181
> UBI DBG (pid 1346): ubi_scan: process PEB 182
> UBI DBG (pid 1346): ubi_scan: process PEB 183
> UBI DBG (pid 1346): ubi_scan: process PEB 184
> UBI DBG (pid 1346): ubi_scan: process PEB 185
> UBI DBG (pid 1346): ubi_scan: process PEB 186
> UBI DBG (pid 1346): ubi_scan: process PEB 187
> UBI DBG (pid 1346): ubi_scan: process PEB 188
> UBI DBG (pid 1346): ubi_scan: process PEB 189
> UBI DBG (pid 1346): ubi_scan: process PEB 190
> UBI DBG (pid 1346): ubi_scan: process PEB 191
> UBI DBG (pid 1346): ubi_scan: process PEB 192
> UBI DBG (pid 1346): ubi_scan: process PEB 193
> UBI DBG (pid 1346): ubi_scan: process PEB 194
> UBI DBG (pid 1346): ubi_scan: process PEB 195
> UBI DBG (pid 1346): ubi_scan: process PEB 196
> UBI DBG (pid 1346): ubi_scan: process PEB 197
> UBI DBG (pid 1346): ubi_scan: process PEB 198
> UBI DBG (pid 1346): ubi_scan: process PEB 199
> UBI DBG (pid 1346): ubi_scan: process PEB 200
> UBI DBG (pid 1346): ubi_scan: process PEB 201
> UBI DBG (pid 1346): ubi_scan: process PEB 202
> UBI DBG (pid 1346): ubi_scan: process PEB 203
> UBI DBG (pid 1346): ubi_scan: process PEB 204
> UBI DBG (pid 1346): ubi_scan: process PEB 205
> UBI DBG (pid 1346): ubi_scan: process PEB 206
> UBI DBG (pid 1346): ubi_scan: process PEB 207
> UBI DBG (pid 1346): ubi_scan: scanning is finished
> UBI: max. sequence number:       145
> UBI DBG (pid 1346): process_lvol: check layout volume
> UBI DBG (pid 1346): uif_init: ubi0 major is 253
> UBI DBG (pid 1346): ubi_add_volume: add volume 0
> UBI: attached mtd5 to ubi0
> UBI: MTD device name:            "homefs"
> UBI: MTD device size:            52 MiB
> UBI: number of good PEBs:        208
> UBI: number of bad PEBs:         0
> UBI: number of corrupted PEBs:   0
> UBI: max. allowed volumes:       128
> UBI: wear-leveling threshold:    4096
> UBI: number of internal volumes: 1
> UBI: number of user volumes:     1
> UBI: available PEBs:             0
> UBI: total number of reserved PEBs: 208
> UBI: number of PEBs reserved for bad PEB handling: 0
> UBI: max/mean erase counter: 3/1
> UBI: image sequence number:  1966556915
> UBI: background thread "ubi_bgt0d" started, PID 1349
> UBI DBG (pid 1350): ubi_open_volume_path: open volume /dev/ubi0_0, mode 1
> UBI DBG (pid 1350): ubi_open_volume: open device 0, volume 0, mode 1
> UBI DBG (pid 1350): ubi_open_volume: open device 0, volume 0, mode 2
> UBI DBG (pid 1350): ubi_is_mapped: test LEB 0:0
> UBI DBG (pid 1350): ubi_leb_read: read 4096 bytes from LEB 0:0:0
> UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 1:0
> UBI DBG (pid 1350): ubi_leb_read: read 262016 bytes from LEB 0:1:0
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:0 (262016 bytes left)
> UBIFS DBG (pid 1352): ubifs_bg_thread: background thread "ubifs_bgt0_0" started, PID 1352
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:512 (261504 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:1024 (260992 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:1536 (260480 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:2048 (259968 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:2560 (259456 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:3072 (258944 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:3584 (258432 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:4096 (257920 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:4608 (257408 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:5120 (256896 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:5632 (256384 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:6144 (255872 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: hit empty space
> UBIFS DBG (pid 1350): ubifs_end_scan: stop scanning LEB 1 at offset 6144
> UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 2:0
> UBI DBG (pid 1350): ubi_leb_read: read 262016 bytes from LEB 0:2:0
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:0 (262016 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:512 (261504 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:1024 (260992 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:1536 (260480 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:2048 (259968 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:2560 (259456 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:3072 (258944 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:3584 (258432 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:4096 (257920 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:4608 (257408 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:5120 (256896 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:5632 (256384 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:6144 (255872 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: hit empty space
> UBIFS DBG (pid 1350): ubifs_end_scan: stop scanning LEB 2 at offset 6144
> UBI DBG (pid 1350): ubi_leb_read: read 88 bytes from LEB 0:12:221424
> UBIFS: recovery needed
> UBIFS DBG (pid 1350): ubifs_recover_inl_heads: checking index head at 12:221512
> UBI DBG (pid 1350): ubi_leb_read: read 8 bytes from LEB 0:12:221512
> UBIFS DBG (pid 1350): ubifs_recover_inl_heads: checking LPT head at 7:2296
> UBI DBG (pid 1350): ubi_leb_read: read 8 bytes from LEB 0:7:2296
> UBI DBG (pid 1350): ubi_leb_read: read 12 bytes from LEB 0:7:1960
> UBI DBG (pid 1350): ubi_leb_unmap: unmap LEB 0:8
> UBI DBG (pid 1350): ubi_leb_read: read 13 bytes from LEB 0:7:2279
> UBI DBG (pid 1350): ubi_leb_read: read 13 bytes from LEB 0:7:2168
> UBI DBG (pid 1350): ubi_leb_read: read 13 bytes from LEB 0:7:1990
> UBI DBG (pid 1350): ubi_leb_read: read 18 bytes from LEB 0:7:1972
> UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 5:0
> UBI DBG (pid 1350): ubi_leb_read: read 262016 bytes from LEB 0:5:0
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 5:0 (262016 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning commit start node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 5:32 (261984 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 5:96 (261920 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 5:160 (261856 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 5:224 (261792 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 5:288 (261728 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: hit empty space
> UBIFS DBG (pid 1350): ubifs_end_scan: stop scanning LEB 5 at offset 288
> UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 6:0
> UBI DBG (pid 1350): ubi_leb_read: read 262016 bytes from LEB 0:6:0
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:0 (262016 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning commit start node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:32 (261984 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:96 (261920 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:160 (261856 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:224 (261792 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:288 (261728 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:352 (261664 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:416 (261600 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:480 (261536 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:544 (261472 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:608 (261408 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:672 (261344 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:736 (261280 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:800 (261216 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:864 (261152 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:928 (261088 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:992 (261024 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:1056 (260960 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:1120 (260896 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:1184 (260832 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:1248 (260768 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:1312 (260704 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:1376 (260640 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:1440 (260576 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: hit empty space
> UBIFS DBG (pid 1350): ubifs_end_scan: stop scanning LEB 6 at offset 1440
> UBIFS DBG (pid 1350): ubifs_recover_leb: 86:1920
> UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 86:1920
> UBI DBG (pid 1350): ubi_leb_read: read 260096 bytes from LEB 0:86:1920
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:1920 (260096 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:2080 (259936 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:2240 (259776 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:2400 (259616 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:2560 (259456 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:2720 (259296 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:2880 (259136 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:3040 (258976 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:3200 (258816 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:3360 (258656 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:3520 (258496 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:3680 (258336 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:3840 (258176 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: ing inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:18080 (243936 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:18240 (243776 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:18400 (243616 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:18560 (243456 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:18720 (243296 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:18880 (243136 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:19040 (242976 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:19200 (242816 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:19360 (242656 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:19520 (242496 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:19680 (242336 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:19840 (242176 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:20000 (242016 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:20160 (241856 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:20320 (241696 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:20480 (241536 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:20640 (241376 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:20800 (241216 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:20960 (241056 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:21120 (240896 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:21280 (240736 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:21440 (240576 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:21600 (240416 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:21760 (240256 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:21920 (240096 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:22080 (239936 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:22240 (239776 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:22400 (239616 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:22560 (239456 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:22720 (239296 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:22880 (239136 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:23040 (238976 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:23200 (238816 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:23360 (238656 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:23520 (238496 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:23680 (238336 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:23840 (238176 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:24000 (238016 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:24160 (237856 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:24320 (237696 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:24480 (237536 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:24640 (237376 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:24800 (237216 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:24960 (237056 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:25120 (236896 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:25280 (236736 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:25440 (236576 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:25600 (236416 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:25760 (236256 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:25920 (236096 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:26080 (235936 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:26240 (235776 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:26400 (235616 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:26560 (235456 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:26720 (235296 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:26880 (235136 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:27040 (234976 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:27200 (234816 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: hit empty space
> UBIFS DBG (pid 1350): ubifs_end_scan: stop scanning LEB 86 at offset 27200
> UBIFS DBG (pid 1350): ubifs_recover_leb: 89:4144
> UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 89:4144
> UBI DBG (pid 1350): ubi_leb_read: read 257872 bytes from LEB 0:89:4144
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:4144 (257872 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:8288 (253728 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:12432 (249584 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:16576 (245440 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:20720 (241296 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:24864 (237152 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:29008 (233008 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:33152 (228864 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:37296 (224720 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:41440 (220576 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:45584 (216432 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:49728 (212288 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:53872 (208144 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:58016 (204000 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:62160 (199856 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:66304 (195712 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:70448 (191568 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:74592 (187424 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:78736 (183280 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:82880 (179136 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:87024 (174992 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:91168 (170848 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:95312 (166704 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:99456 (162560 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:103600 (158416 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:107744 (154272 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:111888 (150128 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:116032 (145984 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:120176 (141840 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:124320 (137696 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:128464 (133552 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:132608 (129408 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:136752 (125264 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:140896 (121120 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:145040 (116976 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:149184 (112832 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:153328 (108688 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:157472 (104544 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:161616 (100400 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:165760 (96256 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:169904 (92112 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:174048 (87968 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:178192 (83824 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:182336 (79680 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:186480 (75536 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:190624 (71392 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:194768 (67248 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:198912 (63104 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:203056 (58960 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:207200 (54816 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:211344 (50672 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:215488 (46528 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:219632 (42384 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:223776 (38240 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:227920 (34096 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:232064 (29952 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:236208 (25808 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:240352 (21664 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:244496 (17520 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:248640 (13376 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:252784 (9232 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:256928 (5088 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:261072 (944 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: hit empty space
> UBIFS DBG (pid 1350): ubifs_end_scan: stop scanning LEB 89 at offset 261072
> UBIFS DBG (pid 1350): ubifs_recover_leb: 57:0
> UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 57:0
> UBI DBG (pid 1350): ubi_leb_read: read 262016 bytes from LEB 0:57:0
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:0 (262016 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:4144 (257872 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:8288 (253728 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:12432 (249584 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:16576 (245440 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:20720 (241296 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:24864 (237152 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:29008 (233008 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:33152 (228864 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:37296 (224720 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:41440 (220576 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:45584 (216432 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:49728 (212288 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:53872 (208144 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:58016 (204000 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:62160 (199856 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:66304 (195712 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:70448 (191568 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:74592 (187424 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:78736 (183280 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:82880 (179136 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:87024 (174992 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:91168 (170848 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:95312 (166704 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:99456 (162560 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:103600 (158416 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:107744 (154272 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:111888 (150128 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:116032 (145984 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:120176 (141840 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:124320 (137696 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:128464 (133552 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:132608 (129408 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:136752 (125264 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:140896 (121120 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:145040 (116976 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:149184 (112832 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:153328 (108688 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:157472 (104544 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:161616 (100400 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:165760 (96256 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:169904 (92112 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:174048 (87968 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:178192 (83824 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:182336 (79680 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:186480 (75536 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:190624 (71392 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:194768 (67248 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:198912 (63104 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:203056 (58960 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:207200 (54816 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:211344 (50672 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:215488 (46528 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:219632 (42384 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:223776 (38240 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:227920 (34096 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:232064 (29952 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:236208 (25808 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:240352 (21664 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:244496 (17520 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:248640 (13376 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:252784 (9232 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:256928 (5088 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:261072 (944 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: hit empty space
> UBIFS DBG (pid 1350): ubifs_end_scan: stop scanning LEB 57 at offset 261072
> UBIFS DBG (pid 1350): ubifs_recover_leb: 11:0
> UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 11:0
> UBI DBG (pid 1350): ubi_leb_read: read 262016 bytes from LEB 0:11:0
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:0 (262016 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:4144 (257872 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:8288 (253728 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:12432 (249584 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:16576 (245440 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:20720 (241296 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:24864 (237152 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:29008 (233008 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:33152 (228864 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:37296 (224720 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:41440 (220576 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:45584 (216432 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:49728 (212288 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:53872 (208144 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:58016 (204000 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:62160 (199856 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:66304 (195712 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:70448 (191568 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:74592 (187424 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:78736 (183280 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:82880 (179136 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:87024 (174992 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:91168 (170848 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:95312 (166704 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:99456 (162560 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:103600 (158416 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:107744 (154272 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:111888 (150128 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:116032 (145984 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:120176 (141840 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:124320 (137696 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:128464 (133552 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:132608 (129408 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning unknown node
> UBIFS DBG (pid 1350): no_more_nodes: unexpected bad common header at 11:132608
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:132608 (129408 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning unknown node
> UBIFS error (pid 1350): ubifs_check_node: bad node type 255
> UBIFS error (pid 1350): ubifs_check_node: bad node at LEB 11:132608
> 	magic          0x6101831
> 	crc            0x495c96f5
> 	node_type      255 (unknown node)
> 	group_type     255 (unknown)
> 	sqnum          281470681808895
> 	len            65535
> node type 255 was not recognized
> Call Trace:
> [c6037b80] [c0007ecc] show_stack+0x4c/0x16c (unreliable)
> [c6037bc0] [c013e980] ubifs_check_node+0x17c/0x308
> [c6037be0] [c0147dec] ubifs_scan_a_node+0x15c/0x2d8
> [c6037c10] [c015d1c0] ubifs_recover_leb+0x3f0/0x940
> [c6037c80] [c01486fc] replay_buds+0xb4/0xb4c
> [c6037d20] [c0149894] ubifs_replay_journal+0x700/0xf48
> [c6037da0] [c013b060] ubifs_fill_super+0xda0/0x1600
> [c6037e00] [c013cbb4] ubifs_get_sb+0x10c/0x344
> [c6037e80] [c007b9a4] vfs_kern_mount+0x60/0x150
> [c6037ea0] [c007bae4] do_kern_mount+0x40/0x100
> [c6037ec0] [c00926c0] do_mount+0x40c/0x718
> [c6037f10] [c0092a5c] sys_mount+0x90/0xd8
> [c6037f40] [c0010b44] ret_from_syscall+0x0/0x38
> --- Exception: c01 at 0xfe93d18
>     LR = 0x1000347c
> UBIFS DBG (pid 1350): no_more_nodes: unexpected bad common header at 11:132608
> UBIFS error (pid 1350): ubifs_recover_leb: bad node
> UBIFS error (pid 1350): ubifs_scanned_corruption: corruption at LEB 11:132608
> UBIFS error (pid 1350): ubifs_scanned_corruption: first 8192 bytes from LEB 11:132608
> 00000000: 31181006 f5965c49 ffff0000 ffff0000 ffff0000 ffff0000 ffff0000 ffff0020  1.....\I....................... 
> 00000020: 00000000 00000000 00100000 00000000 f747be92 df3f8fc0 f1e9a37c 01b63b8c  .................G...?.....|..;.
> 00000040: b8b202a5 e569195d 38bdb7e7 b57d99ac c4583ea3 97cd6388 b60604b8 bc3f4474  .....i.]8....}...X>...c......?Dt
> 00000060: f24619d7 b03235e8 efeccfa4 6969512d c18fd058 5d33e013 39e4cbf5 23106915  .F...25.....iiQ-...X]3..9...#.i.
> 00000080: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000000a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000000c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000000e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000100: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000120: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000140: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000160: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000180: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000001a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000001c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000001e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000200: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000220: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000240: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000260: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000280: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000002a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000002c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000002e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000300: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000320: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000340: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000360: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000380: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000003a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000003c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000003e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000400: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000420: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000440: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000460: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000480: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000004a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000004c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000004e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000500: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000520: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000540: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000560: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000580: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000005a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000005c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000005e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000600: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000620: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000640: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000660: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000680: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000006a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000006c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000006e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000700: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000720: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000740: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000760: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000780: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000007a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000007c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000007e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000800: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000820: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000840: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000860: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000880: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000008a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000008c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000008e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000900: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000920: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000940: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000960: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000980: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000009a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000009c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000009e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000a00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000a20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000a40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000a60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000a80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000aa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ac0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ae0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000b00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000b20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000b40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000b60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000b80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ba0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000bc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000be0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000c00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000c20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000c40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000c60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000c80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ca0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000cc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ce0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000d00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000d20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000d40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000d60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000d80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000da0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000dc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000de0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000e00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000e20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000e40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000e60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000e80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ea0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ec0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ee0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000f00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000f20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000f40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000f60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000f80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000fa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000fc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000fe0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001000: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001040: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001060: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001080: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000010a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000010c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000010e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001100: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001120: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001140: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001160: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001180: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000011a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000011c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000011e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001200: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001220: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001240: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001260: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001280: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000012a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000012c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000012e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001300: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001320: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001340: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001360: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001380: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000013a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000013c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000013e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001400: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001420: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001440: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001460: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001480: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000014a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000014c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000014e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001500: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001520: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001540: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001560: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001580: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000015a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000015c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000015e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001600: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001620: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001640: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001660: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001680: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000016a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000016c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000016e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001700: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001720: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001740: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001760: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001780: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000017a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000017c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000017e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001800: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001820: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001840: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001860: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001880: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000018a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000018c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000018e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001900: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001920: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001940: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001960: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001980: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000019a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000019c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000019e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001a00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001a20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001a40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001a60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001a80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001aa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ac0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ae0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001b00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001b20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001b40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001b60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001b80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ba0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001bc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001be0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001c00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001c20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001c40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001c60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001c80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ca0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001cc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ce0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001d00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001d20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001d40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001d60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001d80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001da0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001dc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001de0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001e00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001e20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001e40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001e60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001e80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ea0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ec0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ee0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001f00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001f20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001f40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001f60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001f80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001fa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001fc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001fe0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> UBIFS error (pid 1350): ubifs_recover_leb: LEB 11 scanning failed
> UBIFS DBG (pid 1352): ubifs_bg_thread: background thread "ubifs_bgt0_0" stops
> 
> Thanks,
> Anatolij
> 
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/


From linus.ml.walleij at gmail.com  Tue Nov 30 03:26:43 2010
From: linus.ml.walleij at gmail.com (Linus Walleij)
Date: Tue, 30 Nov 2010 09:26:43 +0100
Subject: [PATCH 3/3] mtd: FSMC NAND fix obvious speling errors
In-Reply-To: <20101129132033.GE20449@pengutronix.de>
References: <1291035147-17840-1-git-send-email-linus.walleij@stericsson.com>
	<20101129132033.GE20449@pengutronix.de>
Message-ID: <AANLkTik1tqmguot2nzuZwy4dW-axx6X+Gh62mbgF-rmw@mail.gmail.com>

2010/11/29 Uwe Kleine-K?nig <u.kleine-koenig at pengutronix.de>:

> Hi Linus,
>
> $SUBJECT ~= s/speling/spelling/ :-)

It's intentional, an old in-joke from old POSIX days...
I think there was a library called libspel at one point.

Linus


From savinay.dharmappa at ti.com  Tue Nov 30 05:02:05 2010
From: savinay.dharmappa at ti.com (Savinay Dharmappa)
Date: Tue, 30 Nov 2010 15:32:05 +0530
Subject: [PATCH v4 1/2] mtd: NOR flash driver for OMAP-L137/AM17x
Message-ID: <1291111325-25784-1-git-send-email-savinay.dharmappa@ti.com>

From: David Griego <dgriego at mvista.com>

OMAP-L137/AM17x has limited number of dedicated EMIFA
address pins, enough to interface directly to an SDRAM.
If a device such as an asynchronous flash needs to be
attached to the EMIFA, then either GPIO pins or a chip
select may be used to control the flash device's upper
address lines.

This patch adds support for the NOR flash on the OMAP-L137/
AM17x user interface daughter board using the latch-addr-flash
MTD mapping driver which allows flashes to be partially
physically addressed. The upper address lines are set by
a board specific code which is a separate patch.

Signed-off-by: David Griego <dgriego at mvista.com>
Signed-off-by: Aleksey Makarov <amakarov at ru.mvista.com>
Signed-off-by: Sergei Shtylyov <sshtylyov at ru.mvista.com>
Signed-off-by: Savinay Dharmappa <savinay.dharmappa at ti.com>
---
Since v3:
No modifications in this patch. Reposting, as other patch in
this series has been modified.

 drivers/mtd/maps/Kconfig             |    9 +
 drivers/mtd/maps/Makefile            |    1 +
 drivers/mtd/maps/latch-addr-flash.c  |  272 ++++++++++++++++++++++++++++++++++
 include/linux/mtd/latch-addr-flash.h |   29 ++++
 4 files changed, 311 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mtd/maps/latch-addr-flash.c
 create mode 100644 include/linux/mtd/latch-addr-flash.h

diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index a0dd7bb..c0993d0 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -552,4 +552,13 @@ config MTD_PISMO
 
 	  When built as a module, it will be called pismo.ko
 
+config MTD_LATCH_ADDR
+        tristate "Latch-assisted Flash Chip Support"
+        depends on MTD_COMPLEX_MAPPINGS
+        help
+          Map driver which allows flashes to be partially physically addressed
+          and have the upper address lines set by a board specific code.
+
+          If compiled as a module, it will be called latch-addr-flash.
+
 endmenu
diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile
index c7869c7..08533bd 100644
--- a/drivers/mtd/maps/Makefile
+++ b/drivers/mtd/maps/Makefile
@@ -59,3 +59,4 @@ obj-$(CONFIG_MTD_RBTX4939)	+= rbtx4939-flash.o
 obj-$(CONFIG_MTD_VMU)		+= vmu-flash.o
 obj-$(CONFIG_MTD_GPIO_ADDR)	+= gpio-addr-flash.o
 obj-$(CONFIG_MTD_BCM963XX)	+= bcm963xx-flash.o
+obj-$(CONFIG_MTD_LATCH_ADDR)	+= latch-addr-flash.o
diff --git a/drivers/mtd/maps/latch-addr-flash.c b/drivers/mtd/maps/latch-addr-flash.c
new file mode 100644
index 0000000..2f91291
--- /dev/null
+++ b/drivers/mtd/maps/latch-addr-flash.c
@@ -0,0 +1,272 @@
+/*
+ * Interface for NOR flash driver whose high address lines are latched
+ *
+ * Copyright 2000 Nicolas Pitre <nico at cam.org>
+ * Copyright 2005-2008 Analog Devices Inc.
+ * Coyright (C) 2008 MontaVista Software, Inc. <source at mvista.com>
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#include <linux/mtd/partitions.h>
+#include <linux/platform_device.h>
+#include <linux/mtd/latch-addr-flash.h>
+#include <linux/slab.h>
+
+#define DRIVER_NAME "latch-addr-flash"
+
+struct latch_addr_flash_info {
+	struct mtd_info		*mtd;
+	struct map_info		map;
+	struct resource		*res;
+
+	void			(*set_window)(unsigned long offset, void *data);
+	void			*data;
+
+	/* cache; could be found out of res */
+	unsigned long		win_mask;
+
+	int			nr_parts;
+	struct mtd_partition	*parts;
+
+	spinlock_t		lock;
+};
+
+static map_word lf_read(struct map_info *map, unsigned long ofs)
+{
+	struct latch_addr_flash_info *info;
+	map_word datum;
+
+	info = (struct latch_addr_flash_info *)map->map_priv_1;
+
+	spin_lock(&info->lock);
+
+	info->set_window(ofs, info->data);
+	datum = inline_map_read(map, info->win_mask & ofs);
+
+	spin_unlock(&info->lock);
+
+	return datum;
+}
+
+static void lf_write(struct map_info *map, map_word datum, unsigned long ofs)
+{
+	struct latch_addr_flash_info *info;
+
+	info = (struct latch_addr_flash_info *)map->map_priv_1;
+
+	spin_lock(&info->lock);
+
+	info->set_window(ofs, info->data);
+	inline_map_write(map, datum, info->win_mask & ofs);
+
+	spin_unlock(&info->lock);
+}
+
+static void lf_copy_from(struct map_info *map, void *to,
+		unsigned long from, ssize_t len)
+{
+	struct latch_addr_flash_info *info =
+		(struct latch_addr_flash_info *) map->map_priv_1;
+	unsigned n;
+
+	while (len > 0) {
+		n = info->win_mask + 1 - (from & info->win_mask);
+		if (n > len)
+			n = len;
+
+		spin_lock(&info->lock);
+
+		info->set_window(from, info->data);
+		memcpy_fromio(to, map->virt + (from & info->win_mask), n);
+
+		spin_unlock(&info->lock);
+
+		to += n;
+		from += n;
+		len -= n;
+	}
+}
+
+static char *rom_probe_types[] = { "cfi_probe", NULL };
+
+static char *part_probe_types[] = { "cmdlinepart", NULL };
+
+static int latch_addr_flash_remove(struct platform_device *dev)
+{
+	struct latch_addr_flash_info *info;
+	struct latch_addr_flash_data *latch_addr_data;
+
+	info = platform_get_drvdata(dev);
+	if (info == NULL)
+		return 0;
+	platform_set_drvdata(dev, NULL);
+
+	latch_addr_data = dev->dev.platform_data;
+
+	if (info->mtd != NULL) {
+		if (mtd_has_partitions()) {
+			if (info->nr_parts) {
+				del_mtd_partitions(info->mtd);
+				kfree(info->parts);
+			} else if (latch_addr_data->nr_parts) {
+				del_mtd_partitions(info->mtd);
+			} else {
+				del_mtd_device(info->mtd);
+			}
+		} else {
+			del_mtd_device(info->mtd);
+		}
+		map_destroy(info->mtd);
+	}
+
+	if (info->map.virt != NULL)
+		iounmap(info->map.virt);
+
+	if (info->res != NULL)
+		release_mem_region(info->res->start, resource_size(info->res));
+
+	kfree(info);
+
+	if (latch_addr_data->done)
+		latch_addr_data->done(latch_addr_data->data);
+
+	return 0;
+}
+
+static int __devinit latch_addr_flash_probe(struct platform_device *dev)
+{
+	struct latch_addr_flash_data *latch_addr_data;
+	struct latch_addr_flash_info *info;
+	resource_size_t win_base = dev->resource->start;
+	resource_size_t win_size = resource_size(dev->resource);
+	char **probe_type;
+	int chipsel;
+	int err;
+
+	latch_addr_data = dev->dev.platform_data;
+	if (latch_addr_data == NULL)
+		return -ENODEV;
+
+	pr_notice("latch-addr platform flash device: %#llx byte "
+		  "window at %#.8llx\n",
+		  (unsigned long long)win_size, (unsigned long long)win_base);
+
+	chipsel = dev->id;
+
+	if (latch_addr_data->init) {
+		err = latch_addr_data->init(latch_addr_data->data, chipsel);
+		if (err != 0)
+			return err;
+	}
+
+	info = kzalloc(sizeof(struct latch_addr_flash_info), GFP_KERNEL);
+	if (info == NULL) {
+		err = -ENOMEM;
+		goto done;
+	}
+
+	platform_set_drvdata(dev, info);
+
+	info->res = request_mem_region(win_base, win_size, DRIVER_NAME);
+	if (info->res == NULL) {
+		dev_err(&dev->dev, "Could not reserve memory region\n");
+		err = -EBUSY;
+		goto free_info;
+	}
+
+	info->map.name		= DRIVER_NAME;
+	info->map.size		= latch_addr_data->size;
+	info->map.bankwidth	= latch_addr_data->width;
+
+	info->map.phys		= NO_XIP;
+	info->map.virt		= ioremap(win_base, win_size);
+	if (!info->map.virt) {
+		err = -ENOMEM;
+		goto free_res;
+	}
+
+	info->map.map_priv_1	= (unsigned long)info;
+
+	info->map.read		= lf_read;
+	info->map.copy_from	= lf_copy_from;
+	info->map.write		= lf_write;
+	info->set_window	= latch_addr_data->set_window;
+	info->data		= latch_addr_data->data;
+	info->win_mask		= win_size - 1;
+
+	spin_lock_init(&info->lock);
+
+	for (probe_type = rom_probe_types; !info->mtd && *probe_type;
+		probe_type++)
+		info->mtd = do_map_probe(*probe_type, &info->map);
+
+	if (info->mtd == NULL) {
+		dev_err(&dev->dev, "map_probe failed\n");
+		err = -ENODEV;
+		goto iounmap;
+	}
+	info->mtd->owner = THIS_MODULE;
+
+	if (mtd_has_partitions()) {
+
+		err = parse_mtd_partitions(info->mtd,
+					   (const char **)part_probe_types,
+					   &info->parts, 0);
+		if (err > 0) {
+			add_mtd_partitions(info->mtd, info->parts, err);
+			return 0;
+		}
+		if (latch_addr_data->nr_parts) {
+			pr_notice("Using latch-addr-flash partition information\n");
+			add_mtd_partitions(info->mtd, latch_addr_data->parts,
+					latch_addr_data->nr_parts);
+			return 0;
+		}
+	}
+	add_mtd_device(info->mtd);
+	return 0;
+
+iounmap:
+	iounmap(info->map.virt);
+free_res:
+	release_mem_region(info->res->start, resource_size(info->res));
+free_info:
+	kfree(info);
+done:
+	if (latch_addr_data->done)
+		latch_addr_data->done(latch_addr_data->data);
+	return err;
+}
+
+static struct platform_driver latch_addr_flash_driver = {
+	.probe		= latch_addr_flash_probe,
+	.remove		= __devexit_p(latch_addr_flash_remove),
+	.driver		= {
+		.name	= DRIVER_NAME,
+	},
+};
+
+static int __init latch_addr_flash_init(void)
+{
+	return platform_driver_register(&latch_addr_flash_driver);
+}
+module_init(latch_addr_flash_init);
+
+static void __exit latch_addr_flash_exit(void)
+{
+	platform_driver_unregister(&latch_addr_flash_driver);
+}
+module_exit(latch_addr_flash_exit);
+
+MODULE_AUTHOR("David Griego <dgriego at mvista.com>");
+MODULE_DESCRIPTION("MTD map driver for flashes addressed physically with upper "
+		"address lines being set board specifically");
+MODULE_LICENSE("GPL v2");
diff --git a/include/linux/mtd/latch-addr-flash.h b/include/linux/mtd/latch-addr-flash.h
new file mode 100644
index 0000000..d35d070
--- /dev/null
+++ b/include/linux/mtd/latch-addr-flash.h
@@ -0,0 +1,29 @@
+/*
+ * Interface for NOR flash driver whose high address lines are latched
+ *
+ * Copyright (C) 2008 MontaVista Software, Inc. <source at mvista.com>
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+#ifndef __LATCH_ADDR_FLASH__
+#define __LATCH_ADDR_FLASH__
+
+struct map_info;
+struct mtd_partition;
+
+struct latch_addr_flash_data {
+	unsigned int		width;
+	unsigned int		size;
+
+	int			(*init)(void *data, int cs);
+	void			(*done)(void *data);
+	void			(*set_window)(unsigned long offset, void *data);
+	void			*data;
+
+	unsigned int		nr_parts;
+	struct mtd_partition	*parts;
+};
+
+#endif
-- 
1.5.6



From savinay.dharmappa at ti.com  Tue Nov 30 05:02:41 2010
From: savinay.dharmappa at ti.com (Savinay Dharmappa)
Date: Tue, 30 Nov 2010 15:32:41 +0530
Subject: [PATCH v4 2/2] davinci: Platform support for OMAP-L137/AM17x NOR
	flash driver
Message-ID: <1291111361-25848-1-git-send-email-savinay.dharmappa@ti.com>

From: Aleksey Makarov <amakarov at ru.mvista.com>

Adds platform support for OMAP-L137/AM17x NOR flash driver.

Also, configures chip select 3 to control NOR flash's upper
address lines.

Signed-off-by: Aleksey Makarov <amakarov at ru.mvista.com>
Signed-off-by: Sergei Shtylyov <sshtylyov at ru.mvista.com>
Signed-off-by: Savinay Dharmappa <savinay.dharmappa at ti.com>
---
Since v3:
Addressed comments from Sergei Shtylyov at [1].

[1]http://linux.davincidsp.com/pipermail/davinci-linux-open-source/2010-November/021105.html

 arch/arm/mach-davinci/Kconfig           |    8 +
 arch/arm/mach-davinci/board-da830-evm.c |  217 +++++++++++++++++++++++++++++++
 2 files changed, 225 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 84066e8..72d4fd0 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -142,6 +142,14 @@ config DA830_UI_NAND
 	help
 	  Say Y here to use the NAND flash. Do not forget to setup
 	  the switch correctly.
+
+config DA830_UI_NOR
+        bool "NOR flash"
+        help
+          Configure this option to specify the that AEMIF CE2/CE3 will be used to
+          communicate to the NOR flash. Do not forget to setup the switch SW1
+          on UI card correctly.
+
 endchoice
 
 config MACH_DAVINCI_DA850_EVM
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
index b52a3a1..93daf52 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -20,6 +20,8 @@
 #include <linux/i2c/at24.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
+#include <linux/mtd/latch-addr-flash.h>
+#include <linux/clk.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -429,6 +431,219 @@ static inline void da830_evm_init_nand(int mux_mode)
 static inline void da830_evm_init_nand(int mux_mode) { }
 #endif
 
+#ifdef CONFIG_DA830_UI_NOR
+/*
+ * Number of lines going to the NOR flash that are used as
+ * AEMIF address lines B_EMIF_BA0-B_EMIF_A12 on CS2.
+ */
+#define NOR_WINDOW_SIZE_LOG2     15
+#define NOR_WINDOW_SIZE         (1 << NOR_WINDOW_SIZE_LOG2)
+
+static struct {
+	struct clk *clk;
+	void __iomem *latch_addr;
+	void __iomem *aemif_addr;
+} da830_evm_nor;
+
+static struct davinci_aemif_timing da830_evm_norflash_timing = {
+	.wsetup		= 0,
+	.wstrobe	= 40,
+	.whold		= 0,
+	.rsetup		= 0,
+	.rstrobe	= 130,
+	.rhold		= 0,
+	.ta		= 20,
+};
+
+static void da830_evm_nor_set_window(unsigned long offset, void *data)
+{
+	/*
+	 * CS2 and CS3 lines are used to address NOR flash. Address lines
+	 * A0-A14 from NOR flash are connected to AEMIF address lines
+	 * B_EMIF_BA0-B_EMIF_A12 on CS2. Address lines A15-A23 of the NOR
+	 * flash are latched from AEMIF address lines B_EMIF_A0-B_EMIF_A6
+	 * on CS3. The offset argument received by this function is the offset
+	 * within NOR flash. Upper address is obtained  by shifting the offset
+	 * by the number of CS2 address lines used (13) and masking it with
+	 * complement of 3 (2 address lines used to address banks) and adding
+	 * the resultant offset value to CS3 base address. Writing to this
+	 * address will latch the upper address lines.
+	 */
+	writeb(0x0, da830_evm_nor.latch_addr +
+		(~3UL & (offset >> (NOR_WINDOW_SIZE_LOG2 - 2))));
+}
+
+static void da830_evm_nor_done(void *data)
+{
+	clk_disable(da830_evm_nor.clk);
+	clk_put(da830_evm_nor.clk);
+	iounmap(da830_evm_nor.latch_addr);
+	release_mem_region(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE);
+	iounmap(da830_evm_nor.aemif_addr);
+	release_mem_region(DA8XX_AEMIF_CTL_BASE, SZ_32K);
+}
+
+static int da830_evm_nor_init(void *data, int cs)
+{
+	struct resource *res = NULL;
+
+	/* Turn on AEMIF clocks */
+	da830_evm_nor.clk = clk_get(NULL, "aemif");
+	if (IS_ERR(da830_evm_nor.clk)) {
+		pr_err("%s: could not get AEMIF clock\n", __func__);
+		da830_evm_nor.clk = NULL;
+		return -ENODEV;
+	}
+	clk_enable(da830_evm_nor.clk);
+
+	res = request_mem_region(DA8XX_AEMIF_CTL_BASE, SZ_32K, "AEMIF control");
+	if (res == NULL) {
+		pr_err("%s: could not request AEMIF control region\n",
+			__func__);
+		goto err_clk;
+	}
+
+	da830_evm_nor.aemif_addr = ioremap_nocache(DA8XX_AEMIF_CTL_BASE,
+						   SZ_32K);
+	if (da830_evm_nor.aemif_addr == NULL) {
+		pr_err("%s: could not remap AEMIF control region\n", __func__);
+		goto err_aemif_region;
+	}
+
+	/* Setup AEMIF -- timings, etc. */
+
+	/* Set maximum wait cycles */
+	davinci_aemif_setup_timing(&da830_evm_norflash_timing,
+						da830_evm_nor.aemif_addr, cs);
+
+	davinci_aemif_setup_timing(&da830_evm_norflash_timing,
+					da830_evm_nor.aemif_addr, cs + 1);
+
+	/* Setup the window to access the latch */
+	res = request_mem_region(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE,
+				"DA830 UI NOR address latch");
+	if (res == NULL) {
+		pr_err("%s: could not request address latch region\n",
+			__func__);
+		goto err_aemif_ioremap;
+	}
+
+	da830_evm_nor.latch_addr =
+		ioremap_nocache(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE);
+	if (da830_evm_nor.latch_addr == NULL) {
+		pr_err("%s: could not remap address latch region\n", __func__);
+		goto err_latch_region;
+	}
+	return 0;
+
+err_latch_region:
+	release_mem_region(DA8XX_AEMIF_CS3_BASE, PAGE_SIZE);
+
+err_aemif_ioremap:
+	iounmap(da830_evm_nor.aemif_addr);
+
+err_aemif_region:
+	release_mem_region(DA8XX_AEMIF_CTL_BASE, SZ_32K);
+
+err_clk:
+	clk_disable(da830_evm_nor.clk);
+	clk_put(da830_evm_nor.clk);
+
+	return -ENOMEM;
+}
+
+static struct mtd_partition da830_evm_nor_partitions[] = {
+	/* bootloader (U-Boot, etc) in first 2 sectors */
+	[0] = {
+		.name           = "bootloader",
+		.offset		= 0,
+		.size           = SZ_128K,
+		.mask_flags     = MTD_WRITEABLE, /* force read-only */
+	},
+	/* bootloader parameters in the next 1 sector */
+	[1] = {
+		.name           = "params",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = SZ_64K,
+	},
+	/* kernel */
+	[2] = {
+		.name           = "kernel",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = SZ_2M,
+	},
+	/* file system */
+	[3] = {
+		.name           = "filesystem",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = MTDPART_SIZ_FULL,
+	}
+};
+
+static struct latch_addr_flash_data da830_evm_nor_pdata = {
+	.width          = 1,
+	.size           = SZ_4M,
+	.init           = da830_evm_nor_init,
+	.done           = da830_evm_nor_done,
+	.set_window     = da830_evm_nor_set_window,
+	.nr_parts       = ARRAY_SIZE(da830_evm_nor_partitions),
+	.parts          = da830_evm_nor_partitions,
+};
+
+static struct resource da830_evm_nor_resource[] = {
+	[0] = {
+		.start  = DA8XX_AEMIF_CS2_BASE,
+		.end    = DA8XX_AEMIF_CS2_BASE + NOR_WINDOW_SIZE - 1,
+		.flags  = IORESOURCE_MEM,
+	},
+	[1] = {
+		.start  = DA8XX_AEMIF_CS3_BASE,
+		.end    = DA8XX_AEMIF_CS3_BASE + PAGE_SIZE - 1,
+		.flags  = IORESOURCE_MEM,
+	},
+	[2] = {
+		.start  = DA8XX_AEMIF_CTL_BASE,
+		.end    = DA8XX_AEMIF_CTL_BASE + SZ_32K - 1,
+		.flags  = IORESOURCE_MEM,
+	}
+};
+
+static struct platform_device da830_evm_nor_device = {
+	.name           = "latch-addr-flash",
+	.id             = 0,
+	.dev            = {
+		.platform_data  = &da830_evm_nor_pdata,
+	},
+	.num_resources  = ARRAY_SIZE(da830_evm_nor_resource),
+	.resource       = da830_evm_nor_resource,
+};
+
+static inline void da830_evm_init_nor(int mux_mode)
+{
+	int ret;
+
+	if (HAS_MMC) {
+		pr_warning("WARNING: both MMC/SD and NOR are "
+			   "enabled, but they share AEMIF pins.\n"
+			   "\tDisable MMC/SD for NOR support.\n");
+		return;
+	}
+
+	ret = davinci_cfg_reg_list(da830_evm_emif25_pins);
+	if (ret)
+		pr_warning("da830_evm_init: EMIF 2.5 mux setup failed: %d\n",
+			  ret);
+
+	ret = platform_device_register(&da830_evm_nor_device);
+	if (ret)
+		pr_warning("da830_evm_init: NOR device not registered.\n");
+
+	gpio_direction_output(mux_mode, 1);
+}
+#else
+static inline void da830_evm_init_nor(int mux_mode) { }
+#endif  /* CONFIG_DA830_UI_NOR */
+
 #ifdef CONFIG_DA830_UI_LCD
 static inline void da830_evm_init_lcdc(int mux_mode)
 {
@@ -469,6 +684,8 @@ static int __init da830_evm_ui_expander_setup(struct i2c_client *client,
 
 	da830_evm_init_nand(gpio + 6);
 
+	da830_evm_init_nor(gpio + 6);
+
 	return 0;
 }
 
-- 
1.5.6



From nvbolhuis at aimvalley.nl  Tue Nov 30 05:41:14 2010
From: nvbolhuis at aimvalley.nl (Norbert van Bolhuis)
Date: Tue, 30 Nov 2010 11:41:14 +0100
Subject: UBIFS partition on NOR flash not mountable after power cut test
In-Reply-To: <20101129195014.19224240@wker>
References: <20101129195014.19224240@wker>
Message-ID: <4CF4D4CA.8040906@aimvalley.nl>


Did you read the mail discussions
"UBIFS Corrupt during power failure"
dated april 2009 from Eric Holmberg.

He did some great work in making UBIFS on NOR flash
more reliable for power-cuts.

One of the problems was UBI/UBIFS assumes a (CFI) write
buffer size of 8 bytes. Maybe this is still the case.
I think for your NOR flash it is 64 bytes though.

hth,
Norbert van Bolhuis.






Anatolij Gustschin wrote:
> Hello,
> 
> using kernel 2.6.34.7 with applied UBI/UBIFS back-port patches from
> 2.6.34 UBIFS back-port tree and an UBIFS filesystem in a partition
> on Spansion NOR Flash S29GL512P (2 x16 chips in a 32-bit bank) we are
> not able to mount the filesystem after around 30 power cut test
> cycles. Has anyone seen similar issues before?
> 
> The power failure test is simulated by triggering an external reset
> of the board while a simple program is writing data into a file on
> the UBIFS partition. Each test cycle consists of the following steps:
> 
>  - booting the kernel
>  - attaching the MTD device
>  - mounting the UBIFS partition
>  - starting a program for writing the test data into a file on the
>    mounted UBIFS partition (only if mounting of this partition
>    succeeded)
>  - triggering a reset after about 15 sec.
> 
> After a number of test cycles we end up with corrupted partition
> which cannot be recovered any more and mounting the partition
> does not succeed. Two kernel logs with enabled UBIFS debug output
> are included below.
> 
> Previous to the above tests we also validated the flash access by
> running some MTD tests (mtd_readtest/mtd_stresstest) and these MTD
> tests didn't show any errors or warnings.
> 
> The problem can also be reproduced when running with UBIFS extra
> self checks enabled, but here it seems that we need to run more
> test cycles until the issue pops up.
> 
> Used UBI/UBIFS configuration:
> CONFIG_MTD_UBI=y
> CONFIG_MTD_UBI_WL_THRESHOLD=4096
> CONFIG_MTD_UBI_BEB_RESERVE=1
> 
> CONFIG_UBIFS_FS=y
> # CONFIG_UBIFS_FS_XATTR is not set
> # CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
> CONFIG_UBIFS_FS_LZO=y
> CONFIG_UBIFS_FS_ZLIB=y
> CONFIG_UBIFS_FS_DEBUG=y
> CONFIG_UBIFS_FS_DEBUG_MSG_LVL=1
> CONFIG_UBIFS_FS_DEBUG_CHKS=y
> 
> Our flash device is a Spansion S29GL512P NOR flash,
> 2 x16 in a 32-bit bank.
> 
> # cat /proc/mtd 
> dev:    size   erasesize  name
> mtd0: 02ac0000 00040000 "rootfs"
> mtd1: 00040000 00040000 "env-0"
> mtd2: 00040000 00040000 "env-1"
> mtd3: 00040000 00040000 "splash-image"
> mtd4: 00500000 00040000 "linux"
> mtd5: 03400000 00040000 "homefs"
> mtd6: 00002000 00001000 "50040000.mram0"
> mtd7: 00008000 00001000 "50042000.mram1"
> 
> The UBIFS partition is on mtd5.
> 
> The kernel version is 2.6.34.7 with updated UBI/UBIFS pulled from
> 2.6.34 back-port tree.
> 
> Kernel log:
> 
> UBI: attaching mtd5 to ubi0
> UBI: physical eraseblock size:   262144 bytes (256 KiB)
> UBI: logical eraseblock size:    262016 bytes
> UBI: smallest flash I/O unit:    1
> UBI: VID header offset:          64 (aligned 64)
> UBI: data offset:                128
> UBI: max. sequence number:       2348
> UBI: attached mtd5 to ubi0
> UBI: MTD device name:            "homefs"
> UBI: MTD device size:            52 MiB
> UBI: number of good PEBs:        208
> UBI: number of bad PEBs:         0
> UBI: number of corrupted PEBs:   0
> UBI: max. allowed volumes:       128
> UBI: wear-leveling threshold:    4096
> UBI: number of internal volumes: 1
> UBI: number of user volumes:     1
> UBI: available PEBs:             0
> UBI: total number of reserved PEBs: 208
> UBI: number of PEBs reserved for bad PEB handling: 0
> UBI: max/mean erase counter: 24/16
> UBI: image sequence number:  1966556915
> UBI: background thread "ubi_bgt0d" started, PID 1287
> UBIFS DBG (pid 1288): ubifs_start_scan: scan LEB 1:0
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:0 (262016 bytes left)
> UBIFS DBG (pid 1290): ubifs_bg_thread: background thread "ubifs_bgt0_0" started, PID 1290
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:512 (261504 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:1024 (260992 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:1536 (260480 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:2048 (259968 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:2560 (259456 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:3072 (258944 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:3584 (258432 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:4096 (257920 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:4608 (257408 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:5120 (256896 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:5632 (256384 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:6144 (255872 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:6656 (255360 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:7168 (254848 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:7680 (254336 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:8192 (253824 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:8704 (253312 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:9216 (252800 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:9728 (252288 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:10240 (251776 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:10752 (251264 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:11264 (250752 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:11776 (250240 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:12288 (249728 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:12800 (249216 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:13312 (248704 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:13824 (248192 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:14336 (247680 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:14848 (247168 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:15360 (246656 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:15872 (246144 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:16384 (245632 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:16896 (245120 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:17408 (244608 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:17920 (244096 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:18432 (243584 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:18944 (243072 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:19456 (242560 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:19968 (242048 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:20480 (241536 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:20992 (241024 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:21504 (240512 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:22016 (240000 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:22528 (239488 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:23040 (238976 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:23552 (238464 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:24064 (237952 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:24576 (237440 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:25088 (236928 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:25600 (236416 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:26112 (235904 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:26624 (235392 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:27136 (234880 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:27648 (234368 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:28160 (233856 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:28672 (233344 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:29184 (232832 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:29696 (232320 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:30208 (231808 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:30720 (231296 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:31232 (230784 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:31744 (230272 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:32256 (229760 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:32768 (229248 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:33280 (228736 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:33792 (228224 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:34304 (227712 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:34816 (227200 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:35328 (226688 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:35840 (226176 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:36352 (225664 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:36864 (225152 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:37376 (224640 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:37888 (224128 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:38400 (223616 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:38912 (223104 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:39424 (222592 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:39936 (222080 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:40448 (221568 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:40960 (221056 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:41472 (220544 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:41984 (220032 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:42496 (219520 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:43008 (219008 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:43520 (218496 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:44032 (217984 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:44544 (217472 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:45056 (216960 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:45568 (216448 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:46080 (215936 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:46592 (215424 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:47104 (214912 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:47616 (214400 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:48128 (213888 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:48640 (213376 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:49152 (212864 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:49664 (212352 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:50176 (211840 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:50688 (211328 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:51200 (210816 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:51712 (210304 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:52224 (209792 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:52736 (209280 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:53248 (208768 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:53760 (208256 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:54272 (207744 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:54784 (207232 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:55296 (206720 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:55808 (206208 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:56320 (205696 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:56832 (205184 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:57344 (204672 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:57856 (204160 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:58368 (203648 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:58880 (203136 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:59392 (202624 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:59904 (202112 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:60416 (201600 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:60928 (201088 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:61440 (200576 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:61952 (200064 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:62464 (199552 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:62976 (199040 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:63488 (198528 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:64000 (198016 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:64512 (197504 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:65024 (196992 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:65536 (196480 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:66048 (195968 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:66560 (195456 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:67072 (194944 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:67584 (194432 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:68096 (193920 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:68608 (193408 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:69120 (192896 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:69632 (192384 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:70144 (191872 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:70656 (191360 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:71168 (190848 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:71680 (190336 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:72192 (189824 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:72704 (189312 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:73216 (188800 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 1:73728 (188288 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: hit empty space
> UBIFS DBG (pid 1288): ubifs_end_scan: stop scanning LEB 1 at offset 73728
> UBIFS DBG (pid 1288): ubifs_start_scan: scan LEB 2:0
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:0 (262016 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:512 (261504 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:1024 (260992 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:1536 (260480 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:2048 (259968 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:2560 (259456 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:3072 (258944 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:3584 (258432 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:4096 (257920 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:4608 (257408 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:5120 (256896 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:5632 (256384 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:6144 (255872 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:6656 (255360 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:7168 (254848 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:7680 (254336 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:8192 (253824 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:8704 (253312 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:9216 (252800 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:9728 (252288 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:10240 (251776 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:10752 (251264 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:11264 (250752 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:11776 (250240 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:12288 (249728 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:12800 (249216 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:13312 (248704 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:13824 (248192 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:14336 (247680 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:14848 (247168 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:15360 (246656 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:15872 (246144 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:16384 (245632 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:16896 (245120 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:17408 (244608 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:17920 (244096 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:18432 (243584 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:18944 (243072 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:19456 (242560 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:19968 (242048 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:20480 (241536 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:20992 (241024 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:21504 (240512 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:22016 (240000 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:22528 (239488 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:23040 (238976 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:23552 (238464 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:24064 (237952 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:24576 (237440 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:25088 (236928 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:25600 (236416 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:26112 (235904 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:26624 (235392 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:27136 (234880 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:27648 (234368 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:28160 (233856 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:28672 (233344 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:29184 (232832 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:29696 (232320 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:30208 (231808 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:30720 (231296 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:31232 (230784 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:31744 (230272 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:32256 (229760 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:32768 (229248 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:33280 (228736 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:33792 (228224 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:34304 (227712 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:34816 (227200 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:35328 (226688 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:35840 (226176 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:36352 (225664 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:36864 (225152 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:37376 (224640 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:37888 (224128 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:38400 (223616 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:38912 (223104 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:39424 (222592 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:39936 (222080 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:40448 (221568 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:40960 (221056 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:41472 (220544 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:41984 (220032 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:42496 (219520 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:43008 (219008 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:43520 (218496 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:44032 (217984 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:44544 (217472 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:45056 (216960 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:45568 (216448 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:46080 (215936 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:46592 (215424 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:47104 (214912 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:47616 (214400 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:48128 (213888 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:48640 (213376 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:49152 (212864 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:49664 (212352 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:50176 (211840 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:50688 (211328 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:51200 (210816 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:51712 (210304 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:52224 (209792 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:52736 (209280 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:53248 (208768 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:53760 (208256 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:54272 (207744 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:54784 (207232 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:55296 (206720 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:55808 (206208 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:56320 (205696 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:56832 (205184 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:57344 (204672 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:57856 (204160 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:58368 (203648 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:58880 (203136 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:59392 (202624 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:59904 (202112 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:60416 (201600 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:60928 (201088 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:61440 (200576 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:61952 (200064 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:62464 (199552 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:62976 (199040 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:63488 (198528 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:64000 (198016 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:64512 (197504 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:65024 (196992 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:65536 (196480 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:66048 (195968 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:66560 (195456 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:67072 (194944 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:67584 (194432 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:68096 (193920 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:68608 (193408 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:69120 (192896 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:69632 (192384 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:70144 (191872 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:70656 (191360 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:71168 (190848 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:71680 (190336 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:72192 (189824 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:72704 (189312 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:73216 (188800 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 2:73728 (188288 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: hit empty space
> UBIFS DBG (pid 1288): ubifs_end_scan: stop scanning LEB 2 at offset 73728
> UBIFS: recovery needed
> UBIFS DBG (pid 1288): ubifs_recover_inl_heads: checking index head at 173:204000
> UBIFS DBG (pid 1288): ubifs_recover_inl_heads: checking LPT head at 7:45864
> UBIFS DBG (pid 1288): ubifs_start_scan: scan LEB 6:0
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 6:0 (262016 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning commit start node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 6:32 (261984 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 6:96 (261920 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 6:160 (261856 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: hit empty space
> UBIFS DBG (pid 1288): ubifs_end_scan: stop scanning LEB 6 at offset 160
> UBIFS DBG (pid 1288): ubifs_start_scan: scan LEB 3:0
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 3:0 (262016 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning commit start node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 3:32 (261984 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 3:96 (261920 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1288): ubifs_scan: look at LEB 3:160 (261856 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: hit empty space
> UBIFS DBG (pid 1288): ubifs_end_scan: stop scanning LEB 3 at offset 160
> UBIFS DBG (pid 1288): ubifs_recover_leb: 162:210456
> UBIFS DBG (pid 1288): ubifs_start_scan: scan LEB 162:210456
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:210456 (51560 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:210616 (51400 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:210776 (51240 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:210936 (51080 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:211096 (50920 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:211256 (50760 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:211416 (50600 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:211576 (50440 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:211736 (50280 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:211896 (50120 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:212056 (49960 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:212216 (49800 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:212376 (49640 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:212536 (49480 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:212696 (49320 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:212856 (49160 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:213016 (49000 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:213176 (48840 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:213336 (48680 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:213496 (48520 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:213656 (48360 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:213816 (48200 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:213976 (48040 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:214136 (47880 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning unknown node
> UBIFS DBG (pid 1288): no_more_nodes: unexpected bad common header at 162:214136
> UBIFS DBG (pid 1288): ubifs_recover_leb: look at LEB 162:214136 (47880 bytes left)
> UBIFS DBG (pid 1288): ubifs_scan_a_node: scanning unknown node
> UBIFS error (pid 1288): ubifs_check_node: bad node type 255
> UBIFS error (pid 1288): ubifs_check_node: bad node at LEB 162:214136
> 	magic          0x6101831
> 	crc            0xc06989c8
> 	node_type      255 (unknown node)
> 	group_type     255 (unknown)
> 	sqnum          18446744073709551615
> 	len            4294967295
> node type 255 was not recognized
> Call Trace:
> [c602db80] [c0007ecc] show_stack+0x4c/0x16c (unreliable)
> [c602dbc0] [c013e980] ubifs_check_node+0x17c/0x308
> [c602dbe0] [c0147dec] ubifs_scan_a_node+0x15c/0x2d8
> [c602dc10] [c015d1c0] ubifs_recover_leb+0x3f0/0x940
> [c602dc80] [c01486fc] replay_buds+0xb4/0xb4c
> [c602dd20] [c0149894] ubifs_replay_journal+0x700/0xf48
> [c602dda0] [c013b060] ubifs_fill_super+0xda0/0x1600
> [c602de00] [c013cbb4] ubifs_get_sb+0x10c/0x344
> [c602de80] [c007b9a4] vfs_kern_mount+0x60/0x150
> [c602dea0] [c007bae4] do_kern_mount+0x40/0x100
> [c602dec0] [c00926c0] do_mount+0x40c/0x718
> [c602df10] [c0092a5c] sys_mount+0x90/0xd8
> [c602df40] [c0010b44] ret_from_syscall+0x0/0x38
> --- Exception: c01 at 0xfe93d18
>     LR = 0x1000347c
> UBIFS DBG (pid 1288): no_more_nodes: unexpected bad common header at 162:214136
> UBIFS error (pid 1288): ubifs_recover_leb: bad node
> UBIFS error (pid 1288): ubifs_scanned_corruption: corruption at LEB 162:214136
> UBIFS error (pid 1288): ubifs_scanned_corruption: first 8192 bytes from LEB 162:214136
> 00000000: 31181006 c88969c0 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  1.....i.........................
> 00000020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000040: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000060: ffffffff ffffffff a4810000 00000000 00000000 00000000 00000000 00000000  ................................
> 00000080: 00000000 00000000 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000000a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000000c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000000e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000100: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000120: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000140: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000160: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000180: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000001a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000001c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000001e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000200: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000220: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000240: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000260: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000280: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000002a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000002c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000002e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000300: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000320: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000340: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000360: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000380: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000003a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000003c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000003e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000400: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000420: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000440: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000460: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000480: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000004a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000004c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000004e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000500: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000520: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000540: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000560: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000580: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000005a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000005c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000005e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000600: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000620: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000640: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000660: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000680: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000006a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000006c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000006e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000700: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000720: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000740: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000760: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000780: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000007a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000007c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000007e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000800: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000820: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000840: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000860: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000880: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000008a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000008c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000008e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000900: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000920: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000940: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000960: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000980: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000009a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000009c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000009e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000a00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000a20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000a40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000a60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000a80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000aa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ac0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ae0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000b00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000b20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000b40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000b60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000b80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ba0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000bc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000be0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000c00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000c20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000c40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000c60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000c80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ca0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000cc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ce0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000d00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000d20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000d40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000d60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000d80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000da0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000dc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000de0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000e00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000e20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000e40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000e60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000e80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ea0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ec0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ee0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000f00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000f20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000f40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000f60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000f80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000fa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000fc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000fe0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001000: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001040: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001060: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001080: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000010a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000010c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000010e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001100: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001120: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001140: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001160: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001180: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000011a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000011c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000011e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001200: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001220: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001240: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001260: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001280: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000012a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000012c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000012e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001300: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001320: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001340: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001360: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001380: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000013a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000013c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000013e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001400: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001420: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001440: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001460: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001480: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000014a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000014c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000014e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001500: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001520: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001540: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001560: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001580: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000015a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000015c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000015e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001600: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001620: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001640: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001660: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001680: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000016a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000016c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000016e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001700: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001720: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001740: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001760: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001780: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000017a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000017c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000017e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001800: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001820: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001840: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001860: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001880: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000018a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000018c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000018e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001900: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001920: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001940: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001960: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001980: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000019a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000019c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000019e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001a00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001a20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001a40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001a60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001a80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001aa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ac0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ae0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001b00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001b20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001b40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001b60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001b80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ba0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001bc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001be0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001c00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001c20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001c40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001c60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001c80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ca0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001cc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ce0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001d00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001d20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001d40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001d60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001d80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001da0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001dc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001de0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001e00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001e20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001e40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001e60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001e80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ea0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ec0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ee0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001f00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001f20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001f40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001f60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001f80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001fa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001fc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001fe0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> UBIFS error (pid 1288): ubifs_recover_leb: LEB 162 scanning failed
> UBIFS DBG (pid 1290): ubifs_bg_thread: background thread "ubifs_bgt0_0" stops
> 
> 
> Kernel log after trying to mount corrupted partition from another
> test run. I'm including it here since it has different pattern
> in corrupted node. Here the debug level is increased to 3:
> 
> UBI: attaching mtd5 to ubi0
> UBI DBG (pid 1346): io_init: min_io_size      1
> UBI DBG (pid 1346): io_init: hdrs_min_io_size 1
> UBI DBG (pid 1346): io_init: ec_hdr_alsize    64
> UBI DBG (pid 1346): io_init: vid_hdr_alsize   64
> UBI DBG (pid 1346): io_init: vid_hdr_offset   64
> UBI DBG (pid 1346): io_init: vid_hdr_aloffset 64
> UBI DBG (pid 1346): io_init: vid_hdr_shift    0
> UBI DBG (pid 1346): io_init: leb_start        128
> UBI DBG (pid 1346): io_init: max_erroneous    20
> UBI: physical eraseblock size:   262144 bytes (256 KiB)
> UBI: logical eraseblock size:    262016 bytes
> UBI: smallest flash I/O unit:    1
> UBI: VID header offset:          64 (aligned 64)
> UBI: data offset:                128
> UBI DBG (pid 1346): ubi_scan: process PEB 0
> UBI DBG (pid 1346): ubi_scan: process PEB 1
> UBI DBG (pid 1346): ubi_scan: process PEB 2
> UBI DBG (pid 1346): ubi_scan: process PEB 3
> UBI DBG (pid 1346): ubi_scan: process PEB 4
> UBI DBG (pid 1346): ubi_scan: process PEB 5
> UBI DBG (pid 1346): ubi_scan: process PEB 6
> UBI DBG (pid 1346): ubi_scan: process PEB 7
> UBI DBG (pid 1346): ubi_scan: process PEB 8
> UBI DBG (pid 1346): ubi_scan: process PEB 9
> UBI DBG (pid 1346): ubi_scan: process PEB 10
> UBI DBG (pid 1346): ubi_scan: process PEB 11
> UBI DBG (pid 1346): ubi_scan: process PEB 12
> UBI DBG (pid 1346): ubi_scan: process PEB 13
> UBI DBG (pid 1346): ubi_scan: process PEB 14
> UBI DBG (pid 1346): ubi_scan: process PEB 15
> UBI DBG (pid 1346): ubi_scan: process PEB 16
> UBI DBG (pid 1346): ubi_scan: process PEB 17
> UBI DBG (pid 1346): ubi_scan: process PEB 18
> UBI DBG (pid 1346): ubi_scan: process PEB 19
> UBI DBG (pid 1346): ubi_scan: process PEB 20
> UBI DBG (pid 1346): ubi_scan: process PEB 21
> UBI DBG (pid 1346): ubi_scan: process PEB 22
> UBI DBG (pid 1346): ubi_scan: process PEB 23
> UBI DBG (pid 1346): ubi_scan: process PEB 24
> UBI DBG (pid 1346): ubi_scan: process PEB 25
> UBI DBG (pid 1346): ubi_scan: process PEB 26
> UBI DBG (pid 1346): ubi_scan: process PEB 27
> UBI DBG (pid 1346): ubi_scan: process PEB 28
> UBI DBG (pid 1346): ubi_scan: process PEB 29
> UBI DBG (pid 1346): ubi_scan: process PEB 30
> UBI DBG (pid 1346): ubi_scan: process PEB 31
> UBI DBG (pid 1346): ubi_scan: process PEB 32
> UBI DBG (pid 1346): ubi_scan: process PEB 33
> UBI DBG (pid 1346): ubi_scan: process PEB 34
> UBI DBG (pid 1346): ubi_scan: process PEB 35
> UBI DBG (pid 1346): ubi_scan: process PEB 36
> UBI DBG (pid 1346): ubi_scan: process PEB 37
> UBI DBG (pid 1346): ubi_scan: process PEB 38
> UBI DBG (pid 1346): ubi_scan: process PEB 39
> UBI DBG (pid 1346): ubi_scan: process PEB 40
> UBI DBG (pid 1346): ubi_scan: process PEB 41
> UBI DBG (pid 1346): ubi_scan: process PEB 42
> UBI DBG (pid 1346): ubi_scan: process PEB 43
> UBI DBG (pid 1346): ubi_scan: process PEB 44
> UBI DBG (pid 1346): ubi_scan: process PEB 45
> UBI DBG (pid 1346): ubi_scan: process PEB 46
> UBI DBG (pid 1346): ubi_scan: process PEB 47
> UBI DBG (pid 1346): ubi_scan: process PEB 48
> UBI DBG (pid 1346): ubi_scan: process PEB 49
> UBI DBG (pid 1346): ubi_scan: process PEB 50
> UBI DBG (pid 1346): ubi_scan: process PEB 51
> UBI DBG (pid 1346): ubi_scan: process PEB 52
> UBI DBG (pid 1346): ubi_scan: process PEB 53
> UBI DBG (pid 1346): ubi_scan: process PEB 54
> UBI DBG (pid 1346): ubi_scan: process PEB 55
> UBI DBG (pid 1346): ubi_scan: process PEB 56
> UBI DBG (pid 1346): ubi_scan: process PEB 57
> UBI DBG (pid 1346): ubi_scan: process PEB 58
> UBI DBG (pid 1346): ubi_scan: process PEB 59
> UBI DBG (pid 1346): ubi_scan: process PEB 60
> UBI DBG (pid 1346): ubi_scan: process PEB 61
> UBI DBG (pid 1346): ubi_scan: process PEB 62
> UBI DBG (pid 1346): ubi_scan: process PEB 63
> UBI DBG (pid 1346): ubi_scan: process PEB 64
> UBI DBG (pid 1346): ubi_scan: process PEB 65
> UBI DBG (pid 1346): ubi_scan: process PEB 66
> UBI DBG (pid 1346): ubi_scan: process PEB 67
> UBI DBG (pid 1346): ubi_scan: process PEB 68
> UBI DBG (pid 1346): ubi_scan: process PEB 69
> UBI DBG (pid 1346): ubi_scan: process PEB 70
> UBI DBG (pid 1346): ubi_scan: process PEB 71
> UBI DBG (pid 1346): ubi_scan: process PEB 72
> UBI DBG (pid 1346): ubi_scan: process PEB 73
> UBI DBG (pid 1346): ubi_scan: process PEB 74
> UBI DBG (pid 1346): ubi_scan: process PEB 75
> UBI DBG (pid 1346): ubi_scan: process PEB 76
> UBI DBG (pid 1346): ubi_scan: process PEB 77
> UBI DBG (pid 1346): ubi_scan: process PEB 78
> UBI DBG (pid 1346): ubi_scan: process PEB 79
> UBI DBG (pid 1346): ubi_scan: process PEB 80
> UBI DBG (pid 1346): ubi_scan: process PEB 81
> UBI DBG (pid 1346): ubi_scan: process PEB 82
> UBI DBG (pid 1346): ubi_scan: process PEB 83
> UBI DBG (pid 1346): ubi_scan: process PEB 84
> UBI DBG (pid 1346): ubi_scan: process PEB 85
> UBI DBG (pid 1346): ubi_scan: process PEB 86
> UBI DBG (pid 1346): ubi_scan: process PEB 87
> UBI DBG (pid 1346): ubi_scan: process PEB 88
> UBI DBG (pid 1346): ubi_scan: process PEB 89
> UBI DBG (pid 1346): ubi_scan: process PEB 90
> UBI DBG (pid 1346): ubi_scan: process PEB 91
> UBI DBG (pid 1346): ubi_scan: process PEB 92
> UBI DBG (pid 1346): ubi_scan: process PEB 93
> UBI DBG (pid 1346): ubi_scan: process PEB 94
> UBI DBG (pid 1346): ubi_scan: process PEB 95
> UBI DBG (pid 1346): ubi_scan: process PEB 96
> UBI DBG (pid 1346): ubi_scan: process PEB 97
> UBI DBG (pid 1346): ubi_scan: process PEB 98
> UBI DBG (pid 1346): ubi_scan: process PEB 99
> UBI DBG (pid 1346): ubi_scan: process PEB 100
> UBI DBG (pid 1346): ubi_scan: process PEB 101
> UBI DBG (pid 1346): ubi_scan: process PEB 102
> UBI DBG (pid 1346): ubi_scan: process PEB 103
> UBI DBG (pid 1346): ubi_scan: process PEB 104
> UBI DBG (pid 1346): ubi_scan: process PEB 105
> UBI DBG (pid 1346): ubi_scan: process PEB 106
> UBI DBG (pid 1346): ubi_scan: process PEB 107
> UBI DBG (pid 1346): ubi_scan: process PEB 108
> UBI DBG (pid 1346): ubi_scan: process PEB 109
> UBI DBG (pid 1346): ubi_scan: process PEB 110
> UBI DBG (pid 1346): ubi_scan: process PEB 111
> UBI DBG (pid 1346): ubi_scan: process PEB 112
> UBI DBG (pid 1346): ubi_scan: process PEB 113
> UBI DBG (pid 1346): ubi_scan: process PEB 114
> UBI DBG (pid 1346): ubi_scan: process PEB 115
> UBI DBG (pid 1346): ubi_scan: process PEB 116
> UBI DBG (pid 1346): ubi_scan: process PEB 117
> UBI DBG (pid 1346): ubi_scan: process PEB 118
> UBI DBG (pid 1346): ubi_scan: process PEB 119
> UBI DBG (pid 1346): ubi_scan: process PEB 120
> UBI DBG (pid 1346): ubi_scan: process PEB 121
> UBI DBG (pid 1346): ubi_scan: process PEB 122
> UBI DBG (pid 1346): ubi_scan: process PEB 123
> UBI DBG (pid 1346): ubi_scan: process PEB 124
> UBI DBG (pid 1346): ubi_scan: process PEB 125
> UBI DBG (pid 1346): ubi_scan: process PEB 126
> UBI DBG (pid 1346): ubi_scan: process PEB 127
> UBI DBG (pid 1346): ubi_scan: process PEB 128
> UBI DBG (pid 1346): ubi_scan: process PEB 129
> UBI DBG (pid 1346): ubi_scan: process PEB 130
> UBI DBG (pid 1346): ubi_scan: process PEB 131
> UBI DBG (pid 1346): ubi_scan: process PEB 132
> UBI DBG (pid 1346): ubi_scan: process PEB 133
> UBI DBG (pid 1346): ubi_scan: process PEB 134
> UBI DBG (pid 1346): ubi_scan: process PEB 135
> UBI DBG (pid 1346): ubi_scan: process PEB 136
> UBI DBG (pid 1346): ubi_scan: process PEB 137
> UBI DBG (pid 1346): ubi_scan: process PEB 138
> UBI DBG (pid 1346): ubi_scan: process PEB 139
> UBI DBG (pid 1346): ubi_scan: process PEB 140
> UBI DBG (pid 1346): ubi_scan: process PEB 141
> UBI DBG (pid 1346): ubi_scan: process PEB 142
> UBI DBG (pid 1346): ubi_scan: process PEB 143
> UBI DBG (pid 1346): ubi_scan: process PEB 144
> UBI DBG (pid 1346): ubi_scan: process PEB 145
> UBI DBG (pid 1346): ubi_scan: process PEB 146
> UBI DBG (pid 1346): ubi_scan: process PEB 147
> UBI DBG (pid 1346): ubi_scan: process PEB 148
> UBI DBG (pid 1346): ubi_scan: process PEB 149
> UBI DBG (pid 1346): ubi_scan: process PEB 150
> UBI DBG (pid 1346): ubi_scan: process PEB 151
> UBI DBG (pid 1346): ubi_scan: process PEB 152
> UBI DBG (pid 1346): ubi_scan: process PEB 153
> UBI DBG (pid 1346): ubi_scan: process PEB 154
> UBI DBG (pid 1346): ubi_scan: process PEB 155
> UBI DBG (pid 1346): ubi_scan: process PEB 156
> UBI DBG (pid 1346): ubi_scan: process PEB 157
> UBI DBG (pid 1346): ubi_scan: process PEB 158
> UBI DBG (pid 1346): ubi_scan: process PEB 159
> UBI DBG (pid 1346): ubi_scan: process PEB 160
> UBI DBG (pid 1346): ubi_scan: process PEB 161
> UBI DBG (pid 1346): ubi_scan: process PEB 162
> UBI DBG (pid 1346): ubi_scan: process PEB 163
> UBI DBG (pid 1346): ubi_scan: process PEB 164
> UBI DBG (pid 1346): ubi_scan: process PEB 165
> UBI DBG (pid 1346): ubi_scan: process PEB 166
> UBI DBG (pid 1346): ubi_scan: process PEB 167
> UBI DBG (pid 1346): ubi_scan: process PEB 168
> UBI DBG (pid 1346): ubi_scan: process PEB 169
> UBI DBG (pid 1346): ubi_scan: process PEB 170
> UBI DBG (pid 1346): ubi_scan: process PEB 171
> UBI DBG (pid 1346): ubi_scan: process PEB 172
> UBI DBG (pid 1346): ubi_scan: process PEB 173
> UBI DBG (pid 1346): ubi_scan: process PEB 174
> UBI DBG (pid 1346): ubi_scan: process PEB 175
> UBI DBG (pid 1346): ubi_scan: process PEB 176
> UBI DBG (pid 1346): ubi_scan: process PEB 177
> UBI DBG (pid 1346): ubi_scan: process PEB 178
> UBI DBG (pid 1346): ubi_scan: process PEB 179
> UBI DBG (pid 1346): ubi_scan: process PEB 180
> UBI DBG (pid 1346): ubi_scan: process PEB 181
> UBI DBG (pid 1346): ubi_scan: process PEB 182
> UBI DBG (pid 1346): ubi_scan: process PEB 183
> UBI DBG (pid 1346): ubi_scan: process PEB 184
> UBI DBG (pid 1346): ubi_scan: process PEB 185
> UBI DBG (pid 1346): ubi_scan: process PEB 186
> UBI DBG (pid 1346): ubi_scan: process PEB 187
> UBI DBG (pid 1346): ubi_scan: process PEB 188
> UBI DBG (pid 1346): ubi_scan: process PEB 189
> UBI DBG (pid 1346): ubi_scan: process PEB 190
> UBI DBG (pid 1346): ubi_scan: process PEB 191
> UBI DBG (pid 1346): ubi_scan: process PEB 192
> UBI DBG (pid 1346): ubi_scan: process PEB 193
> UBI DBG (pid 1346): ubi_scan: process PEB 194
> UBI DBG (pid 1346): ubi_scan: process PEB 195
> UBI DBG (pid 1346): ubi_scan: process PEB 196
> UBI DBG (pid 1346): ubi_scan: process PEB 197
> UBI DBG (pid 1346): ubi_scan: process PEB 198
> UBI DBG (pid 1346): ubi_scan: process PEB 199
> UBI DBG (pid 1346): ubi_scan: process PEB 200
> UBI DBG (pid 1346): ubi_scan: process PEB 201
> UBI DBG (pid 1346): ubi_scan: process PEB 202
> UBI DBG (pid 1346): ubi_scan: process PEB 203
> UBI DBG (pid 1346): ubi_scan: process PEB 204
> UBI DBG (pid 1346): ubi_scan: process PEB 205
> UBI DBG (pid 1346): ubi_scan: process PEB 206
> UBI DBG (pid 1346): ubi_scan: process PEB 207
> UBI DBG (pid 1346): ubi_scan: scanning is finished
> UBI: max. sequence number:       145
> UBI DBG (pid 1346): process_lvol: check layout volume
> UBI DBG (pid 1346): uif_init: ubi0 major is 253
> UBI DBG (pid 1346): ubi_add_volume: add volume 0
> UBI: attached mtd5 to ubi0
> UBI: MTD device name:            "homefs"
> UBI: MTD device size:            52 MiB
> UBI: number of good PEBs:        208
> UBI: number of bad PEBs:         0
> UBI: number of corrupted PEBs:   0
> UBI: max. allowed volumes:       128
> UBI: wear-leveling threshold:    4096
> UBI: number of internal volumes: 1
> UBI: number of user volumes:     1
> UBI: available PEBs:             0
> UBI: total number of reserved PEBs: 208
> UBI: number of PEBs reserved for bad PEB handling: 0
> UBI: max/mean erase counter: 3/1
> UBI: image sequence number:  1966556915
> UBI: background thread "ubi_bgt0d" started, PID 1349
> UBI DBG (pid 1350): ubi_open_volume_path: open volume /dev/ubi0_0, mode 1
> UBI DBG (pid 1350): ubi_open_volume: open device 0, volume 0, mode 1
> UBI DBG (pid 1350): ubi_open_volume: open device 0, volume 0, mode 2
> UBI DBG (pid 1350): ubi_is_mapped: test LEB 0:0
> UBI DBG (pid 1350): ubi_leb_read: read 4096 bytes from LEB 0:0:0
> UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 1:0
> UBI DBG (pid 1350): ubi_leb_read: read 262016 bytes from LEB 0:1:0
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:0 (262016 bytes left)
> UBIFS DBG (pid 1352): ubifs_bg_thread: background thread "ubifs_bgt0_0" started, PID 1352
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:512 (261504 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:1024 (260992 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:1536 (260480 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:2048 (259968 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:2560 (259456 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:3072 (258944 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:3584 (258432 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:4096 (257920 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:4608 (257408 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:5120 (256896 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:5632 (256384 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 1:6144 (255872 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: hit empty space
> UBIFS DBG (pid 1350): ubifs_end_scan: stop scanning LEB 1 at offset 6144
> UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 2:0
> UBI DBG (pid 1350): ubi_leb_read: read 262016 bytes from LEB 0:2:0
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:0 (262016 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:512 (261504 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:1024 (260992 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:1536 (260480 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:2048 (259968 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:2560 (259456 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:3072 (258944 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:3584 (258432 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:4096 (257920 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:4608 (257408 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:5120 (256896 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:5632 (256384 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning master node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 2:6144 (255872 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: hit empty space
> UBIFS DBG (pid 1350): ubifs_end_scan: stop scanning LEB 2 at offset 6144
> UBI DBG (pid 1350): ubi_leb_read: read 88 bytes from LEB 0:12:221424
> UBIFS: recovery needed
> UBIFS DBG (pid 1350): ubifs_recover_inl_heads: checking index head at 12:221512
> UBI DBG (pid 1350): ubi_leb_read: read 8 bytes from LEB 0:12:221512
> UBIFS DBG (pid 1350): ubifs_recover_inl_heads: checking LPT head at 7:2296
> UBI DBG (pid 1350): ubi_leb_read: read 8 bytes from LEB 0:7:2296
> UBI DBG (pid 1350): ubi_leb_read: read 12 bytes from LEB 0:7:1960
> UBI DBG (pid 1350): ubi_leb_unmap: unmap LEB 0:8
> UBI DBG (pid 1350): ubi_leb_read: read 13 bytes from LEB 0:7:2279
> UBI DBG (pid 1350): ubi_leb_read: read 13 bytes from LEB 0:7:2168
> UBI DBG (pid 1350): ubi_leb_read: read 13 bytes from LEB 0:7:1990
> UBI DBG (pid 1350): ubi_leb_read: read 18 bytes from LEB 0:7:1972
> UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 5:0
> UBI DBG (pid 1350): ubi_leb_read: read 262016 bytes from LEB 0:5:0
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 5:0 (262016 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning commit start node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 5:32 (261984 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 5:96 (261920 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 5:160 (261856 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 5:224 (261792 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 5:288 (261728 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: hit empty space
> UBIFS DBG (pid 1350): ubifs_end_scan: stop scanning LEB 5 at offset 288
> UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 6:0
> UBI DBG (pid 1350): ubi_leb_read: read 262016 bytes from LEB 0:6:0
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:0 (262016 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning commit start node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:32 (261984 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:96 (261920 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:160 (261856 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:224 (261792 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:288 (261728 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:352 (261664 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:416 (261600 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:480 (261536 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:544 (261472 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:608 (261408 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:672 (261344 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:736 (261280 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:800 (261216 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:864 (261152 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:928 (261088 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:992 (261024 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:1056 (260960 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:1120 (260896 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:1184 (260832 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:1248 (260768 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:1312 (260704 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:1376 (260640 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning reference node
> UBIFS DBG (pid 1350): ubifs_scan: look at LEB 6:1440 (260576 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: hit empty space
> UBIFS DBG (pid 1350): ubifs_end_scan: stop scanning LEB 6 at offset 1440
> UBIFS DBG (pid 1350): ubifs_recover_leb: 86:1920
> UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 86:1920
> UBI DBG (pid 1350): ubi_leb_read: read 260096 bytes from LEB 0:86:1920
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:1920 (260096 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:2080 (259936 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:2240 (259776 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:2400 (259616 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:2560 (259456 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:2720 (259296 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:2880 (259136 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:3040 (258976 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:3200 (258816 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:3360 (258656 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:3520 (258496 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:3680 (258336 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:3840 (258176 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: ing inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:18080 (243936 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:18240 (243776 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:18400 (243616 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:18560 (243456 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:18720 (243296 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:18880 (243136 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:19040 (242976 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:19200 (242816 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:19360 (242656 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:19520 (242496 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:19680 (242336 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:19840 (242176 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:20000 (242016 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:20160 (241856 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:20320 (241696 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:20480 (241536 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:20640 (241376 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:20800 (241216 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:20960 (241056 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:21120 (240896 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:21280 (240736 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:21440 (240576 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:21600 (240416 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:21760 (240256 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:21920 (240096 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:22080 (239936 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:22240 (239776 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:22400 (239616 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:22560 (239456 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:22720 (239296 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:22880 (239136 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:23040 (238976 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:23200 (238816 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:23360 (238656 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:23520 (238496 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:23680 (238336 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:23840 (238176 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:24000 (238016 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:24160 (237856 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:24320 (237696 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:24480 (237536 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:24640 (237376 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:24800 (237216 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:24960 (237056 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:25120 (236896 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:25280 (236736 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:25440 (236576 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:25600 (236416 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:25760 (236256 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:25920 (236096 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:26080 (235936 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:26240 (235776 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:26400 (235616 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:26560 (235456 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:26720 (235296 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:26880 (235136 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:27040 (234976 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning inode node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 86:27200 (234816 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: hit empty space
> UBIFS DBG (pid 1350): ubifs_end_scan: stop scanning LEB 86 at offset 27200
> UBIFS DBG (pid 1350): ubifs_recover_leb: 89:4144
> UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 89:4144
> UBI DBG (pid 1350): ubi_leb_read: read 257872 bytes from LEB 0:89:4144
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:4144 (257872 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:8288 (253728 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:12432 (249584 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:16576 (245440 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:20720 (241296 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:24864 (237152 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:29008 (233008 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:33152 (228864 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:37296 (224720 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:41440 (220576 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:45584 (216432 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:49728 (212288 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:53872 (208144 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:58016 (204000 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:62160 (199856 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:66304 (195712 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:70448 (191568 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:74592 (187424 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:78736 (183280 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:82880 (179136 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:87024 (174992 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:91168 (170848 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:95312 (166704 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:99456 (162560 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:103600 (158416 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:107744 (154272 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:111888 (150128 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:116032 (145984 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:120176 (141840 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:124320 (137696 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:128464 (133552 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:132608 (129408 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:136752 (125264 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:140896 (121120 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:145040 (116976 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:149184 (112832 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:153328 (108688 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:157472 (104544 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:161616 (100400 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:165760 (96256 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:169904 (92112 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:174048 (87968 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:178192 (83824 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:182336 (79680 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:186480 (75536 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:190624 (71392 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:194768 (67248 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:198912 (63104 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:203056 (58960 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:207200 (54816 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:211344 (50672 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:215488 (46528 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:219632 (42384 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:223776 (38240 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:227920 (34096 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:232064 (29952 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:236208 (25808 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:240352 (21664 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:244496 (17520 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:248640 (13376 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:252784 (9232 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:256928 (5088 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 89:261072 (944 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: hit empty space
> UBIFS DBG (pid 1350): ubifs_end_scan: stop scanning LEB 89 at offset 261072
> UBIFS DBG (pid 1350): ubifs_recover_leb: 57:0
> UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 57:0
> UBI DBG (pid 1350): ubi_leb_read: read 262016 bytes from LEB 0:57:0
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:0 (262016 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:4144 (257872 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:8288 (253728 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:12432 (249584 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:16576 (245440 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:20720 (241296 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:24864 (237152 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:29008 (233008 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:33152 (228864 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:37296 (224720 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:41440 (220576 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:45584 (216432 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:49728 (212288 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:53872 (208144 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:58016 (204000 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:62160 (199856 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:66304 (195712 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:70448 (191568 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:74592 (187424 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:78736 (183280 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:82880 (179136 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:87024 (174992 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:91168 (170848 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:95312 (166704 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:99456 (162560 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:103600 (158416 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:107744 (154272 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:111888 (150128 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:116032 (145984 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:120176 (141840 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:124320 (137696 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:128464 (133552 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:132608 (129408 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:136752 (125264 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:140896 (121120 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:145040 (116976 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:149184 (112832 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:153328 (108688 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:157472 (104544 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:161616 (100400 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:165760 (96256 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:169904 (92112 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:174048 (87968 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:178192 (83824 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:182336 (79680 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:186480 (75536 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:190624 (71392 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:194768 (67248 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:198912 (63104 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:203056 (58960 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:207200 (54816 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:211344 (50672 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:215488 (46528 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:219632 (42384 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:223776 (38240 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:227920 (34096 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:232064 (29952 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:236208 (25808 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:240352 (21664 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:244496 (17520 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:248640 (13376 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:252784 (9232 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:256928 (5088 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 57:261072 (944 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: hit empty space
> UBIFS DBG (pid 1350): ubifs_end_scan: stop scanning LEB 57 at offset 261072
> UBIFS DBG (pid 1350): ubifs_recover_leb: 11:0
> UBIFS DBG (pid 1350): ubifs_start_scan: scan LEB 11:0
> UBI DBG (pid 1350): ubi_leb_read: read 262016 bytes from LEB 0:11:0
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:0 (262016 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:4144 (257872 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:8288 (253728 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:12432 (249584 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:16576 (245440 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:20720 (241296 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:24864 (237152 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:29008 (233008 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:33152 (228864 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:37296 (224720 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:41440 (220576 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:45584 (216432 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:49728 (212288 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:53872 (208144 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:58016 (204000 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:62160 (199856 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:66304 (195712 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:70448 (191568 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:74592 (187424 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:78736 (183280 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:82880 (179136 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:87024 (174992 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:91168 (170848 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:95312 (166704 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:99456 (162560 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:103600 (158416 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:107744 (154272 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:111888 (150128 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:116032 (145984 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:120176 (141840 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:124320 (137696 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:128464 (133552 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning data node
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:132608 (129408 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning unknown node
> UBIFS DBG (pid 1350): no_more_nodes: unexpected bad common header at 11:132608
> UBIFS DBG (pid 1350): ubifs_recover_leb: look at LEB 11:132608 (129408 bytes left)
> UBIFS DBG (pid 1350): ubifs_scan_a_node: scanning unknown node
> UBIFS error (pid 1350): ubifs_check_node: bad node type 255
> UBIFS error (pid 1350): ubifs_check_node: bad node at LEB 11:132608
> 	magic          0x6101831
> 	crc            0x495c96f5
> 	node_type      255 (unknown node)
> 	group_type     255 (unknown)
> 	sqnum          281470681808895
> 	len            65535
> node type 255 was not recognized
> Call Trace:
> [c6037b80] [c0007ecc] show_stack+0x4c/0x16c (unreliable)
> [c6037bc0] [c013e980] ubifs_check_node+0x17c/0x308
> [c6037be0] [c0147dec] ubifs_scan_a_node+0x15c/0x2d8
> [c6037c10] [c015d1c0] ubifs_recover_leb+0x3f0/0x940
> [c6037c80] [c01486fc] replay_buds+0xb4/0xb4c
> [c6037d20] [c0149894] ubifs_replay_journal+0x700/0xf48
> [c6037da0] [c013b060] ubifs_fill_super+0xda0/0x1600
> [c6037e00] [c013cbb4] ubifs_get_sb+0x10c/0x344
> [c6037e80] [c007b9a4] vfs_kern_mount+0x60/0x150
> [c6037ea0] [c007bae4] do_kern_mount+0x40/0x100
> [c6037ec0] [c00926c0] do_mount+0x40c/0x718
> [c6037f10] [c0092a5c] sys_mount+0x90/0xd8
> [c6037f40] [c0010b44] ret_from_syscall+0x0/0x38
> --- Exception: c01 at 0xfe93d18
>     LR = 0x1000347c
> UBIFS DBG (pid 1350): no_more_nodes: unexpected bad common header at 11:132608
> UBIFS error (pid 1350): ubifs_recover_leb: bad node
> UBIFS error (pid 1350): ubifs_scanned_corruption: corruption at LEB 11:132608
> UBIFS error (pid 1350): ubifs_scanned_corruption: first 8192 bytes from LEB 11:132608
> 00000000: 31181006 f5965c49 ffff0000 ffff0000 ffff0000 ffff0000 ffff0000 ffff0020  1.....\I....................... 
> 00000020: 00000000 00000000 00100000 00000000 f747be92 df3f8fc0 f1e9a37c 01b63b8c  .................G...?.....|..;.
> 00000040: b8b202a5 e569195d 38bdb7e7 b57d99ac c4583ea3 97cd6388 b60604b8 bc3f4474  .....i.]8....}...X>...c......?Dt
> 00000060: f24619d7 b03235e8 efeccfa4 6969512d c18fd058 5d33e013 39e4cbf5 23106915  .F...25.....iiQ-...X]3..9...#.i.
> 00000080: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000000a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000000c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000000e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000100: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000120: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000140: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000160: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000180: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000001a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000001c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000001e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000200: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000220: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000240: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000260: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000280: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000002a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000002c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000002e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000300: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000320: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000340: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000360: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000380: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000003a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000003c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000003e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000400: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000420: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000440: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000460: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000480: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000004a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000004c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000004e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000500: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000520: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000540: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000560: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000580: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000005a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000005c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000005e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000600: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000620: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000640: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000660: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000680: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000006a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000006c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000006e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000700: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000720: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000740: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000760: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000780: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000007a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000007c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000007e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000800: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000820: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000840: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000860: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000880: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000008a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000008c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000008e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000900: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000920: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000940: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000960: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000980: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000009a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000009c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000009e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000a00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000a20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000a40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000a60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000a80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000aa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ac0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ae0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000b00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000b20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000b40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000b60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000b80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ba0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000bc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000be0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000c00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000c20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000c40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000c60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000c80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ca0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000cc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ce0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000d00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000d20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000d40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000d60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000d80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000da0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000dc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000de0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000e00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000e20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000e40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000e60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000e80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ea0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ec0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000ee0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000f00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000f20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000f40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000f60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000f80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000fa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000fc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00000fe0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001000: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001020: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001040: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001060: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001080: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000010a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000010c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000010e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001100: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001120: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001140: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001160: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001180: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000011a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000011c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000011e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001200: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001220: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001240: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001260: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001280: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000012a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000012c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000012e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001300: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001320: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001340: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001360: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001380: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000013a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000013c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000013e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001400: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001420: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001440: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001460: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001480: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000014a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000014c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000014e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001500: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001520: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001540: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001560: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001580: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000015a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000015c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000015e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001600: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001620: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001640: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001660: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001680: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000016a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000016c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000016e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001700: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001720: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001740: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001760: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001780: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000017a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000017c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000017e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001800: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001820: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001840: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001860: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001880: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000018a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000018c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000018e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001900: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001920: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001940: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001960: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001980: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000019a0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000019c0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 000019e0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001a00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001a20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001a40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001a60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001a80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001aa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ac0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ae0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001b00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001b20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001b40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001b60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001b80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ba0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001bc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001be0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001c00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001c20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001c40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001c60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001c80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ca0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001cc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ce0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001d00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001d20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001d40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001d60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001d80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001da0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001dc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001de0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001e00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001e20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001e40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001e60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001e80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ea0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ec0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001ee0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001f00: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001f20: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001f40: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001f60: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001f80: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001fa0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001fc0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> 00001fe0: ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff  ................................
> UBIFS error (pid 1350): ubifs_recover_leb: LEB 11 scanning failed
> UBIFS DBG (pid 1352): ubifs_bg_thread: background thread "ubifs_bgt0_0" stops
> 
> Thanks,
> Anatolij
> 
> --
> DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
> 



From agust at denx.de  Tue Nov 30 10:35:41 2010
From: agust at denx.de (Anatolij Gustschin)
Date: Tue, 30 Nov 2010 16:35:41 +0100
Subject: UBIFS partition on NOR flash not mountable after power cut test
In-Reply-To: <4CF4D4CA.8040906@aimvalley.nl>
References: <20101129195014.19224240@wker>
	<4CF4D4CA.8040906@aimvalley.nl>
Message-ID: <20101130163541.44c48a94@wker>

Hi Norbert,

On Tue, 30 Nov 2010 11:41:14 +0100
Norbert van Bolhuis <nvbolhuis at aimvalley.nl> wrote:

> Did you read the mail discussions
> "UBIFS Corrupt during power failure"
> dated april 2009 from Eric Holmberg.
> 
> He did some great work in making UBIFS on NOR flash
> more reliable for power-cuts.

I have partially read the thread "UBIFS Corrupt during power 
failure", especially the discussion from March, May, June and July
2009 but not the whole discussion from April.

> One of the problems was UBI/UBIFS assumes a (CFI) write
> buffer size of 8 bytes. Maybe this is still the case.
> I think for your NOR flash it is 64 bytes though.

Thanks for the hint!

Yes, I remember Eric saying that he used 8 byte write buffers but
still had some failures. Therefore I didn't try to reduce the write
buffer size up to now. But these problems seem to be fixed meanwhile.

The write buffer size used in the CFI driver is indeed 64 bytes. Now
I'm running the tests with write buffer size reduced to 8 bytes and
it looks much better now. After 295 test cycles I haven't seen the
issue so far.

Thanks again,
Anatolij

--
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de


From pat-estes at sbcglobal.net  Tue Nov 30 11:30:18 2010
From: pat-estes at sbcglobal.net (pat-estes at sbcglobal.net)
Date: Tue, 30 Nov 2010 08:30:18 -0800 (PST)
Subject: =?iso-8859-1?Q?Your_Email_Id_has_won_=A31=2C000=2C000=2E00=2E_in_the_Brit?=
	=?iso-8859-1?Q?ish_Xmas_Grant_Promo=2E_send_your?=
Message-ID: <402513.43676.qm@web82505.mail.mud.yahoo.com>


Name....Location...Country....








From tony at atomide.com  Tue Nov 30 13:05:42 2010
From: tony at atomide.com (Tony Lindgren)
Date: Tue, 30 Nov 2010 10:05:42 -0800
Subject: [PATCH V2] omap: nand: remove hardware ECC as default
In-Reply-To: <1290177926-3526-1-git-send-email-s-ghorai@ti.com>
References: <1290177926-3526-1-git-send-email-s-ghorai@ti.com>
Message-ID: <20101130180542.GP17222@atomide.com>

* Sukumar Ghorai <s-ghorai at ti.com> [101119 06:36]:
> CONFIG_MTD_NAND_OMAP_HWECC defined wrongly in patch submitted for 2.6.36.
> This flag enables hw ecc by default. Boards like beagle and pandora uses
> sw ecc for write (e.g. binary flushed from u-boot) and read from kernel.
> https://patchwork.kernel.org/patch/111036/
> 
> Signed-off-by: Sukumar Ghorai <s-ghorai at ti.com>

This should go in as a fix for the -rc via MTD list if possible.

Acked-by: Tony Lindgren <tony at atomide.com>

> ---
>  drivers/mtd/nand/omap2.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
> index cd41c58..15682ec 100644
> --- a/drivers/mtd/nand/omap2.c
> +++ b/drivers/mtd/nand/omap2.c
> @@ -7,7 +7,6 @@
>   * it under the terms of the GNU General Public License version 2 as
>   * published by the Free Software Foundation.
>   */
> -#define CONFIG_MTD_NAND_OMAP_HWECC
>  
>  #include <linux/platform_device.h>
>  #include <linux/dma-mapping.h>
> -- 
> 1.7.0.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


From tony at atomide.com  Tue Nov 30 13:09:59 2010
From: tony at atomide.com (Tony Lindgren)
Date: Tue, 30 Nov 2010 10:09:59 -0800
Subject: [PATCH V2] omap: nand: remove hardware ECC as default
In-Reply-To: <20101130180542.GP17222@atomide.com>
References: <1290177926-3526-1-git-send-email-s-ghorai@ti.com>
	<20101130180542.GP17222@atomide.com>
Message-ID: <20101130180958.GQ17222@atomide.com>

* Tony Lindgren <tony at atomide.com> [101130 09:56]:
> * Sukumar Ghorai <s-ghorai at ti.com> [101119 06:36]:
> > CONFIG_MTD_NAND_OMAP_HWECC defined wrongly in patch submitted for 2.6.36.
> > This flag enables hw ecc by default. Boards like beagle and pandora uses
> > sw ecc for write (e.g. binary flushed from u-boot) and read from kernel.
> > https://patchwork.kernel.org/patch/111036/

Although instead of the link above it should say:

Commit 2c01946c6b9ebaa5a89710bc42ca224a7f52f227 (omap3 nand: cleanup
virtual address usages) wrongly enabled CONFIG_MTD_NAND_OMAP_HWECC
which breaks boards like beagle and pandora that use software ECC
for write.
 
> > Signed-off-by: Sukumar Ghorai <s-ghorai at ti.com>
> 
> This should go in as a fix for the -rc via MTD list if possible.
> 
> Acked-by: Tony Lindgren <tony at atomide.com>
> 
> > ---
> >  drivers/mtd/nand/omap2.c |    1 -
> >  1 files changed, 0 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
> > index cd41c58..15682ec 100644
> > --- a/drivers/mtd/nand/omap2.c
> > +++ b/drivers/mtd/nand/omap2.c
> > @@ -7,7 +7,6 @@
> >   * it under the terms of the GNU General Public License version 2 as
> >   * published by the Free Software Foundation.
> >   */
> > -#define CONFIG_MTD_NAND_OMAP_HWECC
> >  
> >  #include <linux/platform_device.h>
> >  #include <linux/dma-mapping.h>
> > -- 
> > 1.7.0.4
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> > the body of a message to majordomo at vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


From kmpark at infradead.org  Thu Nov  4 08:47:34 2010
From: kmpark at infradead.org (Kyungmin Park)
Date: Thu, 04 Nov 2010 12:47:34 -0000
Subject: [PATCHv2 0/3] mtd: onenand: add cache program feature for 4kb
	page onenand
In-Reply-To: <20101104124016.GA13312@nokia.com>
References: <1288781721-31771-1-git-send-email-roman.tereshonkov@nokia.com>
	<AANLkTikUSTnPedgdP19_bNbhOtSdfApdyCLKMyn+6Ext@mail.gmail.com>
	<E1C7579D1379824DAE67858071C810383717438EEF@NOK-EUMSG-02.mgdnok.nokia.com>
	<AANLkTikrO1BC7LuUCzuNg7b3gAuC=DYLKLRnFh4rPoco@mail.gmail.com>
	<20101104124016.GA13312@nokia.com>
Message-ID: <AANLkTimJK4H00ug-SCybUcMYq+QrSMncfZ7hrCYyegec@mail.gmail.com>

I think it has some slow write performance since two page write is lower
than one page. It means cache program is not work as expected.
That's reason no warning message. In my case I enabled the sync write and
get 10MiB or more performance. Please see my speedtest result.

Thank you,
Kyungmin Park

Sent from Android
On Nov 4, 2010 9:40 PM, "Roman Tereshonkov" <roman.tereshonkov at nokia.com>
wrote:
>
> Hi Park,
>
> I tried several times
> fsstress -p 3 -n 10000 -d /mnt/ubifs
> for 28 MB onenand partition. No warnings observed.
> The logs are below.
>
>
> # modprobe ubi mtd=4
> [ 101.013549] UBI: attaching mtd4 to ubi0
> [ 101.017486] UBI: physical eraseblock size: 262144 bytes (256 KiB)
> [ 101.023895] UBI: logical eraseblock size: 253952 bytes
> [ 101.029510] UBI: smallest flash I/O unit: 4096
> [ 101.034271] UBI: VID header offset: 4096 (aligned 4096)
> [ 101.040405] UBI: data offset: 8192
> [ 101.054565] UBI: empty MTD device detected
> [ 101.058868] UBI: create volume table (copy #1)
> [ 101.067504] UBI: create volume table (copy #2)
> [ 101.077239] UBI: attached mtd4 to ubi0
> [ 101.081054] UBI: MTD device name: "swap"
> [ 101.086090] UBI: MTD device size: 32 MiB
> [ 101.091033] UBI: number of good PEBs: 123
> [ 101.095733] UBI: number of bad PEBs: 5
> [ 101.100280] UBI: max. allowed volumes: 128
> [ 101.104949] UBI: wear-leveling threshold: 8192
> [ 101.109771] UBI: number of internal volumes: 1
> [ 101.114257] UBI: number of user volumes: 0
> [ 101.118804] UBI: available PEBs: 117
> [ 101.123504] UBI: total number of reserved PEBs: 6
> [ 101.128295] UBI: number of PEBs reserved for bad PEB handling: 2
> [ 101.134399] UBI: max/mean erase counter: 0/0
> [ 101.138763] UBI: image sequence number: 0
> [ 101.142852] UBI: background thread "ubi_bgt0d" started, PID 104
> [ 101.150085] modprobe used greatest stack depth: 6068 bytes left
> # modprobe ubifs
> # ubimkvol /dev/ubi0 -N test -m
> Set volume size to 29712384
> Volume ID 0, size 117 LEBs (29712384 bytes, 28.3 MiB), LEB size [
111.348449] ubimkvol used greatest stack depth: 5820 bytes left
> 253952 bytes (248.0 KiB), dynamic, name "test", alignment 1
> #mount -t ubifs ubi0_0 /mnt/ubifs
> [ 133.515991] UBIFS: default file-system created
> [ 133.565490] UBIFS: mounted UBI device 0, volume 0, name "test"
> [ 133.571594] UBIFS: file system size: 27426816 bytes (26784 KiB, 26 MiB,
108 LEBs)
> [ 133.579406] UBIFS: journal size: 2031617 bytes (1984 KiB, 1 MiB, 6 LEBs)
> [ 133.586791] UBIFS: media format: w4/r0 (latest is w4/r0)
> [ 133.592712] UBIFS: default compressor: lzo
> [ 133.596893] UBIFS: reserved for root: 1295435 bytes (1265 KiB)
> [ 133.604675] mount used greatest stack depth: 5768 bytes left
> # fsstress -p 3 -n 10 -d /mnt/ubifs
> seed = 397323
> # fsstress -p 3 -n 100 -d /mnt/ubifs
> seed = 826848
> # fsstress -p 3 -n 1000 -d /mnt/ubifs
> seed = 209658
> # fsstress -p 3 -n 10000 -d /mnt/ubifs
> seed = 748381
> #
>
>
> mtd_speedtest gives no warnings also. Only bad block related errors:
>
> # insmod mtd_speedtest.ko dev=4
> [ 23.759948]
> [ 23.761505] =================================================
> [ 23.767639] mtd_speedtest: MTD device: 4
> [ 23.771728] mtd_speedtest: MTD device size 33554432, eraseblock size
262144, page size 4096, count of eraseblocks 128, pages per eraseblock 64,
OOB size 128
> [ 23.800933] mtd_speedtest: scanning for bad eraseblocks
> [ 23.808441] Bad eraseblock 42 at 0x00a80000
> [ 23.812713] mtd_speedtest: block 22 is bad
> [ 23.818542] Bad eraseblock 60 at 0x00f00000
> [ 23.822814] mtd_speedtest: block 40 is bad
> [ 23.827423] Bad eraseblock 65 at 0x01040000
> [ 23.831665] mtd_speedtest: block 45 is bad
> [ 23.837860] Bad eraseblock 87 at 0x015c0000
> [ 23.842163] mtd_speedtest: block 67 is bad
> [ 23.850891] Bad eraseblock 136 at 0x02200000
> [ 23.855224] mtd_speedtest: block 116 is bad
> [ 23.860534] mtd_speedtest: scanned 128 eraseblocks, 5 are bad
> [ 24.010498] mtd_speedtest: testing eraseblock write speed
> [ 26.267669] mtd_speedtest: eraseblock write speed is 13988 KiB/s
> [ 26.273803] mtd_speedtest: testing eraseblock read speed
> [ 27.286437] mtd_speedtest: eraseblock read speed is 31269 KiB/s
> [ 27.430114] mtd_speedtest: testing page write speed
> [ 36.082855] mtd_speedtest: page write speed is 3641 KiB/s
> [ 36.088409] mtd_speedtest: testing page read speed
> [ 37.086517] mtd_speedtest: page read speed is 31678 KiB/s
> [ 37.444854] mtd_speedtest: testing 2 page write speed
> [ 60.709533] mtd_speedtest: 2 page write speed is 1353 KiB/s
> [ 60.715148] mtd_speedtest: testing 2 page read speed
> [ 61.624176] mtd_speedtest: 2 page read speed is 34870 KiB/s
> [ 61.629791] mtd_speedtest: Testing erase speed
> [ 61.868347] mtd_speedtest: erase speed is 133991 KiB/s
> [ 61.873565] mtd_speedtest: finished
> [ 61.877105] =================================================
>
>
>
> Regards
> Roman Tereshonkov
>
> On Thu, Nov 04, 2010 at 10:10:36AM +0100, ext Kyungmin Park wrote:
>> On Thu, Nov 4, 2010 at 5:58 PM, <roman.tereshonkov at nokia.com> wrote:
>> >
>> > Hi,
>> >
>> >
>> > I used driver/mtd/tests and did not observe any warnings except a
couple of bad blocks for some boards.
>> Yes in case of mtd_test* there's no messages.
>> >
>> > Can you discribe your test case for me to reproduce it. And show your
kernel log when it happens if possible?
>> > Is it for 2kb or 4kb page onenand?
>>
>> Mount ubifs on OneNAND which has 4KiB pagesize and run fsstress -p 3
>> -n 1000000000 -d /ubifs
>>
>> then you can or maybe see the UBI scrubbing message.
>>
>> Thank you,
>> Kyungmin Park
>> >
>> >
>> > Regards
>> > Roman Tereshonkov
>> >
>> >
>> >>-----Original Message-----
>> >>From: kyungmin78 at gmail.com [mailto:kyungmin78 at gmail.com] On
>> >>Behalf Of ext Kyungmin Park
>> >>Sent: 04 November, 2010 03:15
>> >>To: Tereshonkov Roman (Nokia-MS/Helsinki)
>> >>Cc: linux-mtd at lists.infradead.org
>> >>Subject: Re: [PATCHv2 0/3] mtd: onenand: add cache program
>> >>feature for 4kb page onenand
>> >>
>> >>Hi,
>> >>
>> >>One concern is that after apply patch, there are some 1-bit ECC
>> >>warnings so UBI scrubbing messages are displayed.
>> >>
>> >>Are there these message at your board?
>> >>
>> >>Thank you,
>> >>Kyungmin Park
>> >>
>> >>On Wed, Nov 3, 2010 at 7:55 PM, Roman Tereshonkov
>> >><roman.tereshonkov at nokia.com> wrote:
>> >>> Implement cache program feature for 4KB page onenand.
>> >>> This feature improves the write data performance.
>> >>> The observed 128KB data program speed change is
>> >>> from 8827KB/s to 14156 KB/s when the feature is enabled.
>> >>>
>> >>> Roman Tereshonkov (3):
>> >>>  mtd: onenand: add option and variable for cache program feature
>> >>>  mtd: onenand: fix omap2 code to handle cache program feature
>> >>>  mtd: onenand: implement cache program feature for 4kb page onenand
>> >>>
>> >>>  drivers/mtd/onenand/omap2.c        |   12 +++++++++---
>> >>>  drivers/mtd/onenand/onenand_base.c |   22 +++++++++++++++++++---
>> >>>  include/linux/mtd/onenand.h        |   12 ++++++++++++
>> >>>  3 files changed, 40 insertions(+), 6 deletions(-)
>> >>>
>> >>>
>> >>> ______________________________________________________
>> >>> Linux MTD discussion mailing list
>> >>> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>> >>>
>> >>
>> > ______________________________________________________
>> > Linux MTD discussion mailing list
>> > http://lists.infradead.org/mailman/listinfo/linux-mtd/
>> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20101104/6e8054f8/attachment-0001.html>

From justinmattock at gmail.com  Sat Nov 27 01:21:41 2010
From: justinmattock at gmail.com (Justin P. Mattock)
Date: Sat, 27 Nov 2010 06:21:41 -0000
Subject: [RFC 1/9]drivers:infiniband:hw:mthca Change the copyright info.
In-Reply-To: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
References: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
Message-ID: <1290838879-11038-2-git-send-email-justinmattock@gmail.com>

Change the copyright info from Sun Microsystems to Oracle since Oracle now owns them.

Signed-off-by: Justin P. Mattock <justinmattock at gmail.com>

---
 drivers/infiniband/hw/amso1100/c2_cq.c       |    2 +-
 drivers/infiniband/hw/mthca/mthca_av.c       |    2 +-
 drivers/infiniband/hw/mthca/mthca_cq.c       |    2 +-
 drivers/infiniband/hw/mthca/mthca_dev.h      |    2 +-
 drivers/infiniband/hw/mthca/mthca_doorbell.h |    2 +-
 drivers/infiniband/hw/mthca/mthca_main.c     |    2 +-
 drivers/infiniband/hw/mthca/mthca_provider.c |    2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/infiniband/hw/amso1100/c2_cq.c b/drivers/infiniband/hw/amso1100/c2_cq.c
index 49e0e85..2235d43 100644
--- a/drivers/infiniband/hw/amso1100/c2_cq.c
+++ b/drivers/infiniband/hw/amso1100/c2_cq.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2004, 2005 Topspin Communications.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2005 Cisco Systems, Inc. All rights reserved.
  * Copyright (c) 2005 Mellanox Technologies. All rights reserved.
  * Copyright (c) 2004 Voltaire, Inc. All rights reserved.
diff --git a/drivers/infiniband/hw/mthca/mthca_av.c b/drivers/infiniband/hw/mthca/mthca_av.c
index 32f6c63..e882071 100644
--- a/drivers/infiniband/hw/mthca/mthca_av.c
+++ b/drivers/infiniband/hw/mthca/mthca_av.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2004 Topspin Communications.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
diff --git a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c
index 18ee3fa..3a68bdc 100644
--- a/drivers/infiniband/hw/mthca/mthca_cq.c
+++ b/drivers/infiniband/hw/mthca/mthca_cq.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2004, 2005 Topspin Communications.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2005, 2006 Cisco Systems, Inc. All rights reserved.
  * Copyright (c) 2005 Mellanox Technologies. All rights reserved.
  * Copyright (c) 2004 Voltaire, Inc. All rights reserved.
diff --git a/drivers/infiniband/hw/mthca/mthca_dev.h b/drivers/infiniband/hw/mthca/mthca_dev.h
index 7e6a6d6..2af6812 100644
--- a/drivers/infiniband/hw/mthca/mthca_dev.h
+++ b/drivers/infiniband/hw/mthca/mthca_dev.h
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2004, 2005 Topspin Communications.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2005, 2006 Cisco Systems.  All rights reserved.
  * Copyright (c) 2005 Mellanox Technologies. All rights reserved.
  * Copyright (c) 2004 Voltaire, Inc. All rights reserved.
diff --git a/drivers/infiniband/hw/mthca/mthca_doorbell.h b/drivers/infiniband/hw/mthca/mthca_doorbell.h
index 14f51ef..c139265 100644
--- a/drivers/infiniband/hw/mthca/mthca_doorbell.h
+++ b/drivers/infiniband/hw/mthca/mthca_doorbell.h
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2004 Topspin Communications.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2005 Mellanox Technologies. All rights reserved.
  *
  * This software is available to you under a choice of one of two
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c
index 5eee666..7ff36b0 100644
--- a/drivers/infiniband/hw/mthca/mthca_main.c
+++ b/drivers/infiniband/hw/mthca/mthca_main.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2004, 2005 Topspin Communications.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2005 Mellanox Technologies. All rights reserved.
  *
  * This software is available to you under a choice of one of two
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c
index 1e0b4b6..7fb8b4f 100644
--- a/drivers/infiniband/hw/mthca/mthca_provider.c
+++ b/drivers/infiniband/hw/mthca/mthca_provider.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2004, 2005 Topspin Communications.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2005, 2006 Cisco Systems.  All rights reserved.
  * Copyright (c) 2005 Mellanox Technologies. All rights reserved.
  * Copyright (c) 2004 Voltaire, Inc. All rights reserved.
-- 
1.7.1



From justinmattock at gmail.com  Sat Nov 27 01:21:43 2010
From: justinmattock at gmail.com (Justin P. Mattock)
Date: Sat, 27 Nov 2010 06:21:43 -0000
Subject: [RFC 2/9]drivers:infiniband:core Change the copyright info.
In-Reply-To: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
References: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
Message-ID: <1290838879-11038-3-git-send-email-justinmattock@gmail.com>

Change the copyright info from Sun Microsystems to Oracle since Oracle now owns them.

Signed-off-by: Justin P. Mattock <justinmattock at gmail.com>

---
 drivers/infiniband/core/agent.c     |    2 +-
 drivers/infiniband/core/cache.c     |    2 +-
 drivers/infiniband/core/cm.c        |    2 +-
 drivers/infiniband/core/device.c    |    2 +-
 drivers/infiniband/core/fmr_pool.c  |    2 +-
 drivers/infiniband/core/iwcm.c      |    2 +-
 drivers/infiniband/core/mad_priv.h  |    2 +-
 drivers/infiniband/core/packer.c    |    2 +-
 drivers/infiniband/core/smi.c       |    2 +-
 drivers/infiniband/core/sysfs.c     |    2 +-
 drivers/infiniband/core/ud_header.c |    2 +-
 drivers/infiniband/core/user_mad.c  |    2 +-
 drivers/infiniband/core/verbs.c     |    2 +-
 13 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/infiniband/core/agent.c b/drivers/infiniband/core/agent.c
index 91916a8..5152553 100644
--- a/drivers/infiniband/core/agent.c
+++ b/drivers/infiniband/core/agent.c
@@ -4,7 +4,7 @@
  * Copyright (c) 2004, 2005 Intel Corporation.  All rights reserved.
  * Copyright (c) 2004, 2005 Topspin Corporation.  All rights reserved.
  * Copyright (c) 2004-2007 Voltaire Corporation.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c
index 6888356..dcf17a1 100644
--- a/drivers/infiniband/core/cache.c
+++ b/drivers/infiniband/core/cache.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2004 Topspin Communications.  All rights reserved.
  * Copyright (c) 2005 Intel Corporation. All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2005 Voltaire, Inc. All rights reserved.
  *
  * This software is available to you under a choice of one of two
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index 64e0903..d0f37d5 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2004-2007 Intel Corporation.  All rights reserved.
  * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
  * Copyright (c) 2004, 2005 Voltaire Corporation.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index a19effa..73cab4c 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2004 Topspin Communications.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
diff --git a/drivers/infiniband/core/fmr_pool.c b/drivers/infiniband/core/fmr_pool.c
index 4507043..44eac01 100644
--- a/drivers/infiniband/core/fmr_pool.c
+++ b/drivers/infiniband/core/fmr_pool.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2004 Topspin Communications.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c
index 2a1e9ae..8cc6f01 100644
--- a/drivers/infiniband/core/iwcm.c
+++ b/drivers/infiniband/core/iwcm.c
@@ -2,7 +2,7 @@
  * Copyright (c) 2004, 2005 Intel Corporation.  All rights reserved.
  * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
  * Copyright (c) 2004, 2005 Voltaire Corporation.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2005 Open Grid Computing, Inc. All rights reserved.
  * Copyright (c) 2005 Network Appliance, Inc. All rights reserved.
  *
diff --git a/drivers/infiniband/core/mad_priv.h b/drivers/infiniband/core/mad_priv.h
index 9430ab4..ec30aea 100644
--- a/drivers/infiniband/core/mad_priv.h
+++ b/drivers/infiniband/core/mad_priv.h
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2004, 2005, Voltaire, Inc. All rights reserved.
  * Copyright (c) 2005 Intel Corporation. All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2009 HNR Consulting. All rights reserved.
  *
  * This software is available to you under a choice of one of two
diff --git a/drivers/infiniband/core/packer.c b/drivers/infiniband/core/packer.c
index 019bd4b..32754d2 100644
--- a/drivers/infiniband/core/packer.c
+++ b/drivers/infiniband/core/packer.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
diff --git a/drivers/infiniband/core/smi.c b/drivers/infiniband/core/smi.c
index 5855e44..9687b80 100644
--- a/drivers/infiniband/core/smi.c
+++ b/drivers/infiniband/core/smi.c
@@ -4,7 +4,7 @@
  * Copyright (c) 2004, 2005 Intel Corporation.  All rights reserved.
  * Copyright (c) 2004, 2005 Topspin Corporation.  All rights reserved.
  * Copyright (c) 2004-2007 Voltaire Corporation.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c
index 9ab5df7..010ea2d 100644
--- a/drivers/infiniband/core/sysfs.c
+++ b/drivers/infiniband/core/sysfs.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2004, 2005 Topspin Communications.  All rights reserved.
  * Copyright (c) 2005 Mellanox Technologies Ltd.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
diff --git a/drivers/infiniband/core/ud_header.c b/drivers/infiniband/core/ud_header.c
index bb7e192..50f7b56 100644
--- a/drivers/infiniband/core/ud_header.c
+++ b/drivers/infiniband/core/ud_header.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  *
  * This software is available to you under a choice of one of two
  * licenses.  You may choose to be licensed under the terms of the GNU
diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c
index cd1996d..5ec2937 100644
--- a/drivers/infiniband/core/user_mad.c
+++ b/drivers/infiniband/core/user_mad.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2004 Topspin Communications.  All rights reserved.
  * Copyright (c) 2005 Voltaire, Inc. All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2008 Cisco. All rights reserved.
  *
  * This software is available to you under a choice of one of two
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index af7a8b0..02d9581 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -4,7 +4,7 @@
  * Copyright (c) 2004 Intel Corporation.  All rights reserved.
  * Copyright (c) 2004 Topspin Corporation.  All rights reserved.
  * Copyright (c) 2004 Voltaire Corporation.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2005, 2006 Cisco Systems.  All rights reserved.
  *
  * This software is available to you under a choice of one of two
-- 
1.7.1



From justinmattock at gmail.com  Sat Nov 27 01:21:57 2010
From: justinmattock at gmail.com (Justin P. Mattock)
Date: Sat, 27 Nov 2010 06:21:57 -0000
Subject: [RFC 3/9]drivers:infiniband:ulp Change the copyright info.
In-Reply-To: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
References: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
Message-ID: <1290838879-11038-4-git-send-email-justinmattock@gmail.com>

Change the copyright info from Sun Microsystems to Oracle since Oracle now owns them.

Signed-off-by: Justin P. Mattock <justinmattock at gmail.com>

---
 drivers/infiniband/ulp/ipoib/ipoib.h           |    2 +-
 drivers/infiniband/ulp/ipoib/ipoib_ib.c        |    2 +-
 drivers/infiniband/ulp/ipoib/ipoib_main.c      |    2 +-
 drivers/infiniband/ulp/ipoib/ipoib_multicast.c |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h
index 753a983..bdf2efb 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib.h
+++ b/drivers/infiniband/ulp/ipoib/ipoib.h
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2004, 2005 Topspin Communications.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2004 Voltaire, Inc. All rights reserved.
  *
  * This software is available to you under a choice of one of two
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index dfa7190..87ff9eb 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2004, 2005 Topspin Communications.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2005 Mellanox Technologies. All rights reserved.
  * Copyright (c) 2004, 2005 Voltaire, Inc. All rights reserved.
  *
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 9ff7bc7..43df433 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2004 Topspin Communications.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2004 Voltaire, Inc. All rights reserved.
  *
  * This software is available to you under a choice of one of two
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index 3871ac6..af52828 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2004, 2005 Topspin Communications.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2004 Voltaire, Inc. All rights reserved.
  *
  * This software is available to you under a choice of one of two
-- 
1.7.1



From justinmattock at gmail.com  Sat Nov 27 01:21:59 2010
From: justinmattock at gmail.com (Justin P. Mattock)
Date: Sat, 27 Nov 2010 06:21:59 -0000
Subject: [RFC 4/9]drivers:ide Change the copyright info.
In-Reply-To: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
References: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
Message-ID: <1290838879-11038-5-git-send-email-justinmattock@gmail.com>

Change the copyright info from Sun Microsystems to Oracle since Oracle now owns them.

Signed-off-by: Justin P. Mattock <justinmattock at gmail.com>

---
 drivers/ide/hpt366.c      |    2 +-
 drivers/ide/serverworks.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ide/hpt366.c b/drivers/ide/hpt366.c
index 58c51cd..8e31cfa 100644
--- a/drivers/ide/hpt366.c
+++ b/drivers/ide/hpt366.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1999-2003		Andre Hedrick <andre at linux-ide.org>
- * Portions Copyright (C) 2001	        Sun Microsystems, Inc.
+ * Portions Copyright (C) 2001	        Oracle and/or its affiliates. 
  * Portions Copyright (C) 2003		Red Hat Inc
  * Portions Copyright (C) 2007		Bartlomiej Zolnierkiewicz
  * Portions Copyright (C) 2005-2009	MontaVista Software, Inc.
diff --git a/drivers/ide/serverworks.c b/drivers/ide/serverworks.c
index 35fb8da..267c87e 100644
--- a/drivers/ide/serverworks.c
+++ b/drivers/ide/serverworks.c
@@ -3,7 +3,7 @@
  * Copyright (C) 1998-2000 Andrzej Krzysztofowicz
  * Copyright (C) 1998-2000 Andre Hedrick <andre at linux-ide.org>
  * Copyright (C) 2007-2010 Bartlomiej Zolnierkiewicz
- * Portions copyright (c) 2001 Sun Microsystems
+ * Portions copyright (c) 2001 Oracle and/or its affiliates. 
  *
  *
  * RCC/ServerWorks IDE driver for Linux
-- 
1.7.1



From justinmattock at gmail.com  Sat Nov 27 01:22:02 2010
From: justinmattock at gmail.com (Justin P. Mattock)
Date: Sat, 27 Nov 2010 06:22:02 -0000
Subject: [RFC 5/9]drivers:mtd:maps Change the copyright info.
In-Reply-To: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
References: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
Message-ID: <1290838879-11038-6-git-send-email-justinmattock@gmail.com>

Change the copyright info from Sun Microsystems to Oracle since Oracle now owns them.

Signed-off-by: Justin P. Mattock <justinmattock at gmail.com>

---
 drivers/mtd/maps/scb2_flash.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/maps/scb2_flash.c b/drivers/mtd/maps/scb2_flash.c
index 7e329f0..9841bb2 100644
--- a/drivers/mtd/maps/scb2_flash.c
+++ b/drivers/mtd/maps/scb2_flash.c
@@ -1,6 +1,6 @@
 /*
  * MTD map driver for BIOS Flash on Intel SCB2 boards
- * Copyright (C) 2002 Sun Microsystems, Inc.
+ * Copyright (C) 2002 Oracle and/or its affiliates. 
  * Tim Hockin <thockin at sun.com>
  *
  * A few notes on this MTD map:
-- 
1.7.1



From justinmattock at gmail.com  Sat Nov 27 01:22:05 2010
From: justinmattock at gmail.com (Justin P. Mattock)
Date: Sat, 27 Nov 2010 06:22:05 -0000
Subject: [RFC 6/9]drivers:char:nvram.c Change the copyright info.
In-Reply-To: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
References: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
Message-ID: <1290838879-11038-7-git-send-email-justinmattock@gmail.com>

Change the copyright info from Sun Microsystems to Oracle since Oracle now owns them.

Signed-off-by: Justin P. Mattock <justinmattock at gmail.com>

---
 drivers/char/nvram.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c
index 166f1e7..33e8faa 100644
--- a/drivers/char/nvram.c
+++ b/drivers/char/nvram.c
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 1997 Roman Hodek <Roman.Hodek at informatik.uni-erlangen.de>
  * idea by and with help from Richard Jelinek <rj at suse.de>
- * Portions copyright (c) 2001,2002 Sun Microsystems (thockin at sun.com)
+ * Portions copyright (c) 2001,2002 Oracle and/or its affiliates. (thockin at sun.com)
  *
  * This driver allows you to access the contents of the non-volatile memory in
  * the mc146818rtc.h real-time clock. This chip is built into all PCs and into
-- 
1.7.1



From justinmattock at gmail.com  Sat Nov 27 01:22:08 2010
From: justinmattock at gmail.com (Justin P. Mattock)
Date: Sat, 27 Nov 2010 06:22:08 -0000
Subject: [RFC 7/9]drivers:ata Change the copyright info.
In-Reply-To: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
References: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
Message-ID: <1290838879-11038-8-git-send-email-justinmattock@gmail.com>

Change the copyright info from Sun Microsystems to Oracle since Oracle now owns them.

Signed-off-by: Justin P. Mattock <justinmattock at gmail.com>

---
 drivers/ata/pata_hpt366.c      |    2 +-
 drivers/ata/pata_hpt37x.c      |    2 +-
 drivers/ata/pata_hpt3x2n.c     |    2 +-
 drivers/ata/pata_serverworks.c |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c
index 7688868..bd52749 100644
--- a/drivers/ata/pata_hpt366.c
+++ b/drivers/ata/pata_hpt366.c
@@ -6,7 +6,7 @@
  * linux/drivers/ide/pci/hpt366.c		Version 0.36	April 25, 2003
  *
  * Copyright (C) 1999-2003		Andre Hedrick <andre at linux-ide.org>
- * Portions Copyright (C) 2001	        Sun Microsystems, Inc.
+ * Portions Copyright (C) 2001	        Oracle and/or its affiliates. 
  * Portions Copyright (C) 2003		Red Hat Inc
  *
  *
diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c
index 9ae4c08..442575e 100644
--- a/drivers/ata/pata_hpt37x.c
+++ b/drivers/ata/pata_hpt37x.c
@@ -6,7 +6,7 @@
  * linux/drivers/ide/pci/hpt366.c		Version 0.36	April 25, 2003
  *
  * Copyright (C) 1999-2003		Andre Hedrick <andre at linux-ide.org>
- * Portions Copyright (C) 2001	        Sun Microsystems, Inc.
+ * Portions Copyright (C) 2001	        Oracle and/or its affiliates. 
  * Portions Copyright (C) 2003		Red Hat Inc
  * Portions Copyright (C) 2005-2009	MontaVista Software, Inc.
  *
diff --git a/drivers/ata/pata_hpt3x2n.c b/drivers/ata/pata_hpt3x2n.c
index 32f3463..d0780c8 100644
--- a/drivers/ata/pata_hpt3x2n.c
+++ b/drivers/ata/pata_hpt3x2n.c
@@ -6,7 +6,7 @@
  * linux/drivers/ide/pci/hpt366.c		Version 0.36	April 25, 2003
  *
  * Copyright (C) 1999-2003		Andre Hedrick <andre at linux-ide.org>
- * Portions Copyright (C) 2001	        Sun Microsystems, Inc.
+ * Portions Copyright (C) 2001	        Oracle and/or its affiliates. 
  * Portions Copyright (C) 2003		Red Hat Inc
  * Portions Copyright (C) 2005-2009	MontaVista Software, Inc.
  *
diff --git a/drivers/ata/pata_serverworks.c b/drivers/ata/pata_serverworks.c
index 86dd714..a8dd665 100644
--- a/drivers/ata/pata_serverworks.c
+++ b/drivers/ata/pata_serverworks.c
@@ -10,7 +10,7 @@
  * Copyright (C) 1998-2000 Michel Aubry
  * Copyright (C) 1998-2000 Andrzej Krzysztofowicz
  * Copyright (C) 1998-2000 Andre Hedrick <andre at linux-ide.org>
- * Portions copyright (c) 2001 Sun Microsystems
+ * Portions copyright (c) 2001 Oracle and/or its affiliates. 
  *
  *
  * RCC/ServerWorks IDE driver for Linux
-- 
1.7.1



From justinmattock at gmail.com  Sat Nov 27 01:22:12 2010
From: justinmattock at gmail.com (Justin P. Mattock)
Date: Sat, 27 Nov 2010 06:22:12 -0000
Subject: [RFC 8/9]drivers:net Change the copyright info.
In-Reply-To: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
References: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
Message-ID: <1290838879-11038-9-git-send-email-justinmattock@gmail.com>

Change the copyright info from Sun Microsystems to Oracle since Oracle now owns them.

Signed-off-by: Justin P. Mattock <justinmattock at gmail.com>

---
 drivers/net/cassini.c   |    2 +-
 drivers/net/cassini.h   |    4 ++--
 drivers/net/mlx4/cq.c   |    2 +-
 drivers/net/mlx4/main.c |    2 +-
 drivers/net/mlx4/mlx4.h |    2 +-
 drivers/net/natsemi.c   |    2 +-
 drivers/net/tg3.c       |    2 +-
 drivers/net/tg3.h       |    2 +-
 8 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index d6b6d6a..f09f544 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -1,6 +1,6 @@
 /* cassini.c: Sun Microsystems Cassini(+) ethernet driver.
  *
- * Copyright (C) 2004 Sun Microsystems Inc.
+ * Copyright (C) 2004 Oracle and/or its affiliates. 
  * Copyright (C) 2003 Adrian Sun (asun at darksunrising.com)
  *
  * This program is free software; you can redistribute it and/or
diff --git a/drivers/net/cassini.h b/drivers/net/cassini.h
index dbc4787..30c760c 100644
--- a/drivers/net/cassini.h
+++ b/drivers/net/cassini.h
@@ -1,7 +1,7 @@
 /* $Id: cassini.h,v 1.16 2004/08/17 21:15:16 zaumen Exp $
  * cassini.h: Definitions for Sun Microsystems Cassini(+) ethernet driver.
  *
- * Copyright (C) 2004 Sun Microsystems Inc.
+ * Copyright (C) 2004 Oracle and/or its affiliates. 
  * Copyright (c) 2003 Adrian Sun (asun at darksunrising.com)
  *
  * This program is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  * 02111-1307, USA.
  *
- * vendor id: 0x108E (Sun Microsystems, Inc.)
+ * vendor id: 0x108E (Oracle and/or its affiliates.)
  * device id: 0xabba (Cassini)
  * revision ids: 0x01 = Cassini
  *               0x02 = Cassini rev 2
diff --git a/drivers/net/mlx4/cq.c b/drivers/net/mlx4/cq.c
index 7cd34e9..d730de4 100644
--- a/drivers/net/mlx4/cq.c
+++ b/drivers/net/mlx4/cq.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2004, 2005 Topspin Communications.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2005, 2006, 2007 Cisco Systems, Inc. All rights reserved.
  * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved.
  * Copyright (c) 2004 Voltaire, Inc. All rights reserved.
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c
index 782f11d..4e711e3 100644
--- a/drivers/net/mlx4/main.c
+++ b/drivers/net/mlx4/main.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2004, 2005 Topspin Communications.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved.
  * Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved.
  *
diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h
index 0da5bb7..4fc154c 100644
--- a/drivers/net/mlx4/mlx4.h
+++ b/drivers/net/mlx4/mlx4.h
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2004, 2005 Topspin Communications.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2005, 2006, 2007 Cisco Systems.  All rights reserved.
  * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved.
  * Copyright (c) 2004 Voltaire, Inc. All rights reserved.
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index 2fd3963..406f43a 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -1,7 +1,7 @@
 /* natsemi.c: A Linux PCI Ethernet driver for the NatSemi DP8381x series. */
 /*
 	Written/copyright 1999-2001 by Donald Becker.
-	Portions copyright (c) 2001,2002 Sun Microsystems (thockin at sun.com)
+	Portions copyright (c) 2001,2002 Oracle and/or its affiliates. (thockin at sun.com)
 	Portions copyright 2001,2002 Manfred Spraul (manfred at colorfullife.com)
 	Portions copyright 2004 Harald Welte <laforge at gnumonks.org>
 
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 30ccbb6..337850a 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem at redhat.com)
  * Copyright (C) 2001, 2002, 2003 Jeff Garzik (jgarzik at pobox.com)
- * Copyright (C) 2004 Sun Microsystems Inc.
+ * Copyright (C) 2004 Oracle and/or its affiliates. 
  * Copyright (C) 2005-2010 Broadcom Corporation.
  *
  * Firmware is:
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
index 4a19748..f8d7210 100644
--- a/drivers/net/tg3.h
+++ b/drivers/net/tg3.h
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem at redhat.com)
  * Copyright (C) 2001 Jeff Garzik (jgarzik at pobox.com)
- * Copyright (C) 2004 Sun Microsystems Inc.
+ * Copyright (C) 2004 Oracle and/or its affiliates. 
  * Copyright (C) 2007-2010 Broadcom Corporation.
  */
 
-- 
1.7.1



From justinmattock at gmail.com  Sat Nov 27 01:22:15 2010
From: justinmattock at gmail.com (Justin P. Mattock)
Date: Sat, 27 Nov 2010 06:22:15 -0000
Subject: [RFC 9/9]include:linux Change the copyright info.
In-Reply-To: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
References: <1290838879-11038-1-git-send-email-justinmattock@gmail.com>
Message-ID: <1290838879-11038-10-git-send-email-justinmattock@gmail.com>

Change the copyright info from Sun Microsystems to Oracle since Oracle now owns them.

Signed-off-by: Justin P. Mattock <justinmattock at gmail.com>

---
 include/linux/ethtool.h       |    4 ++--
 include/linux/mlx4/doorbell.h |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 6628a50..2d895be 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -3,11 +3,11 @@
  *
  * Copyright (C) 1998 David S. Miller (davem at redhat.com)
  * Copyright 2001 Jeff Garzik <jgarzik at pobox.com>
- * Portions Copyright 2001 Sun Microsystems (thockin at sun.com)
+ * Portions Copyright 2001 Oracle and/or its affiliates. (thockin at sun.com)
  * Portions Copyright 2002 Intel (eli.kupermann at intel.com,
  *                                christopher.leech at intel.com,
  *                                scott.feldman at intel.com)
- * Portions Copyright (C) Sun Microsystems 2008
+ * Portions Copyright (C) 2008 Oracle and/or its affiliates. 
  */
 
 #ifndef _LINUX_ETHTOOL_H
diff --git a/include/linux/mlx4/doorbell.h b/include/linux/mlx4/doorbell.h
index f31bba2..d251ee8 100644
--- a/include/linux/mlx4/doorbell.h
+++ b/include/linux/mlx4/doorbell.h
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2004 Topspin Communications.  All rights reserved.
- * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright (c) 2005 Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2005 Mellanox Technologies. All rights reserved.
  *
  * This software is available to you under a choice of one of two
-- 
1.7.1



