summaryrefslogtreecommitdiff
path: root/target/linux/brcm63xx
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-05-18 17:32:05 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-05-18 17:32:05 +0000
commitab2b78aabd7d8ef87a7d1fa10bad7faf82b76bfe (patch)
tree66cf2be8d5ac4ad37f9e1f80f6a812f725a516d0 /target/linux/brcm63xx
parentbe49888f6cfe328fe2b0ea3f0be80907cf56612e (diff)
downloadmtk-20170518-ab2b78aabd7d8ef87a7d1fa10bad7faf82b76bfe.zip
mtk-20170518-ab2b78aabd7d8ef87a7d1fa10bad7faf82b76bfe.tar.gz
mtk-20170518-ab2b78aabd7d8ef87a7d1fa10bad7faf82b76bfe.tar.bz2
bcm963xx: fix cfe detection
The CFE detection failed to account for zero termination. Signed-off-by: Axel Gembe <ago@bastart.eu.org> SVN-Revision: 11182
Diffstat (limited to 'target/linux/brcm63xx')
-rw-r--r--target/linux/brcm63xx/patches-2.6.25/110-bcm963xx_fix_cfe_detection.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-2.6.25/110-bcm963xx_fix_cfe_detection.patch b/target/linux/brcm63xx/patches-2.6.25/110-bcm963xx_fix_cfe_detection.patch
new file mode 100644
index 0000000..dcc92ee
--- /dev/null
+++ b/target/linux/brcm63xx/patches-2.6.25/110-bcm963xx_fix_cfe_detection.patch
@@ -0,0 +1,46 @@
+From f1a605c36cf1659f5f486ae4135de1e285fdf86c Mon Sep 17 00:00:00 2001
+From: Axel Gembe <ago@bastart.eu.org>
+Date: Sat, 17 May 2008 16:17:22 +0200
+Subject: [PATCH] bcm963xx: fix cfe detection
+
+The CFE detection failed to account for zero termination.
+
+Signed-off-by: Axel Gembe <ago@bastart.eu.org>
+---
+ drivers/mtd/maps/bcm963xx-flash.c | 11 ++++++-----
+ 1 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/mtd/maps/bcm963xx-flash.c b/drivers/mtd/maps/bcm963xx-flash.c
+index c4c4526..4da672b 100644
+--- a/drivers/mtd/maps/bcm963xx-flash.c
++++ b/drivers/mtd/maps/bcm963xx-flash.c
+@@ -1,8 +1,7 @@
+ /*
+- * $Id$
+ * Copyright (C) 2006 Florian Fainelli <florian@openwrt.org>
+- * Mike Albon <malbon@openwrt.org>
+- * Copyright (C) $Date$ $Author$
++ * Mike Albon <malbon@openwrt.org>
++ * Copyright (C) 2008 Axel Gembe <ago@bastart.eu.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+@@ -184,11 +183,13 @@ static int bcm963xx_parts_size = sizeof(bcm963xx_parts) / sizeof(bcm963xx_parts[
+ static int bcm963xx_detect_cfe(struct mtd_info *master)
+ {
+ int idoffset = 0x4e0;
+- static char idstring[8] = "CFE1CFE1";
+- char buf[8];
++ static char idstring[9] = "CFE1CFE1";
++ char buf[9];
+ int ret;
+ size_t retlen;
+
++ memset(buf, 0, sizeof(buf));
++
+ ret = master->read(master, idoffset, 8, &retlen, (void *)buf);
+ printk("bcm963xx: Read Signature value of %s\n", buf);
+ return strcmp(idstring,buf);
+--
+1.5.5.1
+