aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAnshuman Khandual <khandual@linux.vnet.ibm.com>2015-03-08 16:18:23 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-03-20 02:37:15 +1100
commitdad26e2864364b40fd1e9eed8cf58e9aaad3deb7 (patch)
treec05bed7acb6e4b4870dd71edbcd95bfaa1c8c63b /hw
parent47fde67de057498637875963d99d7eee63cfb84f (diff)
downloadskiboot-dad26e2864364b40fd1e9eed8cf58e9aaad3deb7.zip
skiboot-dad26e2864364b40fd1e9eed8cf58e9aaad3deb7.tar.gz
skiboot-dad26e2864364b40fd1e9eed8cf58e9aaad3deb7.tar.bz2
FSP/LEDS: Roll back LED state update in case FSP command queuing fails
The LED local state gets updated before queuing the FSP command. If the command returns in error state, the state gets rolled back in the function callback. But in case where the FSP command queue it self fails, it does not get rolled back. This patch fixes this scenario by rolling back the state change in case the FSP command queuing itself fails. Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/fsp/fsp-leds.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/fsp/fsp-leds.c b/hw/fsp/fsp-leds.c
index df2f945..327adb2 100644
--- a/hw/fsp/fsp-leds.c
+++ b/hw/fsp/fsp-leds.c
@@ -423,6 +423,8 @@ static int fsp_msg_set_led_state(struct led_set_cmd *spcn_cmd)
if (rc != OPAL_SUCCESS) {
fsp_freemsg(msg);
free(spcn_cmd);
+ /* Revert LED state update */
+ update_led_list(spcn_cmd->loc_code, spcn_cmd->ckpt_status);
}
unlock(&led_lock);