summaryrefslogtreecommitdiffstats
path: root/drivers/net/fsl-mc
diff options
context:
space:
mode:
authorPrabhakar Kushwaha <prabhakar@freescale.com>2015-07-02 11:29:01 +0530
committerYork Sun <yorksun@freescale.com>2015-07-20 11:44:37 -0700
commit2b7c4a19835dab608bbd8662a60b03aa0f37a423 (patch)
treed279852e00db1cac4e76473fdb98fa5935cf003d /drivers/net/fsl-mc
parentcd8aefc076ebac3e01499a55fd0830144e854985 (diff)
downloadtalos-obmc-uboot-2b7c4a19835dab608bbd8662a60b03aa0f37a423.tar.gz
talos-obmc-uboot-2b7c4a19835dab608bbd8662a60b03aa0f37a423.zip
drivers: fsl-mc: Return error for major version mismatch
Management complex major version should match to the firmware present in flash. Return error during mismatch of major version. Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'drivers/net/fsl-mc')
-rw-r--r--drivers/net/fsl-mc/mc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index 20945951bb..b2babfbdc7 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -518,9 +518,14 @@ int mc_init(void)
goto out;
}
- if (MC_VER_MAJOR != mc_ver_info.major)
+ if (MC_VER_MAJOR != mc_ver_info.major) {
printf("fsl-mc: ERROR: Firmware major version mismatch (found: %d, expected: %d)\n",
mc_ver_info.major, MC_VER_MAJOR);
+ printf("fsl-mc: Update the Management Complex firmware\n");
+
+ error = -ENODEV;
+ goto out;
+ }
if (MC_VER_MINOR != mc_ver_info.minor)
printf("fsl-mc: WARNING: Firmware minor version mismatch (found: %d, expected: %d)\n",
@@ -541,7 +546,7 @@ int mc_init(void)
out:
if (error != 0)
- mc_boot_status = -error;
+ mc_boot_status = error;
else
mc_boot_status = 0;
OpenPOWER on IntegriCloud