[RFC 0/5] fix data+OOB writes, add ioctl

Brian Norris computersforpeace at gmail.com
Tue Aug 23 12:47:05 EDT 2011


On Mon, Aug 22, 2011 at 11:48 PM, Ricard Wanderlof
<ricard.wanderlof at axis.com> wrote:
>>>> On Wed, 2011-08-17 at 16:50 -0700, Brian Norris wrote:
>>>>> 1) Broken "noecc" writes; `nandwrite -n -o' does not work on my
>>>>>   hardware, at least, without these patches
>
> This particular issue was fixed in a patch by Peter Wippich on June 6th:
>
> http://lists.infradead.org/pipermail/linux-mtd/2011-June/036016.html

Right, I actually found this patch already and have it lined up in my
test kernel, but apparently my issue is separate.

I will try to describe my issue further on the thread for patch 1.
Jason Liu has asked about the details there.

> I could test patch 1 of this set to see if it accomplishes the same thing,
> but initially to me it seems that the issue has already been fixed, albeit
> perhaps not pushed yet?

I am now doubting that my fix will solve your problem like Peter
Wippich's patch did. I believe the problem I am having is specifically
related to my NAND controller's characteristics (how it handles ECC).

So for hardware on which Peter's fix solves your problems, I suppose I
would be interested mostly in seeing if my patch *breaks* your build.
FYI, I already see an issue for those who use both the builtin
`nand_write_page_raw()' and `nand_write_buf()' functions. It can be
fixed if you amend my patch with the following. I can resend later,
but test these for breakage if you can!

--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -1898,7 +1898,8 @@ out:
 static void nand_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
                                const uint8_t *buf)
 {
-       chip->write_buf(mtd, buf, mtd->writesize);
+       if (buf)
+               chip->write_buf(mtd, buf, mtd->writesize);
        chip->write_buf(mtd, chip->oob_poi, mtd->oobsize);
 }



More information about the linux-mtd mailing list