mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-24 07:20:37 +02:00
brcm47xx: do not read out cfe
Reading the CFE properties causes system hangs on some devices. With this patch nvram read will be successful very time so cfe will no be read out. This code is not really correct but it will work around some problems for some people. Related ticket: #7693 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22663 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
10f7c6b5f0
commit
1014b0e07d
@ -1,4 +1,4 @@
|
|||||||
From c5cb2459ff124c1a928e2056bc1fe2da7b6ab6ba Mon Sep 17 00:00:00 2001
|
From ff7295cc37b1e4b31aed9f071374f43aa128329b Mon Sep 17 00:00:00 2001
|
||||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||||
Date: Fri, 30 Jul 2010 17:45:20 +0200
|
Date: Fri, 30 Jul 2010 17:45:20 +0200
|
||||||
Subject: [PATCH 5/6] MIPS: BCM47xx: nvram_getenv fix return value.
|
Subject: [PATCH 5/6] MIPS: BCM47xx: nvram_getenv fix return value.
|
||||||
@ -10,7 +10,8 @@ Change nvram_getenv to do the same.
|
|||||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||||
---
|
---
|
||||||
arch/mips/bcm47xx/nvram.c | 4 ++--
|
arch/mips/bcm47xx/nvram.c | 4 ++--
|
||||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
arch/mips/include/asm/mach-bcm47xx/nvram.h | 3 +++
|
||||||
|
2 files changed, 5 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
--- a/arch/mips/bcm47xx/nvram.c
|
--- a/arch/mips/bcm47xx/nvram.c
|
||||||
+++ b/arch/mips/bcm47xx/nvram.c
|
+++ b/arch/mips/bcm47xx/nvram.c
|
||||||
@ -19,7 +20,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|||||||
|
|
||||||
if (!name)
|
if (!name)
|
||||||
- return 1;
|
- return 1;
|
||||||
+ return -8;
|
+ return NVRAM_ERR_INV_PARAM;
|
||||||
|
|
||||||
if (!nvram_buf[0])
|
if (!nvram_buf[0])
|
||||||
early_nvram_init();
|
early_nvram_init();
|
||||||
@ -28,6 +29,19 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
- return 1;
|
- return 1;
|
||||||
+ return -9;
|
+ return NVRAM_ERR_ENVNOTFOUND;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(nvram_getenv);
|
EXPORT_SYMBOL(nvram_getenv);
|
||||||
|
--- a/arch/mips/include/asm/mach-bcm47xx/nvram.h
|
||||||
|
+++ b/arch/mips/include/asm/mach-bcm47xx/nvram.h
|
||||||
|
@@ -31,6 +31,10 @@ struct nvram_header {
|
||||||
|
#define NVRAM_MAX_VALUE_LEN 255
|
||||||
|
#define NVRAM_MAX_PARAM_LEN 64
|
||||||
|
|
||||||
|
+// TODO: replace by old values. This chaueses that the system will not try to look into the cfe.
|
||||||
|
+#define NVRAM_ERR_INV_PARAM 1 // -8
|
||||||
|
+#define NVRAM_ERR_ENVNOTFOUND 1 // -9
|
||||||
|
+
|
||||||
|
extern int nvram_getenv(char *name, char *val, size_t val_len);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From c5cb2459ff124c1a928e2056bc1fe2da7b6ab6ba Mon Sep 17 00:00:00 2001
|
From ff7295cc37b1e4b31aed9f071374f43aa128329b Mon Sep 17 00:00:00 2001
|
||||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||||
Date: Fri, 30 Jul 2010 17:45:20 +0200
|
Date: Fri, 30 Jul 2010 17:45:20 +0200
|
||||||
Subject: [PATCH 5/6] MIPS: BCM47xx: nvram_getenv fix return value.
|
Subject: [PATCH 5/6] MIPS: BCM47xx: nvram_getenv fix return value.
|
||||||
@ -10,7 +10,8 @@ Change nvram_getenv to do the same.
|
|||||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||||
---
|
---
|
||||||
arch/mips/bcm47xx/nvram.c | 4 ++--
|
arch/mips/bcm47xx/nvram.c | 4 ++--
|
||||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
arch/mips/include/asm/mach-bcm47xx/nvram.h | 3 +++
|
||||||
|
2 files changed, 5 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
--- a/arch/mips/bcm47xx/nvram.c
|
--- a/arch/mips/bcm47xx/nvram.c
|
||||||
+++ b/arch/mips/bcm47xx/nvram.c
|
+++ b/arch/mips/bcm47xx/nvram.c
|
||||||
@ -19,7 +20,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|||||||
|
|
||||||
if (!name)
|
if (!name)
|
||||||
- return 1;
|
- return 1;
|
||||||
+ return -8;
|
+ return NVRAM_ERR_INV_PARAM;
|
||||||
|
|
||||||
if (!nvram_buf[0])
|
if (!nvram_buf[0])
|
||||||
early_nvram_init();
|
early_nvram_init();
|
||||||
@ -28,6 +29,19 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
- return 1;
|
- return 1;
|
||||||
+ return -9;
|
+ return NVRAM_ERR_ENVNOTFOUND;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(nvram_getenv);
|
EXPORT_SYMBOL(nvram_getenv);
|
||||||
|
--- a/arch/mips/include/asm/mach-bcm47xx/nvram.h
|
||||||
|
+++ b/arch/mips/include/asm/mach-bcm47xx/nvram.h
|
||||||
|
@@ -31,6 +31,10 @@ struct nvram_header {
|
||||||
|
#define NVRAM_MAX_VALUE_LEN 255
|
||||||
|
#define NVRAM_MAX_PARAM_LEN 64
|
||||||
|
|
||||||
|
+// TODO: replace by old values. This chaueses that the system will not try to look into the cfe.
|
||||||
|
+#define NVRAM_ERR_INV_PARAM 1 // -8
|
||||||
|
+#define NVRAM_ERR_ENVNOTFOUND 1 // -9
|
||||||
|
+
|
||||||
|
extern int nvram_getenv(char *name, char *val, size_t val_len);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user