]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/powernv: Check image loaded or not before calling flash
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>
Fri, 13 Feb 2015 09:56:33 +0000 (15:26 +0530)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 25 Mar 2015 05:17:02 +0000 (16:17 +1100)
commit479e02e68e4a0f6f05d7333191b7d341fb06687e
tree32cfad5e4eed46dcc80dec057fd3d3416348baa9
parent4601be45deb0752285c6f0e5c646aa14d4d142f7
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: Sam Bobroff <sam.bobroff@au1.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/powernv/opal-flash.c