From: Vasant Hegde Date: Thu, 5 Jun 2014 04:43:40 +0000 (+0530) Subject: powerpc/powernv: Pass buffer size to OPAL validate flash call X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8b8f7bf4c218628fd243d03fc85cdbc7039e9e35;p=linux-beck.git powerpc/powernv: Pass buffer size to OPAL validate flash call We pass actual buffer size to opal_validate_flash() OPAL API call and in return it contains output buffer size. Commit cc146d1d (Fix little endian issues) missed to set the size param before making OPAL call. So firmware image validation fails. This patch sets size variable before making OPAL call. Signed-off-by: Vasant Hegde Tested-by: Thomas Falcon Signed-off-by: Benjamin Herrenschmidt --- diff --git a/arch/powerpc/platforms/powernv/opal-flash.c b/arch/powerpc/platforms/powernv/opal-flash.c index 145a80bc5354..5c21d9c07f45 100644 --- a/arch/powerpc/platforms/powernv/opal-flash.c +++ b/arch/powerpc/platforms/powernv/opal-flash.c @@ -131,7 +131,8 @@ static inline void opal_flash_validate(void) { long ret; void *buf = validate_flash_data.buf; - __be32 size, result; + __be32 size = cpu_to_be32(validate_flash_data.buf_size); + __be32 result; ret = opal_validate_flash(__pa(buf), &size, &result);