diff options
author | Felix Radensky <felix@embedded-sol.com> | 2011-04-24 18:57:12 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2011-05-24 20:54:50 -0400 |
commit | 431e1ecabddcd7cbba237182ddf431771f98bb4c (patch) | |
tree | 63307f7daa9e9601bc36384bf5c8b888f9e725e5 /drivers/mtd/mtdconcat.c | |
parent | a80f1c1f6a15e4eeba5c146ec9c5c0e12458abc5 (diff) |
mtd: mtdconcat: fix NAND OOB write
Currently mtdconcat is broken for NAND. An attemtpt to create
JFFS2 filesystem on concatenation of several NAND devices fails
with OOB write errors. This patch fixes that problem.
Signed-off-by: Felix Radensky <felix@embedded-sol.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: stable@kernel.org
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/mtdconcat.c')
-rw-r--r-- | drivers/mtd/mtdconcat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c index 5060e608ea5d..e601672a5305 100644 --- a/drivers/mtd/mtdconcat.c +++ b/drivers/mtd/mtdconcat.c | |||
@@ -319,7 +319,7 @@ concat_write_oob(struct mtd_info *mtd, loff_t to, struct mtd_oob_ops *ops) | |||
319 | if (!(mtd->flags & MTD_WRITEABLE)) | 319 | if (!(mtd->flags & MTD_WRITEABLE)) |
320 | return -EROFS; | 320 | return -EROFS; |
321 | 321 | ||
322 | ops->retlen = 0; | 322 | ops->retlen = ops->oobretlen = 0; |
323 | 323 | ||
324 | for (i = 0; i < concat->num_subdev; i++) { | 324 | for (i = 0; i < concat->num_subdev; i++) { |
325 | struct mtd_info *subdev = concat->subdev[i]; | 325 | struct mtd_info *subdev = concat->subdev[i]; |
@@ -334,7 +334,7 @@ concat_write_oob(struct mtd_info *mtd, loff_t to, struct mtd_oob_ops *ops) | |||
334 | devops.len = subdev->size - to; | 334 | devops.len = subdev->size - to; |
335 | 335 | ||
336 | err = subdev->write_oob(subdev, to, &devops); | 336 | err = subdev->write_oob(subdev, to, &devops); |
337 | ops->retlen += devops.retlen; | 337 | ops->retlen += devops.oobretlen; |
338 | if (err) | 338 | if (err) |
339 | return err; | 339 | return err; |
340 | 340 | ||