aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2015-02-05 14:10:07 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-02-13 16:50:06 +1100
commite9097178e2a66e27fe325a6a9d6c9e3ced5c8432 (patch)
tree159beb170bee9c8fc72ae1d93a8365b21df4ce71
parent225503568b1097097608ba9a0b2b8333d63133da (diff)
downloadskiboot-e9097178e2a66e27fe325a6a9d6c9e3ced5c8432.zip
skiboot-e9097178e2a66e27fe325a6a9d6c9e3ced5c8432.tar.gz
skiboot-e9097178e2a66e27fe325a6a9d6c9e3ced5c8432.tar.bz2
FSP/LEDS: Check FSP response status
Presently we check only selected status from SPCN passthrough command. So if MBOX command fails for any other reason then we endup considering that as success...which is not correct. This patch considers all response status except success as fail. Also removes unnecessary variable (fail). Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--hw/fsp/fsp-leds.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/hw/fsp/fsp-leds.c b/hw/fsp/fsp-leds.c
index ca39d2f..f2fb501 100644
--- a/hw/fsp/fsp-leds.c
+++ b/hw/fsp/fsp-leds.c
@@ -234,7 +234,6 @@ enclosure:
static void fsp_spcn_set_led_completion(struct fsp_msg *msg)
{
- bool fail;
u16 ckpt_status;
char loc_code[LOC_CODE_SIZE + 1];
struct fsp_msg *resp = msg->resp;
@@ -245,13 +244,11 @@ static void fsp_spcn_set_led_completion(struct fsp_msg *msg)
/*
* LED state update request came as part of FSP async message
* FSP_CMD_SET_LED_STATE, hence need to send response message.
+ *
+ * Also if SPCN command failed, then identify the command and
+ * roll back changes.
*/
- fail = (status == FSP_STATUS_INVALID_DATA) ||
- (status == FSP_STATUS_DMA_ERROR) ||
- (status == FSP_STATUS_SPCN_ERROR);
-
- /* SPCN command failed: Identify the command and roll back changes */
- if (fail) {
+ if (status != FSP_STATUS_SUCCESS) {
log_simple_error(&e_info(OPAL_RC_LED_SPCN),
PREFIX "Last SPCN command failed, status=%02x\n",
status);