[U-Boot] [PATCH 06/12][v3] drivers: fsl-mc: Return error for major version mismatch

Joe Hershberger joe.hershberger at gmail.com
Mon Jun 29 21:49:52 CEST 2015


Hi Prabhakar,

On Sat, Jun 27, 2015 at 11:38 PM, Prabhakar Kushwaha
<prabhakar at freescale.com> wrote:
> 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 at freescale.com>
> ---
> Changes for v2: Sending as it is for patchset
> Changes for v3: Incorporated Joe Hershberger's comments
>         - Use ENODEV instead of "1"
>
>  drivers/net/fsl-mc/mc.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
> index 2094595..3639df6 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;

This should be a negative value. "-ENODEV", as noted in my original comment.

> +               goto out;
> +       }
>
>         if (MC_VER_MINOR != mc_ver_info.minor)
>                 printf("fsl-mc: WARNING: Firmware minor version mismatch (found: %d, expected: %d)\n",
> --
> 1.9.1

Thanks,
-Joe


More information about the U-Boot mailing list