瀏覽代碼

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 <hegdevasant@linux.vnet.ibm.com>
Tested-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Vasant Hegde 11 年之前
父節點
當前提交
8b8f7bf4c2
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      arch/powerpc/platforms/powernv/opal-flash.c

+ 2 - 1
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);