Skip to content

Commit

Permalink
FIXME: msm: ipa_uc: Don't panic on error type IPA_HW_ERROR_NONE
Browse files Browse the repository at this point in the history
CAF's explanation on the error code doesn't give any helpful hint on why this
kind of error even happens, hence escalating the debugging.

Issue tracker: KudProject/kernel_xiaomi_msm8953-4.9#1
Signed-off-by: Albert I <kras@raphielgang.org>
  • Loading branch information
krasCGQ authored and Nicklas373 committed May 5, 2020
1 parent c01b8c3 commit 5783c26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions drivers/platform/msm/ipa/ipa_v2/ipa_uc.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ static void ipa_uc_event_handler(enum ipa_irq_type interrupt,
IPAERR("IPA has encountered a ZIP engine error\n");
ipa_ctx->uc_ctx.uc_zip_error = true;
}
BUG();
BUG_ON(evt.params.errorType != IPA_HW_ERROR_NONE);
} else if (ipa_ctx->uc_ctx.uc_sram_mmio->eventOp ==
IPA_HW_2_CPU_EVENT_LOG_INFO) {
IPADBG("uC evt log info ofst=0x%x\n",
Expand Down Expand Up @@ -642,7 +642,7 @@ int ipa_uc_send_cmd(u32 cmd, u32 opcode, u32 expected_status,
uc_ctx.uc_error_type));
}
mutex_unlock(&ipa_ctx->uc_ctx.uc_lock);
BUG();
BUG_ON(ipa_ctx->uc_ctx.uc_error_type != IPA_HW_ERROR_NONE);
return -EFAULT;
}
} else {
Expand All @@ -655,7 +655,7 @@ int ipa_uc_send_cmd(u32 cmd, u32 opcode, u32 expected_status,
uc_ctx.uc_error_type));
}
mutex_unlock(&ipa_ctx->uc_ctx.uc_lock);
BUG();
BUG_ON(ipa_ctx->uc_ctx.uc_error_type != IPA_HW_ERROR_NONE);
return -EFAULT;
}
}
Expand Down
6 changes: 3 additions & 3 deletions drivers/platform/msm/ipa/ipa_v3/ipa_uc.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ static void ipa3_uc_event_handler(enum ipa_irq_type interrupt,
ipa3_ctx->uc_ctx.uc_error_type = evt.params.errorType;
ipa3_ctx->uc_ctx.uc_error_timestamp =
ipahal_read_reg(IPA_TAG_TIMER);
BUG();
BUG_ON(evt.params.errorType != IPA_HW_ERROR_NONE);
} else if (ipa3_ctx->uc_ctx.uc_sram_mmio->eventOp ==
IPA_HW_2_CPU_EVENT_LOG_INFO) {
IPADBG("uC evt log info ofst=0x%x\n",
Expand Down Expand Up @@ -547,7 +547,7 @@ static int ipa3_uc_send_cmd_64b_param(u32 cmd_lo, u32 cmd_hi, u32 opcode,
uc_ctx.uc_error_type));
}
IPA3_UC_UNLOCK(flags);
BUG();
BUG_ON(ipa3_ctx->uc_ctx.uc_error_type != IPA_HW_ERROR_NONE);
return -EFAULT;
}
} else {
Expand All @@ -560,7 +560,7 @@ static int ipa3_uc_send_cmd_64b_param(u32 cmd_lo, u32 cmd_hi, u32 opcode,
uc_ctx.uc_error_type));
}
IPA3_UC_UNLOCK(flags);
BUG();
BUG_ON(ipa3_ctx->uc_ctx.uc_error_type != IPA_HW_ERROR_NONE);
return -EFAULT;
}
}
Expand Down

0 comments on commit 5783c26

Please sign in to comment.