diff options
author | Jonas Gorski <jogo@openwrt.org> | 2013-03-19 13:08:27 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-03-19 19:15:40 +0100 |
commit | 97367519d7dac94de566796f034d5f72cbc671f7 (patch) | |
tree | 7b9620f642b242634928a7a6cf3ee048c5a3bffc /arch/mips/bcm63xx/nvram.c | |
parent | 63c2b6812f1dc0beda4d6adad0365e048aa693e2 (diff) |
MIPS: BCM63XX: Make nvram checksum failure non fatal
Some vendors modify the nvram layout moving the checksum to a different
place or dropping entirely, so reduce the checksum failure to a warning.
Reported-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: John Crispin <blogic@openwrt.org>
Cc: Maxime Bizon <mbizon@freebox.fr>
Cc: Florian Fainelli <florian@openwrt.org>
Cc: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/bcm63xx/nvram.c')
-rw-r--r-- | arch/mips/bcm63xx/nvram.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/mips/bcm63xx/nvram.c b/arch/mips/bcm63xx/nvram.c index 62061168083..a4b8864f930 100644 --- a/arch/mips/bcm63xx/nvram.c +++ b/arch/mips/bcm63xx/nvram.c @@ -38,7 +38,7 @@ struct bcm963xx_nvram { static struct bcm963xx_nvram nvram; static int mac_addr_used; -int __init bcm63xx_nvram_init(void *addr) +void __init bcm63xx_nvram_init(void *addr) { unsigned int check_len; u32 crc, expected_crc; @@ -60,9 +60,8 @@ int __init bcm63xx_nvram_init(void *addr) crc = crc32_le(~0, (u8 *)&nvram, check_len); if (crc != expected_crc) - return -EINVAL; - - return 0; + pr_warn("nvram checksum failed, contents may be invalid (expected %08x, got %08x)\n", + expected_crc, crc); } u8 *bcm63xx_nvram_get_name(void) |