Revert "OneNAND: Don't write if it exceeds the partition"
authorKyungmin Park <kyungmin.park@samsung.com>
Tue, 2 Feb 2010 04:52:59 +0000 (13:52 +0900)
committerKyungmin Park <kyungmin.park@samsung.com>
Tue, 2 Feb 2010 04:52:59 +0000 (13:52 +0900)
This reverts commit 2ce10476e35556875d8227c0cf753b7b1726ea4b.

common/cmd_onenand.c

index bf76610..8b0741a 100644 (file)
@@ -86,6 +86,7 @@ static int onenand_block_read(loff_t from, ssize_t len,
                        printk("Bad blocks %d at 0x%x\n",
                               (u32)(ofs >> this->erase_shift), (u32)ofs);
                        ofs += blocksize;
+                       /* FIXME need to check how to handle the 'len' */
                        len -= blocksize;
                        continue;
                }
@@ -145,7 +146,6 @@ static int onenand_block_write(loff_t to, ssize_t len,
                        printk("Bad blocks %d at 0x%x\n",
                               (u32)(ofs >> this->erase_shift), (u32)ofs);
                        skip_ofs += blocksize;
-                       len -= blocksize;
                        goto next;
                }