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