Gupta, Pekon | 18 Apr 11:15 2014

update patch state on patchwork


I was just wondering if there is a script which can automatically search the
git tree and update state of patch on patchwork [1]. If not then is it possible
to update the patch status from now onwards (or may be a month back) ?
This can be added as part of git-commit script used by Maintainers.

This would be helpful in reviewing and finding references. And would be
good for Maintainers too to keep a track of pending ones.


with regards, pekon

Linux MTD discussion mailing list

Leon Pollak | 17 Apr 21:10 2014

Problem with JFFS2 garbage collector

Hello to all.

About a month ago I already wrote here about the problem I have (see below).
At that time 3-4 of list members reacted saying this is the bug and there were 
some suggestions for testing/work-arounding it.

I kindly ask people to return to this issue and I am ready to debug the 
possible solutions/work-arounds....
The following scenario produces a lot of errors -5 or crashes in the following 
After initial flash partition burn from within U-Boot, JFFS2 partition is 
mounted RO at fstab, flashes are write protected by HW. 

On the first boot I:
- take HW flash write protect off;
- remount as RW;
- make a small update to a small file;
- sync;
- remount as RO;
- HW write protect ON.

At this moment I receive a lot of error -5 messages and sometimes even crash 
This problem repeats at each sequential boot 5-8 times with each time less 
number of -5 errors till it finally is gone.

I will be very thankful to you for any tip what can be done.

Many thanks ahead and best regards
(Continue reading)

Brajesh Sharma | 17 Apr 16:08 2014

Need Help in Testing FTL code using NAND simulator

Hi All,

I’ve started recently working on FTL thing and now I need some kind of 
help from all of you as I’ve seen similar kind of thread just now.
I'm having a Huge FTL code (block + character) driver which is a linux 
kernel module and is having a specific PCIe based hardware. But i don 
have that H/W so I'll be porting this code for generic Flash device but 
i'm not sure how to test the code in absence pf H/W. I'm removing the 
character driver complications and wanna use just block driver which 
offers management module implementations (bad block , GC, Address 
mapping etc).
I've come across NANDsim which i find can be really useful in my case to 
emulate the virtual flash device in host memory (RAM) . But NANDsim is a 
part of MTD subsystem and My code doesn't have anything to do with MTD. 
SO i'm not sure can i use it with my code. I've seen usage of NANDsim on 
web with mtdblock device & on top of it an NFTL or something else though 
i'm having my own block device driver with FTL implementation in it.

e.g. NFTL/UBIFS --> mtdblock/mtdchar --> Virtual Flash (RAM) using 
NANDsim ....

But for me it'll be like (FTL+block driver) --> Character driver --> 
Virtual Flash (NANDsim)... or do i have any other alternative ????

Any help would be appreciated.

-- Thanks & Regards
Brajesh Sharma

(Continue reading)

Ezequiel Garcia | 17 Apr 15:23 2014

[PATCH for v3.15 0/2] UBI: block: Support very large volumes

This is a re-spin of Richard's work [1]. I've added a patch for some minor
clean-up, so the large volume fix is a less intrusive one.

The proposed returned value E2BIG has been changed for EFBIG, which results
in a slightly more accurate error. Also, the user messages have been removed
entirely; returning an error seems enough.

This bug was reported on #mtd IRC. I don't have to reporter name to give proper
credit. It should be applied as a fix for v3.15.

Richard: Thanks a lot for hunting this down, and feel free to disagree about
my changes.


Ezequiel Garcia (1):
  UBI: block: Set disk_capacity out of the mutex

Richard Weinberger (1):
  UBI: block: Avoid disk size integer overflow

 drivers/mtd/ubi/block.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)



Linux MTD discussion mailing list
(Continue reading)

Masahiro Yamada | 17 Apr 12:22 2014

[PATCH] mtd: denali: fix write_oob_data() function

Since write_oob_data is calling denali_send_pipeline_cmd()
with access_type=SPARE_ACCESS, this might has no impact.

But calling it with tranfser_spare=false looks weird because
write_oob_data() is the function for transferring the spare area.

