From: Wen Xie Date: Tue, 12 Feb 2019 08:44:27 +0000 (+0800) Subject: chub: Report chub issue to dropbox X-Git-Tag: MMI-RSA31.Q1-48-36-11~224 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d4dcf3d5ccef2ba05522d7492ac4ceddfa917794;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git chub: Report chub issue to dropbox Report chub issue to dropbox, please note that when bug2go receive it, dump files may not exist for dumpping action is executed by sensors hal. Change-Id: I3597eb51ba1b86789a2e4da2c17d34115032859c Signed-off-by: Wen Xie Reviewed-on: https://gerrit.mot.com/1307564 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Yuchang Guo Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- diff --git a/drivers/staging/nanohub/chub_dbg.c b/drivers/staging/nanohub/chub_dbg.c index 563868958aa1..8be4f10ed3c4 100644 --- a/drivers/staging/nanohub/chub_dbg.c +++ b/drivers/staging/nanohub/chub_dbg.c @@ -20,6 +20,7 @@ #ifdef CONFIG_CHRE_SENSORHUB_HAL #include "main.h" #endif +#include "linux/dropbox.h" #define NUM_OF_GPR (17) #define GPR_PC_INDEX (16) @@ -155,6 +156,14 @@ static void chub_dbg_dump_status(struct contexthub_ipc_info *ipc) log_flush(ipc->fw_log); } +static void dropbox_report_event(struct contexthub_ipc_info *ipc, enum chub_err_type err) +{ + char dropbox_msg[256]; + + dev_info(ipc->dev, "%s: reporting dropbox\n", __func__); + snprintf(dropbox_msg, sizeof(dropbox_msg), "reason: %d", err); + dropbox_queue_event_text("chub_issue", dropbox_msg, strlen(dropbox_msg)); +} void chub_dbg_dump_hw(struct contexthub_ipc_info *ipc, enum chub_err_type reason) { @@ -167,6 +176,8 @@ void chub_dbg_dump_hw(struct contexthub_ipc_info *ipc, enum chub_err_type reason nanohub_add_dump_request(ipc->data); #endif + dropbox_report_event(ipc, reason); + #ifdef SUPPORT_DUMP_ON_DRIVER /* dosen't support on android-p */ if (p_dbg_dump) {