diff options
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0043-MTD-silence-ecc-errors-on-mtdblock0.patch')
-rw-r--r-- | extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0043-MTD-silence-ecc-errors-on-mtdblock0.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0043-MTD-silence-ecc-errors-on-mtdblock0.patch b/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0043-MTD-silence-ecc-errors-on-mtdblock0.patch new file mode 100644 index 00000000..b80e3d62 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0043-MTD-silence-ecc-errors-on-mtdblock0.patch | |||
@@ -0,0 +1,59 @@ | |||
1 | From 2379628bcd6c08e472020c78019ce8ea3fce3027 Mon Sep 17 00:00:00 2001 | ||
2 | From: Steve Sakoman <steve@sakoman.com> | ||
3 | Date: Mon, 26 Apr 2010 11:17:26 -0700 | ||
4 | Subject: [PATCH 43/45] MTD: silence ecc errors on mtdblock0 | ||
5 | |||
6 | mtdblock0 is the x-load partition, which uses hw ecc | ||
7 | this confuses linux, which uses sw ecc | ||
8 | this patch silences ecc error messages when linux peeks into mtdblock0 | ||
9 | * not for upstream submission * | ||
10 | --- | ||
11 | block/blk-core.c | 3 ++- | ||
12 | drivers/mtd/nand/nand_ecc.c | 2 +- | ||
13 | fs/buffer.c | 3 ++- | ||
14 | 3 files changed, 5 insertions(+), 3 deletions(-) | ||
15 | |||
16 | diff --git a/block/blk-core.c b/block/blk-core.c | ||
17 | index 718897e..c526fde 100644 | ||
18 | --- a/block/blk-core.c | ||
19 | +++ b/block/blk-core.c | ||
20 | @@ -1970,7 +1970,8 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes) | ||
21 | req->errors = 0; | ||
22 | |||
23 | if (error && (blk_fs_request(req) && !(req->cmd_flags & REQ_QUIET))) { | ||
24 | - printk(KERN_ERR "end_request: I/O error, dev %s, sector %llu\n", | ||
25 | + if (req->rq_disk && (strcmp(req->rq_disk->disk_name, "mtdblock0") != 0)) | ||
26 | + printk(KERN_ERR "end_request: I/O error, dev %s, sector %llu\n", | ||
27 | req->rq_disk ? req->rq_disk->disk_name : "?", | ||
28 | (unsigned long long)blk_rq_pos(req)); | ||
29 | } | ||
30 | diff --git a/drivers/mtd/nand/nand_ecc.c b/drivers/mtd/nand/nand_ecc.c | ||
31 | index 92320a6..2b86b6d 100644 | ||
32 | --- a/drivers/mtd/nand/nand_ecc.c | ||
33 | +++ b/drivers/mtd/nand/nand_ecc.c | ||
34 | @@ -492,7 +492,7 @@ int __nand_correct_data(unsigned char *buf, | ||
35 | if ((bitsperbyte[b0] + bitsperbyte[b1] + bitsperbyte[b2]) == 1) | ||
36 | return 1; /* error in ecc data; no action needed */ | ||
37 | |||
38 | - printk(KERN_ERR "uncorrectable error : "); | ||
39 | +// printk(KERN_ERR "uncorrectable error : "); | ||
40 | return -1; | ||
41 | } | ||
42 | EXPORT_SYMBOL(__nand_correct_data); | ||
43 | diff --git a/fs/buffer.c b/fs/buffer.c | ||
44 | index 6fa5302..27b3103 100644 | ||
45 | --- a/fs/buffer.c | ||
46 | +++ b/fs/buffer.c | ||
47 | @@ -114,7 +114,8 @@ static int quiet_error(struct buffer_head *bh) | ||
48 | static void buffer_io_error(struct buffer_head *bh) | ||
49 | { | ||
50 | char b[BDEVNAME_SIZE]; | ||
51 | - printk(KERN_ERR "Buffer I/O error on device %s, logical block %Lu\n", | ||
52 | + if (strcmp(bdevname(bh->b_bdev, b), "mtdblock0") != 0) | ||
53 | + printk(KERN_ERR "Buffer I/O error on device %s, logical block %Lu\n", | ||
54 | bdevname(bh->b_bdev, b), | ||
55 | (unsigned long long)bh->b_blocknr); | ||
56 | } | ||
57 | -- | ||
58 | 1.6.6.1 | ||
59 | |||