Signed-off-by: Masahiro Yamada <yamada.m <at>>
 drivers/mtd/nand/denali.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index c07cd57..a55b9d4 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
 <at>  <at>  -841,7 +841,7  <at>  <at>  static int write_oob_data(struct mtd_info *mtd, uint8_t *buf, int page)

 	denali->page = page;

-	if (denali_send_pipeline_cmd(denali, false, false, SPARE_ACCESS,
+	if (denali_send_pipeline_cmd(denali, false, true, SPARE_ACCESS,
 							DENALI_WRITE) == PASS) {
 		write_data_to_flash_mem(denali, buf, mtd->oobsize);



Linux MTD discussion mailing list
(Continue reading)

Wolfram Sang | 17 Apr 09:39 2014

[PATCH] mtd: elm: compile suspend/resume only with PM_SLEEP

From: Wolfram Sang <wsa <at>>

drivers/mtd/devices/elm.c:480:12: warning: 'elm_suspend' defined but not used [-Wunused-function]
drivers/mtd/devices/elm.c:488:12: warning: 'elm_resume' defined but not used [-Wunused-function]

Signed-off-by: Wolfram Sang <wsa <at>>
 drivers/mtd/devices/elm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c
index 1fd4a0f77967..0a037b15c11b 100644
--- a/drivers/mtd/devices/elm.c
+++ b/drivers/mtd/devices/elm.c
 <at>  <at>  -418,6 +418,7  <at>  <at>  static int elm_remove(struct platform_device *pdev)
 	return 0;

  * elm_context_save
  * saves ELM configurations to preserve them across Hardware powered-down
 <at>  <at>  -509,6 +510,7  <at>  <at>  static int elm_resume(struct device *dev)
 	return 0;

 static SIMPLE_DEV_PM_OPS(elm_pm_ops, elm_suspend, elm_resume);
(Continue reading)

Paul McGougan | 17 Apr 07:09 2014

[PATCH] mtd: tests: Fix endian issue with CRC generation algorithm

The calculation of the CRC in /tests/checkfs/makefiles.c was writing the CRC
Into the produced files in host byte-order which would cause CRC validation
to fail on big-endian systems as the validation is performed bytewise.

Signed-off-by: Paul McGougan <pmcgougan AT>
tests/checkfs/makefiles.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/checkfs/makefiles.c b/tests/checkfs/makefiles.c
index 662fe86..050ea60 100644
--- a/tests/checkfs/makefiles.c
+++ b/tests/checkfs/makefiles.c
 <at>  <at>  -170,6 +170,7  <at>  <at>  void checksum(char *filename){
     printf("Error! Cannot open filename to update checksum: %s\n",filename);
+  crc = htole16(crc);
   if(fwrite(&crc, sizeof(crc), 1, fp) != 1){
     printf("error! unable to update the file for checksum.\n");

Confidentiality Notice:  This message (including attachments) is a private communication solely for use
of the intended recipient(s).  
If you are not the intended recipient(s) or believe you received this message in error, notify the sender
immediately and then delete this 
message.  Any other use, retention, dissemination or copying is prohibited and may be a violation of law,
including the Electronic 
Communication Privacy Act of 1986."

(Continue reading)

Ezequiel Garcia | 16 Apr 22:47 2014

[PATCH] UBI: weaken the 'exclusive' constraint when opening volumes to rename

The UBI volume rename ioctl (UBI_IOCRNVOL) open the volumes in exclusive
mode. The volumes are opened for two reasons: to build a volume rename list,
and a volume remove list.

However, the first open constraint is excessive and can be replaced by
a 'read-write' open mode. The second open constraint is properly set as
'exclusive' given the volume is opened for removal and we don't want any
users around.

By weakening the former 'exclusive' mode, we allow 'read-only' users to keep
the volume open, while a rename is taking place. This is useful to perform
an atomic rename, in a firmware upgrade scenario, while keeping the volume
in read-only use (for instance, if a ubiblock is mounted as rootfs).

It's worth mention this is not the case of UBIFS, which keeps the volume
opened as 'read-write' despite mounted as read-write or read-only mode.

This change was suggested at least twice by Artem:

Signed-off-by: Ezequiel Garcia <ezequiel.garcia <at>>
 drivers/mtd/ubi/cdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c
index f54562a..7646220 100644
--- a/drivers/mtd/ubi/cdev.c
+++ b/drivers/mtd/ubi/cdev.c
(Continue reading)

Gerhard Sittig | 16 Apr 21:49 2014

Re: [PATCH v5 5/5] mtd: nand: Improve bitflip detection for on-die ECC scheme.

On Mon, 2014-04-14 at 13:35 -0600, David Mosberger wrote:
>  <at>  <at>  -1276,6 +1276,64  <at>  <at>  static int nand_read_subpage(struct mtd_info *mtd, struct nand_chip *chip,
>  	return max_bitflips;
>  }
> +static int set_on_die_ecc(struct mtd_info *mtd, int on)
> +{
> +	u8 data[ONFI_SUBFEATURE_PARAM_LEN] = { 0, };
> +	struct nand_chip *chip = mtd->priv;
> +
> +	if (on)
> +
> +	return chip->onfi_set_features(mtd, chip,
> +				       ONFI_FEATURE_ADDR_ARRAY_OP_MODE, data);
> +}

I'd suggest to extend this, and check whether this operation
actually did enable the wanted mode (the ONFI set feature request
is a prerequisite but need not be sufficient, you might want to
re-get the feature and test for success)

> +
> +static int check_for_bitflips(struct mtd_info *mtd, int page)
> +{
> +	int flips = 0, max_bitflips = 0, i, j, read_size;

it's been elsewhere too, but here it really bothers me that the
"initial" value and subsequent access to variables is spread so
(Continue reading)

Gerhard Sittig | 16 Apr 20:47 2014

Re: [PATCH v5 0/5] mtd: nand: Add on-die ECC support

On Mon, 2014-04-14 at 13:35 -0600, David Mosberger wrote:
> This series adds support for Micron on-die ECC.
> The patches are designed to go on top of Gerhard Sittig's patches
> to introduce a READMODE command.
> Changes in v5:
>  - Fixed some formatting issues.
>  - Wherever possible, new functions take only mtd argument (not also chip).
>  - Eliminated bitdiff() function.
>  - Clarified/shortened some comments.

nit: please supply the change log for past revisions as well if
you resubmit, reviewers should not have to do the book keeping or
archeology for you if they want to know whether some aspect has
been addressed that was raised before

some readers prefer or even demand that individual patches have
their change log, because cover letters are optional, and most of
all cover letters won't end up in trackers while patches do

virtually yours
Gerhard Sittig

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>

Linux MTD discussion mailing list
(Continue reading)

Huang Shijie | 16 Apr 11:47 2014

[RFC PATCH] mtd: spi-nor: add DDR quad read support

This patch adds the DDR quad read support by the following:
  [1] add SPI_NOR_DDR_QUAD read mode.

  [2] add DDR Quad read opcode: SPINOR_OP_READ_1_4_4_D.

  [3] add set_ddr_quad_mode() to initialize for the DDR quad read.
      Currently it only works for Spansion NOR.

  [3] set the dummy with 8 for DDR quad read.
Signed-off-by: Huang Shijie <b32955 <at>>
 drivers/mtd/spi-nor/spi-nor.c |   36 ++++++++++++++++++++++++++++++++++--
 include/linux/mtd/spi-nor.h   |    7 +++++--
 2 files changed, 39 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index b88cc7e..6858e36 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
 <at>  <at>  -74,6 +74,11  <at>  <at>  static int read_cr(struct spi_nor *nor)
 static inline int spi_nor_read_dummy_cycles(struct spi_nor *nor)
 	switch (nor->flash_read) {
+		/*
+		 * We set 8 for the DDR Quad read, the SPI NOR controller
+		 * can change it to 6 or 4 with DeviceTree property.
+		 */
 	case SPI_NOR_FAST:
(Continue reading)