From: Prabhakar Kushwaha Date: Thu, 2 Jul 2015 05:59:01 +0000 (+0530) Subject: drivers: fsl-mc: Return error for major version mismatch X-Git-Tag: v2015.10-rc1~183^2~24 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2b7c4a19835dab608bbd8662a60b03aa0f37a423;p=u-boot 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 Acked-by: Joe Hershberger Reviewed-by: York Sun --- 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;