* [PATCH] mtdconcat: Fix NAND OOB write
@ 2011-04-24 22:57 Felix Radensky
2011-04-26 7:43 ` Artem Bityutskiy
2011-04-26 7:47 ` Artem Bityutskiy
0 siblings, 2 replies; 4+ messages in thread
From: Felix Radensky @ 2011-04-24 22:57 UTC (permalink / raw)
To: linux-mtd; +Cc: Felix Radensky, dwmw2
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>
---
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 5060e60..e601672 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)
if (!(mtd->flags & MTD_WRITEABLE))
return -EROFS;
- ops->retlen = 0;
+ ops->retlen = ops->oobretlen = 0;
for (i = 0; i < concat->num_subdev; i++) {
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)
devops.len = subdev->size - to;
err = subdev->write_oob(subdev, to, &devops);
- ops->retlen += devops.retlen;
+ ops->retlen += devops.oobretlen;
if (err)
return err;
--
1.7.4.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] mtdconcat: Fix NAND OOB write
2011-04-24 22:57 [PATCH] mtdconcat: Fix NAND OOB write Felix Radensky
@ 2011-04-26 7:43 ` Artem Bityutskiy
2011-04-26 8:00 ` Felix Radensky
2011-04-26 7:47 ` Artem Bityutskiy
1 sibling, 1 reply; 4+ messages in thread
From: Artem Bityutskiy @ 2011-04-26 7:43 UTC (permalink / raw)
To: Felix Radensky; +Cc: dwmw2, linux-mtd
On Mon, 2011-04-25 at 01:57 +0300, Felix Radensky wrote:
> 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>
Looks like material for -stable, no?
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mtdconcat: Fix NAND OOB write
2011-04-26 7:43 ` Artem Bityutskiy
@ 2011-04-26 8:00 ` Felix Radensky
0 siblings, 0 replies; 4+ messages in thread
From: Felix Radensky @ 2011-04-26 8:00 UTC (permalink / raw)
To: dedekind1; +Cc: linux-mtd, dwmw2
Hi Artem,
On 04/26/2011 10:43 AM, Artem Bityutskiy wrote:
> On Mon, 2011-04-25 at 01:57 +0300, Felix Radensky wrote:
>> 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>
> Looks like material for -stable, no?
Adding this to -stable would be great.
Felix.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mtdconcat: Fix NAND OOB write
2011-04-24 22:57 [PATCH] mtdconcat: Fix NAND OOB write Felix Radensky
2011-04-26 7:43 ` Artem Bityutskiy
@ 2011-04-26 7:47 ` Artem Bityutskiy
1 sibling, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2011-04-26 7:47 UTC (permalink / raw)
To: Felix Radensky; +Cc: dwmw2, linux-mtd
On Mon, 2011-04-25 at 01:57 +0300, Felix Radensky wrote:
> 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>
Added "Cc: stable@kernel.org" and pushed to l2-mtd-2.6.git, thanks!
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-26 7:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-24 22:57 [PATCH] mtdconcat: Fix NAND OOB write Felix Radensky
2011-04-26 7:43 ` Artem Bityutskiy
2011-04-26 8:00 ` Felix Radensky
2011-04-26 7:47 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox