Skip to contentSkip to conversation

Nand Flash write fails

DISCUSSION Ajay Jain 2 participants 2 messages Sep 22, 2006 – Sep 28, 2006 Memory technology devices (MTD)

lore
Share & tools
lore

Ajay Jain

author
#0 lore raw

Hi,

I have set up a JFFS2 partition on my NAND flash. The board driver in question is my own. I can successfully 'mkfs' & 'mount' that partition. However when I start copying any file to it, it gives the following error.

nand_write_ecc: vectored attempt to write not page aligned data: to =
20b9e4, total_len = 44
Write of 68 bytes at 0x0000b9e4 failed. returned -22, retlen 0 Not marking the space at 0x0000b9e4 as dirty because the flash driver returned retlen zero

I was looking up the code of the mtd nand layer. I see that in case the data is not alligned on the page boundary, it returns back giving this error. Therefore my question is that is it the responsibility of the "jffs2 layer" or "mtd" layer to issue writes that are aligned to page boundary.
ANY suggestions are welcome.

Thanks.

#1 lore raw
Quoted 13 lines · Ajay Jain

Hi,

I have set up a JFFS2 partition on my NAND flash. The board driver in question is my own. I can successfully 'mkfs' & 'mount' that partition. However when I start copying any file to it, it gives the following error.

nand_write_ecc: vectored attempt to write not page aligned data: to =
20b9e4, total_len = 44
Write of 68 bytes at 0x0000b9e4 failed. returned -22, retlen 0 Not marking the space at 0x0000b9e4 as dirty because the flash driver returned retlen zero

Quoted 6 lines

I was looking up the code of the mtd nand layer. I see that in case the data is not alligned on the page boundary, it returns back giving this error. Therefore my question is that is it the responsibility of the "jffs2 layer" or "mtd" layer to issue writes that are aligned to page boundary.
ANY suggestions are welcome.

Update to a recent kernel.

tglx