提交 3f77df7f 编写于 作者: V Vasant Hegde 提交者: Benjamin Herrenschmidt

powerpc/powernv: Check image loaded or not before calling flash

Present code checks for update_flash_data in opal_flash_term_callback().
update_flash_data has been statically initialized to zero, and that
is the value of FLASH_IMG_READY. Also code update initialization happens
during subsys init.

So if reboot is issued before the subsys init stage then we endup displaying
"Flashing new firmware" message.. which may confuse end user.

This patch fixes above described issue by initializes update_flash status
to invalid state.
Reported-by: NSam Bobroff <sam.bobroff@au1.ibm.com>
Signed-off-by: NVasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 a02c0af2
...@@ -120,7 +120,11 @@ static struct image_header_t image_header; ...@@ -120,7 +120,11 @@ static struct image_header_t image_header;
static struct image_data_t image_data; static struct image_data_t image_data;
static struct validate_flash_t validate_flash_data; static struct validate_flash_t validate_flash_data;
static struct manage_flash_t manage_flash_data; static struct manage_flash_t manage_flash_data;
static struct update_flash_t update_flash_data;
/* Initialize update_flash_data status to No Operation */
static struct update_flash_t update_flash_data = {
.status = FLASH_NO_OP,
};
static DEFINE_MUTEX(image_data_mutex); static DEFINE_MUTEX(image_data_mutex);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册